summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2008-07-22 20:39:42 +0000
committerKeith Seitz <keiths@redhat.com>2008-07-22 20:39:42 +0000
commit24af8de1062fda6b0c35651e8b0b9860e3f2ddbd (patch)
tree46ea83d88a2ce5f019f728543106bec210325004
parent5601295b75f82401817b35387a9843a18a9ae357 (diff)
downloadgdb-24af8de1062fda6b0c35651e8b0b9860e3f2ddbd.tar.gz
imported Itcl 3.3ITCL_3_3
-rw-r--r--itcl/itcl/CHANGES2041
-rw-r--r--itcl/itcl/ChangeLog1902
-rw-r--r--itcl/itcl/INCOMPATIBLE102
-rw-r--r--itcl/itcl/Makefile.in538
-rw-r--r--itcl/itcl/README311
-rw-r--r--itcl/itcl/TODO89
-rw-r--r--itcl/itcl/aclocal.m42
-rwxr-xr-xitcl/itcl/configure10955
-rw-r--r--itcl/itcl/configure.in375
-rw-r--r--itcl/itcl/doc/RegisterC.3124
-rw-r--r--itcl/itcl/doc/Stack.360
-rw-r--r--itcl/itcl/doc/body.n12
-rw-r--r--itcl/itcl/doc/class.n10
-rw-r--r--itcl/itcl/doc/code.n2
-rw-r--r--itcl/itcl/doc/configbody.n14
-rw-r--r--itcl/itcl/doc/delete.n4
-rw-r--r--itcl/itcl/doc/ensemble.n6
-rw-r--r--itcl/itcl/doc/find.n6
-rw-r--r--itcl/itcl/doc/is.n66
-rw-r--r--itcl/itcl/doc/local.n6
-rw-r--r--itcl/itcl/doc/scope.n2
-rw-r--r--itcl/itcl/generic/itcl.decls9
-rw-r--r--itcl/itcl/generic/itcl.h102
-rw-r--r--itcl/itcl/generic/itclDecls.h157
-rw-r--r--itcl/itcl/generic/itclInt.decls99
-rw-r--r--itcl/itcl/generic/itclInt.h78
-rw-r--r--itcl/itcl/generic/itclIntDecls.h747
-rw-r--r--itcl/itcl/generic/itclStubInit.c6
-rw-r--r--itcl/itcl/generic/itclStubLib.c11
-rw-r--r--itcl/itcl/generic/itcl_bicmds.c41
-rw-r--r--itcl/itcl/generic/itcl_class.c64
-rw-r--r--itcl/itcl/generic/itcl_cmds.c338
-rw-r--r--itcl/itcl/generic/itcl_ensemble.c124
-rw-r--r--itcl/itcl/generic/itcl_linkage.c6
-rw-r--r--itcl/itcl/generic/itcl_methods.c115
-rw-r--r--itcl/itcl/generic/itcl_migrate.c2
-rw-r--r--itcl/itcl/generic/itcl_objects.c45
-rw-r--r--itcl/itcl/generic/itcl_parse.c14
-rw-r--r--itcl/itcl/generic/itcl_util.c101
-rw-r--r--itcl/itcl/itclConfig.sh.in37
-rw-r--r--itcl/itcl/library/itcl.tcl22
-rw-r--r--itcl/itcl/pkgIndex.tcl.in2
-rwxr-xr-xitcl/itcl/tclconfig/install-sh119
-rw-r--r--itcl/itcl/tclconfig/tcl.m43827
-rw-r--r--itcl/itcl/tests/all.tcl113
-rw-r--r--itcl/itcl/tests/basic.test47
-rw-r--r--itcl/itcl/tests/body.test10
-rw-r--r--itcl/itcl/tests/chain.test10
-rw-r--r--itcl/itcl/tests/delete.test10
-rw-r--r--itcl/itcl/tests/ensemble.test19
-rw-r--r--itcl/itcl/tests/import.test28
-rw-r--r--itcl/itcl/tests/info.test10
-rw-r--r--itcl/itcl/tests/inherit.test10
-rw-r--r--itcl/itcl/tests/interp.test10
-rw-r--r--itcl/itcl/tests/local.test10
-rw-r--r--itcl/itcl/tests/methods.test10
-rw-r--r--itcl/itcl/tests/mkindex.itcl6
-rw-r--r--itcl/itcl/tests/mkindex.test20
-rw-r--r--itcl/itcl/tests/namespace.test10
-rw-r--r--itcl/itcl/tests/protection.test10
-rw-r--r--itcl/itcl/tests/scope.test10
-rw-r--r--itcl/itcl/tests/tclIndex1
-rw-r--r--itcl/itcl/win/makefile.bc425
-rw-r--r--itcl/itcl/win/makefile.vc716
-rw-r--r--itcl/itcl/win/nmakehlp.c359
-rw-r--r--itcl/itcl/win/rc/itcl.rc116
-rw-r--r--itcl/itcl/win/toaster.bmpbin0 -> 3126 bytes
-rw-r--r--itcl/itk/CHANGES2041
-rw-r--r--itcl/itk/ChangeLog1902
-rw-r--r--itcl/itk/INCOMPATIBLE102
-rw-r--r--itcl/itk/Makefile.in523
-rw-r--r--itcl/itk/README311
-rw-r--r--itcl/itk/TODO89
-rw-r--r--itcl/itk/aclocal.m42
-rwxr-xr-xitcl/itk/configure11950
-rw-r--r--itcl/itk/configure.in370
-rw-r--r--itcl/itk/doc/Archetype.n12
-rw-r--r--itcl/itk/doc/Toplevel.n4
-rw-r--r--itcl/itk/doc/Widget.n8
-rw-r--r--itcl/itk/doc/usual.n2
-rw-r--r--itcl/itk/generic/itk.decls4
-rw-r--r--itcl/itk/generic/itk.h45
-rw-r--r--itcl/itk/generic/itkDecls.h101
-rw-r--r--itcl/itk/generic/itkStubLib.c4
-rw-r--r--itcl/itk/generic/itk_archetype.c115
-rw-r--r--itcl/itk/generic/itk_cmds.c42
-rw-r--r--itcl/itk/generic/itk_option.c8
-rw-r--r--itcl/itk/itkConfig.sh.in2
-rw-r--r--itcl/itk/library/Toplevel.itk11
-rw-r--r--itcl/itk/library/Widget.itk11
-rw-r--r--itcl/itk/library/itk.tcl1
-rw-r--r--itcl/itk/pkgIndex.tcl.in2
-rwxr-xr-xitcl/itk/tclconfig/install-sh119
-rw-r--r--itcl/itk/tclconfig/tcl.m43827
-rw-r--r--itcl/itk/tests/all.tcl113
-rw-r--r--itcl/itk/tests/interp.test3
-rw-r--r--itcl/itk/tests/option.test3
-rw-r--r--itcl/itk/tests/privacy.test3
-rw-r--r--itcl/itk/tests/public.test3
-rw-r--r--itcl/itk/tests/toplevel.test120
-rw-r--r--itcl/itk/tests/widget.test125
-rw-r--r--itcl/itk/win/makefile.bc455
-rw-r--r--itcl/itk/win/makefile.vc749
-rw-r--r--itcl/itk/win/nmakehlp.c359
-rw-r--r--itcl/itk/win/rc/itk.rc122
-rw-r--r--itcl/itk/win/toaster.bmpbin0 -> 3126 bytes
-rw-r--r--itcl/iwidgets/Makefile.in16
-rwxr-xr-xitcl/iwidgets/configure233
-rw-r--r--itcl/iwidgets/configure.in66
109 files changed, 42305 insertions, 6326 deletions
diff --git a/itcl/itcl/CHANGES b/itcl/itcl/CHANGES
new file mode 100644
index 00000000000..b0cbdafe85d
--- /dev/null
+++ b/itcl/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/itcl/ChangeLog b/itcl/itcl/ChangeLog
new file mode 100644
index 00000000000..777cced389c
--- /dev/null
+++ b/itcl/itcl/ChangeLog
@@ -0,0 +1,1902 @@
+2005-03-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * Makefile.in: OS X patches from Steffen
+ * itcl/generic/itcl_cmds.c (initScript):
+ * itk/generic/itk_cmds.c (initScript):
+
+2005-03-18 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/Makefile.in, itk/Makefile.in (AR): use @AR@
+ * tclconfig/tcl.m4, itcl/configure, itk/configure: update to TEA 3.2
+
+2005-02-14 Jean-Claude Wippler <jcw@equi4.com>
+
+ * configure.in, tclconfig/tcl.m4: update to TEA 3.2
+ * configure, itcl/configure, itk/configure: regen with autoconf 2.59
+
+2005-02-11 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/generic/itcl_methods.c (Itcl_GetMemberCode): fixed c99 var
+ decl from previous patch.
+
+2005-02-10 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/generic/itclInt.h: [Bug 1115085] (dejong) Fix crash
+ * itcl/generic/itcl_bicmds.c: with TclInitCompiledLocals reliance
+ * itcl/generic/itcl_methods.c: on bytecode ptr type
+
+2005-01-24 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/configure, itk/configure: update to TEA 3.1 r1.54, removes
+ * configure, tclconfig/tcl.m4: DBGX, updates default opt levels
+
+2004-12-11 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itc_class.c: instansiation of an object must return
+ an FQN.
+
+2004-11-23 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl_cmds.c: Fix for [Bug 1047544] Forward loading
+ * itcl/generic/itcl_util.c: from an 8.4 build loading into in 8.5
+ is not possible at this time.
+
+2004-11-11 David Gravereaux <davygrvy@pobox.com>
+
+ * itk/Makefile.in: Possible fix for 1049579, but untested.
+
+2004-09-21 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl_utils.c: Error code internal flag abuse
+ fixed. From Don Porter. [Bug 1032210]
+
+ * makefile.vc: Some VC7 support.
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc: Had to include the win directory to Tcl's
+ includes since Tcl has had an order change recently.
+
+2004-09-19 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/doc/*.n: Tree name for commands changed from "[Incr Tcl]"
+ to "[Incr Tcl] Commands". Started to add exported API docs under
+ the new "[Incr Tcl] Library Procedures" tree.
+
+ * itcl/doc/RegisterC.3 (new): docs for Itcl_RegisterC and
+ Itcl_RegisterObjC. More to be added over time.
+
+2004-09-07 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/configure, itk/configure, tclconfig/tcl.m4: updated TEA m4
+ to support evc4 Win/CE builds
+
+2004-08-31 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/doc/body.n
+ * itcl/doc/class.n:
+ * itcl/doc/configbody.n::
+ * itcl/doc/delete.n:
+ * itcl/doc/ensemble.n:
+ * itcl/doc/find.n:
+ * itcl/doc/is.n:
+ * itcl/doc/local.n: Updated code examples to use the fully
+ qualified Itcl command names. A few references to the itcl
+ namespace command are still there and need to be changed at
+ some point.
+
+ * itk/doc/Archetype.n:
+ * itk/doc/Toplevel.n:
+ * itk/doc/usual.n:
+ * itk/doc/Widget.n: Ditto as above.
+
+2004-08-17 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * */Makefile.in (install-doc): sed in man.macros on doc install
+ [Bug 631378] (rmax)
+
+ * */Makefile.in (VPATH): move $(srcdir)/unix to front (unused) to
+ get around bug in autoconf that strips $(srcdir) from first
+ element when building in the source directory.
+
+ * itk/configure: remove extraneous --with-itcl AC macro
+ * itk/configure.in: TEA_PATH_CONFIG handles this for us
+
+ * itcl/itclConfig.sh.in: must be absolute path to
+ * itcl/configure.in (itcl_SRC_DIR): configure in the srcdir.
+ * itcl/configure: [Bug 582951]
+
+2004-08-10 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * README, TODO: version, info updates
+
+ * Makefile.in, configure, configure.in: Update to TEA 3.1
+ * tcl.m4 (removed): cleanup build system to only
+ * config/config.guess (removed): provide the parts that are
+ * config/config.sub (removed): necessary to itcl and itk.
+ * config/install-sh (removed): Update to 3.3.0 as version
+ * tclconfig/install-sh (added): throughout.
+ * tclconfig/tcl.m4 (added):
+ * itcl/generic/itcl.h:
+ * itcl/Makefile.in, itcl/aclocal.m4, itcl/configure:
+ * itcl/configure.in, itcl/itclConfig.sh.in, itcl/pkgIndex.tcl.in:
+ * itk/Makefile.in, itk/aclocal.m4, itk/configure, itk/configure.in:
+ * itk/itkConfig.sh.in, itk/pkgIndex.tcl.in, itk/generic/itk.h:
+
+ * itcl/mac/MW_ItclHeader.pch (removed) Removed Mac Classic
+ * itcl/mac/itclMacApplication.r (removed) sources. There were
+ * itcl/mac/itclMacLibrary.r (removed) no longer maintained,
+ * itcl/mac/itclMacResource.r (removed) and Tcl has dropped
+ * itcl/mac/itclMacTclCode.r (removed) ongoing Mac Classic
+ * itcl/mac/itclStaticApplication.r (removed) support as well (in
+ * itcl/mac/pkgIndex.tcl (removed) favor of OS X).
+ * itk/mac/MW_ItkHeader.pch (removed)
+ * itk/mac/itkMacApplication.r (removed)
+ * itk/mac/itkMacLibrary.r (removed)
+ * itk/mac/itkMacResource.r (removed)
+ * itk/mac/itkMacTclCode.r (removed)
+ * itk/mac/itkStaticApplication.r (removed)
+ * itk/mac/pkgIndex.tcl (removed)
+ * itk/mac/tclIndex (removed)
+
+2004-04-29 davygrvy
+
+ * itcl/tests/import.test: fixed [subst] problem.
+
+ * itcl/win/makefile.vc:
+ * itcl/win/nmakehlp.c:
+ * itk/win/makefile.vc:
+ * itk/win/nmakehlp.c:
+ * rules.vc: brain dump
+
+ * itcl/Makefile.in: test target now calling tcltest correctly
+
+2004-02-13 davygrvy
+ * itcl/tests/all:
+ * itcl/tests/defs (deleted): This serves no purpose today with
+ tcltest being so powerful.
+
+ * itcl/tests/import.test: more load precision with
+ ::tcltest::loadTestedCommands in sub interps.
+
+ * itcl/tests/mkindex.itcl:
+ * itcl/tests/mkindex.test:
+ * itcl/tests/tclIndex: reference to itcl_class removed from
+ mkindex.test so 1.3 can now pass.
+
+2004-02-12 davygrvy
+ * itcl/win/makefile.vc:
+ * itcl/win/rc/itcl.rc: rc file work
+
+ * itcl/tests/all.tcl:
+ * itcl/tests/import.test:
+ * itcl/tests/mkindex.test: some cleanup.
+
+ * itcl/generic/itclInt.h: commentary
+
+ * itcl/win/makefile.vc: now runs the test suite, OMG!
+
+ * itcl/tests/all.tcl:
+ * itcl/tests/basic.test:
+ * itcl/tests/body.test:
+ * itcl/tests/chain.test:
+ * itcl/tests/delete.test:
+ * itcl/tests/ensemble.test:
+ * itcl/tests/import.test:
+ * itcl/tests/info.test:
+ * itcl/tests/inherit.test:
+ * itcl/tests/interp.test:
+ * itcl/tests/local.test:
+ * itcl/tests/methods.test:
+ * itcl/tests/mkindex.test:
+ * itcl/tests/namespace.test:
+ * itcl/tests/protection.test:
+ * itcl/tests/scope.test: Modified test suite to use -loadfile and
+ ::tcltest:: loadTestedCommands in each test file.
+
+2003-12-24 davygrvy
+ * itcl/generic/itcl.h:
+ * itcl/generic/itcl_ensemble.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_migrate.c:
+ * itcl/generic/itcl_util.c:
+ * itcl/win/makefile.vc: Changed deprecated 'panic' to 'Tcl_Panic'.
+
+ * itcl/generic/itclStubLib.c:
+ * itk/generic/itkStubLib.c:
+ * itk/win/makefile.vc: Small 'const' issue with Tcl_PkgRequireEx
+ under 8.1.0
+
+2003-12-23 davygrvy
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc:
+ 8.0 build needs a different output name for the binaries.
+
+ * itcl/win/nmakehlp.c:
+ * itk/win/nmakehlp.c:
+ * rules.vc: sync'd to Tcl.
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclStubLib.c:
+ * itk/generic/itk.h:
+ * itk/generic/itkStubLib.c: Some It*_InitStubs adjustments for CONST.
+
+ * itcl/win/makefile.vc: temp help merge script should be deleted
+ after use.
+
+ * tools/genStubs.tcl: we need this.
+
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc: install target bugs fixed
+
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc:
+ * pkg.vc: Uses new features of nmakehlp to get the version strings
+ from header files without the use of hardcoded values.
+
+ * itk/generic/itk_archetype.c:
+ * itk/generic/itk_cmds.c:
+ * itk/win/makefile.vc: changes to support building against 8.0.5
+
+ * itcl/doc/itclsh.1:
+ * itcl/mac/tclMacAppInit.c:
+ * itk/doc/itkwish.1:
+ * itk/mac/tkMacAppInit.c: custom shell no longer exists
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/win/makefile.vc:
+ * itcl/win/rc/itcl.rc:
+ * itk/generic/itk.h:
+ * itk/generic/itkDecls.h:
+ * itk/win/makefile.vc:
+ * makefile.vc: winhelp targets fixed and Stubs table issues resolved.
+
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc: some pkgIndex.tcl generation work.
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclInt.h:
+ * itcl/generic/itcl_bicmds.c:
+ * itcl/generic/itcl_cmds.c:
+ * itcl/generic/itcl_ensemble.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_objects.c:
+ * itcl/generic/itcl_util.c:
+ * itcl/win/makefile.vc:
+ * itk/generic/itk_cmds.c:
+ * itk/win/makefile.vc: Now builds against Tcl 8.0! Unbeleivable,
+ but true :) Tcl bug #803489 now suppressed with grotesque macros
+ in itclInt.h
+
+ * itcl/win/makefile.vc:
+ * itcl/win/rc/itcl.rc:
+ * itk/win/rc/itk.rc:
+ * itk/win/rc/itk.rc: some resource bugs fixed
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclInt.h: moved some backward compat macros to
+ itclInt.h
+
+ * itcl/win/nmakehlp.c:
+ * itk/win/nmakehlp.c: prevent static buffer overflow (Doh!)
+
+ * itcl/generic/itclInt.h:
+ * itcl/generic/itcl_cmds.c:
+ changes to support Itk building against 8.0.5
+
+2003-12-22 davygrvy
+ * itcl/generic/itcl.h:
+ * itcl/generic/itcl_class.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_objects.c:
+ * itcl/generic/itcl_util.c:
+ * itk/generic/itk_archetype.c:
+ Now builds with 8.3 regarding CONST84 trims on some Tcl API calls.
+
+ * itcl/generic/itcl_cmds.c:
+ * itk/generic/itk_cmds.c:
+ Because the Tcl_Namespace APIs in Tcl have moved to the public
+ space in 8.5, the stub slots have shifted. This now causes Itcl
+ when built against 8.5 to core when loaded into 8.4. What genius
+ you developers! The absolute first rule with Stubs is not to EVER
+ move the slots, but now you did. Previously, one could build Itcl
+ against 8.4 and load into any core 8.1+. Now we can't do this.
+ Gee, thank you all for the support...
+
+ Now, what we compile against is the lowest we can load
+ into.. Sorry! send heated complaints to tcl-core@lists.sf.net
+
+2003-12-17 davygrvy
+ * itcl/generic/itcl.h:
+ Use fancy STRINGIFY macros for version string.
+
+ * itcl/generic/itcl_cmds.c:
+ * itcl/generic/itcl_objects.c:
+ Needed to fix usage of Itcl_DecodeScopedCommand as rCmdPtr always
+ needs to be freed.
+
+ * itcl/generic/itcl_cmd.c (Itcl_FindClassesCmd) : Memory leaking
+ Tcl_Obj plugged. [Bug 738189]
+
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itcl_util.c:
+ Itcl_DecodeScopedCommand now fixed.
+
+ * itcl/generic/itcl.decls:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itclInt.h:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itcl_class.c:
+ * itcl/generic/itcl_ensemble.c:
+ * itcl/generic/itcl_linkage.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_objects.c:
+ * itcl/generic/itcl_util.c:
+ full brain dump. All CONST issues fixed except for
+ Itcl_DecodeScopedCommand. Will address this next.
+
+2003-04-04 andreas_kupries
+ * itcl/configure:
+ * itk/configure:
+ * tcl.m4:
+ * itcl/configure.in:
+ * itk/configure.in:
+ * tclconfig/tcl.m4: Updated to newest tcl.m4, regenerated configure's.
+
+2003-01-28 davygrvy
+ * itcl/configure:
+ * itk/configure:
+ * itk/configure.in:
+ Make sure threading is always on for compiling.
+
+2002-10-16 andreas_kupries
+ * itcl/configure:
+ * itk/configure:
+ * tcl.m4: tcl.m4 typo correction, Regen'd. aix fix
+
+2002-10-15 andreas_kupries
+ * itcl/configure:
+ * itk/configure:
+ * tcl.m4: Regen'd configure for new tcl.m4.
+
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in:
+ Changed to propagate an initial CFLAGS value
+ to the final definition. A TEA condition (SHARED_BUILD == 1)
+ squashed it, causing it the build system to loose the
+ +DAportable we specify for the AS PA-RISC2.2 build host. This is
+ a problem for _all_ TEA and TEA 2 based configure files.
+
+2002-10-15 hobbs
+ * itcl/configure: move the CFLAGS definition into
+ * itcl/configure.in: TEA_ENABLE_SHARED and make it pick up the env
+ * itk/configure: CFLAGS at configure time.
+ * itk/configure.in:
+ * tcl.m4:
+
+2002-09-29 davygrvy
+ * itcl/win/makefile.vc:
+ needed `if !exist` logic for the non-8.4 case.
+
+ * itcl/win/makefile.vc:
+ Use virtual base address rule from the master file contained in
+ the Tcl source.
+
+ * itcl/library/itcl.tcl:
+ Reference to [itcl_class] removed.
+
+2002-08-12 andreas_kupries
+ * itcl/generic/itcl_class.c (ItclDestroyClassNamesp): Applied itcl
+ patch 593112 provided by Reinhard Max
+ <rmax@users.sourceforge.net>. This fixes the segfault in itcl bug
+ 577719, reported by Simon White <s_a_white@users.sourceforge.net>.
+
+2002-08-11 davygrvy
+ * itcl/generic/itcl_class.c (Itcl_ClassVarResolver,
+ Itcl_ClassCompiledVarResolver):
+ * itcl/generic/itcl_object.c (Itcl_ScopedVarResolver,
+ ItclTraceThisVar):
+ * itcl/generic/itcl_parse.c (Itcl_ParseVarResolver):
+ * itcl/generic/itclInt.decls:
+ Signiture changes to match 8.4b2 CONST'ification of the
+ Tcl_ResolveVarProc typedef. Stubs slot positions nor sizes
+ have changed -- just the sigs.
+
+ * itk/win/makefile.vc:
+ more install target fixes
+
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itclStubInit.c: Re-gen from modified genStubs.tcl
+ for the special TCL_EXTERN macro changes that Itcl has.
+
+ * itk/generic/itk.h: speling error.
+
+ * README.vc.txt: This no longer is needed.
+
+ * itcl/generic/itcl.h: Borland TCL_EXTERN support revistited and
+ refreshed.
+
+ * itcl/win/makefile.vc:
+ * itcl/Makefile.in: Removed itcl_obsolete.c from the build
+ instructions.
+
+ * itcl/generic/itcl_obsolete.c (deleted):
+ * itcl/generic/itcl_cmds.c: Removed old [itcl_class] command
+ and old backward support that came with it.
+
+ * itk/generic/itk.h:
+ * itk/generic/itcl.h: Borland TCL_EXTERN support revistited and
+ refreshed.
+
+ * itk/generic/itkDecls.h:
+ * itk/generic/itkStubInit.c: regenerated for newer Borland TCL_EXTERN
+ support refreshing.
+
+ * itk/generic/itk_option.c (Itk_TraceClassDestroy):
+ Signiture change to match 8.4b2 CONST'ification.
+
+ * itk/generic/itk_archetype.c: CONST`ification updates.
+
+ * itk/win/makefile.vc: genstubs target fixed.
+
+ * itcl/doc/itcl_class.n:
+ * itcl/doc/itcl_info.n: old docs for old commands removed, removed.
+
+ * itk/win/makefile.vc: install target fixed
+
+2002-07-17 hobbs
+
+ * itcl/itclConfig.sh.in: dupped vars to have both itcl_* and
+ ITCL_* to support apps that used old-style itclConfig.sh.
+
+2002-06-13 davygrvy
+ * itk/library/Toplevel.itk (destructor):
+ * itk/library/Widget.itk (destructor): Remove the
+ hull component after possibly destroying the hull.
+ Destroy any component that still exists after
+ destroying the hull since it must have been
+ created outside the hull.
+ * itk/tests/toplevel.test:
+ * itk/tests/widget.test: Test that a component
+ outside the hull is destroyed when the mega-widget
+ is destroyed. Also check for case where one external
+ widget contains another.
+ [Patch 515010]
+
+2002-05-14 davygrvy
+ * itk/generic/itk_archetype.c:
+ * itk/library/itk.tcl:
+
+2002-05-14 Mo DeJong <mdejong@users.sourceforge.net>
+
+ * itk/generic/itk_archetype.c (ArchComponent, Itk_ArchCompDeleteCmd,
+ Itk_CreateArchComponent, Itk_DelArchComponent): Save a copy
+ of the window path name in the ArchComponent struct and use
+ it in the Itk_ArchCompDeleteCmd method. The old code was
+ invoking Tk_PathName(tkwin) on a Tk_Window which lead to
+ a memory access on memory that has already been free'd
+ when the widget was destroyed.
+ * itk/library/itk.tcl (itk::remove_destroy_hook): Don't attempt
+ to remove the widget binding if the widget has already been
+ destroyed.
+
+2002-05-02 davygrvy
+ * itcl/configure:
+ * itk/configure:
+ re'gened with autoconf 2.13-4
+
+2002-04-25 davygrvy
+ * itcl/win/makefile.vc:
+ install bug set pkgIndex.tcl to load itcl33.dll.dll. corrected.
+
+ * itcl/doc/is.n:
+ Changed "last update" to be 3.3 instead 3.2
+
+ * itcl/generic/itcl_cmds.c:
+ Patch from Brett Schwarz for not exporting itcl::is [Patch
+ 548757]
+
+ * itcl/doc/is.n:
+ small format fix.
+
+2002-04-20 davygrvy
+ * config.vc:
+ * itcl/win/.cvsignore:
+ * itcl/win/makefile.vc:
+ * itcl/win/nmakehlp.c:
+ * itcl/win/toaster.bmp:
+ * makefile.vc:
+ * rules.vc:
+ makefile.vc changes.
+
+ * pkg.vc:
+ missed this file..
+
+ * itcl/configure.in:
+ * itcl/generic/itcl.h:
+ With a new command, we need to bump up the version to 3.3.0
+
+ * itcl/generic/itcl_objects.c:
+ I missed a CONST for ItclTraceThisVar()
+
+ * itcl/doc/is.n:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itclStubInit.c:
+ * itcl/generic/itcl_cmds.c:
+ * itcl/tests/basic.test:
+ Added the itcl::is command from Brett Schwarz.
+ Untested by me, but looks great.
+ [Patch 546343 546344 546345 546346]
+
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itcl_class.c:
+ * itcl/generic/itcl_objects.c:
+ * itk/generic/itk_option.c:
+ minor changes for CONST'ification project.
+
+ * itk/win/.cvsignore:
+ * itk/win/makefile.vc:
+ * itk/win/nmakehlp.c:
+ * itk/win/toaster.bmp:
+ makefile.vc changes to match the core.
+
+ * itk/configure.in:
+ missed this file, too
+
+2002-04-11 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/configure:
+ * itk/configure:
+ * tcl.m4: Enabled COFF as well as CV style debug info with
+ --enable-symbols to allow Dr. Watson users to see function info.
+ More info on debugging levels can be obtained at:
+ http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
+
+2002-04-03 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * */configure: regend
+ * configure.in: removed prefix default calls
+ * itcl/configure.in:
+ * itk/configure.in:
+ * tcl.m4: updated of TEA base
+
+ * itcl/tests/mkindex.test: corrected to work tests are run from a
+ different build dir
+
+ * itcl/Makefile.in:
+ * itk/Makefile.in: updated to use DESTDIR for install everywhere
+ and added shell and gdb targets
+
+2002-04-01 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/Makefile.in (install-lib-binaries):
+ * itk/Makefile.in (install-lib-binaries): ensure that dynamic
+ library is installed executable
+
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in: redid generation of itclConfig.sh (making it
+ work on Windows broke Unix). Retested so that it is happy on
+ Windows and Unix (calls ${CYGPATH} only when necessary).
+
+2002-03-29 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * */configure: regenerated
+ * tcl.m4: updated from sample changes
+
+2002-03-28 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure:
+ * configure.in:
+ * tcl.m4:
+ * itcl/Makefile.in:
+ * itcl/configure:
+ * itcl/configure.in:
+ * itcl/itclConfig.sh.in:
+ * itcl/pkgIndex.tcl.in:
+ * itcl/generic/itclStubLib.c:
+ * itcl/tests/all.tcl:
+ * itk/Makefile.in:
+ * itk/configure:
+ * itk/configure.in:
+ * itk/pkgIndex.tcl.in:
+ * itk/tests/all.tcl:
+ * config/installFile.tcl (removed):
+ * config/mkinstalldirs (removed): Massive overhaul (and
+ simplification) of the build framework to adapt to TEA 2002
+ specs. Dynamic libraries now install in the pkglibdir (before it
+ was libdir), itclConfig.sh is properly generated and itk uses it.
+ Stubs libraries are now correctly generated and used. You can now
+ build and test itcl/itk against built but not installed Tcl/Tk.
+
+2002-03-27 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure:
+ * tcl.m4: corrected pointer to ldAix to use Tcl version and add
+ -lc for AIX builds
+
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in: corrected to use SHLIB_LD_LIBS instead of
+ TCL_SHLIB_LD_LIBS.
+
+2002-03-02 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * itcl/Makefile.in:
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itcl_bicmds.c:
+ * itcl/generic/itcl_class.c:
+ * itcl/generic/itcl_ensemble.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_objects.c:
+ * itcl/generic/itcl_obsolete.c:
+ * itcl/generic/itcl_parse.c:
+ * itcl/generic/itcl_util.c:
+ * itk/Makefile.in:
+ * itk/generic/itk.decls:
+ * itk/generic/itk_archetype.c:
+ * itk/generic/itk_option.c: Applied SF patch #511035 (provided by
+ Don Porter <dgp@users.sourceforge.net>) to remove warnings
+ related to TIP 27.
+
+2002-01-16 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * tcl.m4: Fix from patch #501979 applied.
+
+ * itcl/configure:
+ * itk/configure: Regenerated.
+
+2002-01-10 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl_cmds.c (Itcl_FindObjectsCmd, Itcl_FindClassesCmd):
+ optimized use of Tcl_Objs to remove the creation of new ones that ended
+ just being set to the interp's result. Let it use the result obj
+ instead. Changed a few Tcl_GetStringFromObj() calls to Tcl_GetString()
+ when a length int* isn't used.
+
+ * itcl/generic/itcl.h: fix from patch #501979 applied.
+
+2001-11-24 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclIntDecls.h:
+ * itk/generic/itk.h:
+ * itk/generic/itkDecls.h:
+ * itk/generic/itk.decls: Changed redefining the macro EXTERN to
+ making a new macro called TCL_EXTERN to get this Borland problem
+ squashed without breaking all headers included after itcl.h that
+ use the EXTERN macro.
+
+2001-11-05 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/tests/ensemble.test: fixed 1.5 to work with 8.4 updated
+ warning messages
+
+2001-10-29 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure:
+ * itcl/configure:
+ * itk/configure: regen'ed
+ * tcl.m4: changed MSSDK cygpath check to use pipe instead of
+ subshell to only occur at the right point.
+
+2001-10-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure:
+ * tcl.m4:
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in: added Win64 build support.
+
+ * itcl/generic/itcl_methods.c (Itcl_GetMemberFuncUsage): corrected
+ casting of CONST char * to prevent compile warnings.
+
+ * itcl/generic/itcl_ensemble.c (CreateEnsemble, AddEnsemblePart):
+ made the <8.4 Tcl header version changes easier in the code.
+
+2001-10-24 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/generic/itcl_cmds.c (Itcl_FindObjectsCmd): fixed potential
+ crash where cmdName was never initialized
+
+2001-09-06 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclInt.h:
+ * itcl/generic/itclIntDecls.h:
+ * itk/generic/itk.h:
+ * itk/generic/itkDecls.h: EXTERN macro changed to support TIP#60
+ in draft form. [Incr Tcl] will be the "successful implementation"
+ part of the TIP.
+
+2001-09-06 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl_util.c: Threading patch from "Haneef Mohammed"
+ <haneef@mindspringx.com>.
+ [Patch: 445670]
+
+ -=[ 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-05-28 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * 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-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.
+
+ * 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.
+
+ * 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
+
+ * itcl/configure:
+ * 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.
+
+ * .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.
+
+ * itcl/.cvsignore:
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/.cvsignore:
+ * itk/configure:
+ * itk/configure.in:
+ Updated patch level to 3.2.1 in prep for a release.
+
+ * itcl/win/makefile.vc:
+ * itcl/win/rc/itcl.rc:
+ yet another rc problem repaired
+
+ * itcl/win/makefile.vc:
+ rc problem repaired
+
+2001-05-22 davygrvy
+ * itcl/generic/itcl_objects.c:
+ * itcl/tests/interp.test:
+ patch #426205, self deleting class caused core dump.
+
+ * 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.
+
+ * 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/win/pkgIndex.tcl:
+ * itk/win/pkgIndex.tcl:
+ we'll auto gen these from the makefile
+
+ * 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:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in:
+ 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 <a.kupries@westend.com>
+
+ * itk/generic/itk_archetype.c: Fixed bug 227876.
+
+ * itcl/generic/itcl_objects.c: Fixed bug 227824 (and several
+ duplicates).
+
+ * 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 rcs 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:
+ 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:
+ 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.
+
+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 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:
+ Changed this to use installFiles.tcl instead of install-sh
+
+ * itcl/generic/itclStubLib.c:
+ Fix for new Itcl_InitStubs.c
+
+ * 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.
+
+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
+
+ * config/install-sh: 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_objects.c:
+ * itcl/tests/all:
+ * 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.
+
+2000-06-01 wart
+ * itcl/Makefile.in:
+ * itcl/tests/basic.test:
+ * itcl/tests/body.test:
+ * itcl/tests/chain.test:
+ * itcl/tests/delete.test:
+ * itcl/tests/ensemble.test:
+ * itcl/tests/import.test:
+ * itcl/tests/info.test:
+ * itcl/tests/inherit.test:
+ * itcl/tests/interp.test:
+ * itcl/tests/local.test:
+ * itcl/tests/methods.test:
+ * itcl/tests/mkindex.test:
+ * itcl/tests/namespace.test:
+ * itcl/tests/protection.test:
+ * itcl/tests/scope.test:
+ * 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:
+ 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\
+
+ * 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
+
+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
+
+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)
+
+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-24 wart
+ * itcl/configure:
+ * itk/configure:
+ Regenerated configure scripts to pick up changes to tcl.m4
+
+ * itcl/configure:
+ * itk/configure:
+ Regenerated configure scripts to pick up recent changes to tcl.m4
+
+ * tcl.m4:
+ * tcl.m4:
+ Updated to reflect recent TEA changes
+
+2000-01-18 wart
+ * tcl.m4:
+ Updated to reflect recent TEA changes
+
+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/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.
+
+ * 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/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-11-24 wart
+ * itcl/configure:
+ * itk/configure:
+ regenerated configure scripts to pick up tcl.m4 changes
+
+ * 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
+
+ * tcl.m4:
+ Updated to reflect recent TEA changes
+
+1999-09-21 wart
+ * itk/Makefile.in:
+ Itk now installs appropriate library files.
+
+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-09-17 wart
+ * tcl.m4:
+ Updated to reflect recent changes
+
+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-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.
+
+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.
+
+ * itcl/Makefile.in:
+ * itk/Makefile.in:
+ Temporarily removed pkg_mkIndex step from Makefile since it causes a
+ crash on Windows.
+
+1999-08-21 matt
+ * itcl/unix/Makefile.in:
+ Fixed mismatch between configure script and makefile for stub
+ enabled builds
+
+ * itk/unix/Makefile.in:
+ Fixed mismatch between conifgure script and Makefile for stub
+ enabled builds.
+
+1999-06-28 hershey
+ * itk/unix/configure.in:
+ * itk/unix/itkConfig.sh:
+ remove version number from comments
+
+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-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.
+
+ * 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.
+
+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.
+
+1999-02-05 stanton
+ * itk/unix/itkConfig.sh:
+ updated version to itcl3.0.1
+
+1999-01-15 rjohnson
+ * itcl/tests/mkindex.itcl:
+
+ Fixed typo in tcl file.
+
+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-08-23 stanton
+ * itcl/doc/scope.n:
+ fixed section
+
+1998-08-20 welch
+ * itcl/generic/itcl.h:
+ Patchlevel 3.0.1
+
+1998-08-18 welch
+ * itk/win/pkgIndex.tcl:
+ Fixed loading .dll
+
+ * itcl/win/pkgIndex.tcl:
+ fixed loading .dll
+
+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".
+
+1998-08-12 welch
+ * itk/win/makefile.bc:
+ * itk/win/makefile.vc:
+ Fixes for tkConsole
+
+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
+
+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/generic/itclInt.h:
+ changed to reflect new resolver api
+
+ * itcl/generic/itcl_bicmds.c:
+ * itcl/generic/itcl_ensemble.c:
+ changed to reflect new CompiledLocal structure
+
+ * itcl/generic/itcl_class.c:
+ changed to reflect changes in resolver api
+
+ * itcl/doc/scope.n: fixed section name
+
+ * itcl/generic/itcl_cmds.c:
+ * itcl/generic/itcl_util.c:
+ * itk/doc/Toplevel.n: lint
+
+1998-08-04 escoffon
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclInt.h:
+ * itk/generic/itk.h: EXPORT is now TCL_STORAGE_CLASS
+
+1998-07-29 escoffon
+ * itcl/generic/itcl.h:
+ added setting of EXPORT to DLLEXPORT if we are building the
+ itcl lib.
+
+ * 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/generic/itclInt.h:
+ - added setting of EXPORT to DLLEXPORT if we are building the itcl lib.
+ - use EXTERN instead of extern for Itcl_Assert
+
+1998-07-28 stanton
+ * itcl/generic/itcl_cmds.c:
+ * itk/generic/itk_cmds.c: changed search order
+
diff --git a/itcl/itcl/INCOMPATIBLE b/itcl/itcl/INCOMPATIBLE
new file mode 100644
index 00000000000..b0e2bd15d3a
--- /dev/null
+++ b/itcl/itcl/INCOMPATIBLE
@@ -0,0 +1,102 @@
+
+As much as possible, I've tried to make itcl3.0 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 namespaces. John Ousterhout
+adopted a slightly different namespace model for Tcl8. The syntax
+of the "namespace" command is different, as well as the semantics
+for command/variable lookups and imports. Also, John Ousterhout
+failed to adopt ensembles into the Tcl core, so itcl can't add
+functions like "info objects" and "info classes" into the usual "info"
+command. These functions have been moved to a new "itcl::find" command.
+
+The [incr Widgets] package has changed quite a bit. There are many
+new widgets, and some of the existing widgets were streamlined--some
+of the widget options were removed to improve performance. For details,
+see the "CHANGES" file in the iwidgets3.0.0 directory. Because there
+are a lot of changes, this distribution contains the iwidgets2.2.0
+package, which is backward-compatible with the existing [incr Widgets].
+
+Following is a quick summary of changes, to serve as a porting guide.
+
+
+----------------------------------|-------------------------------------
+ You have code like this... | change to this...
+----------------------------------|-------------------------------------
+ namespace foo {...} | namespace eval foo {...}
+ |
+ delete namespace foo | namespace delete foo
+ |
+ info which -namespace $name | if {![string match ::* $name]} {
+ | set name [namespace current]::$name
+ | }
+ |
+ info context | namespace current
+ |
+ info objects ... | itcl::find objects ...
+ |
+ info classes ... | itcl::find classes ...
+ |
+ In itcl2.2, commands/classes | In Tcl8.0, all commands/classes that
+ could be found in any namespace | are not in the global namespace must
+ in a hierarchy. So within a | be qualified. For example, the
+ namespace like "iwidgets" you | "iwidgets" namespace has a bunch of
+ could use simple names like: | classes within it. You must always
+ | refer to these classes with qualified
+ | names, like this:
+ |
+ Labeledwidget::alignlabels ... | iwidgets::Labeledwidget::alignlabels ...
+ Pane #auto | iwidgets::Pane #auto
+ |
+ |
+ In itcl2.2, the "global" | In Tcl8.0, the "variable" command is
+ command was used to access | used to access variables in a namespace:
+ variables in a namespace: |
+ |
+ namespace foo { | namespace eval foo {
+ variable x 0 | variable x 0
+ proc example {} { | proc example {} {
+ global x | variable x
+ return $x | return $x
+ } | }
+ } | }
+ |
+ |
+ public itk_component add... | itk_component add ...
+ protected itk_component add... | itk_component add -protected ...
+ private itk_component add... | itk_component add -private ...
+ |
+ |
+
+ OTHER DIFFERENCES
+------------------------------------------------------------------------
+- You can now use instance variables (along with the usual common
+ variables) with the "scope" command. Thus, you're no longer forced
+ to use the trick with a common array like: [scope modes($this)]
+
+- All widget/mega-widget access commands (e.g., ".foo.bar") are
+ installed in the global namespace. Therefore, they can be accessed
+ from any namespace context.
+
+- The [incr Widgets] package used to be loaded by default. You must
+ now use the "package require" command to load it explicitly:
+
+ package require Iwidgets <-- loads the lastest (iwidgets3.0.0)
+ package require -exact Iwidgets 2.2 <-- loads the older release
+
+- Command/variable names are now reported with fully-qualified names
+ in "info" inquiries and in error messages.
+
+- No public/protected/private declarations outside of class definitions
+
+- The "scope" command used to be more or less the same as the "code"
+ command. In itcl3.x, "scope" is only for variables, and if a variable
+ is not recognized, you'll get an error.
+
+- The "code" command used to return a value like "@scope ...". It now
+ returns "namespace inscope ...", to be compatible with Tcl8.
+
+- The prototypes for Itcl_RegisterC and Itcl_FindC have changed. You
+ can now include ClientData when you register C functions. Also, there
+ is a new Itcl_RegisterObjC function for (objc,objv)-style command
+ handlers.
diff --git a/itcl/itcl/Makefile.in b/itcl/itcl/Makefile.in
index 3dce5accee2..4413ec52786 100644
--- a/itcl/itcl/Makefile.in
+++ b/itcl/itcl/Makefile.in
@@ -7,6 +7,7 @@
# replaced in the actual Makefile.
#
# Copyright (c) 1999 Scriptics Corporation.
+# Copyright (c) 2002-2004 ActiveState Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -14,112 +15,33 @@
# RCS: @(#) $Id$
#========================================================================
-# Edit the following few lines when writing a new extension
-#========================================================================
-
-#========================================================================
-# Change the name of the variable "exampleA_LIB_FILE" to match the one
-# used in the configure script. This is the parameterized name of the
-# library that we are building.
-#========================================================================
-
-lib_BINARIES=$(itcl_LIB_FILE) $(itclstub_LIB_FILE)
-BINARIES=$(lib_BINARIES)
-
-#========================================================================
-# Enumerate the names of the source files included in this package.
+# The names of the source files is defined in the configure script.
+# The object files are used for linking into the final library.
# This will be used when a dist target is added to the Makefile.
+# It is not important to specify the directory, as long as it is the
+# $(srcdir) or in the generic, win or unix subdirectory.
#========================================================================
-WIN_DIR=$(srcdir)/win
-UNIX_DIR=$(srcdir)/unix
-GENERIC_DIR=$(srcdir)/generic
-PLATFORM_DIR=@PLATFORM_DIR@
-
-WIN_SOURCES=$(PLATFORM_DIR)/tclAppInit.c \
- $(PLATFORM_DIR)/dllEntryPoint.c
-UNIX_SOURCES=$(PLATFORM_DIR)/tclAppInit.c
-GENERIC_SOURCES = $(GENERIC_DIR)/itclStubInit.c \
- $(GENERIC_DIR)/itclStubLib.c \
- $(GENERIC_DIR)/itcl_bicmds.c \
- $(GENERIC_DIR)/itcl_class.c \
- $(GENERIC_DIR)/itcl_cmds.c \
- $(GENERIC_DIR)/itcl_ensemble.c \
- $(GENERIC_DIR)/itcl_linkage.c \
- $(GENERIC_DIR)/itcl_methods.c \
- $(GENERIC_DIR)/itcl_migrate.c \
- $(GENERIC_DIR)/itcl_objects.c \
- $(GENERIC_DIR)/itcl_obsolete.c \
- $(GENERIC_DIR)/itcl_parse.c \
- $(GENERIC_DIR)/itcl_util.c
-PLATFORM_SOURCES = @PLATFORM_SOURCES@
-itcl_SOURCES = $(PLATFORM_SOURCES) $(GENERIC_SOURCES)
-SOURCES = $(itcl_SOURCES)
-
-#========================================================================
-# Enumerate the names of the object files included in this package.
-# These objects are created and linked into the final library. In
-# most cases these object files will correspond to the source files
-# above.
-#
-#========================================================================
+PKG_SOURCES = @PKG_SOURCES@
+PKG_OBJECTS = @PKG_OBJECTS@
-WIN_OBJECTS = dllEntryPoint.$(OBJEXT)
-UNIX_OBJECTS =
-GENERIC_OBJECTS = itclStubInit.$(OBJEXT) \
- itcl_bicmds.$(OBJEXT) \
- itcl_class.$(OBJEXT) \
- itcl_cmds.$(OBJEXT) \
- itcl_ensemble.$(OBJEXT) \
- itcl_linkage.$(OBJEXT) \
- itcl_methods.$(OBJEXT) \
- itcl_migrate.$(OBJEXT) \
- itcl_objects.$(OBJEXT) \
- itcl_obsolete.$(OBJEXT) \
- itcl_parse.$(OBJEXT) \
- itcl_util.$(OBJEXT)
-PLATFORM_OBJECTS = @PLATFORM_OBJECTS@
-itclstub_OBJECTS = itclStubLib.$(OBJEXT)
-itcl_OBJECTS = $(PLATFORM_OBJECTS) $(GENERIC_OBJECTS)
-OBJECTS = $(itcl_OBJECTS) $(itclstub_OBJECTS)
+PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
+PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
#========================================================================
-# The substitution of "exampleA_LIB_FILE" into the variable name below
-# let's us refer to the objects for the library without knowing the name
-# of the library in advance. It also lets us use the "$@" variable in
-# the rule for building the library, so we can refer to both the list of
-# objects and the library itself in a platform-independent manner.
+# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
+# this package that need to be installed, if any.
#========================================================================
-itcl_LIB_FILE = @itcl_LIB_FILE@
-@itcl_LIB_FILE@_OBJECTS = $(itcl_OBJECTS)
-
-itclstub_LIB_FILE = @itclstub_LIB_FILE@
-@itclstub_LIB_FILE@_OBJECTS = $(itclstub_OBJECTS)
+PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
#========================================================================
# This is a list of header files to be installed
-# itk.h includes itclInt.h, which needs itclIntDecls.h, so we must install them.
-#========================================================================
-
-GENERIC_HDRS= \
- $(srcdir)/generic/itcl.h \
- $(srcdir)/generic/itclDecls.h \
- $(srcdir)/generic/itclInt.h \
- $(srcdir)/generic/itclIntDecls.h
-
+# itk.h includes itclInt.h, which needs itclIntDecls.h,
+# so we must install them.
#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added to the configure script.
-#========================================================================
-
-SAMPLE_NEW_VAR=@SAMPLE_NEW_VAR@
-ITCL_LIBRARY = $(prefix)/lib/itcl$(VERSION)
-
-ITCL_GENERIC_DIR_NATIVE = @ITCL_GENERIC_DIR_NATIVE@
-ITCL_UNIX_DIR_NATIVE = @ITCL_UNIX_DIR_NATIVE@
-ITCL_WIN_DIR_NATIVE = @ITCL_WIN_DIR_NATIVE@
+PKG_HEADERS = @PKG_HEADERS@
#========================================================================
# Nothing of the variables below this line need to be changed. Please
@@ -127,111 +49,104 @@ ITCL_WIN_DIR_NATIVE = @ITCL_WIN_DIR_NATIVE@
# correct.
#========================================================================
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@@VERSION@
-pkglibdir = $(libdir)/@PACKAGE@@VERSION@
-pkgincludedir = $(includedir)/@PACKAGE@@VERSION@
-
-top_builddir = .
-
-#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@
-INSTALL_STRIP_FLAG =
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-CC = @CC@
-CFLAGS_DEBUG = @CFLAGS_DEBUG@
-CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
-CLEANFILES = @CLEANFILES@
-EXEEXT = @EXEEXT@
-LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB = @MAKE_LIB@
-MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
-OBJEXT = @OBJEXT@
-RANLIB = @RANLIB@
-SHLIB_CFLAGS = @SHLIB_CFLAGS@
-SHLIB_LD = @SHLIB_LD@
-SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
-STLIB_LD = @STLIB_LD@
-TCL_BIN_DIR = @TCL_BIN_DIR@
-TCL_DEFS = @TCL_DEFS@
-TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@
-TCL_LD_FLAGS = @TCL_LD_FLAGS@
-TCL_LIBS = @TCL_LIBS@
-TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@
-TCL_SRC_DIR = @TCL_SRC_DIR@
-TCL_DBGX = @TCL_DBGX@
-TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
-TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
-TCL_TOOL_DIR_NATIVE = @TCL_TOOL_DIR_NATIVE@
+#========================================================================
+# Change the name of the variable "exampleA_LIB_FILE" to match the one
+# used in the configure script. This is the parameterized name of the
+# library that we are building.
+#========================================================================
+
+PKG_LIB_FILE = @PKG_LIB_FILE@
+PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
+
+lib_BINARIES = $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE)
+BINARIES = $(lib_BINARIES)
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+libdir = @libdir@
+datadir = @datadir@
+mandir = @mandir@
+includedir = @includedir@
+
+DESTDIR =
+
+PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
+pkgdatadir = $(datadir)/$(PKG_DIR)
+pkglibdir = $(libdir)/$(PKG_DIR)
+pkgincludedir = $(includedir)/$(PKG_DIR)
+
+top_builddir = .
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+CC = @CC@
+CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
+CFLAGS_WARNING = @CFLAGS_WARNING@
+CLEANFILES = @CLEANFILES@
+EXEEXT = @EXEEXT@
+LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
+MAKE_LIB = @MAKE_LIB@
+MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
+MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
+MAKE_STUB_LIB = @MAKE_STUB_LIB@
+OBJEXT = @OBJEXT@
+RANLIB = @RANLIB@
+RANLIB_STUB = @RANLIB_STUB@
+SHLIB_CFLAGS = @SHLIB_CFLAGS@
+SHLIB_LD = @SHLIB_LD@
+SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@
+SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+STLIB_LD = @STLIB_LD@
+TCL_DEFS = @TCL_DEFS@
+TCL_BIN_DIR = @TCL_BIN_DIR@
+TCL_SRC_DIR = @TCL_SRC_DIR@
+# This is necessary for packages that use private Tcl headers
TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@
-TCL_UNIX_DIR_NATIVE = @TCL_UNIX_DIR_NATIVE@
-TCL_WIN_DIR_NATIVE = @TCL_WIN_DIR_NATIVE@
-INCLUDE_DIR_NATIVE = @INCLUDE_DIR_NATIVE@
-TCL_BMAP_DIR_NATIVE = @TCL_BMAP_DIR_NATIVE@
-TCL_PLATFORM_DIR_NATIVE = @TCL_PLATFORM_DIR_NATIVE@
-TCL_GENERIC_DIR_NATIVE = @TCL_GENERIC_DIR_NATIVE@
-TCLSH_PROG = @TCLSH_PROG@
-ITCL_INCLUDES = @ITCL_INCLUDES@
-AUTOCONF = autoconf
+# Not used, but retained for reference of what libs Tcl required
+TCL_LIBS = @TCL_LIBS@
+
+#========================================================================
+# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
+# package without installing. The other environment variables allow us
+# to test against an uninstalled Tcl. Add special env vars that you
+# require for testing here (like TCLX_LIBRARY).
+#========================================================================
-LDFLAGS = $(LDFLAGS_DEFAULT)
+EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR)
+TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
+ ITCL_LIBRARY=`@CYGPATH@ $(srcdir)/library` \
+ @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
+ PATH="$(EXTRA_PATH):$(PATH)" \
+ TCLLIBPATH="$(top_builddir)"
+TCLSH_PROG = @TCLSH_PROG@
+TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
+SHARED_BUILD = @SHARED_BUILD@
-INCLUDES = @TCL_INCLUDES@ @ITCL_INCLUDES@
+INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@
-EXTRA_CFLAGS = $(AC_FLAGS) $(PROTO_FLAGS) $(MEM_DEBUG_FLAGS) $(NO_DEPRECATED_FLAGS) $(TCL_EXTRA_CFLAGS)
+PKG_CFLAGS = @PKG_CFLAGS@
-DEFS = @DEFS@ $(EXTRA_CFLAGS) -DITCL_LIBRARY=\"$(ITCL_LIBRARY)\"
+DEFS = @DEFS@ $(PKG_CFLAGS) \
+ -DITCL_LIBRARY=\"$(pkglibdir)\" -DUSE_NON_CONST
-ACLOCAL_M4 = $(srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../config/mkinstalldirs
+CONFIG_CLEAN_FILES = @CONFIG_CLEAN_FILES@ Makefile itclConfig.sh pkgIndex.tcl
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-AR = ar
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+CPPFLAGS = @CPPFLAGS@
+LIBS = @PKG_LIBS@ @LIBS@
+AR = @AR@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
#========================================================================
# Start of user-definable TARGETS section
@@ -269,16 +184,11 @@ install-binaries: binaries install-lib-binaries install-bin-binaries
#========================================================================
install-libraries: libraries
- $(mkinstalldirs) $(includedir)
- @echo "Installing header files in $(includedir)"
- @for i in $(GENERIC_HDRS) ; do \
- echo "Installing $$i" ; \
- $(INSTALL_DATA) $$i $(includedir) ; \
- done;
- @echo "Installing library files in $(ITCL_LIBRARY)"
- @for i in $(srcdir)/library/*.tcl ; do \
- echo "Installing $$i" ; \
- $(INSTALL_DATA) $$i $(ITCL_LIBRARY) ; \
+ @mkdir -p $(DESTDIR)$(includedir)
+ @echo "Installing header files in $(DESTDIR)$(includedir)"
+ @list='$(PKG_HEADERS)'; for i in $$list; do \
+ echo "Installing $(srcdir)/$$i" ; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
done;
#========================================================================
@@ -287,104 +197,113 @@ install-libraries: libraries
#========================================================================
install-doc: doc
- $(mkinstalldirs) $(mandir)/mann
- @echo "Installing man pages in $(mandir)"
- @for i in $(srcdir)/doc/*.n; \
- do \
+ @mkdir -p $(DESTDIR)$(mandir)/mann
+ @echo "Installing man pages in $(DESTDIR)$(mandir)"
+ @cd $(srcdir)/doc; for i in *.n; do \
echo "Installing $$i"; \
- rm -f $(mandir)/mann/`basename $$i`; \
- $(INSTALL_DATA) $$i $(mandir)/mann ; \
- done
+ rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
+ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
+ $$i > $(DESTDIR)$(mandir)/mann/$$i; \
+ chmod 444 $(DESTDIR)$(mandir)/mann/$$i; \
+ done
+
+test: binaries libraries
+ $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` -load "package require Itcl" $(TESTFLAGS)
+
+shell: binaries libraries
+ @$(TCLSH) $(SCRIPT)
-test: $(TCLSH_PROG)
- $(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` \
- -exedir `@CYGPATH@ $(bindir)` $(TESTFLAGS)
+gdb:
+ $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
depend:
#========================================================================
-# Enumerate the names of the object files included in this package.
-# These objects are created and linked into the final library. In
-# most cases these object files will correspond to the source files
-# above.
+# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
+# mentioned above. That will ensure that this target is built when you
+# run "make binaries".
#
-# $(exampleA_LIB_FILE) should be listed as part of the BINARIES variable
-# at the top of the Makefile. That will ensure that this target is built
-# when you run "make binaries".
-#
-# You shouldn't need to modify this target, except to change the package
-# name from "exampleA" to your package's name.
+# The $(PKG_OBJECTS) objects are created and linked into the final
+# library. In most cases these object files will correspond to the
+# source files above.
#========================================================================
-$(itcl_LIB_FILE): $(itcl_OBJECTS)
- -rm -f $(itcl_LIB_FILE)
- @MAKE_LIB@
- $(RANLIB) $(itcl_LIB_FILE)
+$(PKG_LIB_FILE): $(PKG_OBJECTS)
+ -rm -f $(PKG_LIB_FILE)
+ ${MAKE_LIB}
+ $(RANLIB) $(PKG_LIB_FILE)
-$(itclstub_LIB_FILE): $(itclstub_OBJECTS)
- -rm -f $(itclstub_LIB_FILE)
- @MAKE_STATIC_LIB@
- $(RANLIB) $(itclstub_LIB_FILE)
+$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
+ -rm -f $(PKG_STUB_LIB_FILE)
+ ${MAKE_STUB_LIB}
+ $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
#========================================================================
# We need to enumerate the list of .c to .o lines here.
-# Unfortunately, there does not seem to be any other way to do this
-# in a Makefile-independent way. We can't use VPATH because it picks up
-# object files that may be located in the source directory.
#
# In the following lines, $(srcdir) refers to the toplevel directory
# containing your extension. If your sources are in a subdirectory,
# you will have to modify the paths to reflect this:
#
-# exampleA.$(OBJEXT): $(srcdir)/src/win/exampleA.c
-# $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/win/exampleA.c` -o $@
+# exampleA.$(OBJEXT): $(srcdir)/generic/exampleA.c
+# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/exampleA.c` -o $@
+#
+# Setting the VPATH variable to a list of paths will cause the makefile
+# to look into these paths when resolving .c to .obj dependencies.
+# As necessary, add $(srcdir):$(srcdir)/compat:....
#========================================================================
-dllEntryPoint.$(OBJEXT): $(WIN_DIR)/dllEntryPoint.c
- $(COMPILE) -c `@CYGPATH@ $(WIN_DIR)/dllEntryPoint.c` -o $@
-
-tclAppInit.$(OBJEXT): $(PLATFORM_DIR)/tclAppInit.c
- $(COMPILE) -c `@CYGPATH@ $(PLATFORM_DIR)/tclAppInit.c` -o $@
+VPATH = $(srcdir)/unix:$(srcdir)/generic:$(srcdir)/win
-itclStubInit.$(OBJEXT): $(GENERIC_DIR)/itclStubInit.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itclStubInit.c` -o $@
+.c.$(OBJEXT):
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
-itclStubLib.$(OBJEXT): $(GENERIC_DIR)/itclStubLib.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itclStubLib.c` -o $@
-
-itcl_bicmds.$(OBJEXT): $(GENERIC_DIR)/itcl_bicmds.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_bicmds.c` -o $@
-
-itcl_class.$(OBJEXT): $(GENERIC_DIR)/itcl_class.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_class.c` -o $@
-
-itcl_cmds.$(OBJEXT): $(GENERIC_DIR)/itcl_cmds.c Makefile
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_cmds.c` -o $@
-
-itcl_ensemble.$(OBJEXT): $(GENERIC_DIR)/itcl_ensemble.c Makefile
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_ensemble.c` -o $@
-
-itcl_linkage.$(OBJEXT): $(GENERIC_DIR)/itcl_linkage.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_linkage.c` -o $@
+#========================================================================
+# Distribution creation
+# You may need to tweak this target to make it work correctly.
+#========================================================================
-itcl_methods.$(OBJEXT): $(GENERIC_DIR)/itcl_methods.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_methods.c` -o $@
+#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
+COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
+DIST_ROOT = /tmp/dist
+DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
-itcl_migrate.$(OBJEXT): $(GENERIC_DIR)/itcl_migrate.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_migrate.c` -o $@
+dist-clean:
+ rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-itcl_objects.$(OBJEXT): $(GENERIC_DIR)/itcl_objects.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_objects.c` -o $@
+dist: dist-clean doc
+ mkdir -p $(DIST_DIR)
+ cp -p $(srcdir)/license* $(srcdir)/aclocal.m4 $(srcdir)/configure \
+ $(srcdir)/*.in $(DIST_DIR)/
+ chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
+ chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-itcl_obsolete.$(OBJEXT): $(GENERIC_DIR)/itcl_obsolete.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_obsolete.c` -o $@
+ mkdir $(DIST_DIR)/tclconfig
+ cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
+ $(DIST_DIR)/tclconfig/
+ chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
+ chmod +x $(DIST_DIR)/tclconfig/install-sh
-itcl_parse.$(OBJEXT): $(GENERIC_DIR)/itcl_parse.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_parse.c` -o $@
+ list='doc generic library tests tests/old win win/rc'; \
+ for p in $$list; do \
+ if test -d $(srcdir)/$$p ; then \
+ mkdir $(DIST_DIR)/$$p; \
+ for q in $(srcdir)/$$p/*; do \
+ if test -f $$q ; then \
+ cp -p $$q $(DIST_DIR)/$$p/; \
+ fi; \
+ done; \
+ fi; \
+ done
-itcl_util.$(OBJEXT): $(GENERIC_DIR)/itcl_util.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itcl_util.c` -o $@
+ list='CHANGES ChangeLog INCOMPATIBLE README TODO'; \
+ for p in $$list; do \
+ if test -f $(srcdir)/../$$p ; then \
+ cp -p $(srcdir)/../$$p $(DIST_DIR)/; \
+ fi; \
+ done
+ (cd $(DIST_ROOT); $(COMPRESS);)
#========================================================================
# End of user-definable section
@@ -403,9 +322,8 @@ clean:
distclean: clean
-rm -f *.tab.c
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -rm -f config.status
+ -rm -f $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log config.status
#========================================================================
# Install binary object libraries. On Windows this includes both .dll and
@@ -419,31 +337,39 @@ distclean: clean
# You should not have to modify this target.
#========================================================================
-install-lib-binaries: installdirs
+install-lib-binaries:
+ @mkdir -p $(DESTDIR)$(pkglibdir)
@list='$(lib_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
+ stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
+ if test "x$$stub" = "xstub"; then \
+ echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
+ else \
+ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
+ fi; \
ext=`echo $$p|sed -e "s/.*\.//"`; \
if test "x$$ext" = "xdll"; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
if test -f $$lib; then \
- echo " $(INSTALL_PROGRAM) $$lib $(DESTDIR)$(libdir)/$$lib"; \
- $(INSTALL_PROGRAM) $$lib $(DESTDIR)$(libdir)/$$lib; \
+ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
+ $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
fi; \
- else \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \
fi; \
- else :; fi; \
+ fi; \
done
- @list='$(lib_BINARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
+ @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ destp=`basename $$p`; \
+ echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
+ fi; \
done
- $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir)
+ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
+ $(INSTALL_DATA) itclConfig.sh $(DESTDIR)$(libdir)
#========================================================================
# Install binary executables (e.g. .exe files)
@@ -451,40 +377,34 @@ install-lib-binaries: installdirs
# You should not have to modify this target.
#========================================================================
-install-bin-binaries: installdirs
+install-bin-binaries:
+ @mkdir -p $(DESTDIR)$(bindir)
@list='$(bin_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
- else :; fi; \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
+ fi; \
done
-.SUFFIXES: .c .o .obj
+.SUFFIXES: .c .$(OBJEXT)
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-#config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-# $(SHELL) ./config.status --recheck
-#$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
-# cd $(srcdir) && $(AUTOCONF)
-
-
uninstall-binaries:
- @$(NORMAL_UNINSTALL)
- list='$(BINARIES)'; for p in $$list; do \
- rm -f $(DESTDIR)$(libdir)/$$p; \
+ list='$(lib_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ p=`basename $$p`; \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(bin_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/$$p; \
done
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
- $(mkinstalldirs) $(ITCL_LIBRARY)
-
-.PHONY: all binaries clean depend distclean doc install installdirs \
-libraries test
+.PHONY: all binaries clean depend distclean doc install libraries test
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/itcl/itcl/README b/itcl/itcl/README
new file mode 100644
index 00000000000..fee26d2851e
--- /dev/null
+++ b/itcl/itcl/README
@@ -0,0 +1,311 @@
+------------------------------------------------------------------------
+ [incr Tcl] - version 3.3 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://incrtcl.sourceforge.net/
+ 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://incrtcl.sourceforge.net/
+
+ Installation on Unix Systems
+------------------------------------------------------------------------
+ 1) Obtain this distribution from an archive site like this:
+
+ http://incrtcl.sourceforge.net/
+ http://sourceforge.net/project/showfiles.php?group_id=13244
+
+ 2) Uncompress and untar the distribution:
+
+ gunzip itcl<version>.tar.gz
+ tar xvf itcl<version>.tar
+
+ 3) Run the configuration script:
+
+ cd itcl<version>
+ ./configure
+
+ or, for systems that don't recognize "#!" in shell scripts:
+
+ cd itcl<version>
+ /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 want to debug, you can add this option as well:
+
+ ./configure --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
+------------------------------------------------------------------------
+ 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/itcl/TODO b/itcl/itcl/TODO
new file mode 100644
index 00000000000..8183f73c10d
--- /dev/null
+++ b/itcl/itcl/TODO
@@ -0,0 +1,89 @@
+=======================================================================
+ Following is a list of notes describing things which might be
+ fixed or changed in a future release of [incr Tcl]
+=======================================================================
+
+Handle this case more elegantly:
+
+class Foo {
+ constructor {args} {
+ _init
+ }
+ proc _init {} {
+ puts "once!"
+ proc _init {} {}
+ }
+}
+Foo #auto
+Foo #auto
+
+
+itcl "wish" list
+------------------------------------------------------------------
+- add virtual inheritance
+- add "border" type to canvas widget
+- add "validate" and "valid" commands for type validation
+- add "unknownvar" and provide access to object data members: "obj.var"
+- check namespace [info class] {...} as a replacement for "virtual"
+- fix "auto_load_all" problem in Tcl-DP
+ (Their implementation uses "info commands" to verify that a command
+ has been successfully autoloaded, but absolute command names like
+ "::iwidgets::fileselectiondialog" don't show up.)
+- fix "auto_load" mechanism to be extensible like "unknown"
+- fix Itcl_RegisterC() to support ClientData
+- core dump with "cmdtrace" (tclX thing?)
+
+- ideas from Nelson Macy:
+ - add "delegate" keyword for inheritance via composition?
+ - add "forward" keyword for implementing error handlers
+ - add "get" code to public variables for "cget" access
+
+- equivalent of constructor/destructor for classes
+- protected/private recognized for constructor/destructor
+- add something like Tk_CreateWidgetCommand() for widget developers
+
+
+itcl documentation cleanup
+------------------------------------------------------------------
+- add "Finance: Trading Systems" to commercial uses of Itcl (Deshaw)
+- update doc: "config" code also gets invoked on startup for itk widgets
+- update doc: add to FAQ: class with common array interacts with Tk widget
+
+itcl "to do" list
+------------------------------------------------------------------
+
+- write "auto_load_all" proc for Tcl-DP
+
+- bad errorInfo:
+ > More specifically, the constructor for the class did the following:
+ >
+ > set hull [info namespace tail $this]
+ > ::frame $hull
+ >
+ > One of the class variables had a configuration script:
+ >
+ > public variable textvariable "" {
+ > if { $textvariable != "" } {
+ > regsub "\\(.*\\)" $textvariable "" global
+ > global ::$global
+ > trace variable $textvariable w "$hull adjust"
+ > }
+ > }
+
+- add "@body" in as many places as possible to support Tcl compiler
+
+- check out itcl with Tix:
+ lappend auto_path $env(TIX_LIBRARY)
+ source "$env(IWIDGETS_LIBRARY)/init.iwidgets"
+
+ iwidgets::Dialog ._Arcattributes -title "Code: Arc Annotations"
+ -modality application
+
+ set attrframe [._Arcattributes childsite]
+
+ tixScrolledHList $attrframe.ports
+ [$attrframe.ports subwidget hlist] configure -selectmode browse
+
+ pack $attrframe.ports -expand yes -fill both -padx 10 -pady 10
+
+ ._Arcattributes activate
diff --git a/itcl/itcl/aclocal.m4 b/itcl/itcl/aclocal.m4
index 7ca9320395f..0f09fb8c447 100644
--- a/itcl/itcl/aclocal.m4
+++ b/itcl/itcl/aclocal.m4
@@ -1 +1 @@
-builtin(include,../tcl.m4)
+builtin(include,tclconfig/tcl.m4)
diff --git a/itcl/itcl/configure b/itcl/itcl/configure
index 9e90aa4f47f..a7cdbbbfa61 100755
--- a/itcl/itcl/configure
+++ b/itcl/itcl/configure
@@ -1,36 +1,324 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.59 for itcl 3.3.
#
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-# Defaults:
-ac_help=
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
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"
-ac_help="$ac_help
- --enable-shared build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
- --enable-symbols build with debugging symbols [--disable-symbols]"
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='itcl'
+PACKAGE_TARNAME='itcl'
+PACKAGE_VERSION='3.3'
+PACKAGE_STRING='itcl 3.3'
+PACKAGE_BUGREPORT=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS LN_S CONFIG_CLEAN_FILES TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS CLEANFILES TCL_TOP_DIR_NATIVE TCL_GENERIC_DIR_NATIVE TCL_UNIX_DIR_NATIVE TCL_WIN_DIR_NATIVE TCL_BMAP_DIR_NATIVE TCL_TOOL_DIR_NATIVE TCL_PLATFORM_DIR_NATIVE TCL_INCLUDES SHARED_BUILD AR TCLSH_PROG CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LD_LIBS LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB itcl_STUB_LIB_FILE itcl_LIB_FILE itcl_BUILD_LIB_SPEC itcl_LIB_SPEC itcl_BUILD_STUB_LIB_SPEC itcl_STUB_LIB_SPEC itcl_BUILD_STUB_LIB_PATH itcl_STUB_LIB_PATH itcl_SRC_DIR LTLIBOBJS'
+ac_subst_files=''
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -39,10 +327,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -56,17 +349,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -74,59 +359,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -135,95 +420,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -232,19 +469,19 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -258,26 +495,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -294,7 +531,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -304,7 +541,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -315,58 +552,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -377,99 +613,110 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-exec 5>./config.log
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=generic/itcl.h
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -479,13 +726,474 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures itcl 3.3 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of itcl 3.3:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-shared build and link with shared libraries --enable-shared
+ --enable-64bit enable 64bit support (where applicable)
+ --enable-64bit-vis enable 64bit Sparc VIS support
+ --enable-wince enable Win/CE support (where applicable)
+ --disable-load disallow dynamic loading and "load" command
+ --enable-symbols build with debugging symbols --disable-symbols
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-tcl directory containing tcl configuration (tclConfig.sh)
+ --with-celib=DIR use Windows/CE support library from DIR
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+itcl configure 3.3
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by itcl $as_me 3.3, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -496,43 +1204,245 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#--------------------------------------------------------------------
+# Call TEA_INIT as the first TEA_ macro to set up initial vars.
+# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
+# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
+#--------------------------------------------------------------------
+
+
+ # TEA extensions pass this us the version of TEA they think they
+ # are compatible with.
+ TEA_VERSION="3.2"
+
+ echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
+echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6
+ if test x"${PACKAGE_NAME}" = x ; then
+ { { echo "$as_me:$LINENO: error:
+The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
+echo "$as_me: error:
+The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test x"3.2" = x ; then
+ { { echo "$as_me:$LINENO: error:
+TEA version not specified." >&5
+echo "$as_me: error:
+TEA version not specified." >&2;}
+ { (exit 1); exit 1; }; }
+ elif test "3.2" != "${TEA_VERSION}" ; then
+ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.2\", have \"${TEA_VERSION}\"" >&5
+echo "${ECHO_T}warning: requested TEA version \"3.2\", have \"${TEA_VERSION}\"" >&6
+ else
+ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
+echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
+ fi
+ case "`uname -s`" in
+ *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
+ # Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CYGPATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CYGPATH"; then
+ ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CYGPATH="cygpath -w"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
+
+ test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
+fi
+fi
+CYGPATH=$ac_cv_prog_CYGPATH
+if test -n "$CYGPATH"; then
+ echo "$as_me:$LINENO: result: $CYGPATH" >&5
+echo "${ECHO_T}$CYGPATH" >&6
else
- ac_n= ac_c='\c' ac_t=
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ EXEEXT=".exe"
+ TEA_PLATFORM="windows"
+ ;;
+ *)
+ CYGPATH=echo
+ EXEEXT=""
+ TEA_PLATFORM="unix"
+ ;;
+ esac
+
+ # Check if exec_prefix is set. If not use fall back to prefix.
+ # Note when adjusted, so that TEA_PREFIX can correct for this.
+ # This is needed for recursive configures, since autoconf propagates
+ # $prefix, but not $exec_prefix (doh!).
+ if test x$exec_prefix = xNONE ; then
+ exec_prefix_default=yes
+ exec_prefix=$prefix
+ fi
+
+
+
+
+ # This package name must be replaced statically for AC_SUBST to work
+
+ # Substitute STUB_LIB_FILE in case package creates a stub library too.
+
+
+ # We AC_SUBST these here to ensure they are subst'ed,
+ # in case the user doesn't call TEA_ADD_...
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+CONFIG_CLEAN_FILES=
+if test ! -d $srcdir/tclconfig ; then
+ if test -d $srcdir/../tclconfig ; then
+ $LN_S $srcdir/../tclconfig tclconfig
+ CONFIG_CLEAN_FILES=tclconfig
+ fi
fi
ac_aux_dir=
-for ac_dir in ../config $srcdir/../config; do
+for ac_dir in tclconfig $srcdir/tclconfig; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -541,295 +1451,899 @@ for ac_dir in ../config $srcdir/../config; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../config $srcdir/../config" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&2;}
+ { (exit 1); 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.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
#--------------------------------------------------------------------
-# __CHANGE__
-# Set your package name and version numbers here. The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows). The VERSION variable is used on the
-# other systems.
+# Load the tclConfig.sh file
#--------------------------------------------------------------------
-PACKAGE=itcl
-MAJOR_VERSION=3
-MINOR_VERSION=2
-PATCHLEVEL=.1
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
+ #
+ # Ok, lets find the tcl configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tcl
+ #
+
+ if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+
+# Check whether --with-tcl or --without-tcl was given.
+if test "${with_tcl+set}" = set; then
+ withval="$with_tcl"
+ with_tclconfig=${withval}
+fi;
+ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
+echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
+ if test "${ac_cv_c_tclconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ # First check to see if --with-tcl was specified.
+ if test x"${with_tclconfig}" != x ; then
+ case ${with_tclconfig} in
+ */tclConfig.sh )
+ if test -f ${with_tclconfig}; then
+ { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
+echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
+ with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
+echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCL_BIN_DIR="# no Tcl configs found"
+ { echo "$as_me:$LINENO: WARNING: \"Cannot find Tcl configuration definitions\"" >&5
+echo "$as_me: WARNING: \"Cannot find Tcl configuration definitions\"" >&2;}
+ exit 0
+ else
+ no_tcl=
+ TCL_BIN_DIR=${ac_cv_c_tclconfig}
+ echo "$as_me:$LINENO: result: found $TCL_BIN_DIR/tclConfig.sh" >&5
+echo "${ECHO_T}found $TCL_BIN_DIR/tclConfig.sh" >&6
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
+echo $ECHO_N "checking for existence of $TCL_BIN_DIR/tclConfig.sh... $ECHO_C" >&6
+
+ if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
+ echo "$as_me:$LINENO: result: loading" >&5
+echo "${ECHO_T}loading" >&6
+ . $TCL_BIN_DIR/tclConfig.sh
+ else
+ echo "$as_me:$LINENO: result: file not found" >&5
+echo "${ECHO_T}file not found" >&6
+ fi
+
+ #
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f $TCL_BIN_DIR/Makefile ; then
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ fi
+
+ #
+ # eval is required to do the TCL_DBGX substitution
+ #
+
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
-#--------------------------------------------------------------------
-# We put this here so that you can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
-#--------------------------------------------------------------------
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
-#------------------------------------------------------------------------
-# Handle the --prefix=... option
-#------------------------------------------------------------------------
+ #AC_SUBST(TCL_BUILD_LIB_SPEC)
+ #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
-if test "${prefix}" = "NONE"; then
- prefix=/usr/local
+
+#-----------------------------------------------------------------------
+# Handle the --prefix=... option by defaulting to what Tcl gave.
+# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
+#-----------------------------------------------------------------------
+
+
+ if test "${prefix}" = "NONE"; then
+ prefix_default=yes
+ if test x"${TCL_PREFIX}" != x; then
+ { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
+echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
+ prefix=${TCL_PREFIX}
+ else
+ { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
+echo "$as_me: --prefix defaulting to /usr/local" >&6;}
+ prefix=/usr/local
+ fi
+ fi
+ if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
+ -o x"${exec_prefix_default}" = x"yes" ; then
+ if test x"${TCL_EXEC_PREFIX}" != x; then
+ { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
+echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
+ exec_prefix=${TCL_EXEC_PREFIX}
+ else
+ { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
+echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
+ exec_prefix=$prefix
+ fi
+ fi
+
+
+#-----------------------------------------------------------------------
+# Standard compiler checks.
+# This sets up CC by using the CC env var, or looks for gcc otherwise.
+# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
+# the basic setup necessary to compile executables.
+#-----------------------------------------------------------------------
+
+
+ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
+ # in this macro, they need to go into TEA_SETUP_COMPILER instead.
+
+ # If the user did not set CFLAGS, set it now to keep
+ # the AC_PROG_CC macro from adding "-g -O2".
+ if test "${CFLAGS+set}" != "set" ; then
+ CFLAGS=""
+ fi
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
fi
-if test "${exec_prefix}" = "NONE"; then
- exec_prefix=$prefix
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-#--------------------------------------------------------------------
-# Check whether --enable-gcc or --disable-gcc was given. Do this
-# before AC_CYGWIN is called so the compiler can
-# be fully tested by built-in autoconf tools.
-# This macro also calls AC_PROG_CC to set the compiler if --enable-gcc
-# was not used.
-#--------------------------------------------------------------------
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
- # Check whether --enable-gcc or --disable-gcc was given.
-if test "${enable_gcc+set}" = set; then
- enableval="$enable_gcc"
- ok=$enableval
+ CC=$ac_ct_CC
else
- ok=no
+ CC="$ac_cv_prog_CC"
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: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
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # 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_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
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: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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
- if test $# -gt 0; then
+ if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # 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: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
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # 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_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- ;;
- esac
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ test -n "$ac_ct_CC" && break
+done
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 753 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-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
- ac_cv_prog_cc_cross=no
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
else
- ac_cv_prog_cc_cross=yes
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-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: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: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
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-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
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
else
- ac_cv_prog_gcc=no
-fi
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GCC=
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-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: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
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
else
- ac_cv_prog_cc_g=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
+ CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
@@ -843,499 +2357,3841 @@ else
CFLAGS=
fi
fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-# Find a good install program. We prefer a C program (faster),
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ # 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:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
# ./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:861: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
fi
fi
done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-#--------------------------------------------------------------------
-# Checks to see if the make program sets the $MAKE variable.
-#--------------------------------------------------------------------
+ #--------------------------------------------------------------------
+ # Checks to see if the make program sets the $MAKE variable.
+ #--------------------------------------------------------------------
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-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
+ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftestmake <<\EOF
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 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
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
-#--------------------------------------------------------------------
-# Find ranlib
-#--------------------------------------------------------------------
+ #--------------------------------------------------------------------
+ # Find ranlib
+ #--------------------------------------------------------------------
-# 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: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
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-#--------------------------------------------------------------------
-# This macro performs additional compiler tests.
-#--------------------------------------------------------------------
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-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
+ RANLIB=$ac_ct_RANLIB
else
- cat > conftest.$ac_ext <<EOF
-#line 991 "configure"
-#include "confdefs.h"
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
-int main() {
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
+ #--------------------------------------------------------------------
+ # Determines the correct binary file extension (.o, .obj, .exe etc.)
+ #--------------------------------------------------------------------
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
fi
rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
rm -f conftest*
+
fi
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
-#--------------------------------------------------------------------
-# Determines the correct binary file extension (.o, .obj, .exe etc.)
-#--------------------------------------------------------------------
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-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:1030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-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 1053 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
fi
-rm -f conftest*
-rm -f conftest*
+
+done
+
+
+
+ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
+
+
+ #------------------------------------------------------------------------
+ # If we're using GCC, see if the compiler understands -pipe. If so, use it.
+ # It makes compiling go faster. (This is only a performance feature.)
+ #------------------------------------------------------------------------
+
+ if test -z "$no_pipe" -a -n "$GCC"; then
+ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
+echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
+ OLDCC="$CC"
+ CC="$CC -pipe"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CC="$OLDCC"
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
+ #--------------------------------------------------------------------
+ # Common compiler flag setup
+ #--------------------------------------------------------------------
+ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-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
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=yes
else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- 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) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+ if test "${TEA_PLATFORM}" = "unix" ; then
+
+ #--------------------------------------------------------------------
+ # 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").
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking for sin" >&5
+echo $ECHO_N "checking for sin... $ECHO_C" >&6
+if test "${ac_cv_func_sin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define sin to an innocuous variant, in case <limits.h> declares sin.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define sin innocuous_sin
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sin (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef sin
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_sin) || defined (__stub___sin)
+choke me
+#else
+char (*f) () = sin;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != sin;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_sin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_sin=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
+echo "${ECHO_T}$ac_cv_func_sin" >&6
+if test $ac_cv_func_sin = yes; then
+ MATH_LIBS=""
+else
+ MATH_LIBS="-lm"
+fi
+
+ echo "$as_me:$LINENO: checking for main in -lieee" >&5
+echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
+if test "${ac_cv_lib_ieee_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lieee $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ieee_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ieee_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
+echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6
+if test $ac_cv_lib_ieee_main = yes; then
+ MATH_LIBS="-lieee $MATH_LIBS"
+fi
-#--------------------------------------------------------------------
-# "cygpath" is used on windows to generate native path names for include
-# files.
-# These variables should only be used with the compiler and linker since
-# they generate native path names.
-#
-# Unix tclConfig.sh points SRC_DIR at the top-level directory of
-# the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at
-# the win subdirectory. Hence the different usages of SRC_DIR below.
-#
-# This must be done before calling SC_PUBLIC_TCL_HEADERS
-#
-# RELPATH is used to locate binary extensions relative to the lib directory.
-# It is only needed if mkIndex.tcl can't generate an installed pkgIndex.tcl
-# file for you.
-#--------------------------------------------------------------------
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
- CYGPATH="cygpath -w"
- RELPATH=".. .. bin"
+ #--------------------------------------------------------------------
+ # Interactive UNIX requires -linet instead of -lsocket, plus it
+ # needs net/errno.h to define the socket-related error codes.
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking for main in -linet" >&5
+echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
+if test "${ac_cv_lib_inet_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
+echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
+if test $ac_cv_lib_inet_main = yes; then
+ LIBS="$LIBS -linet"
+fi
+
+ if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for net/errno.h" >&5
+echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking net/errno.h usability" >&5
+echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <net/errno.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking net/errno.h presence" >&5
+echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <net/errno.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- *)
- CYGPATH=echo
- RELPATH=..
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: net/errno.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
;;
esac
+echo "$as_me:$LINENO: checking for net/errno.h" >&5
+echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_net_errno_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
+fi
+if test $ac_cv_header_net_errno_h = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_NET_ERRNO_H 1
+_ACEOF
+
+fi
+
+
+
+ #--------------------------------------------------------------------
+ # 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
+ echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != connect;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+if test $ac_cv_func_connect = yes; then
+ tcl_checkSocket=0
+else
+ tcl_checkSocket=1
+fi
+
+ if test "$tcl_checkSocket" = 1; then
+ echo "$as_me:$LINENO: checking for setsockopt" >&5
+echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
+if test "${ac_cv_func_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define setsockopt innocuous_setsockopt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setsockopt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef setsockopt
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
+choke me
+#else
+char (*f) () = setsockopt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != setsockopt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_setsockopt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
+if test $ac_cv_func_setsockopt = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
+echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt ();
+int
+main ()
+{
+setsockopt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_setsockopt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
+if test $ac_cv_lib_socket_setsockopt = yes; then
+ LIBS="$LIBS -lsocket"
+else
+ tcl_checkBoth=1
+fi
+
+fi
+
+ fi
+ if test "$tcl_checkBoth" = 1; then
+ tk_oldLibs=$LIBS
+ LIBS="$LIBS -lsocket -lnsl"
+ echo "$as_me:$LINENO: checking for accept" >&5
+echo $ECHO_N "checking for accept... $ECHO_C" >&6
+if test "${ac_cv_func_accept+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define accept to an innocuous variant, in case <limits.h> declares accept.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define accept innocuous_accept
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char accept (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef accept
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char accept ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_accept) || defined (__stub___accept)
+choke me
+#else
+char (*f) () = accept;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != accept;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_accept=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_accept=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
+echo "${ECHO_T}$ac_cv_func_accept" >&6
+if test $ac_cv_func_accept = yes; then
+ tcl_checkNsl=0
+else
+ LIBS=$tk_oldLibs
+fi
+
+ fi
+ echo "$as_me:$LINENO: checking for gethostbyname" >&5
+echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gethostbyname
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+char (*f) () = gethostbyname;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gethostbyname;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
+if test $ac_cv_func_gethostbyname = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+ LIBS="$LIBS -lnsl"
+fi
+
+fi
+
+
+ # Don't perform the eval of the libraries here because DL_LIBS
+ # won't be set until we call TEA_CONFIG_CFLAGS
+
+ TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
-#--------------------------------------------------------------------
-# Includes for this package
-#--------------------------------------------------------------------
-ITCL_GENERIC_DIR_NATIVE=`${CYGPATH} ${srcdir}/generic`
-ITCL_WIN_DIR_NATIVE=`${CYGPATH} ${srcdir}/win`
-ITCL_UNIX_DIR_NATIVE=`${CYGPATH} ${srcdir}/unix`
+ echo "$as_me:$LINENO: checking dirent.h" >&5
+echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <dirent.h>
+int
+main ()
+{
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
- ITCL_PLATFORM_DIR_NATIVE=${ITCL_WIN_DIR_NATIVE}
+#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);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_ok=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_ok=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ if test $tcl_ok = no; then
+ cat >>confdefs.h <<\_ACEOF
+#define NO_DIRENT_H 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: result: $tcl_ok" >&5
+echo "${ECHO_T}$tcl_ok" >&6
+ if test "${ac_cv_header_errno_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking errno.h usability" >&5
+echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <errno.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking errno.h presence" >&5
+echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- *)
- ITCL_PLATFORM_DIR_NATIVE=${ITCL_UNIX_DIR_NATIVE}
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: errno.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
;;
esac
+echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_errno_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
-ITCL_INCLUDES="-I\"${ITCL_GENERIC_DIR_NATIVE}\" -I\"${ITCL_PLATFORM_DIR_NATIVE}\""
+fi
+if test $ac_cv_header_errno_h = yes; then
+ :
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_ERRNO_H 1
+_ACEOF
+fi
+ if test "${ac_cv_header_float_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for float.h" >&5
+echo $ECHO_N "checking for float.h... $ECHO_C" >&6
+if test "${ac_cv_header_float_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
+echo "${ECHO_T}$ac_cv_header_float_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking float.h usability" >&5
+echo $ECHO_N "checking float.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <float.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking float.h presence" >&5
+echo $ECHO_N "checking float.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <float.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: float.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for float.h" >&5
+echo $ECHO_N "checking for float.h... $ECHO_C" >&6
+if test "${ac_cv_header_float_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_float_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
+echo "${ECHO_T}$ac_cv_header_float_h" >&6
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
+fi
+if test $ac_cv_header_float_h = yes; then
+ :
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_FLOAT_H 1
+_ACEOF
+fi
- #
- # Ok, lets find the tcl configuration
- # First, look for one uninstalled.
- # the alternative search directory is invoked by --with-tcl
- #
- if test x"${no_tcl}" = x ; then
- # we reset no_tcl in case something fails here
- no_tcl=true
- # Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
- withval="$with_tcl"
- with_tclconfig=${withval}
+ if test "${ac_cv_header_values_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for values.h" >&5
+echo $ECHO_N "checking for values.h... $ECHO_C" >&6
+if test "${ac_cv_header_values_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
fi
+echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
+echo "${ECHO_T}$ac_cv_header_values_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking values.h usability" >&5
+echo $ECHO_N "checking values.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <values.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-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
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking values.h presence" >&5
+echo $ECHO_N "checking values.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <values.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
-
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- # First check to see if --with-tcl was specified.
- if test x"${with_tclconfig}" != x ; then
- if test -f "${with_tclconfig}/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
- else
- { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
- fi
- fi
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: values.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for values.h" >&5
+echo $ECHO_N "checking for values.h... $ECHO_C" >&6
+if test "${ac_cv_header_values_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_values_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
+echo "${ECHO_T}$ac_cv_header_values_h" >&6
- # then check for a private Tcl installation
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ../tcl \
- `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
- ../../tcl \
- `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
- ../../../tcl \
- `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
+fi
+if test $ac_cv_header_values_h = yes; then
+ :
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_VALUES_H 1
+_ACEOF
- # check in a few common install locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in `ls -d ${prefix}/lib 2>/dev/null` \
- `ls -d /usr/local/lib 2>/dev/null` ; do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i; pwd)`
- break
- fi
- done
- fi
+fi
- # check in a few other private locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ${srcdir}/../tcl \
- `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
-
+
+ if test "${ac_cv_header_limits_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for limits.h" >&5
+echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
+if test "${ac_cv_header_limits_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
fi
+echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
+echo "${ECHO_T}$ac_cv_header_limits_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking limits.h usability" >&5
+echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <limits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking limits.h presence" >&5
+echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <limits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: limits.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for limits.h" >&5
+echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
+if test "${ac_cv_header_limits_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_limits_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
+echo "${ECHO_T}$ac_cv_header_limits_h" >&6
+
+fi
+if test $ac_cv_header_limits_h = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIMITS_H 1
+_ACEOF
+
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_LIMITS_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking stdlib.h usability" >&5
+echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <stdlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking stdlib.h presence" >&5
+echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_stdlib_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+
+fi
+if test $ac_cv_header_stdlib_h = yes; then
+ tcl_ok=1
+else
+ tcl_ok=0
+fi
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtol" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtoul" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtod" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ if test $tcl_ok = 0; then
+ cat >>confdefs.h <<\_ACEOF
+#define NO_STDLIB_H 1
+_ACEOF
- if test x"${ac_cv_c_tclconfig}" = x ; then
- TCL_BIN_DIR="# no Tcl configs found"
- echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
- exit 0
- else
- no_tcl=
- TCL_BIN_DIR=${ac_cv_c_tclconfig}
- echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
- fi
fi
+ if test "${ac_cv_header_string_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking string.h usability" >&5
+echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <string.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking string.h presence" >&5
+echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1256: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_string_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+
+fi
+if test $ac_cv_header_string_h = yes; then
+ tcl_ok=1
+else
+ tcl_ok=0
+fi
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strstr" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strerror" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+
+ # See also memmove check below for a place where NO_STRING_H can be
+ # set and why.
+
+ if test $tcl_ok = 0; then
+ cat >>confdefs.h <<\_ACEOF
+#define NO_STRING_H 1
+_ACEOF
- if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
- echo "$ac_t""loading" 1>&6
- . $TCL_BIN_DIR/tclConfig.sh
- else
- echo "$ac_t""file not found" 1>&6
fi
- #
- # The eval is required to do the TCL_DBGX substitution in the
- # TCL_LIB_FILE variable
- #
+ if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
+echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
+echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/wait.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- eval TCL_LIB_FILE=${TCL_LIB_FILE}
- eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
+echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/wait.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/wait.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/wait.h" >&5
+echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_wait_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
-#--------------------------------------------------------------------
+fi
+if test $ac_cv_header_sys_wait_h = yes; then
+ :
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
+echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dlfcn.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
+echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dlfcn.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dlfcn_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+
+fi
+if test $ac_cv_header_dlfcn_h = yes; then
+ :
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_DLFCN_H 1
+_ACEOF
+
+fi
+
+
+
+ # OS/390 lacks sys/param.h (and doesn't need it, by chance).
+
+for ac_header in sys/param.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ # Let the user call this, because if it triggers, they will
+ # need a compat/strtod.c that is correct. Users can also
+ # use Tcl_GetDouble(FromObj) instead.
+ #TEA_BUGGY_STRTOD
+ fi
+
+
+#-----------------------------------------------------------------------
# __CHANGE__
-# Choose which headers you need. Extension authors should try very
-# hard to only rely on the Tcl public header files. Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This must be done AFTER calling SC_PATH_TCLCONFIG/SC_LOAD_TCLCONFIG
-# so that we can extract TCL_SRC_DIR from the config file (in the case
-# of private headers
-#--------------------------------------------------------------------
+# Specify the C source files to compile in TEA_ADD_SOURCES,
+# public headers that need to be installed in TEA_ADD_HEADERS,
+# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
+# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
+# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
+# and PKG_TCL_SOURCES.
+#-----------------------------------------------------------------------
+
+
+ vars="itclStubInit.c
+ itcl_bicmds.c
+ itcl_class.c
+ itcl_cmds.c
+ itcl_ensemble.c
+ itcl_linkage.c
+ itcl_methods.c
+ itcl_migrate.c
+ itcl_objects.c
+ itcl_parse.c
+ itcl_util.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
-#SC_PUBLIC_TCL_HEADERS
- echo $ac_n "checking for Tcl private include files""... $ac_c" 1>&6
-echo "configure:1304: checking for Tcl private include files" >&5
- 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`\"
- TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
- TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
- TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
- TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
- TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
- ;;
- *)
- TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
- TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
- TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
- TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
- TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
- TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
- TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
- TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
- ;;
- esac
-
-
-
-
-
-
-
+ vars="generic/itcl.h
+ generic/itclDecls.h
+ generic/itclInt.h
+ generic/itclIntDecls.h"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
+echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_HEADERS="$PKG_HEADERS $i"
+ done
+
+
+
+ vars="-I\"`${CYGPATH} ${srcdir}/generic`\""
+ for i in $vars; do
+ PKG_INCLUDES="$PKG_INCLUDES $i"
+ done
+
+
+
+ vars=""
+ for i in $vars; do
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
+ # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
+ i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
+ fi
+ PKG_LIBS="$PKG_LIBS $i"
+ done
+
+
+
+ PKG_CFLAGS="$PKG_CFLAGS "
+
+
+
+ vars="itclStubLib.c"
+ for i in $vars; do
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
+echo "$as_me: error: could not find stub source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
+ done
+
+
+
+
+ vars="library/itcl.tcl"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
+echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
+ done
- TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-
- echo "$ac_t""Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" 1>&6
#--------------------------------------------------------------------
@@ -1355,138 +6211,142 @@ echo "configure:1304: checking for Tcl private include files" >&5
# your system.
#--------------------------------------------------------------------
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
- cat >> confdefs.h <<\EOF
+if test "${TEA_PLATFORM}" = "windows" ; then
+ cat >>confdefs.h <<\_ACEOF
#define BUILD_itcl 1
-EOF
+_ACEOF
- CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch"
- PLATFORM_SOURCES='$(WIN_SOURCES)'
- PLATFORM_OBJECTS='$(WIN_OBJECTS)'
- PLATFORM_DIR='$(WIN_DIR)'
- ;;
- *)
- CLEANFILES=
- PLATFORM_SOURCES='$(UNIX_SOURCES)'
- PLATFORM_OBJECTS='$(UNIX_OBJECTS)'
- PLATFORM_DIR='$(UNIX_DIR)'
- ;;
-esac
+ CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
+ vars="dllEntryPoint.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+else
+ CLEANFILES=
+ #TEA_ADD_SOURCES([])
+fi
+
#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
+# __CHANGE__
+# Choose which headers you need. Extension authors should try very
+# hard to only rely on the Tcl public header files. Internal headers
+# contain private data structures and are subject to change without
+# notice.
+# This must be done AFTER calling TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG
+# so that we can extract TCL_SRC_DIR from the config file (in the case
+# of private headers
#--------------------------------------------------------------------
+#TEA_PUBLIC_TCL_HEADERS
- echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-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"
- tcl_ok=$enableval
-else
- tcl_ok=no
-fi
+ echo "$as_me:$LINENO: checking for Tcl private include files" >&5
+echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6
+ if test "${TEA_PLATFORM}" = "windows"; then
+ 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`\"
+ TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
+ TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
+ TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
+ TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
+ TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
+
+ TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+ else
+ TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
+ TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic'
+ TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix'
+ TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win'
+ TCL_BMAP_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/bitmaps'
+ TCL_TOOL_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/tools'
+ TCL_COMPAT_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/compat'
+ TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
+
+ # substitute these in "relaxed" so that TCL_INCLUDES still works
+ # without requiring the other vars to be defined in the Makefile
+ eval "TCL_INCLUDES=\"-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}\""
+ fi
- if test "$tcl_ok" = "yes"; then
- TCL_THREADS=1
- cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
- cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
- 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: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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lpthread $LIBS"
-cat > conftest.$ac_ext <<EOF
-#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
- builtin and then its argument prototype would still apply. */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_ok=yes
-else
- echo "$ac_t""no" 1>&6
-tcl_ok=no
-fi
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -lpthread"
- echo "$ac_t""yes" 1>&6
- else
- TCL_THREADS=0
- echo "$ac_t""no" 1>&6
- echo "configure: warning: "Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..."" 1>&2
- fi
- ;;
- esac
- else
- TCL_THREADS=0
- echo "$ac_t""no (default)" 1>&6
- fi
+
+ echo "$as_me:$LINENO: result: Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" >&5
+echo "${ECHO_T}Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" >&6
+
+
+#--------------------------------------------------------------------
+# We need to enable the threading macros found in tcl.h and tclInt.h.
+# The use of the threading features is determined by the core the
+# extension is loaded into, but we need to compile with these macros
+# turned on.
+#--------------------------------------------------------------------
+
+cat >>confdefs.h <<\_ACEOF
+#define TCL_THREADS 1
+_ACEOF
+
+
+#--------------------------------------------------------------------
+# Check whether --enable-threads or --disable-threads was given.
+# This auto-enables if Tcl was compiled threaded.
+#--------------------------------------------------------------------
+
+#TEA_ENABLE_THREADS
+
#--------------------------------------------------------------------
# The statement below defines a collection of symbols related to
# building as a shared library instead of a static library.
#--------------------------------------------------------------------
- echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:1482: checking how to build libraries" >&5
+ echo "$as_me:$LINENO: checking how to build libraries" >&5
+echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
# 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=yes
-fi
-
+fi;
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
@@ -1496,88 +6356,2963 @@ fi
fi
if test "$tcl_ok" = "yes" ; then
- echo "$ac_t""shared" 1>&6
+ echo "$as_me:$LINENO: result: shared" >&5
+echo "${ECHO_T}shared" >&6
SHARED_BUILD=1
else
- echo "$ac_t""static" 1>&6
+ echo "$as_me:$LINENO: result: static" >&5
+echo "${ECHO_T}static" >&6
SHARED_BUILD=0
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define STATIC_BUILD 1
-EOF
+_ACEOF
fi
+
#--------------------------------------------------------------------
# This macro figures out what flags to use with the compiler/linker
# when building shared/static debug/optimized objects. This information
-# is all taken from the tclConfig.sh file.
+# can be taken from the tclConfig.sh file, but this figures it all out.
#--------------------------------------------------------------------
-CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
-CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
-LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
-LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
-SHLIB_LD=${TCL_SHLIB_LD}
-STLIB_LD=${TCL_STLIB_LD}
-SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
+ # Allow the user to provide this setting in the env
+ if test "x${TCLSH_PROG}" = "x" ; then
+ echo "$as_me:$LINENO: checking for tclsh" >&5
+echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
+
+ if test "${ac_cv_path_tclsh+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ if test "${TEA_PLATFORM}" != "windows" -o \
+ \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
+ # Do not allow target tclsh in known cross-compile builds,
+ # as we need one we can run on this system
+ search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
+ fi
+ 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
+
+
+ if test -f "$ac_cv_path_tclsh" ; then
+ TCLSH_PROG=$ac_cv_path_tclsh
+ echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
+echo "${ECHO_T}$TCLSH_PROG" >&6
+ else
+ { { echo "$as_me:$LINENO: error: No tclsh found in PATH: $search_path" >&5
+echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+
+
+
+
+ # Step 0: Enable 64 bit support?
+
+ echo "$as_me:$LINENO: checking if 64bit support is enabled" >&5
+echo $ECHO_N "checking if 64bit support is enabled... $ECHO_C" >&6
+ # Check whether --enable-64bit or --disable-64bit was given.
+if test "${enable_64bit+set}" = set; then
+ enableval="$enable_64bit"
+ do64bit=$enableval
+else
+ do64bit=no
+fi;
+ echo "$as_me:$LINENO: result: $do64bit" >&5
+echo "${ECHO_T}$do64bit" >&6
+
+ # Step 0.b: Enable Solaris 64 bit VIS support?
+
+ echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
+echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6
+ # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
+if test "${enable_64bit_vis+set}" = set; then
+ enableval="$enable_64bit_vis"
+ do64bitVIS=$enableval
+else
+ do64bitVIS=no
+fi;
+ echo "$as_me:$LINENO: result: $do64bitVIS" >&5
+echo "${ECHO_T}$do64bitVIS" >&6
+
+ if test "$do64bitVIS" = "yes"; then
+ # Force 64bit on with VIS
+ do64bit=yes
+ fi
+
+ # Step 0.c: Cross-compiling options for Windows/CE builds?
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
+echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6
+ # Check whether --enable-wince or --disable-wince was given.
+if test "${enable_wince+set}" = set; then
+ enableval="$enable_wince"
+ doWince=$enableval
+else
+ doWince=no
+fi;
+ echo "$as_me:$LINENO: result: $doWince" >&5
+echo "${ECHO_T}$doWince" >&6
+ fi
+
+ # 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.
+
+ echo "$as_me:$LINENO: checking system version (for dynamic loading)" >&5
+echo $ECHO_N "checking system version (for dynamic loading)... $ECHO_C" >&6
+ 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
+ echo "$as_me:$LINENO: result: unknown (can't find uname command)" >&5
+echo "${ECHO_T}unknown (can't find uname command)" >&6
+ 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 }' /etc/.relid'`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+ fi
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ system=windows
+ fi
+ echo "$as_me:$LINENO: result: $system" >&5
+echo "${ECHO_T}$system" >&6
+ fi
+ fi
+
+ # Step 2: check for existence of -ldl library. This is needed because
+ # Linux can use either -ldl or -ldld for dynamic loading.
+
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ have_dl=yes
+else
+ have_dl=no
+fi
+
+
+ # Step 3: set configuration options based on system name and version.
+ # This is similar to Tcl's unix/tcl.m4 except that we've added a
+ # "windows" case and CC_SEARCH_FLAGS becomes LD_SEARCH_FLAGS for us
+ # (and we have no CC_SEARCH_FLAGS).
+
+ do64bit_ok=no
+ LDFLAGS_ORIG="$LDFLAGS"
+ TCL_EXPORT_FILE_SUFFIX=""
+ UNSHARED_LIB_SUFFIX=""
+ TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+ ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+ TCL_LIB_VERSIONS_OK=ok
+ CFLAGS_DEBUG=-g
+ if test "$GCC" = "yes" ; then
+ CFLAGS_OPTIMIZE=-O2
+ CFLAGS_WARNING="-Wall -Wno-implicit-int"
+ else
+ CFLAGS_OPTIMIZE=-O
+ CFLAGS_WARNING=""
+ fi
+ TCL_NEEDS_EXP_FILE=0
+ TCL_BUILD_EXP_FILE=""
+ TCL_EXP_FILE=""
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STLIB_LD='${AR} cr'
+ LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+ case $system in
+ windows)
+ # This is a 2-stage check to make sure we have the 64-bit SDK
+ # We have to know where the SDK is installed.
+ if test "$do64bit" = "yes" ; then
+ if test "x${MSSDK}x" = "xx" ; then
+ MSSDK="C:/Progra~1/Microsoft SDK"
+ fi
+ # Ensure that this path has no spaces to work in autoconf
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+
+
+ echo "$as_me:$LINENO: checking short pathname for MSSDK (${MSSDK})" >&5
+echo $ECHO_N "checking short pathname for MSSDK (${MSSDK})... $ECHO_C" >&6
+
+ shortpath=
+ case "${MSSDK}" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [file attributes {${MSSDK}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ echo "$as_me:$LINENO: result: not changed" >&5
+echo "${ECHO_T}not changed" >&6
+ else
+ MSSDK=$shortpath
+ echo "$as_me:$LINENO: result: ${MSSDK}" >&5
+echo "${ECHO_T}${MSSDK}" >&6
+ fi
+ fi
+
+ if test ! -d "${MSSDK}/bin/win64" ; then
+ { echo "$as_me:$LINENO: WARNING: could not find 64-bit SDK to enable 64bit mode" >&5
+echo "$as_me: WARNING: could not find 64-bit SDK to enable 64bit mode" >&2;}
+ do64bit="no"
+ else
+ do64bit_ok="yes"
+ fi
+ fi
+
+ if test "$doWince" != "no" ; then
+ if test "$do64bit" = "yes" ; then
+ { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
+echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test "$GCC" = "yes" ; then
+ { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
+echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-celib
+
+ if test x"${no_celib}" = x ; then
+ # we reset no_celib in case something fails here
+ no_celib=true
+
+# Check whether --with-celib or --without-celib was given.
+if test "${with_celib+set}" = set; then
+ withval="$with_celib"
+ with_celibconfig=${withval}
+fi;
+ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
+echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6
+ if test "${ac_cv_c_celibconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # First check to see if --with-celibconfig was specified.
+ if test x"${with_celibconfig}" != x ; then
+ if test -d "${with_celibconfig}/inc" ; then
+ ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
+ else
+ { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
+echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a celib library
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ for i in \
+ ../celib-palm-3.0 \
+ ../celib \
+ ../../celib-palm-3.0 \
+ ../../celib \
+ `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
+ ${srcdir}/../celib-palm-3.0 \
+ ${srcdir}/../celib \
+ `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
+ ; do
+ if test -d "$i/inc" ; then
+ ac_cv_c_celibconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
+echo "$as_me: error: Cannot find celib support library directory" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ no_celib=
+ CELIB_DIR=${ac_cv_c_celibconfig}
+ echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
+echo "${ECHO_T}found $CELIB_DIR" >&6
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+
+
+ echo "$as_me:$LINENO: checking short pathname for CELIB_DIR (${ac_cv_c_celibconfig})" >&5
+echo $ECHO_N "checking short pathname for CELIB_DIR (${ac_cv_c_celibconfig})... $ECHO_C" >&6
+
+ shortpath=
+ case "${ac_cv_c_celibconfig}" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [file attributes {${ac_cv_c_celibconfig}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ echo "$as_me:$LINENO: result: not changed" >&5
+echo "${ECHO_T}not changed" >&6
+ else
+ CELIB_DIR=$shortpath
+ echo "$as_me:$LINENO: result: ${CELIB_DIR}" >&5
+echo "${ECHO_T}${CELIB_DIR}" >&6
+ fi
+ fi
+
+ fi
+ fi
+
+ # Set defaults for common evc4/PPC2003 setup
+ # Currently Tcl requires 300+, possibly 420+ for sockets
+ CEVERSION=420; # could be 211 300 301 400 420 ...
+ TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ...
+ ARCH=ARM; # could be ARM MIPS X86EM ...
+ PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
+ if test "$doWince" != "yes"; then
+ # If !yes then the user specified something
+ # Reset ARCH to allow user to skip specifying it
+ ARCH=
+ eval `echo $doWince | awk -F, '{ \
+ if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
+ if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
+ if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
+ if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
+ if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
+ }'`
+ if test "x${ARCH}" = "x" ; then
+ ARCH=$TARGETCPU;
+ fi
+ fi
+ OSVERSION=WCE$CEVERSION;
+ if test "x${WCEROOT}" = "x" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
+ if test ! -d "${WCEROOT}" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
+ fi
+ fi
+ if test "x${SDKROOT}" = "x" ; then
+ SDKROOT="C:/Program Files/Windows CE Tools"
+ if test ! -d "${SDKROOT}" ; then
+ SDKROOT="C:/Windows CE Tools"
+ fi
+ fi
+ # Ensure that this path has no spaces to work in autoconf
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+
+
+ echo "$as_me:$LINENO: checking short pathname for WCEROOT (${WCEROOT})" >&5
+echo $ECHO_N "checking short pathname for WCEROOT (${WCEROOT})... $ECHO_C" >&6
+
+ shortpath=
+ case "${WCEROOT}" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [file attributes {${WCEROOT}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ echo "$as_me:$LINENO: result: not changed" >&5
+echo "${ECHO_T}not changed" >&6
+ else
+ WCEROOT=$shortpath
+ echo "$as_me:$LINENO: result: ${WCEROOT}" >&5
+echo "${ECHO_T}${WCEROOT}" >&6
+ fi
+ fi
+
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+
+
+ echo "$as_me:$LINENO: checking short pathname for SDKROOT (${SDKROOT})" >&5
+echo $ECHO_N "checking short pathname for SDKROOT (${SDKROOT})... $ECHO_C" >&6
+
+ shortpath=
+ case "${SDKROOT}" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [file attributes {${SDKROOT}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ echo "$as_me:$LINENO: result: not changed" >&5
+echo "${ECHO_T}not changed" >&6
+ else
+ SDKROOT=$shortpath
+ echo "$as_me:$LINENO: result: ${SDKROOT}" >&5
+echo "${ECHO_T}${SDKROOT}" >&6
+ fi
+ fi
+
+ if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
+ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
+ { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
+echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
+ { (exit 1); exit 1; }; }
+ doWince="no"
+ else
+ # We could PATH_NOSPACE these, but that's not important,
+ # as long as we quote them when used.
+ CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
+ if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
+ CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
+ fi
+ CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
+ fi
+ fi
+
+ if test "$GCC" != "yes" ; then
+ if test "${SHARED_BUILD}" = "0" ; then
+ runtime=-MT
+ else
+ runtime=-MD
+ fi
+
+ if test "$do64bit" = "yes" ; then
+ # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ CC="${MSSDK}/Bin/Win64/cl.exe"
+ CFLAGS="${CFLAGS} -I${MSSDK}/Include/prerelease \
+ -I${MSSDK}/Include/Win64/crt \
+ -I${MSSDK}/Include"
+ RC="${MSSDK}/bin/rc.exe"
+ lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
+ -LIBPATH:${MSSDK}/Lib/Prerelease/IA64 -nologo"
+ LINKBIN="${MSSDK}/bin/win64/link.exe"
+ CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ elif test "$doWince" != "no" ; then
+ CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
+ if test "${TARGETCPU}" = "X86"; then
+ CC="${CEBINROOT}/cl.exe"
+ else
+ CC="${CEBINROOT}/cl${ARCH}.exe"
+ fi
+ CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
+ RC="${WCEROOT}/Common/EVC/bin/rc.exe"
+ arch=`echo ${ARCH} | awk '{print tolower($0)}'`
+ defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
+ if test "${SHARED_BUILD}" = "1" ; then
+ # Static CE builds require static celib as well
+ defs="${defs} _DLL"
+ fi
+ for i in $defs ; do
+ cat >>confdefs.h <<_ACEOF
+#define $i 1
+_ACEOF
+
+ done
+ cat >>confdefs.h <<_ACEOF
+#define _WIN32_WCE $CEVERSION
+_ACEOF
+
+ cat >>confdefs.h <<_ACEOF
+#define UNDER_CE $CEVERSION
+_ACEOF
+
+ CFLAGS_DEBUG="-nologo -Zi -Od"
+ CFLAGS_OPTIMIZE="-nologo -Ox"
+ lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
+ lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
+ LINKBIN="${CEBINROOT}/link.exe"
+
+ else
+ RC="rc"
+ lflags="-nologo"
+ LINKBIN="link"
+ CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ fi
+ fi
+
+ if test "$GCC" = "yes"; then
+ # mingw gcc mode
+ RC="windres"
+ CFLAGS_DEBUG="-g"
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ SHLIB_LD="$CC -shared"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
+ LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
+ else
+ SHLIB_LD="${LINKBIN} -dll ${lflags}"
+ # link -lib only works when -lib is the first arg
+ STLIB_LD="${LINKBIN} -lib ${lflags}"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
+ PATHTYPE=-w
+ # For information on what debugtype is most useful, see:
+ # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
+ # This essentially turns it all on.
+ LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
+ LDFLAGS_OPTIMIZE="-release"
+ if test "$doWince" != "no" ; then
+ LDFLAGS_CONSOLE="-link ${lflags}"
+ LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
+ else
+ LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
+ LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
+ fi
+ fi
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dll"
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+ TCL_LIB_VERSIONS_OK=nodots
+ # Bogus to avoid getting this turned off
+ DL_OBJS="tclLoadNone.obj"
+ ;;
+ AIX-*)
+ if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
+ # AIX requires the _r compiler when gcc isn't being used
+ if test "${CC}" != "cc_r" ; then
+ CC=${CC}_r
+ fi
+ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
+echo "${ECHO_T}Using $CC for compiling with threads" >&6
+ fi
+ LIBS="$LIBS -lc"
+ SHLIB_CFLAGS=""
+ SHLIB_SUFFIX=".so"
+ SHLIB_LD_LIBS='${LIBS}'
+
+ DL_OBJS="tclLoadDl.o"
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+ #LIBOBJS="$LIBOBJS tclLoadAix.o"
+ case $LIBOBJS in
+ "tclLoadAix.$ac_objext" | \
+ *" tclLoadAix.$ac_objext" | \
+ "tclLoadAix.$ac_objext "* | \
+ *" tclLoadAix.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;;
+esac
+
+ DL_LIBS="-lld"
+ fi
+
+ # Check to enable 64-bit flags for compiler/linker on AIX 4+
+ if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
+ if test "$GCC" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: \"64bit mode not supported with GCC on $system\"" >&5
+echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;}
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -q64"
+ LDFLAGS="$LDFLAGS -q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+ fi
+ fi
+
+ if test "`uname -m`" = "ia64" ; then
+ # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ # AIX-5 has dl* in libc.so
+ DL_LIBS=""
+ if test "$GCC" = "yes" ; then
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+ fi
+ else
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ else
+ SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
+ fi
+ SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+ DL_LIBS="-ldl"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ TCL_NEEDS_EXP_FILE=1
+ TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
+ fi
+
+ # On AIX <=v4 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.
+ #
+ # 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.
+
+ echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
+echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
+if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettimeofday ();
+int
+main ()
+{
+gettimeofday ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_bsd_gettimeofday=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_bsd_gettimeofday=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
+if test $ac_cv_lib_bsd_gettimeofday = yes; then
+ libbsd=yes
+else
+ libbsd=no
+fi
+
+ if test $libbsd = yes; then
+ MATH_LIBS="$MATH_LIBS -lbsd"
+ cat >>confdefs.h <<\_ACEOF
+#define USE_DELTA_FOR_TZ 1
+_ACEOF
+
+ fi
+ ;;
+ BeOS*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="${CC} -nostart"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ ;;
+ 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"
+ 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="$LDFLAGS -export-dynamic"
+ LD_SEARCH_FLAGS=""
+ ;;
+ dgux*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LD_SEARCH_FLAGS=""
+ ;;
+ HP-UX-*.11.*)
+ # Use updated header definitions where possible
+ cat >>confdefs.h <<\_ACEOF
+#define _XOPEN_SOURCE_EXTENDED 1
+_ACEOF
+
+
+ SHLIB_SUFFIX=".sl"
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = yes; then
+ SHLIB_CFLAGS="+z"
+ SHLIB_LD="ld -b"
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ fi
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ fi
+
+ # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+ #CFLAGS="$CFLAGS +DAportable"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ hpux_arch=`${CC} -dumpmachine`
+ case $hpux_arch in
+ hppa64*)
+ # 64-bit gcc in use. Fix flags for GNU ld.
+ do64bit_ok=yes
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ ;;
+ *)
+ { echo "$as_me:$LINENO: WARNING: \"64bit mode not supported with GCC on $system\"" >&5
+echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;}
+ ;;
+ esac
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS +DD64"
+ LDFLAGS="$LDFLAGS +DD64"
+ fi
+ fi
+ ;;
+ HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
+ SHLIB_SUFFIX=".sl"
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = yes; then
+ SHLIB_CFLAGS="+z"
+ SHLIB_LD="ld -b"
+ SHLIB_LD_LIBS=""
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ fi
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ ;;
+ 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="$LDFLAGS -Wl,-D,08000000"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ ;;
+ IRIX-5.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ ;;
+ IRIX-6.*|IRIX64-6.5*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mabi=n32"
+ LDFLAGS="$LDFLAGS -mabi=n32"
+ else
+ case $system in
+ IRIX-6.3)
+ # Use to build 6.2 compatible binaries on 6.3.
+ CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -n32"
+ ;;
+ esac
+ LDFLAGS="$LDFLAGS -n32"
+ fi
+ ;;
+ IRIX64-6.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+
+ # Check to enable 64-bit flags for compiler/linker
+
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
+echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
+ else
+ do64bit_ok=yes
+ SHLIB_LD="ld -64 -shared -rdata_shared"
+ CFLAGS="$CFLAGS -64"
+ LDFLAGS="$LDFLAGS -64"
+ fi
+ fi
+ ;;
+ Linux*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ # 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="$LDFLAGS -Wl,--export-dynamic"
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ else
+ if test "${ac_cv_header_dld_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dld.h" >&5
+echo $ECHO_N "checking for dld.h... $ECHO_C" >&6
+if test "${ac_cv_header_dld_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
+echo "${ECHO_T}$ac_cv_header_dld_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dld.h usability" >&5
+echo $ECHO_N "checking dld.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dld.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dld.h presence" >&5
+echo $ECHO_N "checking dld.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dld.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dld.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dld.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dld.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dld.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dld.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dld.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dld.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dld.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dld.h" >&5
+echo $ECHO_N "checking for dld.h... $ECHO_C" >&6
+if test "${ac_cv_header_dld_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dld_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
+echo "${ECHO_T}$ac_cv_header_dld_h" >&6
+
+fi
+if test $ac_cv_header_dld_h = yes; then
+
+ SHLIB_LD="ld -shared"
+ DL_OBJS="tclLoadDld.o"
+ DL_LIBS="-ldld"
+ LD_SEARCH_FLAGS=""
+fi
+
+
+ fi
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$CFLAGS -mieee"
+ fi
+
+ # The combo of gcc + glibc has a bug related
+ # to inlining of functions like strtod(). The
+ # -fno-builtin flag should address this problem
+ # but it does not work. The -fno-inline flag
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+ if test x"${USE_COMPAT}" != x ; then
+ CFLAGS="$CFLAGS -fno-inline"
+ fi
+
+ ;;
+ GNU*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ if test "$have_dl" = yes; then
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ LD_SEARCH_FLAGS=""
+ else
+ if test "${ac_cv_header_dld_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dld.h" >&5
+echo $ECHO_N "checking for dld.h... $ECHO_C" >&6
+if test "${ac_cv_header_dld_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
+echo "${ECHO_T}$ac_cv_header_dld_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dld.h usability" >&5
+echo $ECHO_N "checking dld.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dld.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dld.h presence" >&5
+echo $ECHO_N "checking dld.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dld.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dld.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dld.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dld.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dld.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dld.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dld.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dld.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dld.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dld.h" >&5
+echo $ECHO_N "checking for dld.h... $ECHO_C" >&6
+if test "${ac_cv_header_dld_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dld_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
+echo "${ECHO_T}$ac_cv_header_dld_h" >&6
+
+fi
+if test $ac_cv_header_dld_h = yes; then
+
+ SHLIB_LD="ld -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldld"
+ LD_SEARCH_FLAGS=""
+fi
+
+
+ fi
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$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"
+ 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="$LDFLAGS -Wl,-Bexport"
+ LD_SEARCH_FLAGS=""
+ ;;
+ NetBSD-*|FreeBSD-[1-2].*)
+ # Not available on all versions: check for include file.
+ if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
+echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dlfcn.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
+echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dlfcn.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to the itcl lists. ##
+## ------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dlfcn_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+
+fi
+if test $ac_cv_header_dlfcn_h = yes; then
+
+ # NetBSD/SPARC needs -fPIC, -fpic will not do.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ echo "$as_me:$LINENO: checking for ELF" >&5
+echo $ECHO_N "checking for ELF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __ELF__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+
+fi
+rm -f conftest*
+
+
+else
+
+ 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=""
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+
+fi
+
+
+
+ # FreeBSD doesn't handle version numbers with dots.
+
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ OpenBSD-*)
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ echo "$as_me:$LINENO: checking for ELF" >&5
+echo $ECHO_N "checking for ELF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __ELF__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+
+fi
+rm -f conftest*
+
+
+ # OpenBSD doesn't do version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ FreeBSD-*)
+ # FreeBSD 3.* and greater have ELF.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -export-dynamic"
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ case $system in
+ FreeBSD-3.*)
+ # FreeBSD-3 doesn't handle version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ esac
+ ;;
+ Darwin-*)
+ SHLIB_CFLAGS="-fno-common"
+ SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dylib"
+ DL_OBJS="tclLoadDyld.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first"
+ LD_SEARCH_FLAGS=""
+ LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+ CFLAGS_OPTIMIZE="-Os"
+ ;;
+ NEXTSTEP-*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="cc -nostdlib -r"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadNext.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OS/390-*)
+ CFLAGS_OPTIMIZE="" # Optimizer is buggy
+ cat >>confdefs.h <<\_ACEOF
+#define _OE_SOCKETS 1
+_ACEOF
+ # 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=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-1.*)
+ # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
+ SHLIB_CFLAGS="-fPIC"
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD="ld -shared"
+ else
+ SHLIB_LD="ld -non_shared"
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-V*)
+ # Digital OSF/1
+ SHLIB_CFLAGS=""
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD='ld -shared -expect_unresolved "*"'
+ else
+ SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mieee"
+ else
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
+ fi
+ # see pthread_intro(3) for pthread support on osf1, k.furukawa
+ if test "${TCL_THREADS}" = "1" ; then
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+ CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+ LIBS=`echo $LIBS | sed s/-lpthreads//`
+ if test "$GCC" = "yes" ; then
+ LIBS="$LIBS -lpthread -lmach -lexc"
+ else
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ fi
+
+ ;;
+ QNX-6*)
+ # QNX RTP
+ # This may work for all QNX, but it was only reported for v6.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ # dlopen is in -lc on QNX
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ 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="$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.
+ if test "$GCC" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+ fi
+ SHLIB_LD="ld -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ 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"
+ LD_SEARCH_FLAGS=""
+ ;;
+ SunOS-4*)
+ SHLIB_CFLAGS="-PIC"
+ SHLIB_LD="ld"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ 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}.so.1.0'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ SunOS-5.[0-6]*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # 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 "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ fi
+ ;;
+ SunOS-5*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ arch=`isainfo`
+ if test "$arch" = "sparcv9 sparc" ; then
+ if test "$GCC" = "yes" ; then
+ if test "`gcc -dumpversion` | awk -F. '{print }'" -lt "3" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
+echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -m64 -mcpu=v9"
+ LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+ SHLIB_CFLAGS="-fPIC"
+ fi
+ else
+ do64bit_ok=yes
+ if test "$do64bitVIS" = "yes" ; then
+ CFLAGS="$CFLAGS -xarch=v9a"
+ LDFLAGS="$LDFLAGS -xarch=v9a"
+ else
+ CFLAGS="$CFLAGS -xarch=v9"
+ LDFLAGS="$LDFLAGS -xarch=v9"
+ fi
+ fi
+ else
+ { echo "$as_me:$LINENO: WARNING: \"64bit mode only supported sparcv9 system\"" >&5
+echo "$as_me: WARNING: \"64bit mode only supported sparcv9 system\"" >&2;}
+ 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 "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ if test "$do64bit" = "yes" ; then
+ # We need to specify -static-libgcc or we need to
+ # add the path to the sparv9 libgcc.
+ # JH: static-libgcc is necessary for core Tcl, but may
+ # not be necessary for extensions.
+ SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
+ # for finding sparcv9 libgcc, get the regular libgcc
+ # path, remove so name and append 'sparcv9'
+ #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
+ #LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS},-R,$v9gcclibdir"
+ fi
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ 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="$LDFLAGS -Wl,-D,08000000"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ if test "$GCC" != "yes" ; then
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
+ fi
+ ;;
+ 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
+ echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
+echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
+ LDFLAGS="$LDFLAGS -Wl,-Bexport"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ found=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+LDFLAGS=$hold_ldflags found=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $found" >&5
+echo "${ECHO_T}$found" >&6
+ LD_SEARCH_FLAGS=""
+ ;;
+ esac
+
+ if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
+ { echo "$as_me:$LINENO: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&5
+echo "$as_me: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&2;}
+ 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
+ echo "$as_me:$LINENO: checking sys/exec.h" >&5
+echo $ECHO_N "checking sys/exec.h... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/exec.h>
+int
+main ()
+{
+
+ 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;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_ok=usable
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_ok=unusable
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $tcl_ok" >&5
+echo "${ECHO_T}$tcl_ok" >&6
+ if test $tcl_ok = usable; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_SYS_EXEC_H 1
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: checking a.out.h" >&5
+echo $ECHO_N "checking a.out.h... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <a.out.h>
+int
+main ()
+{
+
+ 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;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_ok=usable
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_ok=unusable
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $tcl_ok" >&5
+echo "${ECHO_T}$tcl_ok" >&6
+ if test $tcl_ok = usable; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_A_OUT_H 1
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: checking sys/exec_aout.h" >&5
+echo $ECHO_N "checking sys/exec_aout.h... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/exec_aout.h>
+int
+main ()
+{
+
+ 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;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_ok=usable
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_ok=unusable
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $tcl_ok" >&5
+echo "${ECHO_T}$tcl_ok" >&6
+ if test $tcl_ok = usable; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_SYS_EXEC_AOUT_H 1
+_ACEOF
+
+ else
+ DL_OBJS=""
+ fi
+ fi
+ fi
+ fi
+
+ # Step 5: disable dynamic loading if requested via a command-line switch.
+
+ # Check whether --enable-load or --disable-load was given.
+if test "${enable_load+set}" = set; then
+ enableval="$enable_load"
+ tcl_ok=$enableval
+else
+ tcl_ok=yes
+fi;
+ 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="$LDFLAGS_ORIG"
+ 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 "$GCC" = "yes" ; then
+ case $system in
+ AIX-*)
+ ;;
+ BSD/OS*)
+ ;;
+ IRIX*)
+ ;;
+ NetBSD-*|FreeBSD-*)
+ ;;
+ Darwin-*)
+ ;;
+ RISCos-*)
+ ;;
+ SCO_SV-3.2*)
+ ;;
+ ULTRIX-4.*)
+ ;;
+ windows)
+ ;;
+ *)
+ SHLIB_CFLAGS="-fPIC"
+ ;;
+ esac
+ fi
+ fi
+
+ if test "$SHARED_LIB_SUFFIX" = "" ; then
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
+ fi
+ if test "$UNSHARED_LIB_SUFFIX" = "" ; then
+ UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # These must be called after we do the basic CFLAGS checks and
+ # verify any possible 64-bit or similar switches are necessary
+
+ echo "$as_me:$LINENO: checking for required early compiler flags" >&5
+echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
+ tcl_flags=""
+
+ if test "${tcl_cv_flag__isoc99_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__isoc99_source=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _ISOC99_SOURCE 1
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__isoc99_source=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_flag__isoc99_source=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define _ISOC99_SOURCE 1
+_ACEOF
+
+ tcl_flags="$tcl_flags _ISOC99_SOURCE"
+ fi
+
+
+ if test "${tcl_cv_flag__largefile64_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__largefile64_source=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGEFILE64_SOURCE 1
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__largefile64_source=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_flag__largefile64_source=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define _LARGEFILE64_SOURCE 1
+_ACEOF
+
+ tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
+ fi
+
+ if test "x${tcl_flags}" = "x" ; then
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+ else
+ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
+echo "${ECHO_T}${tcl_flags}" >&6
+ fi
+
+
+ echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
+echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
+ if test "${tcl_cv_type_64bit+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ tcl_cv_type_64bit=none
+ # See if the compiler knows natively about __int64
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+__int64 value = (__int64) 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_type_64bit=__int64
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_type_64bit="long long"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ # See if we should use long anyway Note that we substitute in the
+ # type that is our current guess for a 64-bit type inside this check
+ # program, so it should be modified only carefully...
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+switch (0) {
+ case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
+ }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_type_64bit=${tcl_type_64bit}
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "${tcl_cv_type_64bit}" = none ; then
+ cat >>confdefs.h <<\_ACEOF
+#define TCL_WIDE_INT_IS_LONG 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: using long" >&5
+echo "${ECHO_T}using long" >&6
+ elif test "${tcl_cv_type_64bit}" = "__int64" \
+ -a "${TEA_PLATFORM}" = "windows" ; then
+ # We actually want to use the default tcl.h checks in this
+ # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
+ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
+echo "${ECHO_T}using Tcl header defaults" >&6
+ else
+ cat >>confdefs.h <<_ACEOF
+#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
+_ACEOF
+
+ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
+echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
+
+ # Now check for auxiliary declarations
+ echo "$as_me:$LINENO: checking for struct dirent64" >&5
+echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
+ if test "${tcl_cv_struct_dirent64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/dirent.h>
+int
+main ()
+{
+struct dirent64 p;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_struct_dirent64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_struct_dirent64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_DIRENT64 1
+_ACEOF
+
+ fi
+ echo "$as_me:$LINENO: result: ${tcl_cv_struct_dirent64}" >&5
+echo "${ECHO_T}${tcl_cv_struct_dirent64}" >&6
+
+ echo "$as_me:$LINENO: checking for struct stat64" >&5
+echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
+ if test "${tcl_cv_struct_stat64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 p;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_struct_stat64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+tcl_cv_struct_stat64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_STAT64 1
+_ACEOF
+ fi
+ echo "$as_me:$LINENO: result: ${tcl_cv_struct_stat64}" >&5
+echo "${ECHO_T}${tcl_cv_struct_stat64}" >&6
+ echo "$as_me:$LINENO: checking for off64_t" >&5
+echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
+ if test "${tcl_cv_type_off64_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+off64_t offset;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_type_off64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_type_off64_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TYPE_OFF64_T 1
+_ACEOF
+
+ fi
+ echo "$as_me:$LINENO: result: ${tcl_cv_type_off64_t}" >&5
+echo "${ECHO_T}${tcl_cv_type_off64_t}" >&6
+ fi
#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols
+# Set the default compiler switches based on the --enable-symbols
# option.
#--------------------------------------------------------------------
- case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*)
- tcl_dbgx=d
- ;;
- *)
- tcl_dbgx=g
- ;;
- esac
- echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:1549: checking for build with symbols" >&5
+
+ DBGX=""
+
+ echo "$as_me:$LINENO: checking for build with symbols" >&5
+echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
# Check whether --enable-symbols or --disable-symbols was given.
if test "${enable_symbols+set}" = set; then
enableval="$enable_symbols"
tcl_ok=$enableval
else
tcl_ok=no
-fi
-
- if test "$tcl_ok" = "yes"; then
- CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
- LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
- DBGX=${tcl_dbgx}
- TCL_DBGX=${tcl_dbgx}
- echo "$ac_t""yes" 1>&6
- else
+fi;
+ if test "$tcl_ok" = "no"; then
CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
- DBGX=""
- TCL_DBGX=""
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ else
+ CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
+ LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+ if test "$tcl_ok" = "yes"; then
+ echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
+echo "${ECHO_T}yes (standard debugging)" >&6
+ fi
+ fi
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ LDFLAGS_DEFAULT="${LDFLAGS}"
fi
-
-
-
-if test "${SHARED_BUILD}" = "1" ; then
- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
-else
- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
-fi
+
+
+ if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+ cat >>confdefs.h <<\_ACEOF
+#define TCL_MEM_DEBUG 1
+_ACEOF
+
+ fi
+
+ if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+ if test "$tcl_ok" = "all"; then
+ echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
+echo "${ECHO_T}enabled symbols mem debugging" >&6
+ else
+ echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
+echo "${ECHO_T}enabled $tcl_ok debugging" >&6
+ fi
+ fi
+
#--------------------------------------------------------------------
# Everyone should be linking against the Tcl stub library. If you
@@ -1587,98 +9322,98 @@ fi
#--------------------------------------------------------------------
if test "${SHARED_BUILD}" = "1" ; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USE_TCL_STUBS 1
-EOF
+_ACEOF
fi
#--------------------------------------------------------------------
# This macro generates a line to use when building a library. It
-# depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS,
-# and SC_LOAD_TCLCONFIG macros above.
+# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
+# and TEA_LOAD_TCLCONFIG macros above.
#--------------------------------------------------------------------
- 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) "
- fi
- ;;
- *)
- MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$@_OBJECTS)"
- MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
- ;;
- esac
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
+ MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
+ MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
+ else
+ MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
+ MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
+ fi
if test "${SHARED_BUILD}" = "1" ; then
- MAKE_LIB=${MAKE_SHARED_LIB}
+ MAKE_LIB="${MAKE_SHARED_LIB} "
else
- MAKE_LIB=${MAKE_STATIC_LIB}
+ MAKE_LIB="${MAKE_STATIC_LIB} "
fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# eval these two values to dereference the ${DBGX} variable.
-#--------------------------------------------------------------------
-
-eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
-eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
+ #--------------------------------------------------------------------
+ # Shared libraries and static libraries have different names.
+ # Use the double eval to make sure any variables in the suffix is
+ # substituted. (@@@ Might not be necessary anymore)
+ #--------------------------------------------------------------------
-#--------------------------------------------------------------------
-# Shared libraries and static libraries have different names.
-#--------------------------------------------------------------------
-
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
+ if test "${TEA_PLATFORM}" = "windows" ; then
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=:
+ # We force the unresolved linking of symbols that are really in
+ # the private libraries of Tcl and Tk.
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+ fi
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
else
- eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
fi
- eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
- ;;
- *)
+ # Some packages build there own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ # These aren't needed on Windows (either MSVC or gcc)
+ RANLIB=:
+ RANLIB_STUB=:
+ else
+ RANLIB_STUB="${RANLIB}"
if test "${SHARED_BUILD}" = "1" ; then
- SHLIB_LD_LIBS="${TCL_BUILD_STUB_LIB_SPEC}"
- eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
+ fi
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
RANLIB=:
else
- eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
fi
- eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
- ;;
-esac
+ # Some packages build there own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ fi
+
+ # These are escaped so that only CFLAGS is picked up at configure time.
+ # The other values will be substituted at make time.
+ CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
+ fi
+
+
-#--------------------------------------------------------------------
-# __CHANGE__
-# Change the name from exampeA_LIB_FILE to match your package name.
-# Use the stub_LIB_FILE substitution if your package creates a stub
-# library.
-#--------------------------------------------------------------------
#--------------------------------------------------------------------
-# Cache the stub library name so that the itk configure script can pick
-# it up.
+# __CHANGE__
+# Change the name from exampeA_LIB_FILE to match your package name.
+# Use the stub_LIB_FILE substitution if your package creates a stub
+# library.
#--------------------------------------------------------------------
-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=${itclstub_LIB_FILE}
-fi
+itcl_STUB_LIB_FILE=${PKG_STUB_LIB_FILE}
+itcl_LIB_FILE=${PKG_LIB_FILE}
+
#--------------------------------------------------------------------
@@ -1690,14 +9425,22 @@ fi
#--------------------------------------------------------------------
- echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:1695: checking for tclsh" >&5
+ # Allow the user to provide this setting in the env
+ if test "x${TCLSH_PROG}" = "x" ; then
+ echo "$as_me:$LINENO: checking for tclsh" >&5
+echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
- if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ if test "${ac_cv_path_tclsh+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ if test "${TEA_PLATFORM}" != "windows" -o \
+ \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
+ # Do not allow target tclsh in known cross-compile builds,
+ # as we need one we can run on this system
+ search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
+ fi
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
@@ -1709,336 +9452,1050 @@ else
fi
done
done
-
+
fi
- 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; }
+ if test -f "$ac_cv_path_tclsh" ; then
+ TCLSH_PROG=$ac_cv_path_tclsh
+ echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
+echo "${ECHO_T}$TCLSH_PROG" >&6
+ else
+ { { echo "$as_me:$LINENO: error: No tclsh found in PATH: $search_path" >&5
+echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
-
+
+
+
+#--------------------------------------------------------------------
+# These are for itclConfig.sh
+#--------------------------------------------------------------------
+
+# pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
+eval pkglibdir="${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}"
+if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+ eval itcl_LIB_FLAG="-litcl${PACKAGE_VERSION}${DBGX}"
+ eval itcl_STUB_LIB_FLAG="-litclstub${PACKAGE_VERSION}${DBGX}"
+else
+ eval itcl_LIB_FLAG="-litcl`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+ eval itcl_STUB_LIB_FLAG="-litclstub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+fi
+itcl_BUILD_LIB_SPEC="-L`pwd` ${itcl_LIB_FLAG}"
+itcl_LIB_SPEC="-L${pkglibdir} ${itcl_LIB_FLAG}"
+
+itcl_BUILD_STUB_LIB_SPEC="-L`pwd` ${itcl_STUB_LIB_FLAG}"
+itcl_STUB_LIB_SPEC="-L${pkglibdir} ${itcl_STUB_LIB_FLAG}"
+itcl_BUILD_STUB_LIB_PATH="`pwd`/${itcl_STUB_LIB_FILE}"
+itcl_STUB_LIB_PATH="${pkglibdir}/${itcl_STUB_LIB_FILE}"
+
+
+
+
+
+
+
+
+# itcl_SRC_DIR must be a fully qualified path
+eval itcl_SRC_DIR="$srcdir"
+itcl_SRC_DIR=`cd "${itcl_SRC_DIR}"; pwd`
#--------------------------------------------------------------------
# Finally, substitute all of the various values into the Makefile.
#--------------------------------------------------------------------
-trap '' 1 2 15
-cat > confcache <<\EOF
+ ac_config_files="$ac_config_files Makefile pkgIndex.tcl itclConfig.sh"
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile \
- pkgIndex.tcl itclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@CYGPATH@%$CYGPATH%g
-s%@RELPATH@%$RELPATH%g
-s%@ITCL_GENERIC_DIR_NATIVE@%$ITCL_GENERIC_DIR_NATIVE%g
-s%@ITCL_WIN_DIR_NATIVE@%$ITCL_WIN_DIR_NATIVE%g
-s%@ITCL_UNIX_DIR_NATIVE@%$ITCL_UNIX_DIR_NATIVE%g
-s%@ITCL_INCLUDES@%$ITCL_INCLUDES%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
-s%@TCL_TOP_DIR_NATIVE@%$TCL_TOP_DIR_NATIVE%g
-s%@TCL_GENERIC_DIR_NATIVE@%$TCL_GENERIC_DIR_NATIVE%g
-s%@TCL_UNIX_DIR_NATIVE@%$TCL_UNIX_DIR_NATIVE%g
-s%@TCL_WIN_DIR_NATIVE@%$TCL_WIN_DIR_NATIVE%g
-s%@TCL_BMAP_DIR_NATIVE@%$TCL_BMAP_DIR_NATIVE%g
-s%@TCL_TOOL_DIR_NATIVE@%$TCL_TOOL_DIR_NATIVE%g
-s%@TCL_PLATFORM_DIR_NATIVE@%$TCL_PLATFORM_DIR_NATIVE%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@PLATFORM_SOURCES@%$PLATFORM_SOURCES%g
-s%@PLATFORM_OBJECTS@%$PLATFORM_OBJECTS%g
-s%@PLATFORM_DIR@%$PLATFORM_DIR%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-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%@itclstub_LIB_FILE@%$itclstub_LIB_FILE%g
-s%@itcl_LIB_FILE@%$itcl_LIB_FILE%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by itcl $as_me 3.3, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+itcl config.status 3.3
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_ACEOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile \
- pkgIndex.tcl itclConfig.sh"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "pkgIndex.tcl" ) CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
+ "itclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES itclConfig.sh" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
+done
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@CYGPATH@,$CYGPATH,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@PKG_LIB_FILE@,$PKG_LIB_FILE,;t t
+s,@PKG_STUB_LIB_FILE@,$PKG_STUB_LIB_FILE,;t t
+s,@PKG_STUB_SOURCES@,$PKG_STUB_SOURCES,;t t
+s,@PKG_STUB_OBJECTS@,$PKG_STUB_OBJECTS,;t t
+s,@PKG_TCL_SOURCES@,$PKG_TCL_SOURCES,;t t
+s,@PKG_HEADERS@,$PKG_HEADERS,;t t
+s,@PKG_INCLUDES@,$PKG_INCLUDES,;t t
+s,@PKG_LIBS@,$PKG_LIBS,;t t
+s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
+s,@LN_S@,$LN_S,;t t
+s,@CONFIG_CLEAN_FILES@,$CONFIG_CLEAN_FILES,;t t
+s,@TCL_VERSION@,$TCL_VERSION,;t t
+s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
+s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
+s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
+s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
+s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
+s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
+s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
+s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
+s,@TCL_LIBS@,$TCL_LIBS,;t t
+s,@TCL_DEFS@,$TCL_DEFS,;t t
+s,@TCL_EXTRA_CFLAGS@,$TCL_EXTRA_CFLAGS,;t t
+s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
+s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CPP@,$CPP,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@EGREP@,$EGREP,;t t
+s,@MATH_LIBS@,$MATH_LIBS,;t t
+s,@PKG_SOURCES@,$PKG_SOURCES,;t t
+s,@PKG_OBJECTS@,$PKG_OBJECTS,;t t
+s,@CLEANFILES@,$CLEANFILES,;t t
+s,@TCL_TOP_DIR_NATIVE@,$TCL_TOP_DIR_NATIVE,;t t
+s,@TCL_GENERIC_DIR_NATIVE@,$TCL_GENERIC_DIR_NATIVE,;t t
+s,@TCL_UNIX_DIR_NATIVE@,$TCL_UNIX_DIR_NATIVE,;t t
+s,@TCL_WIN_DIR_NATIVE@,$TCL_WIN_DIR_NATIVE,;t t
+s,@TCL_BMAP_DIR_NATIVE@,$TCL_BMAP_DIR_NATIVE,;t t
+s,@TCL_TOOL_DIR_NATIVE@,$TCL_TOOL_DIR_NATIVE,;t t
+s,@TCL_PLATFORM_DIR_NATIVE@,$TCL_PLATFORM_DIR_NATIVE,;t t
+s,@TCL_INCLUDES@,$TCL_INCLUDES,;t t
+s,@SHARED_BUILD@,$SHARED_BUILD,;t t
+s,@AR@,$AR,;t t
+s,@TCLSH_PROG@,$TCLSH_PROG,;t t
+s,@CELIB_DIR@,$CELIB_DIR,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@DL_LIBS@,$DL_LIBS,;t t
+s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
+s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
+s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
+s,@STLIB_LD@,$STLIB_LD,;t t
+s,@SHLIB_LD@,$SHLIB_LD,;t t
+s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
+s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
+s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
+s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
+s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
+s,@TCL_DBGX@,$TCL_DBGX,;t t
+s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
+s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
+s,@MAKE_LIB@,$MAKE_LIB,;t t
+s,@MAKE_SHARED_LIB@,$MAKE_SHARED_LIB,;t t
+s,@MAKE_STATIC_LIB@,$MAKE_STATIC_LIB,;t t
+s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
+s,@RANLIB_STUB@,$RANLIB_STUB,;t t
+s,@itcl_STUB_LIB_FILE@,$itcl_STUB_LIB_FILE,;t t
+s,@itcl_LIB_FILE@,$itcl_LIB_FILE,;t t
+s,@itcl_BUILD_LIB_SPEC@,$itcl_BUILD_LIB_SPEC,;t t
+s,@itcl_LIB_SPEC@,$itcl_LIB_SPEC,;t t
+s,@itcl_BUILD_STUB_LIB_SPEC@,$itcl_BUILD_STUB_LIB_SPEC,;t t
+s,@itcl_STUB_LIB_SPEC@,$itcl_STUB_LIB_SPEC,;t t
+s,@itcl_BUILD_STUB_LIB_PATH@,$itcl_BUILD_STUB_LIB_PATH,;t t
+s,@itcl_STUB_LIB_PATH@,$itcl_STUB_LIB_PATH,;t t
+s,@itcl_SRC_DIR@,$itcl_SRC_DIR,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+done
+_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-exit 0
-EOF
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
diff --git a/itcl/itcl/configure.in b/itcl/itcl/configure.in
index b63ca4105be..e1e905070e8 100644
--- a/itcl/itcl/configure.in
+++ b/itcl/itcl/configure.in
@@ -1,157 +1,118 @@
+#!/bin/bash -norc
#--------------------------------------------------------------------
# Sample configure.in for Tcl Extensions. The only places you should
# need to modify this file are marked by the string __CHANGE__
#--------------------------------------------------------------------
-#--------------------------------------------------------------------
-# __CHANGE__
-# This very first macro is used to verify that the configure script can
-# find the sources. The argument to AC_INIT should be a unique filename
-# for this package, and can be a relative path, such as:
-#
-# AC_INIT(../generic/tcl.h)
-#--------------------------------------------------------------------
-
-AC_INIT(generic/itcl.h)
-AC_CONFIG_AUX_DIR(../config)
-
-#--------------------------------------------------------------------
-# __CHANGE__
-# Set your package name and version numbers here. The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows). The VERSION variable is used on the
-# other systems.
-#--------------------------------------------------------------------
-
-PACKAGE=itcl
-
-MAJOR_VERSION=3
-MINOR_VERSION=2
-PATCHLEVEL=.1
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
+#-----------------------------------------------------------------------
+# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
+# set as provided. These will also be added as -D defs in your Makefile
+# so you can encode the package version directly into the source files.
+#-----------------------------------------------------------------------
-
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
+AC_INIT([itcl], [3.3])
#--------------------------------------------------------------------
-# We put this here so that you can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
+# Call TEA_INIT as the first TEA_ macro to set up initial vars.
+# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
+# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-
-#------------------------------------------------------------------------
-# Handle the --prefix=... option
-#------------------------------------------------------------------------
+TEA_INIT([3.2])
-if test "${prefix}" = "NONE"; then
- prefix=/usr/local
-fi
-if test "${exec_prefix}" = "NONE"; then
- exec_prefix=$prefix
+AC_PROG_LN_S
+CONFIG_CLEAN_FILES=
+if test ! -d $srcdir/tclconfig ; then
+ if test -d $srcdir/../tclconfig ; then
+ $LN_S $srcdir/../tclconfig tclconfig
+ CONFIG_CLEAN_FILES=tclconfig
+ fi
fi
+AC_SUBST(CONFIG_CLEAN_FILES)
-#--------------------------------------------------------------------
-# Check whether --enable-gcc or --disable-gcc was given. Do this
-# before AC_CYGWIN is called so the compiler can
-# be fully tested by built-in autoconf tools.
-# This macro also calls AC_PROG_CC to set the compiler if --enable-gcc
-# was not used.
-#--------------------------------------------------------------------
-
-SC_ENABLE_GCC
-AC_PROG_INSTALL
+AC_CONFIG_AUX_DIR(tclconfig)
#--------------------------------------------------------------------
-# Checks to see if the make program sets the $MAKE variable.
+# Load the tclConfig.sh file
#--------------------------------------------------------------------
-AC_PROG_MAKE_SET
-
-#--------------------------------------------------------------------
-# Find ranlib
-#--------------------------------------------------------------------
+TEA_PATH_TCLCONFIG
+TEA_LOAD_TCLCONFIG
-AC_PROG_RANLIB
+#-----------------------------------------------------------------------
+# Handle the --prefix=... option by defaulting to what Tcl gave.
+# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
+#-----------------------------------------------------------------------
-#--------------------------------------------------------------------
-# This macro performs additional compiler tests.
-#--------------------------------------------------------------------
+TEA_PREFIX
-AC_CYGWIN
+#-----------------------------------------------------------------------
+# Standard compiler checks.
+# This sets up CC by using the CC env var, or looks for gcc otherwise.
+# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
+# the basic setup necessary to compile executables.
+#-----------------------------------------------------------------------
-#--------------------------------------------------------------------
-# Determines the correct binary file extension (.o, .obj, .exe etc.)
-#--------------------------------------------------------------------
+TEA_SETUP_COMPILER
-AC_OBJEXT
-AC_EXEEXT
+#-----------------------------------------------------------------------
+# __CHANGE__
+# Specify the C source files to compile in TEA_ADD_SOURCES,
+# public headers that need to be installed in TEA_ADD_HEADERS,
+# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
+# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
+# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
+# and PKG_TCL_SOURCES.
+#-----------------------------------------------------------------------
+
+TEA_ADD_SOURCES([itclStubInit.c
+ itcl_bicmds.c
+ itcl_class.c
+ itcl_cmds.c
+ itcl_ensemble.c
+ itcl_linkage.c
+ itcl_methods.c
+ itcl_migrate.c
+ itcl_objects.c
+ itcl_parse.c
+ itcl_util.c])
+TEA_ADD_HEADERS([generic/itcl.h
+ generic/itclDecls.h
+ generic/itclInt.h
+ generic/itclIntDecls.h])
+TEA_ADD_INCLUDES([-I\"`${CYGPATH} ${srcdir}/generic`\"])
+TEA_ADD_LIBS([])
+TEA_ADD_CFLAGS([])
+TEA_ADD_STUB_SOURCES([itclStubLib.c])
+TEA_ADD_TCL_SOURCES([library/itcl.tcl])
#--------------------------------------------------------------------
-# "cygpath" is used on windows to generate native path names for include
-# files.
-# These variables should only be used with the compiler and linker since
-# they generate native path names.
+# __CHANGE__
+# A few miscellaneous platform-specific items:
#
-# Unix tclConfig.sh points SRC_DIR at the top-level directory of
-# the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at
-# the win subdirectory. Hence the different usages of SRC_DIR below.
+# Define a special symbol for Windows (BUILD_itcl in this case) so
+# that we create the export library with the dll. See sha1.h on how
+# to use this.
#
-# This must be done before calling SC_PUBLIC_TCL_HEADERS
+# Windows creates a few extra files that need to be cleaned up.
+# You can add more files to clean if your extension creates any extra
+# files.
#
-# RELPATH is used to locate binary extensions relative to the lib directory.
-# It is only needed if mkIndex.tcl can't generate an installed pkgIndex.tcl
-# file for you.
-#--------------------------------------------------------------------
-
-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"
- ;;
- *)
- CYGPATH=echo
- RELPATH=..
- ;;
-esac
-
-AC_SUBST(CYGPATH)
-AC_SUBST(RELPATH)
-
-#--------------------------------------------------------------------
-# Includes for this package
+# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
+# These will be appended to the current set of compiler flags for
+# your system.
#--------------------------------------------------------------------
-ITCL_GENERIC_DIR_NATIVE=`${CYGPATH} ${srcdir}/generic`
-ITCL_WIN_DIR_NATIVE=`${CYGPATH} ${srcdir}/win`
-ITCL_UNIX_DIR_NATIVE=`${CYGPATH} ${srcdir}/unix`
-
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
- ITCL_PLATFORM_DIR_NATIVE=${ITCL_WIN_DIR_NATIVE}
- ;;
- *)
- ITCL_PLATFORM_DIR_NATIVE=${ITCL_UNIX_DIR_NATIVE}
- ;;
-esac
-
-ITCL_INCLUDES="-I\"${ITCL_GENERIC_DIR_NATIVE}\" -I\"${ITCL_PLATFORM_DIR_NATIVE}\""
-
-AC_SUBST(ITCL_GENERIC_DIR_NATIVE)
-AC_SUBST(ITCL_WIN_DIR_NATIVE)
-AC_SUBST(ITCL_UNIX_DIR_NATIVE)
-AC_SUBST(ITCL_INCLUDES)
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
+if test "${TEA_PLATFORM}" = "windows" ; then
+ AC_DEFINE(BUILD_itcl)
+ CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
+ TEA_ADD_SOURCES([dllEntryPoint.c])
+else
+ CLEANFILES=
+ #TEA_ADD_SOURCES([])
+fi
-SC_PATH_TCLCONFIG
-SC_LOAD_TCLCONFIG
+AC_SUBST(CLEANFILES)
#--------------------------------------------------------------------
# __CHANGE__
@@ -159,99 +120,51 @@ SC_LOAD_TCLCONFIG
# hard to only rely on the Tcl public header files. Internal headers
# contain private data structures and are subject to change without
# notice.
-# This must be done AFTER calling SC_PATH_TCLCONFIG/SC_LOAD_TCLCONFIG
+# This must be done AFTER calling TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG
# so that we can extract TCL_SRC_DIR from the config file (in the case
# of private headers
#--------------------------------------------------------------------
-#SC_PUBLIC_TCL_HEADERS
-SC_PRIVATE_TCL_HEADERS
+#TEA_PUBLIC_TCL_HEADERS
+TEA_PRIVATE_TCL_HEADERS
#--------------------------------------------------------------------
-# __CHANGE__
-# A few miscellaneous platform-specific items:
-#
-# Define a special symbol for Windows (BUILD_itcl in this case) so
-# that we create the export library with the dll. See sha1.h on how
-# to use this.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# You can add more files to clean if your extension creates any extra
-# files.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
+# We need to enable the threading macros found in tcl.h and tclInt.h.
+# The use of the threading features is determined by the core the
+# extension is loaded into, but we need to compile with these macros
+# turned on.
#--------------------------------------------------------------------
-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)'
- PLATFORM_OBJECTS='$(WIN_OBJECTS)'
- PLATFORM_DIR='$(WIN_DIR)'
- ;;
- *)
- CLEANFILES=
- PLATFORM_SOURCES='$(UNIX_SOURCES)'
- PLATFORM_OBJECTS='$(UNIX_OBJECTS)'
- PLATFORM_DIR='$(UNIX_DIR)'
- ;;
-esac
-
-AC_SUBST(CLEANFILES)
-AC_SUBST(PLATFORM_SOURCES)
-AC_SUBST(PLATFORM_OBJECTS)
-AC_SUBST(PLATFORM_DIR)
+AC_DEFINE(TCL_THREADS)
#--------------------------------------------------------------------
# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
+# This auto-enables if Tcl was compiled threaded.
#--------------------------------------------------------------------
-SC_ENABLE_THREADS
+#TEA_ENABLE_THREADS
#--------------------------------------------------------------------
# The statement below defines a collection of symbols related to
# building as a shared library instead of a static library.
#--------------------------------------------------------------------
-SC_ENABLE_SHARED
+TEA_ENABLE_SHARED
#--------------------------------------------------------------------
# This macro figures out what flags to use with the compiler/linker
# when building shared/static debug/optimized objects. This information
-# is all taken from the tclConfig.sh file.
+# can be taken from the tclConfig.sh file, but this figures it all out.
#--------------------------------------------------------------------
-CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
-CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
-LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
-LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
-SHLIB_LD=${TCL_SHLIB_LD}
-STLIB_LD=${TCL_STLIB_LD}
-SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
-
-AC_SUBST(CFLAGS_DEBUG)
-AC_SUBST(CFLAGS_OPTIMIZE)
-AC_SUBST(STLIB_LD)
-AC_SUBST(SHLIB_LD)
-AC_SUBST(SHLIB_CFLAGS)
-AC_SUBST(SHLIB_LDFLAGS)
+TEA_CONFIG_CFLAGS
#--------------------------------------------------------------------
# Set the default compiler switches based on the --enable-symbols
# option.
#--------------------------------------------------------------------
-SC_ENABLE_SYMBOLS
-
-if test "${SHARED_BUILD}" = "1" ; then
- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
-else
- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
-fi
+TEA_ENABLE_SYMBOLS
#--------------------------------------------------------------------
# Everyone should be linking against the Tcl stub library. If you
@@ -266,45 +179,11 @@ fi
#--------------------------------------------------------------------
# This macro generates a line to use when building a library. It
-# depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS,
-# and SC_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-SC_MAKE_LIB
-
-#--------------------------------------------------------------------
-# eval these two values to dereference the ${DBGX} variable.
-#--------------------------------------------------------------------
-
-eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
-eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
-
-#--------------------------------------------------------------------
-# Shared libraries and static libraries have different names.
+# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
+# and TEA_LOAD_TCLCONFIG macros above.
#--------------------------------------------------------------------
-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}"
- ;;
- *)
- 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
+TEA_MAKE_LIB
#--------------------------------------------------------------------
# __CHANGE__
@@ -313,16 +192,10 @@ esac
# library.
#--------------------------------------------------------------------
-AC_SUBST(itclstub_LIB_FILE)
+itcl_STUB_LIB_FILE=${PKG_STUB_LIB_FILE}
+itcl_LIB_FILE=${PKG_LIB_FILE}
+AC_SUBST(itcl_STUB_LIB_FILE)
AC_SUBST(itcl_LIB_FILE)
-AC_SUBST(SHLIB_LD_LIBS)
-
-#--------------------------------------------------------------------
-# Cache the stub library name so that the itk configure script can pick
-# it up.
-#--------------------------------------------------------------------
-
-AC_CACHE_VAL(ac_cv_itclstub_LIB_FILE, ac_cv_itclstub_LIB_FILE=${itclstub_LIB_FILE})
#--------------------------------------------------------------------
# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
@@ -332,11 +205,43 @@ AC_CACHE_VAL(ac_cv_itclstub_LIB_FILE, ac_cv_itclstub_LIB_FILE=${itclstub_LIB_FIL
# versions have bugs in the pkg_mkIndex routine.
#--------------------------------------------------------------------
-SC_PROG_TCLSH
+TEA_PROG_TCLSH
+
+#--------------------------------------------------------------------
+# These are for itclConfig.sh
+#--------------------------------------------------------------------
+
+# pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
+eval pkglibdir="${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}"
+if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+ eval itcl_LIB_FLAG="-litcl${PACKAGE_VERSION}${DBGX}"
+ eval itcl_STUB_LIB_FLAG="-litclstub${PACKAGE_VERSION}${DBGX}"
+else
+ eval itcl_LIB_FLAG="-litcl`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+ eval itcl_STUB_LIB_FLAG="-litclstub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+fi
+itcl_BUILD_LIB_SPEC="-L`pwd` ${itcl_LIB_FLAG}"
+itcl_LIB_SPEC="-L${pkglibdir} ${itcl_LIB_FLAG}"
+
+itcl_BUILD_STUB_LIB_SPEC="-L`pwd` ${itcl_STUB_LIB_FLAG}"
+itcl_STUB_LIB_SPEC="-L${pkglibdir} ${itcl_STUB_LIB_FLAG}"
+itcl_BUILD_STUB_LIB_PATH="`pwd`/${itcl_STUB_LIB_FILE}"
+itcl_STUB_LIB_PATH="${pkglibdir}/${itcl_STUB_LIB_FILE}"
+
+AC_SUBST(itcl_BUILD_LIB_SPEC)
+AC_SUBST(itcl_LIB_SPEC)
+AC_SUBST(itcl_BUILD_STUB_LIB_SPEC)
+AC_SUBST(itcl_STUB_LIB_SPEC)
+AC_SUBST(itcl_BUILD_STUB_LIB_PATH)
+AC_SUBST(itcl_STUB_LIB_PATH)
+
+# itcl_SRC_DIR must be a fully qualified path
+eval itcl_SRC_DIR="$srcdir"
+itcl_SRC_DIR=`cd "${itcl_SRC_DIR}"; pwd`
+AC_SUBST(itcl_SRC_DIR)
#--------------------------------------------------------------------
# Finally, substitute all of the various values into the Makefile.
#--------------------------------------------------------------------
-AC_OUTPUT([Makefile \
- pkgIndex.tcl itclConfig.sh])
+AC_OUTPUT([Makefile pkgIndex.tcl itclConfig.sh])
diff --git a/itcl/itcl/doc/RegisterC.3 b/itcl/itcl/doc/RegisterC.3
new file mode 100644
index 00000000000..c1e180c26f4
--- /dev/null
+++ b/itcl/itcl/doc/RegisterC.3
@@ -0,0 +1,124 @@
+'\"
+'\" Copyright (c) 1993-1998 Lucent Technologies, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: $Id$
+'\"
+.so man.macros
+.TH Itcl_RegisterC 3 3.0 itcl "[incr\ Tcl] Library Procedures"
+.BS
+'\" Note: do not modify the .SH NAME line immediately below!
+.SH NAME
+Itcl_RegisterC, Itcl_RegisterObjC, Itcl_FindC \- Associate a symbolic name with a C procedure.
+.SH SYNOPSIS
+.nf
+\fB#include <itcl.h>\fR
+.sp
+int
+\fBItcl_RegisterC\fR(\fIinterp, cmdName, argProc, clientData, deleteProc\fR)
+.sp
+int
+\fBItcl_RegisterObjC\fR(\fIinterp, cmdName, objProc, clientData, deleteProc\fR)
+.sp
+int
+\fBItcl_FindC\fR(\fIinterp, cmdName, argProcPtr, objProcPtr, cDataPtr\fR)
+.SH ARGUMENTS
+.AP Tcl_Interp *interp in
+Interpreter in which to create new command.
+.VS 8.4
+.AP "CONST char" *cmdName in
+.VE
+Name of command.
+.AP Tcl_CmdProc *argProc in
+Implementation of new command: \fIargProc\fR will be called whenever
+.AP Tcl_CmdProc **argProcPtr in/out
+The Tcl_CmdProc * to receive the pointer.
+.AP Tcl_ObjCmdProc *objProc in
+Implementation of the new command: \fIobjProc\fR will be called whenever
+.AP Tcl_ObjCmdProc **objProcPtr in/out
+The Tcl_ObjCmdProc * to receive the pointer.
+.AP ClientData clientData in
+Arbitrary one-word value to pass to \fIproc\fR and \fIdeleteProc\fR.
+.AP ClientData *cDataPtr in/out
+The ClientData to receive the pointer.
+.AP Tcl_CmdDeleteProc *deleteProc in
+Procedure to call before \fIcmdName\fR is deleted from the interpreter;
+allows for command-specific cleanup. If NULL, then no procedure is
+called before the command is deleted.
+.BE
+
+.SH DESCRIPTION
+.PP
+Used to associate a symbolic name with an (argc,argv) C procedure
+that handles a Tcl command. Procedures that are registered in this
+manner can be referenced in the body of an [incr Tcl] class
+definition to specify C procedures to acting as methods/procs.
+Usually invoked in an initialization routine for an extension,
+called out in Tcl_AppInit() at the start of an application.
+.PP
+Each symbolic procedure can have an arbitrary client data value
+associated with it. This value is passed into the command
+handler whenever it is invoked.
+.PP
+A symbolic procedure name can be used only once for a given style
+(arg/obj) handler. If the name is defined with an arg-style
+handler, it can be redefined with an obj-style handler; or if
+the name is defined with an obj-style handler, it can be redefined
+with an arg-style handler. In either case, any previous client
+data is discarded and the new client data is remembered. However,
+if a name is redefined to a different handler of the same style,
+this procedure returns an error.
+.PP
+Returns TCL_OK on success, or TCL_ERROR (along with an error message
+in interp->result) if anything goes wrong.
+.PP
+C procedures can be integrated into an \fB[incr\ Tcl]\fR class
+definition to implement methods, procs, and the "config" code
+for public variables. Any body that starts with "\fB@\fR"
+is treated as the symbolic name for a C procedure.
+.PP
+Symbolic names are established by registering procedures via
+\fBItcl_RegisterC()\fR. This is usually done in the \fBTcl_AppInit()\fR
+procedure, which is automatically called when the interpreter starts up.
+In the following example, the procedure \fCMy_FooCmd()\fR is registered
+with the symbolic name "foo". This procedure can be referenced in
+the \fBbody\fR command as "\fC@foo\fR".
+.CS
+int
+Tcl_AppInit(interp)
+ Tcl_Interp *interp; /* Interpreter for application. */
+{
+ if (Itcl_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+
+ if (Itcl_RegisterC(interp, "foo", My_FooCmd) != TCL_OK) {
+ return TCL_ERROR;
+ }
+}
+.CE
+C procedures are implemented just like ordinary Tcl commands.
+See the \fBCrtCommand\fR man page for details. Within the procedure,
+class data members can be accessed like ordinary variables
+using \fBTcl_SetVar()\fR, \fBTcl_GetVar()\fR, \fBTcl_TraceVar()\fR,
+etc. Class methods and procs can be executed like ordinary commands
+using \fBTcl_Eval()\fR. \fB[incr\ Tcl]\fR makes this possible by
+automatically setting up the context before executing the C procedure.
+.PP
+This scheme provides a natural migration path for code development.
+Classes can be developed quickly using Tcl code to implement the
+bodies. An entire application can be built and tested. When
+necessary, individual bodies can be implemented with C code to
+improve performance.
+.PP
+See the Archetype class in \fB[incr\ Tk]\fR for an example of how this
+C linking method is used.
+
+.SH "SEE ALSO"
+Tcl_CreateCommand, Tcl_CreateObjCommand
+
+.SH KEYWORDS
+class, object
+
diff --git a/itcl/itcl/doc/Stack.3 b/itcl/itcl/doc/Stack.3
new file mode 100644
index 00000000000..e5ce2101515
--- /dev/null
+++ b/itcl/itcl/doc/Stack.3
@@ -0,0 +1,60 @@
+'\"
+'\" Copyright (c) 1993-1998 Lucent Technologies, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: $Id$
+'\"
+.so man.macros
+.TH Itcl_InitStack 3 3.0 itcl "[incr\ Tcl] Library Procedures"
+.BS
+'\" Note: do not modify the .SH NAME line immediately below!
+.SH NAME
+Itcl_InitStack, Itcl_DeleteStack, Itcl_PushStack, Itcl_PopStack, Itcl_PeekStack, Itcl_GetStackValue, Itcl_GetStackSize \- Manipulate an Itcl stack object.
+.SH SYNOPSIS
+.nf
+\fB#include <itcl.h>\fR
+.sp
+int
+\fBItcl_InitStack\fR(\fIstack\fR)
+.sp
+int
+\fBItcl_DeleteStack\fR(\fIstack\fR)
+.sp
+int
+\fBItcl_PushStack\fR(\fIcdata, stack\fR)
+.sp
+ClientData
+\fBItcl_PopStack\fR(\fIstack\fR)
+.sp
+ClientData
+\fBItcl_PeekStack\fR(\fIstack\fR)
+.sp
+ClientData
+\fBItcl_GetStackValue\fR(\fIstack, pos\fR)
+.sp
+int
+\fBItcl_GetStackSize\fR(\fIstack\fR)
+.SH ARGUMENTS
+.AP Itcl_Stack *stack in
+Stack info structure.
+.AP int pos in
+position in stack order from the top.
+.AP ClientData clientData in
+Arbitrary one-word value to save in the stack.
+.BE
+
+.SH DESCRIPTION
+.PP
+\fBItcl_InitStack\fR initializes a stack structure and \fBItcl_DeleteStack\fR
+deletes it. \fBItcl_PushStack\fR pushes the \fIcdata\fR value onto the stack.
+\fBItcl_PopStack\fR removes and returns the top most \fIcdata\fR value.
+\fBItcl_PeekStack\fR returns the top most value, but does not remove it.
+\fBItcl_GetStackValue\fR gets a value at some index within the stack. Index
+"0" is the first value pushed onto the stack. \fBItcl_GetStackSize\fR
+returns the count of entries on the stack.
+
+.SH KEYWORDS
+stack
+
diff --git a/itcl/itcl/doc/body.n b/itcl/itcl/doc/body.n
index a01470140fe..ef9e802e3a1 100644
--- a/itcl/itcl/doc/body.n
+++ b/itcl/itcl/doc/body.n
@@ -13,7 +13,7 @@
.SH NAME
body \- change the body for a class method/proc
.SH SYNOPSIS
-\fBbody \fIclassName\fB::\fIfunction args body\fR
+\fBitcl::body \fIclassName\fB::\fIfunction args body\fR
.BE
.SH DESCRIPTION
@@ -86,7 +86,7 @@ of the constructor/destructor must be included in the class
definition, but they can be redefined via the \fBbody\fR command
as well.
.CS
-class File {
+itcl::class File {
private variable fid ""
constructor {name access} {
set fid [open $name $access]
@@ -100,13 +100,13 @@ class File {
method eof {}
}
-body File::get {} {
+itcl::body File::get {} {
return [gets $fid]
}
-body File::put {line} {
+itcl::body File::put {line} {
puts $fid $line
}
-body File::eof {} {
+itcl::body File::eof {} {
return [::eof $fid]
}
@@ -117,7 +117,7 @@ File x /etc/passwd "r"
while {![x eof]} {
puts "=> [x get]"
}
-delete object x
+itcl::delete object x
.CE
.SH KEYWORDS
diff --git a/itcl/itcl/doc/class.n b/itcl/itcl/doc/class.n
index 16f84f8aaa7..9772faa3f97 100644
--- a/itcl/itcl/doc/class.n
+++ b/itcl/itcl/doc/class.n
@@ -13,7 +13,7 @@
.SH NAME
class \- create a class of objects
.SH SYNOPSIS
-\fBclass \fIclassName\fR \fB{
+\fBitcl::class \fIclassName\fR \fB{
.br
\fBinherit \fIbaseClass\fR ?\fIbaseClass\fR...?
.br
@@ -227,7 +227,7 @@ Once a common data member has been defined, it can be set using
This allows common data members to be initialized as arrays.
For example:
.CS
-class Foo {
+itcl::class Foo {
common boolean
set boolean(true) 1
set boolean(false) 0
@@ -366,7 +366,7 @@ derived class handle the same operations as the base class, but
with its own specialized behavior. For example, suppose we have
a Toaster class that looks like this:
.CS
-class Toaster {
+itcl::class Toaster {
variable crumbs 0
method toast {nslices} {
if {$crumbs > 50} {
@@ -383,7 +383,7 @@ We might create another class like SmartToaster that redefines
the "toast" method. If we want to access the base class method,
we can qualify it with the base class name, to avoid ambiguity:
.CS
-class SmartToaster {
+itcl::class SmartToaster {
inherit Toaster
method toast {nslices} {
if {$crumbs > 40} {
@@ -396,7 +396,7 @@ class SmartToaster {
Instead of hard-coding the base class name, we can use the
"chain" command like this:
.CS
-class SmartToaster {
+itcl::class SmartToaster {
inherit Toaster
method toast {nslices} {
if {$crumbs > 40} {
diff --git a/itcl/itcl/doc/code.n b/itcl/itcl/doc/code.n
index 294ba7a41cd..23afe94f0ac 100644
--- a/itcl/itcl/doc/code.n
+++ b/itcl/itcl/doc/code.n
@@ -13,7 +13,7 @@
.SH NAME
code \- capture the namespace context for a code fragment
.SH SYNOPSIS
-\fBcode \fR?\fB-namespace \fIname\fR? \fIcommand \fR?\fIarg arg ...\fR?
+\fBitcl::code \fR?\fB-namespace \fIname\fR? \fIcommand \fR?\fIarg arg ...\fR?
.BE
.SH DESCRIPTION
diff --git a/itcl/itcl/doc/configbody.n b/itcl/itcl/doc/configbody.n
index 51760cf686d..d0592593531 100644
--- a/itcl/itcl/doc/configbody.n
+++ b/itcl/itcl/doc/configbody.n
@@ -13,7 +13,7 @@
.SH NAME
configbody \- change the "config" code for a public variable
.SH SYNOPSIS
-\fBconfigbody \fIclassName\fB::\fIvarName body\fR
+\fBitcl::configbody \fIclassName\fB::\fIvarName body\fR
.BE
.SH DESCRIPTION
@@ -76,7 +76,7 @@ existing file is closed, and a new file is opened. Note that
the "config" code for a public variable is optional. The "-access"
option, for example, does not have it.
.CS
-class File {
+itcl::class File {
private variable fid ""
public variable name ""
@@ -96,17 +96,17 @@ class File {
method eof {}
}
-body File::get {} {
+itcl::body File::get {} {
return [gets $fid]
}
-body File::put {line} {
+itcl::body File::put {line} {
puts $fid $line
}
-body File::eof {} {
+itcl::body File::eof {} {
return [::eof $fid]
}
-configbody File::name {
+itcl::configbody File::name {
if {$fid != ""} {
close $fid
}
@@ -122,7 +122,7 @@ x configure -name /etc/passwd
while {![x eof]} {
puts "=> [x get]"
}
-delete object x
+itcl::delete object x
.CE
.SH KEYWORDS
diff --git a/itcl/itcl/doc/delete.n b/itcl/itcl/doc/delete.n
index 709b2e13ab3..262d4e3cdeb 100644
--- a/itcl/itcl/doc/delete.n
+++ b/itcl/itcl/doc/delete.n
@@ -13,7 +13,7 @@
.SH NAME
delete \- delete things in the interpreter
.SH SYNOPSIS
-\fBdelete \fIoption\fR ?\fIarg arg ...\fR?
+\fBitcl::delete \fIoption\fR ?\fIarg arg ...\fR?
.BE
.SH DESCRIPTION
@@ -47,7 +47,7 @@ the \fIname\fR is removed as a command from the interpreter.
If the access command for an object resides in another namespace,
then its qualified name can be used:
.CS
-delete object foo::bar::x
+itcl::delete object foo::bar::x
.CE
If an error is encountered while destructing an object, the
\fBdelete\fR command is aborted and the object remains alive.
diff --git a/itcl/itcl/doc/ensemble.n b/itcl/itcl/doc/ensemble.n
index 58e9adacf11..9c2e48c8b2e 100644
--- a/itcl/itcl/doc/ensemble.n
+++ b/itcl/itcl/doc/ensemble.n
@@ -13,7 +13,7 @@
.SH NAME
ensemble \- create or modify a composite command
.SH SYNOPSIS
-\fBensemble \fIensName\fR ?\fIcommand arg arg...\fR?
+\fBitcl::ensemble \fIensName\fR ?\fIcommand arg arg...\fR?
.br
or
.br
@@ -150,14 +150,14 @@ wait window .
.CE
The Tcl package could define the following ensemble:
.CS
-ensemble wait part variable {name} {
+itcl::ensemble wait part variable {name} {
uplevel vwait $name
}
.CE
The Tk package could add some options to this ensemble, with a
command like this:
.CS
-ensemble wait {
+itcl::ensemble wait {
part visibility {name} {
tkwait visibility $name
}
diff --git a/itcl/itcl/doc/find.n b/itcl/itcl/doc/find.n
index 5dfbedacb0e..cec1e047153 100644
--- a/itcl/itcl/doc/find.n
+++ b/itcl/itcl/doc/find.n
@@ -13,7 +13,7 @@
.SH NAME
find \- search for classes and objects
.SH SYNOPSIS
-\fBfind \fIoption\fR ?\fIarg arg ...\fR?
+\fBitcl::find \fIoption\fR ?\fIarg arg ...\fR?
.BE
.SH DESCRIPTION
@@ -42,7 +42,7 @@ in another context, this command reports its fully-qualified name.
Therefore, you can use the following command to obtain a list where
all names are fully-qualified:
.CS
-find classes ::*
+itcl::find classes ::*
.CE
.TP
\fBfind objects ?\fIpattern\fR? ?\fB-class \fIclassName\fR? ?\fB-isa \fIclassName\fR?
@@ -65,7 +65,7 @@ in another context, this command reports its fully-qualified name.
Therefore, you can use the following command to obtain a list where
all names are fully-qualified:
.CS
-find objects ::*
+itcl::find objects ::*
.CE
.SH KEYWORDS
diff --git a/itcl/itcl/doc/is.n b/itcl/itcl/doc/is.n
new file mode 100644
index 00000000000..c53bcc9981d
--- /dev/null
+++ b/itcl/itcl/doc/is.n
@@ -0,0 +1,66 @@
+'\"
+'\" Copyright (c) 1993-1998 Lucent Technologies, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: $Id$
+'\"
+.so man.macros
+.TH is n 3.3 itcl "[incr\ Tcl]"
+.BS
+'\" Note: do not modify the .SH NAME line immediately below!
+.SH NAME
+is \- test argument to see if it is a class or an object
+.SH SYNOPSIS
+\fBitcl::is \fIoption\fR ?\fIarg arg ...\fR?
+.BE
+
+.SH DESCRIPTION
+.PP
+The \fBis\fR command is used to check if the argument given is
+a class or an object; depending on the option given. If the argument
+if a class or object, then 1 is returned. Otherwise, 0 is returned.
+The \fBis\fR command also recognizes the commands wrapped in the
+itcl \fBcode command.
+.PP
+The \fIoption\fR argument determines what action is carried out
+by the command. The legal \fIoptions\fR (which may be abbreviated)
+are:
+.TP
+\fBis class \fIcommand\fR
+Returns 1 if command is a class, and returns 0 otherwise.
+.sp
+The fully qualified name of the class needs to be given as the \fIcommand\fR
+argument. So, if a class resides in a namespace, then the namespace needs to
+be specified as well. So, if a class \fBC resides in a namespace \fBN, then
+the command should be called like:
+.CS
+\fBis N::C\fR
+ or
+\fBis ::N::C\fR
+.CE
+.TP
+\fBis\fR object ?\fB-class \fIclassName\fR? \fIcommand\fR
+Returns 1 if \fIcommand\fR is an object, and returns 0 otherwise.
+.sp
+If the optional "\fB-class\fR" parameter is specified, then the
+\fIcommand\fR will be checked within the context of the class
+given. Note that \fIclassName\fR has to exist. If not, then an
+error will be given. So, if \fIclassName\fR is uncertain to be
+a class, then the programmer will need to check it's existance
+beforehand, or wrap it in a catch statement.
+.sp
+So, if \fBc\fR is an object in the class \fBC\fR, in namespace N then
+these are the possibilities (all return 1):
+.CS
+set obj [N::C c]
+itcl::is object N::c
+itcl::is object c
+itcl::is object $obj
+itcl::is object [itcl::code c]
+.CE
+
+.SH KEYWORDS
+class, object
+
diff --git a/itcl/itcl/doc/local.n b/itcl/itcl/doc/local.n
index 2c3a0c883bd..ebc527c5ab3 100644
--- a/itcl/itcl/doc/local.n
+++ b/itcl/itcl/doc/local.n
@@ -13,7 +13,7 @@
.SH NAME
local \- create an object local to a procedure
.SH SYNOPSIS
-\fBlocal \fIclassName objName\fR ?\fIarg arg ...\fR?
+\fBitcl::local \fIclassName objName\fR ?\fIarg arg ...\fR?
.BE
.SH DESCRIPTION
@@ -37,7 +37,7 @@ procedure exits. The \fBputs\fR statements included in the
constructor/destructor show the object coming and going
as the procedure is called.
.CS
-class counter {
+itcl::class counter {
private variable count 0
constructor {} {
puts "created: $this"
@@ -68,7 +68,7 @@ puts "test: $result"
set result [test 10]
puts "test: $result"
-puts "objects: [info objects]"
+puts "objects: [itcl::find objects *]"
.CE
.SH KEYWORDS
diff --git a/itcl/itcl/doc/scope.n b/itcl/itcl/doc/scope.n
index f49591e435d..1101777b3ec 100644
--- a/itcl/itcl/doc/scope.n
+++ b/itcl/itcl/doc/scope.n
@@ -13,7 +13,7 @@
.SH NAME
scope \- capture the namespace context for a variable
.SH SYNOPSIS
-\fBscope \fIname\fR
+\fBitcl::scope \fIname\fR
.BE
.SH DESCRIPTION
diff --git a/itcl/itcl/generic/itcl.decls b/itcl/itcl/generic/itcl.decls
index a644f17c2e2..4eae28f1c17 100644
--- a/itcl/itcl/generic/itcl.decls
+++ b/itcl/itcl/generic/itcl.decls
@@ -33,18 +33,19 @@ declare 1 generic {
int Itcl_SafeInit(Tcl_Interp *interp)
}
declare 2 generic {
- int Itcl_RegisterC(Tcl_Interp *interp, char *name, \
+ int Itcl_RegisterC(Tcl_Interp *interp, CONST char *name, \
Tcl_CmdProc *proc, ClientData clientData, \
Tcl_CmdDeleteProc *deleteProc)
}
declare 3 generic {
- int Itcl_RegisterObjC (Tcl_Interp *interp, char *name, \
+ int Itcl_RegisterObjC (Tcl_Interp *interp, CONST char *name, \
Tcl_ObjCmdProc *proc, ClientData clientData, \
Tcl_CmdDeleteProc *deleteProc)
}
declare 4 generic {
- int Itcl_FindC(Tcl_Interp *interp, char *name, Tcl_CmdProc **argProcPtr, \
- Tcl_ObjCmdProc **objProcPtr, ClientData *cDataPtr)
+ int Itcl_FindC(Tcl_Interp *interp, CONST char *name, \
+ Tcl_CmdProc **argProcPtr, Tcl_ObjCmdProc **objProcPtr, \
+ ClientData *cDataPtr)
}
declare 5 generic {
void Itcl_InitStack(Itcl_Stack *stack)
diff --git a/itcl/itcl/generic/itcl.h b/itcl/itcl/generic/itcl.h
index 529fdc47aee..2a7eac7c49e 100644
--- a/itcl/itcl/generic/itcl.h
+++ b/itcl/itcl/generic/itcl.h
@@ -39,9 +39,6 @@
* mmclennan@lucent.com
* http://www.tcltk.com/itcl
*
- * modified for Stubs 5/20/1999 by
- * David Gravereaux <davygrvy@bigfoot.com>
- *
* RCS: $Id$
* ========================================================================
* Copyright (c) 1993-1998 Lucent Technologies, Inc.
@@ -54,22 +51,24 @@
#include "tcl.h"
-#undef TCL_STORAGE_CLASS
-#ifdef BUILD_itcl
-# define TCL_STORAGE_CLASS DLLEXPORT
-#else
-# ifdef USE_ITCL_STUBS
-# define TCL_STORAGE_CLASS
-# else
-# define TCL_STORAGE_CLASS DLLIMPORT
-# endif
+#ifndef TCL_ALPHA_RELEASE
+# define TCL_ALPHA_RELEASE 0
#endif
+#ifndef TCL_BETA_RELEASE
+# define TCL_BETA_RELEASE 1
+#endif
+#ifndef TCL_FINAL_RELEASE
+# define TCL_FINAL_RELEASE 2
+#endif
+
-#define ITCL_VERSION "3.2"
-#define ITCL_PATCH_LEVEL "3.2.1"
-#define ITCL_MAJOR_VERSION 3
-#define ITCL_MINOR_VERSION 2
-#define ITCL_RELEASE_LEVEL 1
+#define ITCL_MAJOR_VERSION 3
+#define ITCL_MINOR_VERSION 3
+#define ITCL_RELEASE_LEVEL TCL_FINAL_RELEASE
+#define ITCL_RELEASE_SERIAL 0
+
+#define ITCL_VERSION "3.3"
+#define ITCL_PATCH_LEVEL "3.3.0"
/*
* A special definition used to allow this header file to be included
@@ -80,6 +79,67 @@
#ifndef RC_INVOKED
+#undef TCL_STORAGE_CLASS
+#ifdef BUILD_itcl
+# define TCL_STORAGE_CLASS DLLEXPORT
+#else
+# ifdef USE_ITCL_STUBS
+# define TCL_STORAGE_CLASS
+# else
+# define TCL_STORAGE_CLASS DLLIMPORT
+# endif
+#endif
+
+/*
+ * Fix the Borland bug that's in the EXTERN macro from tcl.h.
+ */
+#ifndef TCL_EXTERN
+# undef DLLIMPORT
+# undef DLLEXPORT
+# ifdef __cplusplus
+# define TCL_EXTERNC extern "C"
+# else
+# define TCL_EXTERNC extern
+# endif
+# if defined(STATIC_BUILD)
+# define DLLIMPORT
+# define DLLEXPORT
+# define TCL_EXTERN(RTYPE) TCL_EXTERNC RTYPE
+# elif (defined(__WIN32__) && ( \
+ defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || \
+ defined(__LCC__) || defined(__WATCOMC__) || \
+ (defined(__GNUC__) && defined(__declspec)) \
+ )) || (defined(MAC_TCL) && FUNCTION_DECLSPEC)
+# define DLLIMPORT __declspec(dllimport)
+# define DLLEXPORT __declspec(dllexport)
+# define TCL_EXTERN(RTYPE) TCL_EXTERNC TCL_STORAGE_CLASS RTYPE
+# elif defined(__BORLANDC__)
+# define DLLIMPORT __import
+# define DLLEXPORT __export
+ /* Pre-5.5 Borland requires the attributes be placed after the */
+ /* return type instead. */
+# define TCL_EXTERN(RTYPE) TCL_EXTERNC RTYPE TCL_STORAGE_CLASS
+# else
+# define DLLIMPORT
+# define DLLEXPORT
+# define TCL_EXTERN(RTYPE) TCL_EXTERNC TCL_STORAGE_CLASS RTYPE
+# endif
+#endif
+
+
+/*
+ * Starting from the 8.4 core, Tcl API is CONST'ified. Our API is always
+ * CONST, but we need to build with Tcl when it isn't CONST and fake it
+ * when needed with <= 8.3
+ *
+ * http://wiki.tcl.tk/3669
+ */
+
+#ifndef CONST84
+# define CONST84
+#endif
+
+
/*
* Protection levels:
*
@@ -152,11 +212,9 @@ typedef struct Itcl_InterpState_ *Itcl_InterpState;
#ifdef USE_ITCL_STUBS
-#ifdef __cplusplus
-extern "C"
-#endif
-CONST char * Itcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
- char *version, int exact));
+TCL_EXTERNC CONST char *
+ Itcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST char *version, int exact));
#else
#define Itcl_InitStubs(interp, version, exact) \
Tcl_PkgRequire(interp, "Itcl", version, exact)
diff --git a/itcl/itcl/generic/itclDecls.h b/itcl/itcl/generic/itclDecls.h
index aeb220d1c48..75aabbb594b 100644
--- a/itcl/itcl/generic/itclDecls.h
+++ b/itcl/itcl/generic/itclDecls.h
@@ -3,8 +3,6 @@
*
* Declarations of functions in the platform independent public Itcl API.
*
- * Copyright (c) 1998-1999 by XXXX
- *
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
@@ -26,79 +24,158 @@
* Exported function declarations:
*/
+#ifndef Itcl_Init_TCL_DECLARED
+#define Itcl_Init_TCL_DECLARED
/* 0 */
-EXTERN int Itcl_Init _ANSI_ARGS_((Tcl_Interp * interp));
+TCL_EXTERN(int) Itcl_Init _ANSI_ARGS_((Tcl_Interp * interp));
+#endif
+#ifndef Itcl_SafeInit_TCL_DECLARED
+#define Itcl_SafeInit_TCL_DECLARED
/* 1 */
-EXTERN int Itcl_SafeInit _ANSI_ARGS_((Tcl_Interp * interp));
+TCL_EXTERN(int) Itcl_SafeInit _ANSI_ARGS_((Tcl_Interp * interp));
+#endif
+#ifndef Itcl_RegisterC_TCL_DECLARED
+#define Itcl_RegisterC_TCL_DECLARED
/* 2 */
-EXTERN int Itcl_RegisterC _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, Tcl_CmdProc * proc,
+TCL_EXTERN(int) Itcl_RegisterC _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, Tcl_CmdProc * proc,
ClientData clientData,
Tcl_CmdDeleteProc * deleteProc));
+#endif
+#ifndef Itcl_RegisterObjC_TCL_DECLARED
+#define Itcl_RegisterObjC_TCL_DECLARED
/* 3 */
-EXTERN int Itcl_RegisterObjC _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, Tcl_ObjCmdProc * proc,
+TCL_EXTERN(int) Itcl_RegisterObjC _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, Tcl_ObjCmdProc * proc,
ClientData clientData,
Tcl_CmdDeleteProc * deleteProc));
+#endif
+#ifndef Itcl_FindC_TCL_DECLARED
+#define Itcl_FindC_TCL_DECLARED
/* 4 */
-EXTERN int Itcl_FindC _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, Tcl_CmdProc ** argProcPtr,
+TCL_EXTERN(int) Itcl_FindC _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, Tcl_CmdProc ** argProcPtr,
Tcl_ObjCmdProc ** objProcPtr,
ClientData * cDataPtr));
+#endif
+#ifndef Itcl_InitStack_TCL_DECLARED
+#define Itcl_InitStack_TCL_DECLARED
/* 5 */
-EXTERN void Itcl_InitStack _ANSI_ARGS_((Itcl_Stack * stack));
+TCL_EXTERN(void) Itcl_InitStack _ANSI_ARGS_((Itcl_Stack * stack));
+#endif
+#ifndef Itcl_DeleteStack_TCL_DECLARED
+#define Itcl_DeleteStack_TCL_DECLARED
/* 6 */
-EXTERN void Itcl_DeleteStack _ANSI_ARGS_((Itcl_Stack * stack));
+TCL_EXTERN(void) Itcl_DeleteStack _ANSI_ARGS_((Itcl_Stack * stack));
+#endif
+#ifndef Itcl_PushStack_TCL_DECLARED
+#define Itcl_PushStack_TCL_DECLARED
/* 7 */
-EXTERN void Itcl_PushStack _ANSI_ARGS_((ClientData cdata,
+TCL_EXTERN(void) Itcl_PushStack _ANSI_ARGS_((ClientData cdata,
Itcl_Stack * stack));
+#endif
+#ifndef Itcl_PopStack_TCL_DECLARED
+#define Itcl_PopStack_TCL_DECLARED
/* 8 */
-EXTERN ClientData Itcl_PopStack _ANSI_ARGS_((Itcl_Stack * stack));
+TCL_EXTERN(ClientData) Itcl_PopStack _ANSI_ARGS_((Itcl_Stack * stack));
+#endif
+#ifndef Itcl_PeekStack_TCL_DECLARED
+#define Itcl_PeekStack_TCL_DECLARED
/* 9 */
-EXTERN ClientData Itcl_PeekStack _ANSI_ARGS_((Itcl_Stack * stack));
+TCL_EXTERN(ClientData) Itcl_PeekStack _ANSI_ARGS_((Itcl_Stack * stack));
+#endif
+#ifndef Itcl_GetStackValue_TCL_DECLARED
+#define Itcl_GetStackValue_TCL_DECLARED
/* 10 */
-EXTERN ClientData Itcl_GetStackValue _ANSI_ARGS_((Itcl_Stack * stack,
+TCL_EXTERN(ClientData) Itcl_GetStackValue _ANSI_ARGS_((Itcl_Stack * stack,
int pos));
+#endif
+#ifndef Itcl_InitList_TCL_DECLARED
+#define Itcl_InitList_TCL_DECLARED
/* 11 */
-EXTERN void Itcl_InitList _ANSI_ARGS_((Itcl_List * listPtr));
+TCL_EXTERN(void) Itcl_InitList _ANSI_ARGS_((Itcl_List * listPtr));
+#endif
+#ifndef Itcl_DeleteList_TCL_DECLARED
+#define Itcl_DeleteList_TCL_DECLARED
/* 12 */
-EXTERN void Itcl_DeleteList _ANSI_ARGS_((Itcl_List * listPtr));
+TCL_EXTERN(void) Itcl_DeleteList _ANSI_ARGS_((Itcl_List * listPtr));
+#endif
+#ifndef Itcl_CreateListElem_TCL_DECLARED
+#define Itcl_CreateListElem_TCL_DECLARED
/* 13 */
-EXTERN Itcl_ListElem* Itcl_CreateListElem _ANSI_ARGS_((Itcl_List * listPtr));
+TCL_EXTERN(Itcl_ListElem*) Itcl_CreateListElem _ANSI_ARGS_((
+ Itcl_List * listPtr));
+#endif
+#ifndef Itcl_DeleteListElem_TCL_DECLARED
+#define Itcl_DeleteListElem_TCL_DECLARED
/* 14 */
-EXTERN Itcl_ListElem* Itcl_DeleteListElem _ANSI_ARGS_((
+TCL_EXTERN(Itcl_ListElem*) Itcl_DeleteListElem _ANSI_ARGS_((
Itcl_ListElem * elemPtr));
+#endif
+#ifndef Itcl_InsertList_TCL_DECLARED
+#define Itcl_InsertList_TCL_DECLARED
/* 15 */
-EXTERN Itcl_ListElem* Itcl_InsertList _ANSI_ARGS_((Itcl_List * listPtr,
+TCL_EXTERN(Itcl_ListElem*) Itcl_InsertList _ANSI_ARGS_((Itcl_List * listPtr,
ClientData val));
+#endif
+#ifndef Itcl_InsertListElem_TCL_DECLARED
+#define Itcl_InsertListElem_TCL_DECLARED
/* 16 */
-EXTERN Itcl_ListElem* Itcl_InsertListElem _ANSI_ARGS_((Itcl_ListElem * pos,
- ClientData val));
+TCL_EXTERN(Itcl_ListElem*) Itcl_InsertListElem _ANSI_ARGS_((
+ Itcl_ListElem * pos, ClientData val));
+#endif
+#ifndef Itcl_AppendList_TCL_DECLARED
+#define Itcl_AppendList_TCL_DECLARED
/* 17 */
-EXTERN Itcl_ListElem* Itcl_AppendList _ANSI_ARGS_((Itcl_List * listPtr,
+TCL_EXTERN(Itcl_ListElem*) Itcl_AppendList _ANSI_ARGS_((Itcl_List * listPtr,
ClientData val));
+#endif
+#ifndef Itcl_AppendListElem_TCL_DECLARED
+#define Itcl_AppendListElem_TCL_DECLARED
/* 18 */
-EXTERN Itcl_ListElem* Itcl_AppendListElem _ANSI_ARGS_((Itcl_ListElem * pos,
- ClientData val));
+TCL_EXTERN(Itcl_ListElem*) Itcl_AppendListElem _ANSI_ARGS_((
+ Itcl_ListElem * pos, ClientData val));
+#endif
+#ifndef Itcl_SetListValue_TCL_DECLARED
+#define Itcl_SetListValue_TCL_DECLARED
/* 19 */
-EXTERN void Itcl_SetListValue _ANSI_ARGS_((
+TCL_EXTERN(void) Itcl_SetListValue _ANSI_ARGS_((
Itcl_ListElem * elemPtr, ClientData val));
+#endif
+#ifndef Itcl_EventuallyFree_TCL_DECLARED
+#define Itcl_EventuallyFree_TCL_DECLARED
/* 20 */
-EXTERN void Itcl_EventuallyFree _ANSI_ARGS_((ClientData cdata,
+TCL_EXTERN(void) Itcl_EventuallyFree _ANSI_ARGS_((ClientData cdata,
Tcl_FreeProc * fproc));
+#endif
+#ifndef Itcl_PreserveData_TCL_DECLARED
+#define Itcl_PreserveData_TCL_DECLARED
/* 21 */
-EXTERN void Itcl_PreserveData _ANSI_ARGS_((ClientData cdata));
+TCL_EXTERN(void) Itcl_PreserveData _ANSI_ARGS_((ClientData cdata));
+#endif
+#ifndef Itcl_ReleaseData_TCL_DECLARED
+#define Itcl_ReleaseData_TCL_DECLARED
/* 22 */
-EXTERN void Itcl_ReleaseData _ANSI_ARGS_((ClientData cdata));
+TCL_EXTERN(void) Itcl_ReleaseData _ANSI_ARGS_((ClientData cdata));
+#endif
+#ifndef Itcl_SaveInterpState_TCL_DECLARED
+#define Itcl_SaveInterpState_TCL_DECLARED
/* 23 */
-EXTERN Itcl_InterpState Itcl_SaveInterpState _ANSI_ARGS_((
+TCL_EXTERN(Itcl_InterpState) Itcl_SaveInterpState _ANSI_ARGS_((
Tcl_Interp* interp, int status));
+#endif
+#ifndef Itcl_RestoreInterpState_TCL_DECLARED
+#define Itcl_RestoreInterpState_TCL_DECLARED
/* 24 */
-EXTERN int Itcl_RestoreInterpState _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_RestoreInterpState _ANSI_ARGS_((
Tcl_Interp* interp, Itcl_InterpState state));
+#endif
+#ifndef Itcl_DiscardInterpState_TCL_DECLARED
+#define Itcl_DiscardInterpState_TCL_DECLARED
/* 25 */
-EXTERN void Itcl_DiscardInterpState _ANSI_ARGS_((
+TCL_EXTERN(void) Itcl_DiscardInterpState _ANSI_ARGS_((
Itcl_InterpState state));
+#endif
typedef struct ItclStubHooks {
struct ItclIntStubs *itclIntStubs;
@@ -110,9 +187,9 @@ typedef struct ItclStubs {
int (*itcl_Init) _ANSI_ARGS_((Tcl_Interp * interp)); /* 0 */
int (*itcl_SafeInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 1 */
- int (*itcl_RegisterC) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 2 */
- int (*itcl_RegisterObjC) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 3 */
- int (*itcl_FindC) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_CmdProc ** argProcPtr, Tcl_ObjCmdProc ** objProcPtr, ClientData * cDataPtr)); /* 4 */
+ int (*itcl_RegisterC) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 2 */
+ int (*itcl_RegisterObjC) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 3 */
+ int (*itcl_FindC) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_CmdProc ** argProcPtr, Tcl_ObjCmdProc ** objProcPtr, ClientData * cDataPtr)); /* 4 */
void (*itcl_InitStack) _ANSI_ARGS_((Itcl_Stack * stack)); /* 5 */
void (*itcl_DeleteStack) _ANSI_ARGS_((Itcl_Stack * stack)); /* 6 */
void (*itcl_PushStack) _ANSI_ARGS_((ClientData cdata, Itcl_Stack * stack)); /* 7 */
@@ -136,13 +213,7 @@ typedef struct ItclStubs {
void (*itcl_DiscardInterpState) _ANSI_ARGS_((Itcl_InterpState state)); /* 25 */
} ItclStubs;
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern ItclStubs *itclStubsPtr;
-#ifdef __cplusplus
-}
-#endif
+TCL_EXTERNC ItclStubs *itclStubsPtr;
#if defined(USE_ITCL_STUBS) && !defined(USE_ITCL_STUB_PROCS)
diff --git a/itcl/itcl/generic/itclInt.decls b/itcl/itcl/generic/itclInt.decls
index 466af9ba2b3..d5f9cc27c49 100644
--- a/itcl/itcl/generic/itclInt.decls
+++ b/itcl/itcl/generic/itclInt.decls
@@ -1,9 +1,11 @@
# itclInt.decls --
#
# This file contains the declarations for all unsupported
-# functions that are exported by the Tcl library. This file
-# is used to generate the itclIntDecls.h and itclIntStub.c
-# files
+# functions that are exported by the Itcl library.
+#
+# By "unsupported", it should be noted that due to Tcl's hiding
+# of the data types used, we inherit this hidden-ness ourselves,
+# too, unfortunately.
#
# Copyright (c) 1998-1999 by Scriptics Corporation.
# See the file "license.terms" for information on usage and redistribution
@@ -29,10 +31,10 @@ declare 1 generic {
int Itcl_IsClass (Tcl_Command cmd)
}
declare 2 generic {
- ItclClass* Itcl_FindClass (Tcl_Interp* interp, char* path, int autoload)
+ ItclClass* Itcl_FindClass (Tcl_Interp* interp, CONST char* path, int autoload)
}
declare 3 generic {
- int Itcl_FindObject (Tcl_Interp *interp, char *name, ItclObject **roPtr)
+ int Itcl_FindObject (Tcl_Interp *interp, CONST char *name, ItclObject **roPtr)
}
declare 4 generic {
int Itcl_IsObject (Tcl_Command cmd)
@@ -57,18 +59,18 @@ declare 10 generic {
ItclObjectInfo *info)
}
declare 11 generic {
- void Itcl_ParseNamespPath (char *name, Tcl_DString *buffer, \
+ void Itcl_ParseNamespPath (CONST char *name, Tcl_DString *buffer, \
char **head, char **tail)
}
declare 12 generic {
- int Itcl_DecodeScopedCommand (Tcl_Interp *interp, char *name, \
+ int Itcl_DecodeScopedCommand (Tcl_Interp *interp, CONST char *name, \
Tcl_Namespace **rNsPtr, char **rCmdPtr)
}
declare 13 generic {
int Itcl_EvalArgs (Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
}
declare 14 generic {
- Tcl_Obj* Itcl_CreateArgs (Tcl_Interp *interp, char *string, \
+ Tcl_Obj* Itcl_CreateArgs (Tcl_Interp *interp, CONST char *string, \
int objc, Tcl_Obj *CONST objv[])
}
declare 15 generic {
@@ -138,14 +140,14 @@ declare 30 generic {
#
declare 31 generic {
- int Itcl_CreateClass (Tcl_Interp* interp, char* path, \
+ int Itcl_CreateClass (Tcl_Interp* interp, CONST char* path, \
ItclObjectInfo *info, ItclClass **rPtr)
}
declare 32 generic {
int Itcl_DeleteClass (Tcl_Interp *interp, ItclClass *cdefnPtr)
}
declare 33 generic {
- Tcl_Namespace* Itcl_FindClassNamespace (Tcl_Interp* interp, char* path)
+ Tcl_Namespace* Itcl_FindClassNamespace (Tcl_Interp* interp, CONST char* path)
}
declare 34 generic {
int Itcl_HandleClass (ClientData clientData, Tcl_Interp *interp, \
@@ -156,11 +158,11 @@ declare 35 generic {
Tcl_Namespace *context, int flags, Tcl_Command *rPtr)
}
declare 36 generic {
- int Itcl_ClassVarResolver (Tcl_Interp *interp, char* name, \
+ int Itcl_ClassVarResolver (Tcl_Interp *interp, CONST char* name, \
Tcl_Namespace *context, int flags, Tcl_Var *rPtr)
}
declare 37 generic {
- int Itcl_ClassCompiledVarResolver (Tcl_Interp *interp, char* name, \
+ int Itcl_ClassCompiledVarResolver (Tcl_Interp *interp, CONST char* name, \
int length, Tcl_Namespace *context, Tcl_ResolvedVarInfo **rPtr)
}
declare 38 generic {
@@ -174,12 +176,12 @@ declare 40 generic {
void Itcl_DeleteVarDefn (ItclVarDefn *vdefn)
}
declare 41 generic {
- char* Itcl_GetCommonVar (Tcl_Interp *interp, char *name, \
+ CONST char* Itcl_GetCommonVar (Tcl_Interp *interp, CONST char *name, \
ItclClass *contextClass)
}
declare 42 generic {
ItclMember* Itcl_CreateMember (Tcl_Interp* interp, ItclClass *cdefn, \
- char* name)
+ CONST char* name)
}
declare 43 generic {
void Itcl_DeleteMember (ItclMember *memPtr)
@@ -191,7 +193,7 @@ declare 43 generic {
#
declare 44 generic {
- int Itcl_CreateObject (Tcl_Interp *interp, char* name, ItclClass *cdefn, \
+ int Itcl_CreateObject (Tcl_Interp *interp, CONST char* name, ItclClass *cdefn, \
int objc, Tcl_Obj *CONST objv[], ItclObject **roPtr)
}
declare 45 generic {
@@ -206,11 +208,11 @@ declare 47 generic {
int objc, Tcl_Obj *CONST objv[])
}
declare 48 generic {
- char* Itcl_GetInstanceVar (Tcl_Interp *interp, char *name, \
+ CONST char* Itcl_GetInstanceVar (Tcl_Interp *interp, CONST char *name, \
ItclObject *contextObj, ItclClass *contextClass)
}
declare 49 generic {
- int Itcl_ScopedVarResolver (Tcl_Interp *interp, char *name, \
+ int Itcl_ScopedVarResolver (Tcl_Interp *interp, CONST char *name, \
Tcl_Namespace *contextNs, int flags, Tcl_Var *rPtr)
}
@@ -228,30 +230,31 @@ declare 51 generic {
Tcl_Obj *CONST objv[])
}
declare 52 generic {
- int Itcl_CreateMethod (Tcl_Interp* interp, ItclClass *cdefn, char* name, \
- char* arglist, char* body)
+ int Itcl_CreateMethod (Tcl_Interp* interp, ItclClass *cdefn,
+ CONST char* name, CONST char* arglist, CONST char* body)
}
declare 53 generic {
- int Itcl_CreateProc (Tcl_Interp* interp, ItclClass *cdefn, char* name, \
- char* arglist, char* body)
+ int Itcl_CreateProc (Tcl_Interp* interp, ItclClass *cdefn,
+ CONST char* name, CONST char* arglist, CONST char* body)
}
declare 54 generic {
int Itcl_CreateMemberFunc (Tcl_Interp* interp, ItclClass *cdefn, \
- char* name, char* arglist, char* body, ItclMemberFunc** mfuncPtr)
+ CONST char* name, CONST char* arglist, CONST char* body, \
+ ItclMemberFunc** mfuncPtr)
}
declare 55 generic {
int Itcl_ChangeMemberFunc (Tcl_Interp* interp, ItclMemberFunc* mfunc, \
- char* arglist, char* body)
+ CONST char* arglist, CONST char* body)
}
declare 56 generic {
- void Itcl_DeleteMemberFunc (char* cdata)
+ void Itcl_DeleteMemberFunc (CONST char* cdata)
}
declare 57 generic {
int Itcl_CreateMemberCode (Tcl_Interp* interp, ItclClass *cdefn, \
- char* arglist, char* body, ItclMemberCode** mcodePtr)
+ CONST char* arglist, CONST char* body, ItclMemberCode** mcodePtr)
}
declare 58 generic {
- void Itcl_DeleteMemberCode (char* cdata)
+ void Itcl_DeleteMemberCode (CONST char* cdata)
}
declare 59 generic {
int Itcl_GetMemberCode (Tcl_Interp* interp, ItclMember* member)
@@ -266,11 +269,11 @@ declare 61 generic {
Tcl_Obj *CONST objv[])
}
declare 62 generic {
- int Itcl_CreateArgList (Tcl_Interp* interp, char* decl, int* argcPtr, \
+ int Itcl_CreateArgList (Tcl_Interp* interp, CONST char* decl, int* argcPtr, \
CompiledLocal** argPtr)
}
declare 63 generic {
- CompiledLocal* Itcl_CreateArg (char* name, char* init)
+ CompiledLocal* Itcl_CreateArg (CONST char* name, CONST char* init)
}
declare 64 generic {
void Itcl_DeleteArgList (CompiledLocal *arglist)
@@ -303,7 +306,7 @@ declare 71 generic {
ItclClass *contextClass)
}
declare 72 generic {
- int Itcl_InvokeMethodIfExists (Tcl_Interp *interp, char *name, \
+ int Itcl_InvokeMethodIfExists (Tcl_Interp *interp, CONST char *name, \
ItclClass *contextClass, ItclObject *contextObj, int objc, \
Tcl_Obj *CONST objv[])
}
@@ -360,7 +363,7 @@ declare 84 generic {
int objc, Tcl_Obj *CONST objv[])
}
declare 85 generic {
- int Itcl_ParseVarResolver (Tcl_Interp *interp, char* name, \
+ int Itcl_ParseVarResolver (Tcl_Interp *interp, CONST char* name, \
Tcl_Namespace *contextNs, int flags, Tcl_Var* rPtr)
}
@@ -433,22 +436,22 @@ declare 100 generic {
int Itcl_EnsembleInit (Tcl_Interp *interp)
}
declare 101 generic {
- int Itcl_CreateEnsemble (Tcl_Interp *interp, char* ensName)
+ int Itcl_CreateEnsemble (Tcl_Interp *interp, CONST char* ensName)
}
declare 102 generic {
- int Itcl_AddEnsemblePart (Tcl_Interp *interp, char* ensName, \
- char* partName, char* usageInfo, Tcl_ObjCmdProc *objProc, \
+ int Itcl_AddEnsemblePart (Tcl_Interp *interp, CONST char* ensName, \
+ CONST char* partName, CONST char* usageInfo, Tcl_ObjCmdProc *objProc, \
ClientData clientData, Tcl_CmdDeleteProc *deleteProc)
}
declare 103 generic {
- int Itcl_GetEnsemblePart (Tcl_Interp *interp, char *ensName, \
- char *partName, Tcl_CmdInfo *infoPtr)
+ int Itcl_GetEnsemblePart (Tcl_Interp *interp, CONST char *ensName, \
+ CONST char *partName, Tcl_CmdInfo *infoPtr)
}
declare 104 generic {
int Itcl_IsEnsemble (Tcl_CmdInfo* infoPtr)
}
declare 105 generic {
- int Itcl_GetEnsembleUsage (Tcl_Interp *interp, char *ensName, \
+ int Itcl_GetEnsembleUsage (Tcl_Interp *interp, CONST char *ensName, \
Tcl_Obj *objPtr)
}
declare 106 generic {
@@ -473,12 +476,13 @@ declare 109 generic {
# Commands provided for backward compatibility
#
-declare 110 generic {
- int Itcl_OldInit (Tcl_Interp* interp, ItclObjectInfo* info)
-}
-declare 111 generic {
- int Itcl_InstallOldBiMethods (Tcl_Interp *interp, ItclClass *cdefn)
-}
+# not used anymore (3.3)
+#declare 110 generic {
+# int Itcl_OldInit (Tcl_Interp* interp, ItclObjectInfo* info)
+#}
+#declare 111 generic {
+# int Itcl_InstallOldBiMethods (Tcl_Interp *interp, ItclClass *cdefn)
+#}
#
@@ -496,5 +500,14 @@ declare 114 generic {
Var* _TclNewVar (void)
}
declare 115 generic {
- void Itcl_Assert (char *testExpr, char *fileName, int lineNum)
+ void Itcl_Assert (CONST char *testExpr, CONST char *fileName, int lineNum)
+}
+
+declare 116 generic {
+ int Itcl_IsObjectCmd (ClientData clientData, Tcl_Interp *interp, \
+ int objc, Tcl_Obj *CONST objv[])
+}
+declare 117 generic {
+ int Itcl_IsClassCmd (ClientData clientData, Tcl_Interp *interp, \
+ int objc, Tcl_Obj *CONST objv[])
}
diff --git a/itcl/itcl/generic/itclInt.h b/itcl/itcl/generic/itclInt.h
index 6bde298972e..5aca7c8ffce 100644
--- a/itcl/itcl/generic/itclInt.h
+++ b/itcl/itcl/generic/itclInt.h
@@ -49,14 +49,77 @@
#ifndef ITCLINT_H
#define ITCLINT_H
-#include "itcl.h"
#include "tclInt.h"
+#include "itcl.h"
#ifdef BUILD_itcl
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
#endif
+/*
+ * Fix Tcl bug #803489 the right way. We need to always use the old Stub
+ * slot positions, not the new broken ones part of TIP 127. I do like
+ * that these functions have moved to the public space (about time), but
+ * the slot change is the killer and is the painful side affect.
+ */
+
+#if defined(USE_TCL_STUBS) && \
+ (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 5)
+# undef Tcl_CreateNamespace
+# define Tcl_CreateNamespace \
+ (tclIntStubsPtr->tcl_CreateNamespace)
+# undef Tcl_DeleteNamespace
+# define Tcl_DeleteNamespace \
+ (tclIntStubsPtr->tcl_DeleteNamespace)
+# undef Tcl_AppendExportList
+# define Tcl_AppendExportList \
+ (tclIntStubsPtr->tcl_AppendExportList)
+# undef Tcl_Export
+# define Tcl_Export \
+ (tclIntStubsPtr->tcl_Export)
+# undef Tcl_Import
+# define Tcl_Import \
+ (tclIntStubsPtr->tcl_Import)
+# undef Tcl_ForgetImport
+# define Tcl_ForgetImport \
+ (tclIntStubsPtr->tcl_ForgetImport)
+# undef Tcl_GetCurrentNamespace
+# define Tcl_GetCurrentNamespace \
+ (tclIntStubsPtr->tcl_GetCurrentNamespace)
+# undef Tcl_GetGlobalNamespace
+# define Tcl_GetGlobalNamespace \
+ (tclIntStubsPtr->tcl_GetGlobalNamespace)
+# undef Tcl_FindNamespace
+# define Tcl_FindNamespace \
+ (tclIntStubsPtr->tcl_FindNamespace)
+# undef Tcl_FindCommand
+# define Tcl_FindCommand \
+ (tclIntStubsPtr->tcl_FindCommand)
+# undef Tcl_GetCommandFromObj
+# define Tcl_GetCommandFromObj \
+ (tclIntStubsPtr->tcl_GetCommandFromObj)
+# undef Tcl_GetCommandFullName
+# define Tcl_GetCommandFullName \
+ (tclIntStubsPtr->tcl_GetCommandFullName)
+#endif
+
+/*
+ * Some backward compatability adjustments.
+ */
+
+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
+# define Tcl_GetString(obj) Tcl_GetStringFromObj((obj), NULL)
+# define TCL_DECLARE_MUTEX(mutexVar)
+# define Tcl_MutexLock(mutexVar)
+# define Tcl_MutexUnlock(mutexVar)
+# define Tcl_Panic panic
+#endif
+
+#define TCL_DOES_STUBS \
+ (TCL_MAJOR_VERSION > 8 || TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION > 1 || \
+ (TCL_MINOR_VERSION == 1 && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE)))
+
/*
* Common info for managing all known objects.
@@ -157,6 +220,9 @@ typedef struct ItclMemberCode {
} ItclMemberCode;
+#define Itcl_IsMemberCodeImplemented(mcode) \
+ (((mcode)->flags & ITCL_IMPLEMENT_NONE) == 0)
+
/*
* Basic representation for class members (commands/variables)
*/
@@ -255,15 +321,11 @@ typedef struct ItclContext {
*/
#undef assert
-#ifdef NDEBUG
+#ifndef DEBUG
#define assert(EX) ((void)0)
#else
-#if defined(__STDC__)
-#define assert(EX) (void)((EX) || (Itcl_Assert(#EX, __FILE__, __LINE__), 0))
-#else
-#define assert(EX) (void)((EX) || (Itcl_Assert("EX", __FILE__, __LINE__), 0))
-#endif /* __STDC__ */
-#endif /* NDEBUG */
+#define assert(EX) (void)((EX) || (Itcl_Assert(STRINGIFY(EX), __FILE__, __LINE__), 0))
+#endif /* DEBUG */
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/itcl/itcl/generic/itclIntDecls.h b/itcl/itcl/generic/itclIntDecls.h
index 9658a3e5694..779638763d5 100644
--- a/itcl/itcl/generic/itclIntDecls.h
+++ b/itcl/itcl/generic/itclIntDecls.h
@@ -6,8 +6,6 @@
* interfaces are not guaranteed to remain the same between
* versions. Use at your own risk.
*
- * Copyright (c) 1998-1999 by XXXX
- *
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
@@ -29,422 +27,771 @@
* Exported function declarations:
*/
+#ifndef Itcl_IsClassNamespace_TCL_DECLARED
+#define Itcl_IsClassNamespace_TCL_DECLARED
/* 0 */
-EXTERN int Itcl_IsClassNamespace _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_IsClassNamespace _ANSI_ARGS_((
Tcl_Namespace * namesp));
+#endif
+#ifndef Itcl_IsClass_TCL_DECLARED
+#define Itcl_IsClass_TCL_DECLARED
/* 1 */
-EXTERN int Itcl_IsClass _ANSI_ARGS_((Tcl_Command cmd));
+TCL_EXTERN(int) Itcl_IsClass _ANSI_ARGS_((Tcl_Command cmd));
+#endif
+#ifndef Itcl_FindClass_TCL_DECLARED
+#define Itcl_FindClass_TCL_DECLARED
/* 2 */
-EXTERN ItclClass* Itcl_FindClass _ANSI_ARGS_((Tcl_Interp* interp,
- char* path, int autoload));
+TCL_EXTERN(ItclClass*) Itcl_FindClass _ANSI_ARGS_((Tcl_Interp* interp,
+ CONST char* path, int autoload));
+#endif
+#ifndef Itcl_FindObject_TCL_DECLARED
+#define Itcl_FindObject_TCL_DECLARED
/* 3 */
-EXTERN int Itcl_FindObject _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, ItclObject ** roPtr));
+TCL_EXTERN(int) Itcl_FindObject _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, ItclObject ** roPtr));
+#endif
+#ifndef Itcl_IsObject_TCL_DECLARED
+#define Itcl_IsObject_TCL_DECLARED
/* 4 */
-EXTERN int Itcl_IsObject _ANSI_ARGS_((Tcl_Command cmd));
+TCL_EXTERN(int) Itcl_IsObject _ANSI_ARGS_((Tcl_Command cmd));
+#endif
+#ifndef Itcl_ObjectIsa_TCL_DECLARED
+#define Itcl_ObjectIsa_TCL_DECLARED
/* 5 */
-EXTERN int Itcl_ObjectIsa _ANSI_ARGS_((ItclObject * contextObj,
+TCL_EXTERN(int) Itcl_ObjectIsa _ANSI_ARGS_((ItclObject * contextObj,
ItclClass * cdefn));
+#endif
+#ifndef Itcl_Protection_TCL_DECLARED
+#define Itcl_Protection_TCL_DECLARED
/* 6 */
-EXTERN int Itcl_Protection _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_Protection _ANSI_ARGS_((Tcl_Interp * interp,
int newLevel));
+#endif
+#ifndef Itcl_ProtectionStr_TCL_DECLARED
+#define Itcl_ProtectionStr_TCL_DECLARED
/* 7 */
-EXTERN char* Itcl_ProtectionStr _ANSI_ARGS_((int pLevel));
+TCL_EXTERN(char*) Itcl_ProtectionStr _ANSI_ARGS_((int pLevel));
+#endif
+#ifndef Itcl_CanAccess_TCL_DECLARED
+#define Itcl_CanAccess_TCL_DECLARED
/* 8 */
-EXTERN int Itcl_CanAccess _ANSI_ARGS_((ItclMember* memberPtr,
+TCL_EXTERN(int) Itcl_CanAccess _ANSI_ARGS_((ItclMember* memberPtr,
Tcl_Namespace* fromNsPtr));
+#endif
+#ifndef Itcl_CanAccessFunc_TCL_DECLARED
+#define Itcl_CanAccessFunc_TCL_DECLARED
/* 9 */
-EXTERN int Itcl_CanAccessFunc _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_CanAccessFunc _ANSI_ARGS_((
ItclMemberFunc* mfunc,
Tcl_Namespace* fromNsPtr));
+#endif
+#ifndef Itcl_GetTrueNamespace_TCL_DECLARED
+#define Itcl_GetTrueNamespace_TCL_DECLARED
/* 10 */
-EXTERN Tcl_Namespace* Itcl_GetTrueNamespace _ANSI_ARGS_((
+TCL_EXTERN(Tcl_Namespace*) Itcl_GetTrueNamespace _ANSI_ARGS_((
Tcl_Interp * interp, ItclObjectInfo * info));
+#endif
+#ifndef Itcl_ParseNamespPath_TCL_DECLARED
+#define Itcl_ParseNamespPath_TCL_DECLARED
/* 11 */
-EXTERN void Itcl_ParseNamespPath _ANSI_ARGS_((char * name,
+TCL_EXTERN(void) Itcl_ParseNamespPath _ANSI_ARGS_((CONST char * name,
Tcl_DString * buffer, char ** head,
char ** tail));
+#endif
+#ifndef Itcl_DecodeScopedCommand_TCL_DECLARED
+#define Itcl_DecodeScopedCommand_TCL_DECLARED
/* 12 */
-EXTERN int Itcl_DecodeScopedCommand _ANSI_ARGS_((
- Tcl_Interp * interp, char * name,
+TCL_EXTERN(int) Itcl_DecodeScopedCommand _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
Tcl_Namespace ** rNsPtr, char ** rCmdPtr));
+#endif
+#ifndef Itcl_EvalArgs_TCL_DECLARED
+#define Itcl_EvalArgs_TCL_DECLARED
/* 13 */
-EXTERN int Itcl_EvalArgs _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_EvalArgs _ANSI_ARGS_((Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_CreateArgs_TCL_DECLARED
+#define Itcl_CreateArgs_TCL_DECLARED
/* 14 */
-EXTERN Tcl_Obj* Itcl_CreateArgs _ANSI_ARGS_((Tcl_Interp * interp,
- char * string, int objc,
+TCL_EXTERN(Tcl_Obj*) Itcl_CreateArgs _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_PushContext_TCL_DECLARED
+#define Itcl_PushContext_TCL_DECLARED
/* 15 */
-EXTERN int Itcl_PushContext _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_PushContext _ANSI_ARGS_((Tcl_Interp * interp,
ItclMember * member,
ItclClass * contextClass,
ItclObject * contextObj,
ItclContext * contextPtr));
+#endif
+#ifndef Itcl_PopContext_TCL_DECLARED
+#define Itcl_PopContext_TCL_DECLARED
/* 16 */
-EXTERN void Itcl_PopContext _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(void) Itcl_PopContext _ANSI_ARGS_((Tcl_Interp * interp,
ItclContext * contextPtr));
+#endif
+#ifndef Itcl_GetContext_TCL_DECLARED
+#define Itcl_GetContext_TCL_DECLARED
/* 17 */
-EXTERN int Itcl_GetContext _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_GetContext _ANSI_ARGS_((Tcl_Interp * interp,
ItclClass ** cdefnPtr,
ItclObject ** odefnPtr));
+#endif
+#ifndef Itcl_InitHierIter_TCL_DECLARED
+#define Itcl_InitHierIter_TCL_DECLARED
/* 18 */
-EXTERN void Itcl_InitHierIter _ANSI_ARGS_((ItclHierIter * iter,
+TCL_EXTERN(void) Itcl_InitHierIter _ANSI_ARGS_((ItclHierIter * iter,
ItclClass * cdefn));
+#endif
+#ifndef Itcl_DeleteHierIter_TCL_DECLARED
+#define Itcl_DeleteHierIter_TCL_DECLARED
/* 19 */
-EXTERN void Itcl_DeleteHierIter _ANSI_ARGS_((ItclHierIter * iter));
+TCL_EXTERN(void) Itcl_DeleteHierIter _ANSI_ARGS_((ItclHierIter * iter));
+#endif
+#ifndef Itcl_AdvanceHierIter_TCL_DECLARED
+#define Itcl_AdvanceHierIter_TCL_DECLARED
/* 20 */
-EXTERN ItclClass* Itcl_AdvanceHierIter _ANSI_ARGS_((
+TCL_EXTERN(ItclClass*) Itcl_AdvanceHierIter _ANSI_ARGS_((
ItclHierIter * iter));
+#endif
+#ifndef Itcl_FindClassesCmd_TCL_DECLARED
+#define Itcl_FindClassesCmd_TCL_DECLARED
/* 21 */
-EXTERN int Itcl_FindClassesCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_FindClassesCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_FindObjectsCmd_TCL_DECLARED
+#define Itcl_FindObjectsCmd_TCL_DECLARED
/* 22 */
-EXTERN int Itcl_FindObjectsCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_FindObjectsCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ProtectionCmd_TCL_DECLARED
+#define Itcl_ProtectionCmd_TCL_DECLARED
/* 23 */
-EXTERN int Itcl_ProtectionCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ProtectionCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_DelClassCmd_TCL_DECLARED
+#define Itcl_DelClassCmd_TCL_DECLARED
/* 24 */
-EXTERN int Itcl_DelClassCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_DelClassCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_DelObjectCmd_TCL_DECLARED
+#define Itcl_DelObjectCmd_TCL_DECLARED
/* 25 */
-EXTERN int Itcl_DelObjectCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_DelObjectCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ScopeCmd_TCL_DECLARED
+#define Itcl_ScopeCmd_TCL_DECLARED
/* 26 */
-EXTERN int Itcl_ScopeCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_ScopeCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_CodeCmd_TCL_DECLARED
+#define Itcl_CodeCmd_TCL_DECLARED
/* 27 */
-EXTERN int Itcl_CodeCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_CodeCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_StubCreateCmd_TCL_DECLARED
+#define Itcl_StubCreateCmd_TCL_DECLARED
/* 28 */
-EXTERN int Itcl_StubCreateCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_StubCreateCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_StubExistsCmd_TCL_DECLARED
+#define Itcl_StubExistsCmd_TCL_DECLARED
/* 29 */
-EXTERN int Itcl_StubExistsCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_StubExistsCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_IsStub_TCL_DECLARED
+#define Itcl_IsStub_TCL_DECLARED
/* 30 */
-EXTERN int Itcl_IsStub _ANSI_ARGS_((Tcl_Command cmd));
+TCL_EXTERN(int) Itcl_IsStub _ANSI_ARGS_((Tcl_Command cmd));
+#endif
+#ifndef Itcl_CreateClass_TCL_DECLARED
+#define Itcl_CreateClass_TCL_DECLARED
/* 31 */
-EXTERN int Itcl_CreateClass _ANSI_ARGS_((Tcl_Interp* interp,
- char* path, ItclObjectInfo * info,
+TCL_EXTERN(int) Itcl_CreateClass _ANSI_ARGS_((Tcl_Interp* interp,
+ CONST char* path, ItclObjectInfo * info,
ItclClass ** rPtr));
+#endif
+#ifndef Itcl_DeleteClass_TCL_DECLARED
+#define Itcl_DeleteClass_TCL_DECLARED
/* 32 */
-EXTERN int Itcl_DeleteClass _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_DeleteClass _ANSI_ARGS_((Tcl_Interp * interp,
ItclClass * cdefnPtr));
+#endif
+#ifndef Itcl_FindClassNamespace_TCL_DECLARED
+#define Itcl_FindClassNamespace_TCL_DECLARED
/* 33 */
-EXTERN Tcl_Namespace* Itcl_FindClassNamespace _ANSI_ARGS_((
- Tcl_Interp* interp, char* path));
+TCL_EXTERN(Tcl_Namespace*) Itcl_FindClassNamespace _ANSI_ARGS_((
+ Tcl_Interp* interp, CONST char* path));
+#endif
+#ifndef Itcl_HandleClass_TCL_DECLARED
+#define Itcl_HandleClass_TCL_DECLARED
/* 34 */
-EXTERN int Itcl_HandleClass _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_HandleClass _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ClassCmdResolver_TCL_DECLARED
+#define Itcl_ClassCmdResolver_TCL_DECLARED
/* 35 */
-EXTERN int Itcl_ClassCmdResolver _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ClassCmdResolver _ANSI_ARGS_((
Tcl_Interp * interp, CONST char* name,
Tcl_Namespace * context, int flags,
Tcl_Command * rPtr));
+#endif
+#ifndef Itcl_ClassVarResolver_TCL_DECLARED
+#define Itcl_ClassVarResolver_TCL_DECLARED
/* 36 */
-EXTERN int Itcl_ClassVarResolver _ANSI_ARGS_((
- Tcl_Interp * interp, char* name,
+TCL_EXTERN(int) Itcl_ClassVarResolver _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char* name,
Tcl_Namespace * context, int flags,
Tcl_Var * rPtr));
+#endif
+#ifndef Itcl_ClassCompiledVarResolver_TCL_DECLARED
+#define Itcl_ClassCompiledVarResolver_TCL_DECLARED
/* 37 */
-EXTERN int Itcl_ClassCompiledVarResolver _ANSI_ARGS_((
- Tcl_Interp * interp, char* name, int length,
- Tcl_Namespace * context,
+TCL_EXTERN(int) Itcl_ClassCompiledVarResolver _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char* name,
+ int length, Tcl_Namespace * context,
Tcl_ResolvedVarInfo ** rPtr));
+#endif
+#ifndef Itcl_BuildVirtualTables_TCL_DECLARED
+#define Itcl_BuildVirtualTables_TCL_DECLARED
/* 38 */
-EXTERN void Itcl_BuildVirtualTables _ANSI_ARGS_((
+TCL_EXTERN(void) Itcl_BuildVirtualTables _ANSI_ARGS_((
ItclClass* cdefnPtr));
+#endif
+#ifndef Itcl_CreateVarDefn_TCL_DECLARED
+#define Itcl_CreateVarDefn_TCL_DECLARED
/* 39 */
-EXTERN int Itcl_CreateVarDefn _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_CreateVarDefn _ANSI_ARGS_((Tcl_Interp * interp,
ItclClass* cdefn, char* name, char* init,
char* config, ItclVarDefn** vdefnPtr));
+#endif
+#ifndef Itcl_DeleteVarDefn_TCL_DECLARED
+#define Itcl_DeleteVarDefn_TCL_DECLARED
/* 40 */
-EXTERN void Itcl_DeleteVarDefn _ANSI_ARGS_((ItclVarDefn * vdefn));
+TCL_EXTERN(void) Itcl_DeleteVarDefn _ANSI_ARGS_((ItclVarDefn * vdefn));
+#endif
+#ifndef Itcl_GetCommonVar_TCL_DECLARED
+#define Itcl_GetCommonVar_TCL_DECLARED
/* 41 */
-EXTERN char* Itcl_GetCommonVar _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, ItclClass * contextClass));
+TCL_EXTERN(CONST char*) Itcl_GetCommonVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, ItclClass * contextClass));
+#endif
+#ifndef Itcl_CreateMember_TCL_DECLARED
+#define Itcl_CreateMember_TCL_DECLARED
/* 42 */
-EXTERN ItclMember* Itcl_CreateMember _ANSI_ARGS_((Tcl_Interp* interp,
- ItclClass * cdefn, char* name));
+TCL_EXTERN(ItclMember*) Itcl_CreateMember _ANSI_ARGS_((Tcl_Interp* interp,
+ ItclClass * cdefn, CONST char* name));
+#endif
+#ifndef Itcl_DeleteMember_TCL_DECLARED
+#define Itcl_DeleteMember_TCL_DECLARED
/* 43 */
-EXTERN void Itcl_DeleteMember _ANSI_ARGS_((ItclMember * memPtr));
+TCL_EXTERN(void) Itcl_DeleteMember _ANSI_ARGS_((ItclMember * memPtr));
+#endif
+#ifndef Itcl_CreateObject_TCL_DECLARED
+#define Itcl_CreateObject_TCL_DECLARED
/* 44 */
-EXTERN int Itcl_CreateObject _ANSI_ARGS_((Tcl_Interp * interp,
- char* name, ItclClass * cdefn, int objc,
- Tcl_Obj *CONST objv[], ItclObject ** roPtr));
+TCL_EXTERN(int) Itcl_CreateObject _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char* name, ItclClass * cdefn,
+ int objc, Tcl_Obj *CONST objv[],
+ ItclObject ** roPtr));
+#endif
+#ifndef Itcl_DeleteObject_TCL_DECLARED
+#define Itcl_DeleteObject_TCL_DECLARED
/* 45 */
-EXTERN int Itcl_DeleteObject _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_DeleteObject _ANSI_ARGS_((Tcl_Interp * interp,
ItclObject * contextObj));
+#endif
+#ifndef Itcl_DestructObject_TCL_DECLARED
+#define Itcl_DestructObject_TCL_DECLARED
/* 46 */
-EXTERN int Itcl_DestructObject _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_DestructObject _ANSI_ARGS_((Tcl_Interp * interp,
ItclObject * contextObj, int flags));
+#endif
+#ifndef Itcl_HandleInstance_TCL_DECLARED
+#define Itcl_HandleInstance_TCL_DECLARED
/* 47 */
-EXTERN int Itcl_HandleInstance _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_HandleInstance _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_GetInstanceVar_TCL_DECLARED
+#define Itcl_GetInstanceVar_TCL_DECLARED
/* 48 */
-EXTERN char* Itcl_GetInstanceVar _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, ItclObject * contextObj,
+TCL_EXTERN(CONST char*) Itcl_GetInstanceVar _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ ItclObject * contextObj,
ItclClass * contextClass));
+#endif
+#ifndef Itcl_ScopedVarResolver_TCL_DECLARED
+#define Itcl_ScopedVarResolver_TCL_DECLARED
/* 49 */
-EXTERN int Itcl_ScopedVarResolver _ANSI_ARGS_((
- Tcl_Interp * interp, char * name,
+TCL_EXTERN(int) Itcl_ScopedVarResolver _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
Tcl_Namespace * contextNs, int flags,
Tcl_Var * rPtr));
+#endif
+#ifndef Itcl_BodyCmd_TCL_DECLARED
+#define Itcl_BodyCmd_TCL_DECLARED
/* 50 */
-EXTERN int Itcl_BodyCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_BodyCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ConfigBodyCmd_TCL_DECLARED
+#define Itcl_ConfigBodyCmd_TCL_DECLARED
/* 51 */
-EXTERN int Itcl_ConfigBodyCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_ConfigBodyCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_CreateMethod_TCL_DECLARED
+#define Itcl_CreateMethod_TCL_DECLARED
/* 52 */
-EXTERN int Itcl_CreateMethod _ANSI_ARGS_((Tcl_Interp* interp,
- ItclClass * cdefn, char* name, char* arglist,
- char* body));
+TCL_EXTERN(int) Itcl_CreateMethod _ANSI_ARGS_((Tcl_Interp* interp,
+ ItclClass * cdefn, CONST char* name,
+ CONST char* arglist, CONST char* body));
+#endif
+#ifndef Itcl_CreateProc_TCL_DECLARED
+#define Itcl_CreateProc_TCL_DECLARED
/* 53 */
-EXTERN int Itcl_CreateProc _ANSI_ARGS_((Tcl_Interp* interp,
- ItclClass * cdefn, char* name, char* arglist,
- char* body));
+TCL_EXTERN(int) Itcl_CreateProc _ANSI_ARGS_((Tcl_Interp* interp,
+ ItclClass * cdefn, CONST char* name,
+ CONST char* arglist, CONST char* body));
+#endif
+#ifndef Itcl_CreateMemberFunc_TCL_DECLARED
+#define Itcl_CreateMemberFunc_TCL_DECLARED
/* 54 */
-EXTERN int Itcl_CreateMemberFunc _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_CreateMemberFunc _ANSI_ARGS_((
Tcl_Interp* interp, ItclClass * cdefn,
- char* name, char* arglist, char* body,
- ItclMemberFunc** mfuncPtr));
+ CONST char* name, CONST char* arglist,
+ CONST char* body, ItclMemberFunc** mfuncPtr));
+#endif
+#ifndef Itcl_ChangeMemberFunc_TCL_DECLARED
+#define Itcl_ChangeMemberFunc_TCL_DECLARED
/* 55 */
-EXTERN int Itcl_ChangeMemberFunc _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ChangeMemberFunc _ANSI_ARGS_((
Tcl_Interp* interp, ItclMemberFunc* mfunc,
- char* arglist, char* body));
+ CONST char* arglist, CONST char* body));
+#endif
+#ifndef Itcl_DeleteMemberFunc_TCL_DECLARED
+#define Itcl_DeleteMemberFunc_TCL_DECLARED
/* 56 */
-EXTERN void Itcl_DeleteMemberFunc _ANSI_ARGS_((char* cdata));
+TCL_EXTERN(void) Itcl_DeleteMemberFunc _ANSI_ARGS_((CONST char* cdata));
+#endif
+#ifndef Itcl_CreateMemberCode_TCL_DECLARED
+#define Itcl_CreateMemberCode_TCL_DECLARED
/* 57 */
-EXTERN int Itcl_CreateMemberCode _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_CreateMemberCode _ANSI_ARGS_((
Tcl_Interp* interp, ItclClass * cdefn,
- char* arglist, char* body,
+ CONST char* arglist, CONST char* body,
ItclMemberCode** mcodePtr));
+#endif
+#ifndef Itcl_DeleteMemberCode_TCL_DECLARED
+#define Itcl_DeleteMemberCode_TCL_DECLARED
/* 58 */
-EXTERN void Itcl_DeleteMemberCode _ANSI_ARGS_((char* cdata));
+TCL_EXTERN(void) Itcl_DeleteMemberCode _ANSI_ARGS_((CONST char* cdata));
+#endif
+#ifndef Itcl_GetMemberCode_TCL_DECLARED
+#define Itcl_GetMemberCode_TCL_DECLARED
/* 59 */
-EXTERN int Itcl_GetMemberCode _ANSI_ARGS_((Tcl_Interp* interp,
+TCL_EXTERN(int) Itcl_GetMemberCode _ANSI_ARGS_((Tcl_Interp* interp,
ItclMember* member));
+#endif
/* Slot 60 is reserved */
+#ifndef Itcl_EvalMemberCode_TCL_DECLARED
+#define Itcl_EvalMemberCode_TCL_DECLARED
/* 61 */
-EXTERN int Itcl_EvalMemberCode _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_EvalMemberCode _ANSI_ARGS_((Tcl_Interp * interp,
ItclMemberFunc * mfunc, ItclMember * member,
ItclObject * contextObj, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_CreateArgList_TCL_DECLARED
+#define Itcl_CreateArgList_TCL_DECLARED
/* 62 */
-EXTERN int Itcl_CreateArgList _ANSI_ARGS_((Tcl_Interp* interp,
- char* decl, int* argcPtr,
+TCL_EXTERN(int) Itcl_CreateArgList _ANSI_ARGS_((Tcl_Interp* interp,
+ CONST char* decl, int* argcPtr,
CompiledLocal** argPtr));
+#endif
+#ifndef Itcl_CreateArg_TCL_DECLARED
+#define Itcl_CreateArg_TCL_DECLARED
/* 63 */
-EXTERN CompiledLocal* Itcl_CreateArg _ANSI_ARGS_((char* name, char* init));
+TCL_EXTERN(CompiledLocal*) Itcl_CreateArg _ANSI_ARGS_((CONST char* name,
+ CONST char* init));
+#endif
+#ifndef Itcl_DeleteArgList_TCL_DECLARED
+#define Itcl_DeleteArgList_TCL_DECLARED
/* 64 */
-EXTERN void Itcl_DeleteArgList _ANSI_ARGS_((
+TCL_EXTERN(void) Itcl_DeleteArgList _ANSI_ARGS_((
CompiledLocal * arglist));
+#endif
+#ifndef Itcl_ArgList_TCL_DECLARED
+#define Itcl_ArgList_TCL_DECLARED
/* 65 */
-EXTERN Tcl_Obj* Itcl_ArgList _ANSI_ARGS_((int argc,
+TCL_EXTERN(Tcl_Obj*) Itcl_ArgList _ANSI_ARGS_((int argc,
CompiledLocal* arglist));
+#endif
+#ifndef Itcl_EquivArgLists_TCL_DECLARED
+#define Itcl_EquivArgLists_TCL_DECLARED
/* 66 */
-EXTERN int Itcl_EquivArgLists _ANSI_ARGS_((CompiledLocal* arg1,
+TCL_EXTERN(int) Itcl_EquivArgLists _ANSI_ARGS_((CompiledLocal* arg1,
int arg1c, CompiledLocal* arg2, int arg2c));
+#endif
+#ifndef Itcl_GetMemberFuncUsage_TCL_DECLARED
+#define Itcl_GetMemberFuncUsage_TCL_DECLARED
/* 67 */
-EXTERN void Itcl_GetMemberFuncUsage _ANSI_ARGS_((
+TCL_EXTERN(void) Itcl_GetMemberFuncUsage _ANSI_ARGS_((
ItclMemberFunc * mfunc,
ItclObject * contextObj, Tcl_Obj * objPtr));
+#endif
+#ifndef Itcl_ExecMethod_TCL_DECLARED
+#define Itcl_ExecMethod_TCL_DECLARED
/* 68 */
-EXTERN int Itcl_ExecMethod _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_ExecMethod _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ExecProc_TCL_DECLARED
+#define Itcl_ExecProc_TCL_DECLARED
/* 69 */
-EXTERN int Itcl_ExecProc _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_ExecProc _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_AssignArgs_TCL_DECLARED
+#define Itcl_AssignArgs_TCL_DECLARED
/* 70 */
-EXTERN int Itcl_AssignArgs _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_AssignArgs _ANSI_ARGS_((Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[],
ItclMemberFunc * mfunc));
+#endif
+#ifndef Itcl_ConstructBase_TCL_DECLARED
+#define Itcl_ConstructBase_TCL_DECLARED
/* 71 */
-EXTERN int Itcl_ConstructBase _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_ConstructBase _ANSI_ARGS_((Tcl_Interp * interp,
ItclObject * contextObj,
ItclClass * contextClass));
+#endif
+#ifndef Itcl_InvokeMethodIfExists_TCL_DECLARED
+#define Itcl_InvokeMethodIfExists_TCL_DECLARED
/* 72 */
-EXTERN int Itcl_InvokeMethodIfExists _ANSI_ARGS_((
- Tcl_Interp * interp, char * name,
+TCL_EXTERN(int) Itcl_InvokeMethodIfExists _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
ItclClass * contextClass,
ItclObject * contextObj, int objc,
Tcl_Obj *CONST objv[]));
+#endif
/* Slot 73 is reserved */
+#ifndef Itcl_ReportFuncErrors_TCL_DECLARED
+#define Itcl_ReportFuncErrors_TCL_DECLARED
/* 74 */
-EXTERN int Itcl_ReportFuncErrors _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ReportFuncErrors _ANSI_ARGS_((
Tcl_Interp* interp, ItclMemberFunc * mfunc,
ItclObject * contextObj, int result));
+#endif
+#ifndef Itcl_ParseInit_TCL_DECLARED
+#define Itcl_ParseInit_TCL_DECLARED
/* 75 */
-EXTERN int Itcl_ParseInit _ANSI_ARGS_((Tcl_Interp * interp,
+TCL_EXTERN(int) Itcl_ParseInit _ANSI_ARGS_((Tcl_Interp * interp,
ItclObjectInfo * info));
+#endif
+#ifndef Itcl_ClassCmd_TCL_DECLARED
+#define Itcl_ClassCmd_TCL_DECLARED
/* 76 */
-EXTERN int Itcl_ClassCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_ClassCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ClassInheritCmd_TCL_DECLARED
+#define Itcl_ClassInheritCmd_TCL_DECLARED
/* 77 */
-EXTERN int Itcl_ClassInheritCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ClassInheritCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ClassProtectionCmd_TCL_DECLARED
+#define Itcl_ClassProtectionCmd_TCL_DECLARED
/* 78 */
-EXTERN int Itcl_ClassProtectionCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ClassProtectionCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ClassConstructorCmd_TCL_DECLARED
+#define Itcl_ClassConstructorCmd_TCL_DECLARED
/* 79 */
-EXTERN int Itcl_ClassConstructorCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ClassConstructorCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ClassDestructorCmd_TCL_DECLARED
+#define Itcl_ClassDestructorCmd_TCL_DECLARED
/* 80 */
-EXTERN int Itcl_ClassDestructorCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ClassDestructorCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ClassMethodCmd_TCL_DECLARED
+#define Itcl_ClassMethodCmd_TCL_DECLARED
/* 81 */
-EXTERN int Itcl_ClassMethodCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ClassMethodCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ClassProcCmd_TCL_DECLARED
+#define Itcl_ClassProcCmd_TCL_DECLARED
/* 82 */
-EXTERN int Itcl_ClassProcCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_ClassProcCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ClassVariableCmd_TCL_DECLARED
+#define Itcl_ClassVariableCmd_TCL_DECLARED
/* 83 */
-EXTERN int Itcl_ClassVariableCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ClassVariableCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ClassCommonCmd_TCL_DECLARED
+#define Itcl_ClassCommonCmd_TCL_DECLARED
/* 84 */
-EXTERN int Itcl_ClassCommonCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_ClassCommonCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_ParseVarResolver_TCL_DECLARED
+#define Itcl_ParseVarResolver_TCL_DECLARED
/* 85 */
-EXTERN int Itcl_ParseVarResolver _ANSI_ARGS_((
- Tcl_Interp * interp, char* name,
+TCL_EXTERN(int) Itcl_ParseVarResolver _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char* name,
Tcl_Namespace * contextNs, int flags,
Tcl_Var* rPtr));
+#endif
+#ifndef Itcl_BiInit_TCL_DECLARED
+#define Itcl_BiInit_TCL_DECLARED
/* 86 */
-EXTERN int Itcl_BiInit _ANSI_ARGS_((Tcl_Interp * interp));
+TCL_EXTERN(int) Itcl_BiInit _ANSI_ARGS_((Tcl_Interp * interp));
+#endif
+#ifndef Itcl_InstallBiMethods_TCL_DECLARED
+#define Itcl_InstallBiMethods_TCL_DECLARED
/* 87 */
-EXTERN int Itcl_InstallBiMethods _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_InstallBiMethods _ANSI_ARGS_((
Tcl_Interp * interp, ItclClass * cdefn));
+#endif
+#ifndef Itcl_BiIsaCmd_TCL_DECLARED
+#define Itcl_BiIsaCmd_TCL_DECLARED
/* 88 */
-EXTERN int Itcl_BiIsaCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_BiIsaCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiConfigureCmd_TCL_DECLARED
+#define Itcl_BiConfigureCmd_TCL_DECLARED
/* 89 */
-EXTERN int Itcl_BiConfigureCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_BiConfigureCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiCgetCmd_TCL_DECLARED
+#define Itcl_BiCgetCmd_TCL_DECLARED
/* 90 */
-EXTERN int Itcl_BiCgetCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_BiCgetCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiChainCmd_TCL_DECLARED
+#define Itcl_BiChainCmd_TCL_DECLARED
/* 91 */
-EXTERN int Itcl_BiChainCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_BiChainCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiInfoClassCmd_TCL_DECLARED
+#define Itcl_BiInfoClassCmd_TCL_DECLARED
/* 92 */
-EXTERN int Itcl_BiInfoClassCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_BiInfoClassCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiInfoInheritCmd_TCL_DECLARED
+#define Itcl_BiInfoInheritCmd_TCL_DECLARED
/* 93 */
-EXTERN int Itcl_BiInfoInheritCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_BiInfoInheritCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiInfoHeritageCmd_TCL_DECLARED
+#define Itcl_BiInfoHeritageCmd_TCL_DECLARED
/* 94 */
-EXTERN int Itcl_BiInfoHeritageCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_BiInfoHeritageCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiInfoFunctionCmd_TCL_DECLARED
+#define Itcl_BiInfoFunctionCmd_TCL_DECLARED
/* 95 */
-EXTERN int Itcl_BiInfoFunctionCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_BiInfoFunctionCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiInfoVariableCmd_TCL_DECLARED
+#define Itcl_BiInfoVariableCmd_TCL_DECLARED
/* 96 */
-EXTERN int Itcl_BiInfoVariableCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_BiInfoVariableCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiInfoBodyCmd_TCL_DECLARED
+#define Itcl_BiInfoBodyCmd_TCL_DECLARED
/* 97 */
-EXTERN int Itcl_BiInfoBodyCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_BiInfoBodyCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_BiInfoArgsCmd_TCL_DECLARED
+#define Itcl_BiInfoArgsCmd_TCL_DECLARED
/* 98 */
-EXTERN int Itcl_BiInfoArgsCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_BiInfoArgsCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_DefaultInfoCmd_TCL_DECLARED
+#define Itcl_DefaultInfoCmd_TCL_DECLARED
/* 99 */
-EXTERN int Itcl_DefaultInfoCmd _ANSI_ARGS_((ClientData dummy,
+TCL_EXTERN(int) Itcl_DefaultInfoCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_EnsembleInit_TCL_DECLARED
+#define Itcl_EnsembleInit_TCL_DECLARED
/* 100 */
-EXTERN int Itcl_EnsembleInit _ANSI_ARGS_((Tcl_Interp * interp));
+TCL_EXTERN(int) Itcl_EnsembleInit _ANSI_ARGS_((Tcl_Interp * interp));
+#endif
+#ifndef Itcl_CreateEnsemble_TCL_DECLARED
+#define Itcl_CreateEnsemble_TCL_DECLARED
/* 101 */
-EXTERN int Itcl_CreateEnsemble _ANSI_ARGS_((Tcl_Interp * interp,
- char* ensName));
+TCL_EXTERN(int) Itcl_CreateEnsemble _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char* ensName));
+#endif
+#ifndef Itcl_AddEnsemblePart_TCL_DECLARED
+#define Itcl_AddEnsemblePart_TCL_DECLARED
/* 102 */
-EXTERN int Itcl_AddEnsemblePart _ANSI_ARGS_((
- Tcl_Interp * interp, char* ensName,
- char* partName, char* usageInfo,
+TCL_EXTERN(int) Itcl_AddEnsemblePart _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char* ensName,
+ CONST char* partName, CONST char* usageInfo,
Tcl_ObjCmdProc * objProc,
ClientData clientData,
Tcl_CmdDeleteProc * deleteProc));
+#endif
+#ifndef Itcl_GetEnsemblePart_TCL_DECLARED
+#define Itcl_GetEnsemblePart_TCL_DECLARED
/* 103 */
-EXTERN int Itcl_GetEnsemblePart _ANSI_ARGS_((
- Tcl_Interp * interp, char * ensName,
- char * partName, Tcl_CmdInfo * infoPtr));
+TCL_EXTERN(int) Itcl_GetEnsemblePart _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * ensName,
+ CONST char * partName, Tcl_CmdInfo * infoPtr));
+#endif
+#ifndef Itcl_IsEnsemble_TCL_DECLARED
+#define Itcl_IsEnsemble_TCL_DECLARED
/* 104 */
-EXTERN int Itcl_IsEnsemble _ANSI_ARGS_((Tcl_CmdInfo* infoPtr));
+TCL_EXTERN(int) Itcl_IsEnsemble _ANSI_ARGS_((Tcl_CmdInfo* infoPtr));
+#endif
+#ifndef Itcl_GetEnsembleUsage_TCL_DECLARED
+#define Itcl_GetEnsembleUsage_TCL_DECLARED
/* 105 */
-EXTERN int Itcl_GetEnsembleUsage _ANSI_ARGS_((
- Tcl_Interp * interp, char * ensName,
+TCL_EXTERN(int) Itcl_GetEnsembleUsage _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * ensName,
Tcl_Obj * objPtr));
+#endif
+#ifndef Itcl_GetEnsembleUsageForObj_TCL_DECLARED
+#define Itcl_GetEnsembleUsageForObj_TCL_DECLARED
/* 106 */
-EXTERN int Itcl_GetEnsembleUsageForObj _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_GetEnsembleUsageForObj _ANSI_ARGS_((
Tcl_Interp * interp, Tcl_Obj * ensObjPtr,
Tcl_Obj * objPtr));
+#endif
+#ifndef Itcl_EnsembleCmd_TCL_DECLARED
+#define Itcl_EnsembleCmd_TCL_DECLARED
/* 107 */
-EXTERN int Itcl_EnsembleCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_EnsembleCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_EnsPartCmd_TCL_DECLARED
+#define Itcl_EnsPartCmd_TCL_DECLARED
/* 108 */
-EXTERN int Itcl_EnsPartCmd _ANSI_ARGS_((ClientData clientData,
+TCL_EXTERN(int) Itcl_EnsPartCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_EnsembleErrorCmd_TCL_DECLARED
+#define Itcl_EnsembleErrorCmd_TCL_DECLARED
/* 109 */
-EXTERN int Itcl_EnsembleErrorCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itcl_EnsembleErrorCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
-/* 110 */
-EXTERN int Itcl_OldInit _ANSI_ARGS_((Tcl_Interp* interp,
- ItclObjectInfo* info));
-/* 111 */
-EXTERN int Itcl_InstallOldBiMethods _ANSI_ARGS_((
- Tcl_Interp * interp, ItclClass * cdefn));
+#endif
+/* Slot 110 is reserved */
+/* Slot 111 is reserved */
+#ifndef _Tcl_GetCallFrame_TCL_DECLARED
+#define _Tcl_GetCallFrame_TCL_DECLARED
/* 112 */
-EXTERN Tcl_CallFrame* _Tcl_GetCallFrame _ANSI_ARGS_((Tcl_Interp * interp,
- int level));
+TCL_EXTERN(Tcl_CallFrame*) _Tcl_GetCallFrame _ANSI_ARGS_((
+ Tcl_Interp * interp, int level));
+#endif
+#ifndef _Tcl_ActivateCallFrame_TCL_DECLARED
+#define _Tcl_ActivateCallFrame_TCL_DECLARED
/* 113 */
-EXTERN Tcl_CallFrame* _Tcl_ActivateCallFrame _ANSI_ARGS_((
+TCL_EXTERN(Tcl_CallFrame*) _Tcl_ActivateCallFrame _ANSI_ARGS_((
Tcl_Interp * interp,
Tcl_CallFrame * framePtr));
+#endif
+#ifndef _TclNewVar_TCL_DECLARED
+#define _TclNewVar_TCL_DECLARED
/* 114 */
-EXTERN Var* _TclNewVar _ANSI_ARGS_((void));
+TCL_EXTERN(Var*) _TclNewVar _ANSI_ARGS_((void));
+#endif
+#ifndef Itcl_Assert_TCL_DECLARED
+#define Itcl_Assert_TCL_DECLARED
/* 115 */
-EXTERN void Itcl_Assert _ANSI_ARGS_((char * testExpr,
- char * fileName, int lineNum));
+TCL_EXTERN(void) Itcl_Assert _ANSI_ARGS_((CONST char * testExpr,
+ CONST char * fileName, int lineNum));
+#endif
+#ifndef Itcl_IsObjectCmd_TCL_DECLARED
+#define Itcl_IsObjectCmd_TCL_DECLARED
+/* 116 */
+TCL_EXTERN(int) Itcl_IsObjectCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, int objc,
+ Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itcl_IsClassCmd_TCL_DECLARED
+#define Itcl_IsClassCmd_TCL_DECLARED
+/* 117 */
+TCL_EXTERN(int) Itcl_IsClassCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, int objc,
+ Tcl_Obj *CONST objv[]));
+#endif
typedef struct ItclIntStubs {
int magic;
@@ -452,8 +799,8 @@ typedef struct ItclIntStubs {
int (*itcl_IsClassNamespace) _ANSI_ARGS_((Tcl_Namespace * namesp)); /* 0 */
int (*itcl_IsClass) _ANSI_ARGS_((Tcl_Command cmd)); /* 1 */
- ItclClass* (*itcl_FindClass) _ANSI_ARGS_((Tcl_Interp* interp, char* path, int autoload)); /* 2 */
- int (*itcl_FindObject) _ANSI_ARGS_((Tcl_Interp * interp, char * name, ItclObject ** roPtr)); /* 3 */
+ ItclClass* (*itcl_FindClass) _ANSI_ARGS_((Tcl_Interp* interp, CONST char* path, int autoload)); /* 2 */
+ int (*itcl_FindObject) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, ItclObject ** roPtr)); /* 3 */
int (*itcl_IsObject) _ANSI_ARGS_((Tcl_Command cmd)); /* 4 */
int (*itcl_ObjectIsa) _ANSI_ARGS_((ItclObject * contextObj, ItclClass * cdefn)); /* 5 */
int (*itcl_Protection) _ANSI_ARGS_((Tcl_Interp * interp, int newLevel)); /* 6 */
@@ -461,10 +808,10 @@ typedef struct ItclIntStubs {
int (*itcl_CanAccess) _ANSI_ARGS_((ItclMember* memberPtr, Tcl_Namespace* fromNsPtr)); /* 8 */
int (*itcl_CanAccessFunc) _ANSI_ARGS_((ItclMemberFunc* mfunc, Tcl_Namespace* fromNsPtr)); /* 9 */
Tcl_Namespace* (*itcl_GetTrueNamespace) _ANSI_ARGS_((Tcl_Interp * interp, ItclObjectInfo * info)); /* 10 */
- void (*itcl_ParseNamespPath) _ANSI_ARGS_((char * name, Tcl_DString * buffer, char ** head, char ** tail)); /* 11 */
- int (*itcl_DecodeScopedCommand) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_Namespace ** rNsPtr, char ** rCmdPtr)); /* 12 */
+ void (*itcl_ParseNamespPath) _ANSI_ARGS_((CONST char * name, Tcl_DString * buffer, char ** head, char ** tail)); /* 11 */
+ int (*itcl_DecodeScopedCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_Namespace ** rNsPtr, char ** rCmdPtr)); /* 12 */
int (*itcl_EvalArgs) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 13 */
- Tcl_Obj* (*itcl_CreateArgs) _ANSI_ARGS_((Tcl_Interp * interp, char * string, int objc, Tcl_Obj *CONST objv[])); /* 14 */
+ Tcl_Obj* (*itcl_CreateArgs) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int objc, Tcl_Obj *CONST objv[])); /* 14 */
int (*itcl_PushContext) _ANSI_ARGS_((Tcl_Interp * interp, ItclMember * member, ItclClass * contextClass, ItclObject * contextObj, ItclContext * contextPtr)); /* 15 */
void (*itcl_PopContext) _ANSI_ARGS_((Tcl_Interp * interp, ItclContext * contextPtr)); /* 16 */
int (*itcl_GetContext) _ANSI_ARGS_((Tcl_Interp * interp, ItclClass ** cdefnPtr, ItclObject ** odefnPtr)); /* 17 */
@@ -481,39 +828,39 @@ typedef struct ItclIntStubs {
int (*itcl_StubCreateCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 28 */
int (*itcl_StubExistsCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 29 */
int (*itcl_IsStub) _ANSI_ARGS_((Tcl_Command cmd)); /* 30 */
- int (*itcl_CreateClass) _ANSI_ARGS_((Tcl_Interp* interp, char* path, ItclObjectInfo * info, ItclClass ** rPtr)); /* 31 */
+ int (*itcl_CreateClass) _ANSI_ARGS_((Tcl_Interp* interp, CONST char* path, ItclObjectInfo * info, ItclClass ** rPtr)); /* 31 */
int (*itcl_DeleteClass) _ANSI_ARGS_((Tcl_Interp * interp, ItclClass * cdefnPtr)); /* 32 */
- Tcl_Namespace* (*itcl_FindClassNamespace) _ANSI_ARGS_((Tcl_Interp* interp, char* path)); /* 33 */
+ Tcl_Namespace* (*itcl_FindClassNamespace) _ANSI_ARGS_((Tcl_Interp* interp, CONST 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, 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 */
+ int (*itcl_ClassVarResolver) _ANSI_ARGS_((Tcl_Interp * interp, CONST char* name, Tcl_Namespace * context, int flags, Tcl_Var * rPtr)); /* 36 */
+ int (*itcl_ClassCompiledVarResolver) _ANSI_ARGS_((Tcl_Interp * interp, CONST char* name, int length, Tcl_Namespace * context, Tcl_ResolvedVarInfo ** rPtr)); /* 37 */
void (*itcl_BuildVirtualTables) _ANSI_ARGS_((ItclClass* cdefnPtr)); /* 38 */
int (*itcl_CreateVarDefn) _ANSI_ARGS_((Tcl_Interp * interp, ItclClass* cdefn, char* name, char* init, char* config, ItclVarDefn** vdefnPtr)); /* 39 */
void (*itcl_DeleteVarDefn) _ANSI_ARGS_((ItclVarDefn * vdefn)); /* 40 */
- char* (*itcl_GetCommonVar) _ANSI_ARGS_((Tcl_Interp * interp, char * name, ItclClass * contextClass)); /* 41 */
- ItclMember* (*itcl_CreateMember) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, char* name)); /* 42 */
+ CONST char* (*itcl_GetCommonVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, ItclClass * contextClass)); /* 41 */
+ ItclMember* (*itcl_CreateMember) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, CONST char* name)); /* 42 */
void (*itcl_DeleteMember) _ANSI_ARGS_((ItclMember * memPtr)); /* 43 */
- int (*itcl_CreateObject) _ANSI_ARGS_((Tcl_Interp * interp, char* name, ItclClass * cdefn, int objc, Tcl_Obj *CONST objv[], ItclObject ** roPtr)); /* 44 */
+ int (*itcl_CreateObject) _ANSI_ARGS_((Tcl_Interp * interp, CONST char* name, ItclClass * cdefn, int objc, Tcl_Obj *CONST objv[], ItclObject ** roPtr)); /* 44 */
int (*itcl_DeleteObject) _ANSI_ARGS_((Tcl_Interp * interp, ItclObject * contextObj)); /* 45 */
int (*itcl_DestructObject) _ANSI_ARGS_((Tcl_Interp * interp, ItclObject * contextObj, int flags)); /* 46 */
int (*itcl_HandleInstance) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 47 */
- char* (*itcl_GetInstanceVar) _ANSI_ARGS_((Tcl_Interp * interp, char * name, ItclObject * contextObj, ItclClass * contextClass)); /* 48 */
- int (*itcl_ScopedVarResolver) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_Namespace * contextNs, int flags, Tcl_Var * rPtr)); /* 49 */
+ CONST char* (*itcl_GetInstanceVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, ItclObject * contextObj, ItclClass * contextClass)); /* 48 */
+ int (*itcl_ScopedVarResolver) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNs, int flags, Tcl_Var * rPtr)); /* 49 */
int (*itcl_BodyCmd) _ANSI_ARGS_((ClientData dummy, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 50 */
int (*itcl_ConfigBodyCmd) _ANSI_ARGS_((ClientData dummy, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 51 */
- int (*itcl_CreateMethod) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, char* name, char* arglist, char* body)); /* 52 */
- int (*itcl_CreateProc) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, char* name, char* arglist, char* body)); /* 53 */
- int (*itcl_CreateMemberFunc) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, char* name, char* arglist, char* body, ItclMemberFunc** mfuncPtr)); /* 54 */
- int (*itcl_ChangeMemberFunc) _ANSI_ARGS_((Tcl_Interp* interp, ItclMemberFunc* mfunc, char* arglist, char* body)); /* 55 */
- void (*itcl_DeleteMemberFunc) _ANSI_ARGS_((char* cdata)); /* 56 */
- int (*itcl_CreateMemberCode) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, char* arglist, char* body, ItclMemberCode** mcodePtr)); /* 57 */
- void (*itcl_DeleteMemberCode) _ANSI_ARGS_((char* cdata)); /* 58 */
+ int (*itcl_CreateMethod) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, CONST char* name, CONST char* arglist, CONST char* body)); /* 52 */
+ int (*itcl_CreateProc) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, CONST char* name, CONST char* arglist, CONST char* body)); /* 53 */
+ int (*itcl_CreateMemberFunc) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, CONST char* name, CONST char* arglist, CONST char* body, ItclMemberFunc** mfuncPtr)); /* 54 */
+ int (*itcl_ChangeMemberFunc) _ANSI_ARGS_((Tcl_Interp* interp, ItclMemberFunc* mfunc, CONST char* arglist, CONST char* body)); /* 55 */
+ void (*itcl_DeleteMemberFunc) _ANSI_ARGS_((CONST char* cdata)); /* 56 */
+ int (*itcl_CreateMemberCode) _ANSI_ARGS_((Tcl_Interp* interp, ItclClass * cdefn, CONST char* arglist, CONST char* body, ItclMemberCode** mcodePtr)); /* 57 */
+ void (*itcl_DeleteMemberCode) _ANSI_ARGS_((CONST char* cdata)); /* 58 */
int (*itcl_GetMemberCode) _ANSI_ARGS_((Tcl_Interp* interp, ItclMember* member)); /* 59 */
void *reserved60;
int (*itcl_EvalMemberCode) _ANSI_ARGS_((Tcl_Interp * interp, ItclMemberFunc * mfunc, ItclMember * member, ItclObject * contextObj, int objc, Tcl_Obj *CONST objv[])); /* 61 */
- int (*itcl_CreateArgList) _ANSI_ARGS_((Tcl_Interp* interp, char* decl, int* argcPtr, CompiledLocal** argPtr)); /* 62 */
- CompiledLocal* (*itcl_CreateArg) _ANSI_ARGS_((char* name, char* init)); /* 63 */
+ int (*itcl_CreateArgList) _ANSI_ARGS_((Tcl_Interp* interp, CONST char* decl, int* argcPtr, CompiledLocal** argPtr)); /* 62 */
+ CompiledLocal* (*itcl_CreateArg) _ANSI_ARGS_((CONST char* name, CONST char* init)); /* 63 */
void (*itcl_DeleteArgList) _ANSI_ARGS_((CompiledLocal * arglist)); /* 64 */
Tcl_Obj* (*itcl_ArgList) _ANSI_ARGS_((int argc, CompiledLocal* arglist)); /* 65 */
int (*itcl_EquivArgLists) _ANSI_ARGS_((CompiledLocal* arg1, int arg1c, CompiledLocal* arg2, int arg2c)); /* 66 */
@@ -522,7 +869,7 @@ typedef struct ItclIntStubs {
int (*itcl_ExecProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 69 */
int (*itcl_AssignArgs) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], ItclMemberFunc * mfunc)); /* 70 */
int (*itcl_ConstructBase) _ANSI_ARGS_((Tcl_Interp * interp, ItclObject * contextObj, ItclClass * contextClass)); /* 71 */
- int (*itcl_InvokeMethodIfExists) _ANSI_ARGS_((Tcl_Interp * interp, char * name, ItclClass * contextClass, ItclObject * contextObj, int objc, Tcl_Obj *CONST objv[])); /* 72 */
+ int (*itcl_InvokeMethodIfExists) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, ItclClass * contextClass, ItclObject * contextObj, int objc, Tcl_Obj *CONST objv[])); /* 72 */
void *reserved73;
int (*itcl_ReportFuncErrors) _ANSI_ARGS_((Tcl_Interp* interp, ItclMemberFunc * mfunc, ItclObject * contextObj, int result)); /* 74 */
int (*itcl_ParseInit) _ANSI_ARGS_((Tcl_Interp * interp, ItclObjectInfo * info)); /* 75 */
@@ -535,7 +882,7 @@ typedef struct ItclIntStubs {
int (*itcl_ClassProcCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 82 */
int (*itcl_ClassVariableCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 83 */
int (*itcl_ClassCommonCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 84 */
- int (*itcl_ParseVarResolver) _ANSI_ARGS_((Tcl_Interp * interp, char* name, Tcl_Namespace * contextNs, int flags, Tcl_Var* rPtr)); /* 85 */
+ int (*itcl_ParseVarResolver) _ANSI_ARGS_((Tcl_Interp * interp, CONST char* name, Tcl_Namespace * contextNs, int flags, Tcl_Var* rPtr)); /* 85 */
int (*itcl_BiInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 86 */
int (*itcl_InstallBiMethods) _ANSI_ARGS_((Tcl_Interp * interp, ItclClass * cdefn)); /* 87 */
int (*itcl_BiIsaCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 88 */
@@ -551,30 +898,26 @@ typedef struct ItclIntStubs {
int (*itcl_BiInfoArgsCmd) _ANSI_ARGS_((ClientData dummy, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 98 */
int (*itcl_DefaultInfoCmd) _ANSI_ARGS_((ClientData dummy, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 99 */
int (*itcl_EnsembleInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 100 */
- int (*itcl_CreateEnsemble) _ANSI_ARGS_((Tcl_Interp * interp, char* ensName)); /* 101 */
- int (*itcl_AddEnsemblePart) _ANSI_ARGS_((Tcl_Interp * interp, char* ensName, char* partName, char* usageInfo, Tcl_ObjCmdProc * objProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 102 */
- int (*itcl_GetEnsemblePart) _ANSI_ARGS_((Tcl_Interp * interp, char * ensName, char * partName, Tcl_CmdInfo * infoPtr)); /* 103 */
+ int (*itcl_CreateEnsemble) _ANSI_ARGS_((Tcl_Interp * interp, CONST char* ensName)); /* 101 */
+ int (*itcl_AddEnsemblePart) _ANSI_ARGS_((Tcl_Interp * interp, CONST char* ensName, CONST char* partName, CONST char* usageInfo, Tcl_ObjCmdProc * objProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 102 */
+ int (*itcl_GetEnsemblePart) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * ensName, CONST char * partName, Tcl_CmdInfo * infoPtr)); /* 103 */
int (*itcl_IsEnsemble) _ANSI_ARGS_((Tcl_CmdInfo* infoPtr)); /* 104 */
- int (*itcl_GetEnsembleUsage) _ANSI_ARGS_((Tcl_Interp * interp, char * ensName, Tcl_Obj * objPtr)); /* 105 */
+ int (*itcl_GetEnsembleUsage) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * ensName, Tcl_Obj * objPtr)); /* 105 */
int (*itcl_GetEnsembleUsageForObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * ensObjPtr, Tcl_Obj * objPtr)); /* 106 */
int (*itcl_EnsembleCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 107 */
int (*itcl_EnsPartCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 108 */
int (*itcl_EnsembleErrorCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 109 */
- int (*itcl_OldInit) _ANSI_ARGS_((Tcl_Interp* interp, ItclObjectInfo* info)); /* 110 */
- int (*itcl_InstallOldBiMethods) _ANSI_ARGS_((Tcl_Interp * interp, ItclClass * cdefn)); /* 111 */
+ void *reserved110;
+ void *reserved111;
Tcl_CallFrame* (*_Tcl_GetCallFrame) _ANSI_ARGS_((Tcl_Interp * interp, int level)); /* 112 */
Tcl_CallFrame* (*_Tcl_ActivateCallFrame) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_CallFrame * framePtr)); /* 113 */
Var* (*_TclNewVar) _ANSI_ARGS_((void)); /* 114 */
- void (*itcl_Assert) _ANSI_ARGS_((char * testExpr, char * fileName, int lineNum)); /* 115 */
+ void (*itcl_Assert) _ANSI_ARGS_((CONST char * testExpr, CONST char * fileName, int lineNum)); /* 115 */
+ int (*itcl_IsObjectCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 116 */
+ int (*itcl_IsClassCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 117 */
} ItclIntStubs;
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern ItclIntStubs *itclIntStubsPtr;
-#ifdef __cplusplus
-}
-#endif
+TCL_EXTERNC ItclIntStubs *itclIntStubsPtr;
#if defined(USE_ITCL_STUBS) && !defined(USE_ITCL_STUB_PROCS)
@@ -1016,14 +1359,8 @@ extern ItclIntStubs *itclIntStubsPtr;
#define Itcl_EnsembleErrorCmd \
(itclIntStubsPtr->itcl_EnsembleErrorCmd) /* 109 */
#endif
-#ifndef Itcl_OldInit
-#define Itcl_OldInit \
- (itclIntStubsPtr->itcl_OldInit) /* 110 */
-#endif
-#ifndef Itcl_InstallOldBiMethods
-#define Itcl_InstallOldBiMethods \
- (itclIntStubsPtr->itcl_InstallOldBiMethods) /* 111 */
-#endif
+/* Slot 110 is reserved */
+/* Slot 111 is reserved */
#ifndef _Tcl_GetCallFrame
#define _Tcl_GetCallFrame \
(itclIntStubsPtr->_Tcl_GetCallFrame) /* 112 */
@@ -1040,6 +1377,14 @@ extern ItclIntStubs *itclIntStubsPtr;
#define Itcl_Assert \
(itclIntStubsPtr->itcl_Assert) /* 115 */
#endif
+#ifndef Itcl_IsObjectCmd
+#define Itcl_IsObjectCmd \
+ (itclIntStubsPtr->itcl_IsObjectCmd) /* 116 */
+#endif
+#ifndef Itcl_IsClassCmd
+#define Itcl_IsClassCmd \
+ (itclIntStubsPtr->itcl_IsClassCmd) /* 117 */
+#endif
#endif /* defined(USE_ITCL_STUBS) && !defined(USE_ITCL_STUB_PROCS) */
diff --git a/itcl/itcl/generic/itclStubInit.c b/itcl/itcl/generic/itclStubInit.c
index 50df340c26b..ded4c197a11 100644
--- a/itcl/itcl/generic/itclStubInit.c
+++ b/itcl/itcl/generic/itclStubInit.c
@@ -139,12 +139,14 @@ ItclIntStubs itclIntStubs = {
Itcl_EnsembleCmd, /* 107 */
Itcl_EnsPartCmd, /* 108 */
Itcl_EnsembleErrorCmd, /* 109 */
- Itcl_OldInit, /* 110 */
- Itcl_InstallOldBiMethods, /* 111 */
+ NULL, /* 110 */
+ NULL, /* 111 */
_Tcl_GetCallFrame, /* 112 */
_Tcl_ActivateCallFrame, /* 113 */
_TclNewVar, /* 114 */
Itcl_Assert, /* 115 */
+ Itcl_IsObjectCmd, /* 116 */
+ Itcl_IsClassCmd, /* 117 */
};
static ItclStubHooks itclStubHooks = {
diff --git a/itcl/itcl/generic/itclStubLib.c b/itcl/itcl/generic/itclStubLib.c
index 2888812882b..37eb8d28a24 100644
--- a/itcl/itcl/generic/itclStubLib.c
+++ b/itcl/itcl/generic/itclStubLib.c
@@ -4,7 +4,6 @@
* Stub object that will be statically linked into extensions that wish
* to access Itcl.
*
- * Copyright (c) 1998-1999 by XXXX
* Copyright (c) 1998 Paul Duffin.
*
* See the file "license.terms" for information on usage and redistribution
@@ -44,7 +43,7 @@ ItclIntStubs *itclIntStubsPtr;
*
* Itcl_InitStubs --
*
- * Tries to initialise the stub table pointers and ensures that
+ * Tries to initialize the stub table pointers and ensures that
* the correct version of Itcl is loaded.
*
* Results:
@@ -57,15 +56,19 @@ ItclIntStubs *itclIntStubsPtr;
*----------------------------------------------------------------------
*/
+#ifdef Itcl_InitStubs
+#undef Itcl_InitStubs
+#endif
+
CONST char *
Itcl_InitStubs (interp, version, exact)
Tcl_Interp *interp;
- char *version;
+ CONST char *version;
int exact;
{
CONST char *actualVersion;
- actualVersion = Tcl_PkgRequireEx(interp, "Itcl", version, exact,
+ actualVersion = Tcl_PkgRequireEx(interp, "Itcl", (CONST84 char *)version, exact,
(ClientData *) &itclStubsPtr);
if (actualVersion == NULL) {
diff --git a/itcl/itcl/generic/itcl_bicmds.c b/itcl/itcl/generic/itcl_bicmds.c
index a200f6508ba..88d56879c66 100644
--- a/itcl/itcl/generic/itcl_bicmds.c
+++ b/itcl/itcl/generic/itcl_bicmds.c
@@ -323,7 +323,8 @@ Itcl_BiConfigureCmd(clientData, interp, objc, objv)
ItclObject *contextObj;
int i, result;
- char *token, *lastval;
+ CONST char *lastval;
+ char *token;
ItclClass *cdPtr;
Tcl_HashSearch place;
Tcl_HashEntry *entry;
@@ -487,7 +488,7 @@ Itcl_BiConfigureCmd(clientData, interp, objc, objv)
* set up for public variable access.
*/
mcode = member->code;
- if (mcode && mcode->procPtr->bodyPtr) {
+ if (mcode && Itcl_IsMemberCodeImplemented(mcode)) {
uplevelFramePtr = _Tcl_GetCallFrame(interp, 1);
oldFramePtr = _Tcl_ActivateCallFrame(interp, uplevelFramePtr);
@@ -546,7 +547,7 @@ Itcl_BiCgetCmd(clientData, interp, objc, objv)
ItclClass *contextClass;
ItclObject *contextObj;
- char *name, *val;
+ CONST char *name, *val;
ItclVarLookup *vlookup;
Tcl_HashEntry *entry;
@@ -588,9 +589,9 @@ Itcl_BiCgetCmd(clientData, interp, objc, objv)
contextObj, contextObj->classDefn);
if (val) {
- Tcl_SetResult(interp, val, TCL_VOLATILE);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(val, -1));
} else {
- Tcl_SetResult(interp, "<undefined>", TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("<undefined>", -1));
}
return TCL_OK;
}
@@ -615,7 +616,7 @@ ItclReportPublicOpt(interp, vdefn, contextObj)
ItclVarDefn *vdefn; /* public variable to be reported */
ItclObject *contextObj; /* object containing this variable */
{
- char *val;
+ CONST char *val;
ItclClass *cdefnPtr;
Tcl_HashEntry *entry;
ItclVarLookup *vlookup;
@@ -655,7 +656,7 @@ ItclReportPublicOpt(interp, vdefn, contextObj)
contextObj->classDefn);
if (val) {
- objPtr = Tcl_NewStringObj(val, -1);
+ objPtr = Tcl_NewStringObj((CONST84 char *)val, -1);
} else {
objPtr = Tcl_NewStringObj("<undefined>", -1);
}
@@ -825,12 +826,10 @@ Itcl_BiInfoClassCmd(dummy, interp, objc, objv)
* signal an error.
*/
if (Itcl_GetContext(interp, &contextClass, &contextObj) != TCL_OK) {
- name = Tcl_GetStringFromObj(objv[0], (int*)NULL);
- Tcl_ResetResult(interp);
- Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
- "\nget info like this instead: ",
- "\n namespace eval className { info ", name, "... }",
- (char*)NULL);
+ Tcl_Obj *msg = Tcl_NewStringObj("\nget info like this instead: " \
+ "\n namespace eval className { info ", -1);
+ Tcl_AppendStringsToObj(msg, Tcl_GetString(objv[0]), "... }", NULL);
+ Tcl_SetObjResult(interp, msg);
return TCL_ERROR;
}
@@ -855,7 +854,7 @@ Itcl_BiInfoClassCmd(dummy, interp, objc, objv)
name = contextNs->fullName;
}
- Tcl_SetResult(interp, name, TCL_VOLATILE);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(name, -1));
return TCL_OK;
}
@@ -1133,7 +1132,7 @@ Itcl_BiInfoFunctionCmd(dummy, interp, objc, objv)
break;
case BIfBodyIdx:
- if (mcode && mcode->procPtr->bodyPtr) {
+ if (mcode && Itcl_IsMemberCodeImplemented(mcode)) {
objPtr = mcode->procPtr->bodyPtr;
} else {
objPtr = Tcl_NewStringObj("<undefined>", -1);
@@ -1247,7 +1246,7 @@ Itcl_BiInfoVariableCmd(dummy, interp, objc, objv)
ItclObject *contextObj;
int i, result;
- char *val, *name;
+ CONST char *val, *name;
ItclClass *cdefn;
Tcl_HashSearch place;
Tcl_HashEntry *entry;
@@ -1334,7 +1333,7 @@ Itcl_BiInfoVariableCmd(dummy, interp, objc, objv)
for (i=0 ; i < objc; i++) {
switch (ivlist[i]) {
case BIvConfigIdx:
- if (member->code && member->code->procPtr->bodyPtr) {
+ if (member->code && Itcl_IsMemberCodeImplemented(member->code)) {
objPtr = member->code->procPtr->bodyPtr;
} else {
objPtr = Tcl_NewStringObj("", -1);
@@ -1370,13 +1369,13 @@ Itcl_BiInfoVariableCmd(dummy, interp, objc, objv)
case BIvProtectIdx:
val = Itcl_ProtectionStr(member->protection);
- objPtr = Tcl_NewStringObj(val, -1);
+ objPtr = Tcl_NewStringObj((CONST84 char *)val, -1);
break;
case BIvTypeIdx:
val = ((member->flags & ITCL_COMMON) != 0)
? "common" : "variable";
- objPtr = Tcl_NewStringObj(val, -1);
+ objPtr = Tcl_NewStringObj((CONST84 char *)val, -1);
break;
case BIvValueIdx:
@@ -1400,7 +1399,7 @@ Itcl_BiInfoVariableCmd(dummy, interp, objc, objv)
if (val == NULL) {
val = "<undefined>";
}
- objPtr = Tcl_NewStringObj(val, -1);
+ objPtr = Tcl_NewStringObj((CONST84 char *)val, -1);
break;
}
@@ -1526,7 +1525,7 @@ Itcl_BiInfoBodyCmd(dummy, interp, objc, objv)
/*
* Return a string describing the implementation.
*/
- if (mcode && mcode->procPtr->bodyPtr) {
+ if (mcode && Itcl_IsMemberCodeImplemented(mcode)) {
objPtr = mcode->procPtr->bodyPtr;
} else {
objPtr = Tcl_NewStringObj("<undefined>", -1);
diff --git a/itcl/itcl/generic/itcl_class.c b/itcl/itcl/generic/itcl_class.c
index c3a332885a4..58a78567991 100644
--- a/itcl/itcl/generic/itcl_class.c
+++ b/itcl/itcl/generic/itcl_class.c
@@ -67,10 +67,10 @@ extern int itclCompatFlags;
*/
int
Itcl_CreateClass(interp, path, info, rPtr)
- Tcl_Interp* interp; /* interpreter that will contain new class */
- char* path; /* name of new class */
- ItclObjectInfo *info; /* info for all known objects */
- ItclClass **rPtr; /* returns: pointer to class definition */
+ Tcl_Interp* interp; /* interpreter that will contain new class */
+ CONST char* path; /* name of new class */
+ ItclObjectInfo *info; /* info for all known objects */
+ ItclClass **rPtr; /* returns: pointer to class definition */
{
char *head, *tail;
Tcl_DString buffer;
@@ -89,8 +89,8 @@ Itcl_CreateClass(interp, path, info, rPtr)
* We'll just replace the namespace data below with the
* proper class data.
*/
- classNs = Tcl_FindNamespace(interp, path, (Tcl_Namespace*)NULL,
- /* flags */ 0);
+ classNs = Tcl_FindNamespace(interp, (CONST84 char *)path,
+ (Tcl_Namespace*)NULL, /* flags */ 0);
if (classNs != NULL && Itcl_IsClassNamespace(classNs)) {
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
@@ -105,8 +105,8 @@ Itcl_CreateClass(interp, path, info, rPtr)
* usual Tcl commands from being clobbered when a programmer
* makes a bogus call like "class info".
*/
- cmd = Tcl_FindCommand(interp, path, (Tcl_Namespace*)NULL,
- /* flags */ TCL_NAMESPACE_ONLY);
+ cmd = Tcl_FindCommand(interp, (CONST84 char *)path,
+ (Tcl_Namespace*)NULL, /* flags */ TCL_NAMESPACE_ONLY);
if (cmd != NULL && !Itcl_IsStub(cmd)) {
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
@@ -181,7 +181,7 @@ Itcl_CreateClass(interp, path, info, rPtr)
Itcl_PreserveData((ClientData)cdPtr);
if (classNs == NULL) {
- classNs = Tcl_CreateNamespace(interp, path,
+ classNs = Tcl_CreateNamespace(interp, (CONST84 char *)path,
(ClientData)cdPtr, ItclDestroyClassNamesp);
}
else {
@@ -398,9 +398,15 @@ ItclDestroyClassNamesp(cdata)
elem = Itcl_FirstListElem(&cdefnPtr->derived);
while (elem) {
cdPtr = (ItclClass*)Itcl_GetListValue(elem);
- elem = Itcl_NextListElem(elem); /* advance here--elem will go away */
-
Tcl_DeleteNamespace(cdPtr->namesp);
+
+ /* As the first namespace is now destroyed we have to get the
+ * new first element of the hash table. We cannot go to the
+ * next element from the current one, because the current one
+ * is deleted. itcl Patch #593112, for Bug #577719.
+ */
+
+ elem = Itcl_FirstListElem(&cdefnPtr->derived);
}
/*
@@ -652,7 +658,7 @@ Itcl_IsClass(cmd)
ItclClass*
Itcl_FindClass(interp, path, autoload)
Tcl_Interp* interp; /* interpreter containing class */
- char* path; /* path name for class */
+ CONST char* path; /* path name for class */
{
Tcl_Namespace* classNs;
@@ -717,7 +723,7 @@ Itcl_FindClass(interp, path, autoload)
Tcl_Namespace*
Itcl_FindClassNamespace(interp, path)
Tcl_Interp* interp; /* interpreter containing class */
- char* path; /* path name for class */
+ CONST char* path; /* path name for class */
{
Tcl_Namespace* contextNs = Tcl_GetCurrentNamespace(interp);
Tcl_Namespace* classNs;
@@ -728,8 +734,8 @@ Itcl_FindClassNamespace(interp, path)
* see if it's the current namespace, and try the global
* namespace as well.
*/
- classNs = Tcl_FindNamespace(interp, path, (Tcl_Namespace*)NULL,
- /* flags */ 0);
+ classNs = Tcl_FindNamespace(interp, (CONST84 char *)path,
+ (Tcl_Namespace*)NULL, /* flags */ 0);
if ( !classNs && contextNs->parentPtr != NULL &&
(*path != ':' || *(path+1) != ':') ) {
@@ -909,7 +915,7 @@ Itcl_HandleClass(clientData, interp, objc, objv)
objc-2, objv+2, &newObj);
if (result == TCL_OK) {
- Tcl_SetResult(interp, objName, TCL_VOLATILE);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(objName, -1));
}
Tcl_DStringFree(&buffer);
@@ -933,12 +939,12 @@ Itcl_HandleClass(clientData, interp, objc, objv)
*/
int
Itcl_ClassCmdResolver(interp, name, context, flags, rPtr)
- Tcl_Interp *interp; /* current interpreter */
- 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 */
- Tcl_Command *rPtr; /* returns: resolved command */
+ Tcl_Interp *interp; /* current interpreter */
+ 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 */
+ Tcl_Command *rPtr; /* returns: resolved command */
{
ItclClass *cdefn = (ItclClass*)context->clientData;
@@ -1053,7 +1059,7 @@ Itcl_ClassCmdResolver(interp, name, context, flags, rPtr)
int
Itcl_ClassVarResolver(interp, name, context, flags, rPtr)
Tcl_Interp *interp; /* current interpreter */
- char* name; /* name of the variable being accessed */
+ CONST char* name; /* name of the variable being accessed */
Tcl_Namespace *context; /* namespace performing the resolution */
int flags; /* TCL_LEAVE_ERR_MSG => leave error messages
* in interp if anything goes wrong */
@@ -1206,7 +1212,7 @@ Itcl_ClassVarResolver(interp, name, context, flags, rPtr)
int
Itcl_ClassCompiledVarResolver(interp, name, length, context, rPtr)
Tcl_Interp *interp; /* current interpreter */
- char* name; /* name of the variable being accessed */
+ CONST char* name; /* name of the variable being accessed */
int length; /* number of characters in name */
Tcl_Namespace *context; /* namespace performing the resolution */
Tcl_ResolvedVarInfo **rPtr; /* returns: info that makes it possible to
@@ -1675,13 +1681,13 @@ Itcl_DeleteVarDefn(vdefn)
* anything goes wrong, this returns NULL.
* ------------------------------------------------------------------------
*/
-char*
+CONST char*
Itcl_GetCommonVar(interp, name, contextClass)
Tcl_Interp *interp; /* current interpreter */
- char *name; /* name of desired instance variable */
+ CONST char *name; /* name of desired instance variable */
ItclClass *contextClass; /* name is interpreted in this scope */
{
- char *val = NULL;
+ CONST char *val = NULL;
int result;
Tcl_CallFrame frame;
@@ -1694,7 +1700,7 @@ Itcl_GetCommonVar(interp, name, contextClass)
contextClass->namesp, /*isProcCallFrame*/ 0);
if (result == TCL_OK) {
- val = Tcl_GetVar2(interp, name, (char*)NULL, 0);
+ val = Tcl_GetVar2(interp, (CONST84 char *)name, (char*)NULL, 0);
Tcl_PopCallFrame(interp);
}
return val;
@@ -1714,7 +1720,7 @@ ItclMember*
Itcl_CreateMember(interp, cdefn, name)
Tcl_Interp* interp; /* interpreter managing this action */
ItclClass *cdefn; /* class definition */
- char* name; /* name of new member */
+ CONST char* name; /* name of new member */
{
ItclMember *memPtr;
int fullsize;
diff --git a/itcl/itcl/generic/itcl_cmds.c b/itcl/itcl/generic/itcl_cmds.c
index dff4a46890f..2ba8dfaed1c 100644
--- a/itcl/itcl/generic/itcl_cmds.c
+++ b/itcl/itcl/generic/itcl_cmds.c
@@ -69,6 +69,13 @@ namespace eval ::itcl {\n\
lappend dirs [file join $bindir .. .. library]\n\
lappend dirs [file join $bindir .. .. itcl library]\n\
lappend dirs [file join $bindir .. .. .. itcl library]\n\
+ # On MacOSX, check the directories in the tcl_pkgPath\n\
+ if {[string equal $::tcl_platform(platform) \"unix\"] && \
+ [string equal $::tcl_platform(os) \"Darwin\"]} {\n\
+ foreach d $::tcl_pkgPath {\n\
+ lappend dirs [file join $d itcl$version]\n\
+ }\n\
+ }\n\
}\n\
foreach i $dirs {\n\
set library $i\n\
@@ -101,9 +108,6 @@ static char safeInitScript[] =
return $ptr\n\
}";
-extern ItclStubs itclStubs;
-
-
int itclCompatFlags = -1;
@@ -130,9 +134,15 @@ Initialize(interp)
Tcl_Namespace *itclNs;
ItclObjectInfo *info;
- if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
- return TCL_ERROR;
- };
+#ifndef USE_TCL_STUBS
+ if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) {
+ return TCL_ERROR;
+ }
+#else
+ if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
+ return TCL_ERROR;
+ }
+#endif
/*
* See if [incr Tcl] is already installed.
@@ -145,21 +155,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.
+ * to adapt dynamically regarding use of some internal structures and
+ * functions that have changed (or have been added) since 8.1.0
*/
+#if TCL_DOES_STUBS
if (itclCompatFlags == -1) {
int maj, min, ptch, type;
itclCompatFlags = 0;
Tcl_GetVersion(&maj, &min, &ptch, &type);
+ /* ver >= 8.4a1 */
if ((maj == 8) && (min >= 4)) {
- itclCompatFlags = ITCL_COMPAT_USECMDFLAGS;
+ /* TODO: make a TIP for exporting a Tcl_CommandIsDeleted
+ * function in the core. */
+ itclCompatFlags |= ITCL_COMPAT_USECMDFLAGS;
}
}
+#else
+ itclCompatFlags = 0;
+#endif
/*
@@ -248,6 +263,28 @@ Initialize(interp)
Itcl_PreserveData((ClientData)info);
/*
+ * Create the "itcl::is" command to test object
+ * and classes existence.
+ */
+ if (Itcl_CreateEnsemble(interp, "::itcl::is") != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Itcl_AddEnsemblePart(interp, "::itcl::is",
+ "class", "name", Itcl_IsClassCmd,
+ (ClientData)info, Itcl_ReleaseData) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ Itcl_PreserveData((ClientData)info);
+
+ if (Itcl_AddEnsemblePart(interp, "::itcl::is",
+ "object", "?-class classname? name", Itcl_IsObjectCmd,
+ (ClientData)info, Itcl_ReleaseData) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ Itcl_PreserveData((ClientData)info);
+
+
+ /*
* Add "code" and "scope" commands for handling scoped values.
*/
Tcl_CreateObjCommand(interp, "::itcl::code", Itcl_CodeCmd,
@@ -297,22 +334,29 @@ Initialize(interp)
}
/*
- * Install stuff needed for backward compatibility with previous
- * version of [incr Tcl].
- */
- if (Itcl_OldInit(interp, info) != TCL_OK) {
- return TCL_ERROR;
- }
-
- /*
* Export all commands in the "itcl" namespace so that they
* can be imported with something like "namespace import itcl::*"
*/
itclNs = Tcl_FindNamespace(interp, "::itcl", (Tcl_Namespace*)NULL,
TCL_LEAVE_ERR_MSG);
+ /*
+ * This was changed from a glob export (itcl::*) to explicit
+ * command exports, so that the itcl::is command can *not* be
+ * exported. This is done for concern that the itcl::is command
+ * imported might be confusing ("is").
+ */
if (!itclNs ||
- Tcl_Export(interp, itclNs, "*", /* resetListFirst */ 1) != TCL_OK) {
+ (Tcl_Export(interp, itclNs, "body", /* reset */ 1) != TCL_OK) ||
+ (Tcl_Export(interp, itclNs, "class", 0) != TCL_OK) ||
+ (Tcl_Export(interp, itclNs, "code", 0) != TCL_OK) ||
+ (Tcl_Export(interp, itclNs, "configbody", 0) != TCL_OK) ||
+ (Tcl_Export(interp, itclNs, "delete", 0) != TCL_OK) ||
+ (Tcl_Export(interp, itclNs, "delete_helper", 0) != TCL_OK) ||
+ (Tcl_Export(interp, itclNs, "ensemble", 0) != TCL_OK) ||
+ (Tcl_Export(interp, itclNs, "find", 0) != TCL_OK) ||
+ (Tcl_Export(interp, itclNs, "local", 0) != TCL_OK) ||
+ (Tcl_Export(interp, itclNs, "scope", 0) != TCL_OK)) {
return TCL_ERROR;
}
@@ -329,10 +373,20 @@ Initialize(interp)
/*
* Package is now loaded.
*/
- if (Tcl_PkgProvideEx(interp, "Itcl", ITCL_VERSION,
- (ClientData) &itclStubs) != TCL_OK) {
+#if TCL_DOES_STUBS
+ {
+ extern ItclStubs itclStubs;
+ if (Tcl_PkgProvideEx(interp, "Itcl", ITCL_VERSION,
+ (ClientData)&itclStubs) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+#else
+ if (Tcl_PkgProvide(interp, "Itcl", ITCL_VERSION) != TCL_OK) {
return TCL_ERROR;
}
+#endif
+
return TCL_OK;
}
@@ -469,7 +523,7 @@ Itcl_FindClassesCmd(clientData, interp, objc, objv)
int forceFullNames = 0;
char *pattern;
- CONST char *name;
+ CONST char *cmdName;
int newEntry, handledActiveNs;
Tcl_HashTable unique;
Tcl_HashEntry *entry;
@@ -477,7 +531,7 @@ Itcl_FindClassesCmd(clientData, interp, objc, objv)
Itcl_Stack search;
Tcl_Command cmd, originalCmd;
Namespace *nsPtr;
- Tcl_Obj *listPtr, *objPtr;
+ Tcl_Obj *objPtr;
if (objc > 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?pattern?");
@@ -485,7 +539,7 @@ Itcl_FindClassesCmd(clientData, interp, objc, objv)
}
if (objc == 2) {
- pattern = Tcl_GetStringFromObj(objv[1], (int*)NULL);
+ pattern = Tcl_GetString(objv[1]);
forceFullNames = (strstr(pattern, "::") != NULL);
} else {
pattern = NULL;
@@ -497,7 +551,6 @@ Itcl_FindClassesCmd(clientData, interp, objc, objv)
* in this interpreter. If we find any commands that
* represent classes, report them.
*/
- listPtr = Tcl_NewListObj(0, (Tcl_Obj* CONST*)NULL);
Itcl_InitStack(&search);
Itcl_PushStack((ClientData)globalNs, &search);
@@ -532,10 +585,10 @@ Itcl_FindClassesCmd(clientData, interp, objc, objv)
objPtr = Tcl_NewStringObj((char*)NULL, 0);
Tcl_GetCommandFullName(interp, cmd, objPtr);
- name = Tcl_GetStringFromObj(objPtr, (int*)NULL);
+ cmdName = Tcl_GetString(objPtr);
} else {
- name = Tcl_GetCommandName(interp, cmd);
- objPtr = Tcl_NewStringObj(name, -1);
+ cmdName = Tcl_GetCommandName(interp, cmd);
+ objPtr = Tcl_NewStringObj((CONST84 char *)cmdName, -1);
}
if (originalCmd) {
@@ -543,10 +596,16 @@ Itcl_FindClassesCmd(clientData, interp, objc, objv)
}
Tcl_CreateHashEntry(&unique, (char*)cmd, &newEntry);
- if (newEntry && (!pattern || Tcl_StringMatch(name, pattern))) {
+ if (newEntry &&
+ (!pattern || Tcl_StringMatch((CONST84 char *)cmdName,
+ pattern))) {
Tcl_ListObjAppendElement((Tcl_Interp*)NULL,
- listPtr, objPtr);
- }
+ Tcl_GetObjResult(interp), objPtr);
+ } else {
+ /* if not appended to the result, free objPtr. */
+ Tcl_DecrRefCount(objPtr);
+ }
+
}
entry = Tcl_NextHashEntry(&place);
}
@@ -565,7 +624,6 @@ Itcl_FindClassesCmd(clientData, interp, objc, objv)
Tcl_DeleteHashTable(&unique);
Itcl_DeleteStack(&search);
- Tcl_SetObjResult(interp, listPtr);
return TCL_OK;
}
@@ -598,8 +656,8 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv)
ItclClass *classDefn = NULL;
ItclClass *isaDefn = NULL;
- char *name, *token;
- CONST char *cmdName;
+ char *name = NULL, *token = NULL;
+ CONST char *cmdName = NULL;
int pos, newEntry, match, handledActiveNs;
ItclObject *contextObj;
Tcl_HashTable unique;
@@ -609,7 +667,7 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv)
Tcl_Command cmd, originalCmd;
Namespace *nsPtr;
Command *cmdPtr;
- Tcl_Obj *listPtr, *objPtr;
+ Tcl_Obj *objPtr;
/*
* Parse arguments:
@@ -617,7 +675,7 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv)
*/
pos = 0;
while (++pos < objc) {
- token = Tcl_GetStringFromObj(objv[pos], (int*)NULL);
+ token = Tcl_GetString(objv[pos]);
if (*token != '-') {
if (!pattern) {
pattern = token;
@@ -627,7 +685,7 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv)
}
}
else if ((pos+1 < objc) && (strcmp(token,"-class") == 0)) {
- name = Tcl_GetStringFromObj(objv[pos+1], (int*)NULL);
+ name = Tcl_GetString(objv[pos+1]);
classDefn = Itcl_FindClass(interp, name, /* autoload */ 1);
if (classDefn == NULL) {
return TCL_ERROR;
@@ -635,7 +693,7 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv)
pos++;
}
else if ((pos+1 < objc) && (strcmp(token,"-isa") == 0)) {
- name = Tcl_GetStringFromObj(objv[pos+1], (int*)NULL);
+ name = Tcl_GetString(objv[pos+1]);
isaDefn = Itcl_FindClass(interp, name, /* autoload */ 1);
if (isaDefn == NULL) {
return TCL_ERROR;
@@ -669,7 +727,6 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv)
* in this interpreter. If we find any commands that
* represent objects, report them.
*/
- listPtr = Tcl_NewListObj(0, (Tcl_Obj* CONST*)NULL);
Itcl_InitStack(&search);
Itcl_PushStack((ClientData)globalNs, &search);
@@ -709,16 +766,18 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv)
objPtr = Tcl_NewStringObj((char*)NULL, 0);
Tcl_GetCommandFullName(interp, cmd, objPtr);
- name = Tcl_GetStringFromObj(objPtr, (int*)NULL);
+ cmdName = Tcl_GetString(objPtr);
} else {
cmdName = Tcl_GetCommandName(interp, cmd);
- objPtr = Tcl_NewStringObj(cmdName, -1);
+ objPtr = Tcl_NewStringObj((CONST84 char *)cmdName, -1);
}
Tcl_CreateHashEntry(&unique, (char*)cmd, &newEntry);
match = 0;
- if (newEntry && (!pattern || Tcl_StringMatch(name, pattern))) {
+ if (newEntry &&
+ (!pattern || Tcl_StringMatch((CONST84 char *)cmdName,
+ pattern))) {
if (!classDefn || (contextObj->classDefn == classDefn)) {
if (!isaDefn) {
match = 1;
@@ -736,10 +795,9 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv)
if (match) {
Tcl_ListObjAppendElement((Tcl_Interp*)NULL,
- listPtr, objPtr);
+ Tcl_GetObjResult(interp), objPtr);
} else {
- Tcl_IncrRefCount(objPtr); /* throw away the name */
- Tcl_DecrRefCount(objPtr);
+ Tcl_DecrRefCount(objPtr); /* throw away the name */
}
}
entry = Tcl_NextHashEntry(&place);
@@ -759,7 +817,6 @@ Itcl_FindObjectsCmd(clientData, interp, objc, objv)
Tcl_DeleteHashTable(&unique);
Itcl_DeleteStack(&search);
- Tcl_SetObjResult(interp, listPtr);
return TCL_OK;
}
@@ -821,9 +878,8 @@ Itcl_ProtectionCmd(clientData, interp, objc, objv)
}
else if (result != TCL_OK) {
char mesg[256], *name;
- name = Tcl_GetStringFromObj(objv[0], (int*)NULL);
- sprintf(mesg, "\n (%.100s body line %d)",
- name, interp->errorLine);
+ name = Tcl_GetString(objv[0]);
+ sprintf(mesg, "\n (%.100s body line %d)", name, interp->errorLine);
Tcl_AddErrorInfo(interp, mesg);
}
@@ -865,7 +921,7 @@ Itcl_DelClassCmd(clientData, interp, objc, objv)
* then delete them.
*/
for (i=1; i < objc; i++) {
- name = Tcl_GetStringFromObj(objv[i], (int*)NULL);
+ name = Tcl_GetString(objv[i]);
cdefn = Itcl_FindClass(interp, name, /* autoload */ 1);
if (cdefn == NULL) {
return TCL_ERROR;
@@ -873,7 +929,7 @@ Itcl_DelClassCmd(clientData, interp, objc, objv)
}
for (i=1; i < objc; i++) {
- name = Tcl_GetStringFromObj(objv[i], (int*)NULL);
+ name = Tcl_GetString(objv[i]);
cdefn = Itcl_FindClass(interp, name, /* autoload */ 0);
if (cdefn) {
@@ -1454,3 +1510,181 @@ ItclDeleteStub(cdata)
{
/* do nothing */
}
+
+
+/*
+ * ------------------------------------------------------------------------
+ * Itcl_IsObjectCmd()
+ *
+ * Invoked by Tcl whenever the user issues an "itcl::is object"
+ * command to test whether the argument is an object or not.
+ * syntax:
+ *
+ * itcl::is object ?-class classname? commandname
+ *
+ * Returns 1 if it is an object, 0 otherwise
+ * ------------------------------------------------------------------------
+ */
+int
+Itcl_IsObjectCmd(clientData, interp, objc, objv)
+ ClientData clientData; /* class/object info */
+ Tcl_Interp *interp; /* current interpreter */
+ int objc; /* number of arguments */
+ Tcl_Obj *CONST objv[]; /* argument objects */
+{
+
+ int classFlag = 0;
+ int idx = 0;
+ char *name;
+ char *cname;
+ char *cmdName;
+ char *token;
+ Tcl_Command cmd;
+ Command *cmdPtr;
+ Tcl_Namespace *contextNs = NULL;
+ ItclClass *classDefn = NULL;
+ ItclObject *contextObj;
+
+ /*
+ * Handle the arguments.
+ * objc needs to be either:
+ * 2 itcl::is object commandname
+ * 4 itcl::is object -class classname commandname
+ */
+ if (objc != 2 && objc != 4) {
+ Tcl_WrongNumArgs(interp, 1, objv, "?-class classname? commandname");
+ return TCL_ERROR;
+ }
+
+ /*
+ * Parse the command args. Look for the -class
+ * keyword.
+ */
+ for (idx=1; idx < objc; idx++) {
+ token = Tcl_GetString(objv[idx]);
+
+ if (strcmp(token,"-class") == 0) {
+ cname = Tcl_GetString(objv[idx+1]);
+ classDefn = Itcl_FindClass(interp, cname, /* no autoload */ 0);
+
+ if (classDefn == NULL) {
+ return TCL_ERROR;
+ }
+
+ idx++;
+ classFlag = 1;
+ } else {
+ name = Tcl_GetString(objv[idx]);
+ }
+
+ } /* end for objc loop */
+
+
+ /*
+ * The object name may be a scoped value of the form
+ * "namespace inscope <namesp> <command>". If it is,
+ * decode it.
+ */
+ if (Itcl_DecodeScopedCommand(interp, name, &contextNs, &cmdName)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ cmd = Tcl_FindCommand(interp, cmdName, contextNs, /* flags */ 0);
+
+ /*
+ * Need the NULL test, or the test will fail if cmd is NULL
+ */
+ if (cmd == NULL || ! Itcl_IsObject(cmd)) {
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(0));
+ return TCL_OK;
+ }
+
+ /*
+ * Handle the case when the -class flag is given
+ */
+ if (classFlag) {
+ cmdPtr = (Command*)cmd;
+ contextObj = (ItclObject*)cmdPtr->objClientData;
+
+ if (! Itcl_ObjectIsa(contextObj, classDefn)) {
+
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(0));
+ return TCL_OK;
+ }
+
+ }
+
+ /*
+ * Got this far, so assume that it is a valid object
+ */
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(1));
+ ckfree(cmdName);
+
+ return TCL_OK;
+}
+
+
+
+/*
+ * ------------------------------------------------------------------------
+ * Itcl_IsClassCmd()
+ *
+ * Invoked by Tcl whenever the user issues an "itcl::is class"
+ * command to test whether the argument is an itcl class or not
+ * syntax:
+ *
+ * itcl::is class commandname
+ *
+ * Returns 1 if it is a class, 0 otherwise
+ * ------------------------------------------------------------------------
+ */
+int
+Itcl_IsClassCmd(clientData, interp, objc, objv)
+ ClientData clientData; /* class/object info */
+ Tcl_Interp *interp; /* current interpreter */
+ int objc; /* number of arguments */
+ Tcl_Obj *CONST objv[]; /* argument objects */
+{
+
+ char *cname;
+ char *name;
+ ItclClass *classDefn = NULL;
+ Tcl_Namespace *contextNs = NULL;
+
+ /*
+ * Need itcl::is class classname
+ */
+ if (objc != 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "commandname");
+ return TCL_ERROR;
+ }
+
+ name = Tcl_GetString(objv[1]);
+
+ /*
+ * The object name may be a scoped value of the form
+ * "namespace inscope <namesp> <command>". If it is,
+ * decode it.
+ */
+ if (Itcl_DecodeScopedCommand(interp, name, &contextNs, &cname) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ classDefn = Itcl_FindClass(interp, cname, /* no autoload */ 0);
+
+ /*
+ * If classDefn is NULL, then it wasn't found, hence it
+ * isn't a class
+ */
+ if (classDefn != NULL) {
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(1));
+ } else {
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(0));
+ }
+
+ ckfree(cname);
+
+ return TCL_OK;
+
+} /* end Itcl_IsClassCmd function */
diff --git a/itcl/itcl/generic/itcl_ensemble.c b/itcl/itcl/generic/itcl_ensemble.c
index a60b487ec1c..37f55bf3116 100644
--- a/itcl/itcl/generic/itcl_ensemble.c
+++ b/itcl/itcl/generic/itcl_ensemble.c
@@ -105,7 +105,7 @@ static int CreateEnsemble _ANSI_ARGS_((Tcl_Interp *interp,
Ensemble *parentEnsData, char *ensName));
static int AddEnsemblePart _ANSI_ARGS_((Tcl_Interp *interp,
- Ensemble* ensData, char* partName, char* usageInfo,
+ Ensemble* ensData, CONST char* partName, CONST char* usageInfo,
Tcl_ObjCmdProc *objProc, ClientData clientData,
Tcl_CmdDeleteProc *deleteProc, EnsemblePart **rVal));
@@ -115,15 +115,15 @@ static int FindEnsemble _ANSI_ARGS_((Tcl_Interp *interp, char **nameArgv,
int nameArgc, Ensemble** ensDataPtr));
static int CreateEnsemblePart _ANSI_ARGS_((Tcl_Interp *interp,
- Ensemble *ensData, char* partName, EnsemblePart **ensPartPtr));
+ Ensemble *ensData, CONST char* partName, EnsemblePart **ensPartPtr));
static void DeleteEnsemblePart _ANSI_ARGS_((EnsemblePart *ensPart));
static int FindEnsemblePart _ANSI_ARGS_((Tcl_Interp *interp,
- Ensemble *ensData, char* partName, EnsemblePart **rensPart));
+ Ensemble *ensData, CONST char* partName, EnsemblePart **rensPart));
static int FindEnsemblePartIndex _ANSI_ARGS_((Ensemble *ensData,
- char *partName, int *posPtr));
+ CONST char *partName, int *posPtr));
static void ComputeMinChars _ANSI_ARGS_((Ensemble *ensData, int pos));
@@ -209,7 +209,7 @@ Itcl_EnsembleInit(interp)
int
Itcl_CreateEnsemble(interp, ensName)
Tcl_Interp *interp; /* interpreter to be updated */
- char* ensName; /* name of the new ensemble */
+ CONST char* ensName; /* name of the new ensemble */
{
char **nameArgv = NULL;
int nameArgc;
@@ -219,7 +219,8 @@ Itcl_CreateEnsemble(interp, ensName)
/*
* Split the ensemble name into its path components.
*/
- if (Tcl_SplitList(interp, ensName, &nameArgc, &nameArgv) != TCL_OK) {
+ if (Tcl_SplitList(interp, (CONST84 char *)ensName, &nameArgc,
+ &nameArgv) != TCL_OK) {
goto ensCreateFail;
}
if (nameArgc < 1) {
@@ -310,9 +311,9 @@ Itcl_AddEnsemblePart(interp, ensName, partName, usageInfo,
objProc, clientData, deleteProc)
Tcl_Interp *interp; /* interpreter to be updated */
- char* ensName; /* ensemble containing this part */
- char* partName; /* name of the new part */
- char* usageInfo; /* usage info for argument list */
+ CONST char* ensName; /* ensemble containing this part */
+ CONST char* partName; /* name of the new part */
+ CONST char* usageInfo; /* usage info for argument list */
Tcl_ObjCmdProc *objProc; /* handling procedure for part */
ClientData clientData; /* client data associated with part */
Tcl_CmdDeleteProc *deleteProc; /* procedure used to destroy client data */
@@ -326,7 +327,8 @@ Itcl_AddEnsemblePart(interp, ensName, partName, usageInfo,
/*
* Parse the ensemble name and look for a containing ensemble.
*/
- if (Tcl_SplitList(interp, ensName, &nameArgc, &nameArgv) != TCL_OK) {
+ if (Tcl_SplitList(interp, (CONST84 char *)ensName, &nameArgc,
+ &nameArgv) != TCL_OK) {
goto ensPartFail;
}
if (FindEnsemble(interp, nameArgv, nameArgc, &ensData) != TCL_OK) {
@@ -389,8 +391,8 @@ ensPartFail:
int
Itcl_GetEnsemblePart(interp, ensName, partName, infoPtr)
Tcl_Interp *interp; /* interpreter to be updated */
- char *ensName; /* ensemble containing the part */
- char *partName; /* name of the desired part */
+ CONST char *ensName; /* ensemble containing the part */
+ CONST char *partName; /* name of the desired part */
Tcl_CmdInfo *infoPtr; /* returns: info associated with part */
{
char **nameArgv = NULL;
@@ -407,7 +409,8 @@ Itcl_GetEnsemblePart(interp, ensName, partName, infoPtr)
*/
state = Itcl_SaveInterpState(interp, TCL_OK);
- if (Tcl_SplitList(interp, ensName, &nameArgc, &nameArgv) != TCL_OK) {
+ if (Tcl_SplitList(interp, (CONST84 char *)ensName, &nameArgc,
+ &nameArgv) != TCL_OK) {
goto ensGetFail;
}
if (FindEnsemble(interp, nameArgv, nameArgc, &ensData) != TCL_OK) {
@@ -501,7 +504,7 @@ Itcl_IsEnsemble(infoPtr)
int
Itcl_GetEnsembleUsage(interp, ensName, objPtr)
Tcl_Interp *interp; /* interpreter containing the ensemble */
- char *ensName; /* name of the ensemble */
+ CONST char *ensName; /* name of the ensemble */
Tcl_Obj *objPtr; /* returns: summary of usage info */
{
char **nameArgv = NULL;
@@ -516,7 +519,8 @@ Itcl_GetEnsembleUsage(interp, ensName, objPtr)
*/
state = Itcl_SaveInterpState(interp, TCL_OK);
- if (Tcl_SplitList(interp, ensName, &nameArgc, &nameArgv) != TCL_OK) {
+ if (Tcl_SplitList(interp, (CONST84 char *)ensName, &nameArgc,
+ &nameArgv) != TCL_OK) {
goto ensUsageFail;
}
if (FindEnsemble(interp, nameArgv, nameArgc, &ensData) != TCL_OK) {
@@ -798,29 +802,22 @@ CreateEnsemble(interp, parentEnsData, ensName)
return TCL_ERROR;
}
- ensData->cmd = parentEnsData->cmd;
- ensData->parent = ensPart;
-
- cmdPtr = (Command*)ckalloc(sizeof(Command));
- cmdPtr->hPtr = NULL;
- cmdPtr->nsPtr = ((Command*)ensData->cmd)->nsPtr;
- cmdPtr->refCount = 0;
- cmdPtr->cmdEpoch = 0;
- cmdPtr->compileProc = NULL;
- cmdPtr->objProc = HandleEnsemble;
- cmdPtr->objClientData = (ClientData)ensData;
- cmdPtr->proc = NULL;
- cmdPtr->clientData = NULL;
- cmdPtr->deleteProc = DeleteEnsemble;
- cmdPtr->deleteData = cmdPtr->objClientData;
- #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4)
- cmdPtr->deleted = 0;
- #else
- cmdPtr->flags = 0;
- #endif
- cmdPtr->importRefPtr = NULL;
-
- ensPart->cmdPtr = cmdPtr;
+ ensData->cmd = parentEnsData->cmd;
+ ensData->parent = ensPart;
+
+ /*
+ * Initialize non-NULL data only. This allows us to handle the
+ * structure differences between versions better.
+ */
+ cmdPtr = (Command *) ckalloc(sizeof(Command));
+ memset((VOID *) cmdPtr, 0, sizeof(Command));
+ cmdPtr->nsPtr = ((Command *) ensData->cmd)->nsPtr;
+ cmdPtr->objProc = HandleEnsemble;
+ cmdPtr->objClientData = (ClientData)ensData;
+ cmdPtr->deleteProc = DeleteEnsemble;
+ cmdPtr->deleteData = cmdPtr->objClientData;
+
+ ensPart->cmdPtr = cmdPtr;
return TCL_OK;
}
@@ -860,8 +857,8 @@ AddEnsemblePart(interp, ensData, partName, usageInfo,
Tcl_Interp *interp; /* interpreter to be updated */
Ensemble* ensData; /* ensemble that will contain this part */
- char* partName; /* name of the new part */
- char* usageInfo; /* usage info for argument list */
+ CONST char* partName; /* name of the new part */
+ CONST char* usageInfo; /* usage info for argument list */
Tcl_ObjCmdProc *objProc; /* handling procedure for part */
ClientData clientData; /* client data associated with part */
Tcl_CmdDeleteProc *deleteProc; /* procedure used to destroy client data */
@@ -882,27 +879,20 @@ AddEnsemblePart(interp, ensData, partName, usageInfo,
strcpy(ensPart->usage, usageInfo);
}
- cmdPtr = (Command*)ckalloc(sizeof(Command));
- cmdPtr->hPtr = NULL;
- cmdPtr->nsPtr = ((Command*)ensData->cmd)->nsPtr;
- cmdPtr->refCount = 0;
- cmdPtr->cmdEpoch = 0;
- cmdPtr->compileProc = NULL;
- cmdPtr->objProc = objProc;
- cmdPtr->objClientData = (ClientData)clientData;
- cmdPtr->proc = NULL;
- 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;
- *rVal = ensPart;
+ /*
+ * Initialize non-NULL data only. This allows us to handle the
+ * structure differences between versions better.
+ */
+ cmdPtr = (Command *) ckalloc(sizeof(Command));
+ memset((VOID *) cmdPtr, 0, sizeof(Command));
+ cmdPtr->nsPtr = ((Command *) ensData->cmd)->nsPtr;
+ cmdPtr->objProc = objProc;
+ cmdPtr->objClientData = (ClientData)clientData;
+ cmdPtr->deleteProc = deleteProc;
+ cmdPtr->deleteData = (ClientData)clientData;
+
+ ensPart->cmdPtr = cmdPtr;
+ *rVal = ensPart;
return TCL_OK;
}
@@ -1055,7 +1045,7 @@ static int
CreateEnsemblePart(interp, ensData, partName, ensPartPtr)
Tcl_Interp *interp; /* interpreter containing the ensemble */
Ensemble *ensData; /* ensemble being modified */
- char* partName; /* name of the new part */
+ CONST char* partName; /* name of the new part */
EnsemblePart **ensPartPtr; /* returns: new ensemble part */
{
int i, pos, size;
@@ -1201,7 +1191,7 @@ static int
FindEnsemblePart(interp, ensData, partName, rensPart)
Tcl_Interp *interp; /* interpreter containing the ensemble */
Ensemble *ensData; /* ensemble being searched */
- char* partName; /* name of the desired part */
+ CONST char* partName; /* name of the desired part */
EnsemblePart **rensPart; /* returns: pointer to the desired part */
{
int pos = 0;
@@ -1316,7 +1306,7 @@ FindEnsemblePart(interp, ensData, partName, rensPart)
static int
FindEnsemblePartIndex(ensData, partName, posPtr)
Ensemble *ensData; /* ensemble being searched */
- char *partName; /* name of desired part */
+ CONST char *partName; /* name of desired part */
int *posPtr; /* returns: index for part */
{
int pos = 0;
@@ -1640,7 +1630,7 @@ Itcl_EnsembleCmd(clientData, interp, objc, objv)
}
if (FindEnsemblePart(interp, ensData, ensName, &ensPart)
!= TCL_OK) {
- panic("Itcl_EnsembleCmd: can't create ensemble");
+ Tcl_Panic("Itcl_EnsembleCmd: can't create ensemble");
}
}
@@ -1707,11 +1697,11 @@ Itcl_EnsembleCmd(clientData, interp, objc, objv)
* Otherwise, the offending command is reported twice.
*/
if (status == TCL_ERROR) {
- char *errInfo = Tcl_GetVar2(ensInfo->parser, "::errorInfo",
+ CONST char *errInfo = Tcl_GetVar2(ensInfo->parser, "::errorInfo",
(char*)NULL, TCL_GLOBAL_ONLY);
if (errInfo) {
- Tcl_AddObjErrorInfo(interp, errInfo, -1);
+ Tcl_AddObjErrorInfo(interp, (CONST84 char *)errInfo, -1);
}
if (objc == 3) {
diff --git a/itcl/itcl/generic/itcl_linkage.c b/itcl/itcl/generic/itcl_linkage.c
index 7ad678e92d6..4557124f4a7 100644
--- a/itcl/itcl/generic/itcl_linkage.c
+++ b/itcl/itcl/generic/itcl_linkage.c
@@ -76,7 +76,7 @@ static void ItclFreeC _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp));
int
Itcl_RegisterC(interp, name, proc, clientData, deleteProc)
Tcl_Interp *interp; /* interpreter handling this registration */
- char *name; /* symbolic name for procedure */
+ CONST char *name; /* symbolic name for procedure */
Tcl_CmdProc *proc; /* procedure handling Tcl command */
ClientData clientData; /* client data associated with proc */
Tcl_CmdDeleteProc *deleteProc; /* proc called to free up client data */
@@ -161,7 +161,7 @@ Itcl_RegisterC(interp, name, proc, clientData, deleteProc)
int
Itcl_RegisterObjC(interp, name, proc, clientData, deleteProc)
Tcl_Interp *interp; /* interpreter handling this registration */
- char *name; /* symbolic name for procedure */
+ CONST char *name; /* symbolic name for procedure */
Tcl_ObjCmdProc *proc; /* procedure handling Tcl command */
ClientData clientData; /* client data associated with proc */
Tcl_CmdDeleteProc *deleteProc; /* proc called to free up client data */
@@ -230,7 +230,7 @@ Itcl_RegisterObjC(interp, name, proc, clientData, deleteProc)
int
Itcl_FindC(interp, name, argProcPtr, objProcPtr, cDataPtr)
Tcl_Interp *interp; /* interpreter handling this registration */
- char *name; /* symbolic name for procedure */
+ CONST char *name; /* symbolic name for procedure */
Tcl_CmdProc **argProcPtr; /* returns (argc,argv) command handler */
Tcl_ObjCmdProc **objProcPtr; /* returns (objc,objv) command handler */
ClientData *cDataPtr; /* returns client data */
diff --git a/itcl/itcl/generic/itcl_methods.c b/itcl/itcl/generic/itcl_methods.c
index 0236d3c66fc..b414e1e3a63 100644
--- a/itcl/itcl/generic/itcl_methods.c
+++ b/itcl/itcl/generic/itcl_methods.c
@@ -294,9 +294,9 @@ int
Itcl_CreateMethod(interp, cdefn, name, arglist, body)
Tcl_Interp* interp; /* interpreter managing this action */
ItclClass *cdefn; /* class definition */
- char* name; /* name of new method */
- char* arglist; /* space-separated list of arg names */
- char* body; /* body of commands for the method */
+ CONST char* name; /* name of new method */
+ CONST char* arglist; /* space-separated list of arg names */
+ CONST char* body; /* body of commands for the method */
{
ItclMemberFunc *mfunc;
Tcl_DString buffer;
@@ -331,8 +331,8 @@ Itcl_CreateMethod(interp, cdefn, name, arglist, body)
name = Tcl_DStringValue(&buffer);
Itcl_PreserveData((ClientData)mfunc);
- mfunc->accessCmd = Tcl_CreateObjCommand(interp, name, Itcl_ExecMethod,
- (ClientData)mfunc, Itcl_ReleaseData);
+ mfunc->accessCmd = Tcl_CreateObjCommand(interp, (CONST84 char *)name,
+ Itcl_ExecMethod, (ClientData)mfunc, Itcl_ReleaseData);
Tcl_DStringFree(&buffer);
return TCL_OK;
@@ -345,7 +345,7 @@ Itcl_CreateMethod(interp, cdefn, name, arglist, body)
*
* Installs a class proc into the namespace associated with a class.
* If another command with the same name is already installed, then
- * it is overwritten. Returns TCL_OK on success, or TCL_ERROR (along
+ * it is overwritten. Returns TCL_OK on success, or TCL_ERROR (along
* with an error message in the specified interp) if anything goes
* wrong.
* ------------------------------------------------------------------------
@@ -354,9 +354,9 @@ int
Itcl_CreateProc(interp, cdefn, name, arglist, body)
Tcl_Interp* interp; /* interpreter managing this action */
ItclClass *cdefn; /* class definition */
- char* name; /* name of new proc */
- char* arglist; /* space-separated list of arg names */
- char* body; /* body of commands for the proc */
+ CONST char* name; /* name of new proc */
+ CONST char* arglist; /* space-separated list of arg names */
+ CONST char* body; /* body of commands for the proc */
{
ItclMemberFunc *mfunc;
Tcl_DString buffer;
@@ -396,8 +396,8 @@ Itcl_CreateProc(interp, cdefn, name, arglist, body)
name = Tcl_DStringValue(&buffer);
Itcl_PreserveData((ClientData)mfunc);
- mfunc->accessCmd = Tcl_CreateObjCommand(interp, name, Itcl_ExecProc,
- (ClientData)mfunc, Itcl_ReleaseData);
+ mfunc->accessCmd = Tcl_CreateObjCommand(interp, (CONST84 char *)name,
+ Itcl_ExecProc, (ClientData)mfunc, Itcl_ReleaseData);
Tcl_DStringFree(&buffer);
return TCL_OK;
@@ -423,9 +423,9 @@ int
Itcl_CreateMemberFunc(interp, cdefn, name, arglist, body, mfuncPtr)
Tcl_Interp* interp; /* interpreter managing this action */
ItclClass *cdefn; /* class definition */
- char* name; /* name of new member */
- char* arglist; /* space-separated list of arg names */
- char* body; /* body of commands for the method */
+ CONST char* name; /* name of new member */
+ CONST char* arglist; /* space-separated list of arg names */
+ CONST char* body; /* body of commands for the method */
ItclMemberFunc** mfuncPtr; /* returns: pointer to new method defn */
{
int newEntry;
@@ -518,8 +518,8 @@ int
Itcl_ChangeMemberFunc(interp, mfunc, arglist, body)
Tcl_Interp* interp; /* interpreter managing this action */
ItclMemberFunc* mfunc; /* command member being changed */
- char* arglist; /* space-separated list of arg names */
- char* body; /* body of commands for the method */
+ CONST char* arglist; /* space-separated list of arg names */
+ CONST char* body; /* body of commands for the method */
{
ItclMemberCode *mcode = NULL;
Tcl_Obj *objPtr;
@@ -579,7 +579,7 @@ Itcl_ChangeMemberFunc(interp, mfunc, arglist, body)
*/
void
Itcl_DeleteMemberFunc(cdata)
- char* cdata; /* pointer to member function definition */
+ CONST char* cdata; /* pointer to member function definition */
{
ItclMemberFunc* mfunc = (ItclMemberFunc*)cdata;
@@ -618,8 +618,8 @@ int
Itcl_CreateMemberCode(interp, cdefn, arglist, body, mcodePtr)
Tcl_Interp* interp; /* interpreter managing this action */
ItclClass *cdefn; /* class containing this member */
- char* arglist; /* space-separated list of arg names */
- char* body; /* body of commands for the method */
+ CONST char* arglist; /* space-separated list of arg names */
+ CONST char* body; /* body of commands for the method */
ItclMemberCode** mcodePtr; /* returns: pointer to new implementation */
{
int argc;
@@ -668,11 +668,12 @@ Itcl_CreateMemberCode(interp, cdefn, arglist, body, mcodePtr)
procPtr->cmdPtr->nsPtr = (Namespace*)cdefn->namesp;
if (body) {
- procPtr->bodyPtr = Tcl_NewStringObj(body, -1);
- Tcl_IncrRefCount(procPtr->bodyPtr);
+ procPtr->bodyPtr = Tcl_NewStringObj((CONST84 char *)body, -1);
} else {
- procPtr->bodyPtr = NULL;
+ procPtr->bodyPtr = Tcl_NewStringObj((CONST84 char *)"", -1);
+ mcode->flags |= ITCL_IMPLEMENT_NONE;
}
+ Tcl_IncrRefCount(procPtr->bodyPtr);
/*
* Plug the argument list into the "compiled locals" list.
@@ -695,7 +696,7 @@ Itcl_CreateMemberCode(interp, cdefn, arglist, body, mcodePtr)
* as a symbolic name for a C procedure.
*/
if (body == NULL) {
- mcode->flags |= ITCL_IMPLEMENT_NONE;
+ /* No-op */
}
else if (*body == '@') {
Tcl_CmdProc *argCmdProc;
@@ -745,7 +746,7 @@ Itcl_CreateMemberCode(interp, cdefn, arglist, body, mcodePtr)
*/
void
Itcl_DeleteMemberCode(cdata)
- char* cdata; /* pointer to member function definition */
+ CONST char* cdata; /* pointer to member function definition */
{
ItclMemberCode* mcode = (ItclMemberCode*)cdata;
@@ -789,15 +790,16 @@ Itcl_GetMemberCode(interp, member)
Tcl_Interp* interp; /* interpreter managing this action */
ItclMember* member; /* member containing code body */
{
- ItclMemberCode *mcode = member->code;
-
int result;
+ ItclMemberCode *mcode = member->code;
+ assert(mcode != NULL);
/*
* If the implementation has not yet been defined, try to
* autoload it now.
*/
- if ((mcode->flags & ITCL_IMPLEMENT_NONE) != 0) {
+
+ if (!Itcl_IsMemberCodeImplemented(mcode)) {
result = Tcl_VarEval(interp, "::auto_load ", member->fullname,
(char*)NULL);
@@ -820,8 +822,9 @@ Itcl_GetMemberCode(interp, member)
* the member and look at the current code pointer again.
*/
mcode = member->code;
+ assert(mcode != NULL);
- if ((mcode->flags & ITCL_IMPLEMENT_NONE) != 0) {
+ if (!Itcl_IsMemberCodeImplemented(mcode)) {
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
"member function \"", member->fullname,
"\" is not defined and cannot be autoloaded",
@@ -1003,7 +1006,7 @@ Itcl_EvalMemberCode(interp, mfunc, member, contextObj, objc, objv)
result = Tcl_EvalObj(interp, mcode->procPtr->bodyPtr);
}
else {
- panic("itcl: bad implementation flag for %s", member->fullname);
+ Tcl_Panic("itcl: bad implementation flag for %s", member->fullname);
}
/*
@@ -1050,7 +1053,7 @@ evalMemberCodeDone:
int
Itcl_CreateArgList(interp, decl, argcPtr, argPtr)
Tcl_Interp* interp; /* interpreter managing this function */
- char* decl; /* string representing argument list */
+ CONST char* decl; /* string representing argument list */
int* argcPtr; /* returns number of args in argument list */
CompiledLocal** argPtr; /* returns pointer to parsed argument list */
{
@@ -1064,7 +1067,8 @@ Itcl_CreateArgList(interp, decl, argcPtr, argPtr)
*argcPtr = 0;
if (decl) {
- if (Tcl_SplitList(interp, decl, &argc, &argv) != TCL_OK) {
+ if (Tcl_SplitList(interp, (CONST84 char *)decl, &argc, &argv)
+ != TCL_OK) {
return TCL_ERROR;
}
@@ -1142,8 +1146,8 @@ Itcl_CreateArgList(interp, decl, argcPtr, argPtr)
*/
CompiledLocal*
Itcl_CreateArg(name, init)
- char* name; /* name of new argument */
- char* init; /* initial value */
+ CONST char* name; /* name of new argument */
+ CONST char* init; /* initial value */
{
CompiledLocal *localPtr = NULL;
int nameLen;
@@ -1164,7 +1168,7 @@ Itcl_CreateArg(name, init)
localPtr->resolveInfo = NULL;
if (init != NULL) {
- localPtr->defValuePtr = Tcl_NewStringObj(init, -1);
+ localPtr->defValuePtr = Tcl_NewStringObj((CONST84 char *)init, -1);
Tcl_IncrRefCount(localPtr->defValuePtr);
} else {
localPtr->defValuePtr = NULL;
@@ -1338,7 +1342,7 @@ Itcl_GetMemberFuncUsage(mfunc, contextObj, objPtr)
Tcl_Obj *objPtr; /* returns: string showing usage */
{
int argcount;
- CONST char *name;
+ char *name;
CompiledLocal *arglist, *argPtr;
Tcl_HashEntry *entry;
ItclMemberFunc *mf;
@@ -1365,25 +1369,22 @@ Itcl_GetMemberFuncUsage(mfunc, contextObj, objPtr)
Tcl_GetCommandFullName(contextObj->classDefn->interp,
contextObj->classDefn->accessCmd, objPtr);
Tcl_AppendToObj(objPtr, " ", -1);
- name = Tcl_GetCommandName(contextObj->classDefn->interp,
- contextObj->accessCmd);
+ name = (char *) Tcl_GetCommandName(
+ contextObj->classDefn->interp, contextObj->accessCmd);
Tcl_AppendToObj(objPtr, name, -1);
} else {
Tcl_AppendToObj(objPtr, mfunc->member->fullname, -1);
}
- }
- else if (contextObj && contextObj->accessCmd) {
- name = Tcl_GetCommandName(contextObj->classDefn->interp,
+ } else if (contextObj && contextObj->accessCmd) {
+ name = (char *) Tcl_GetCommandName(contextObj->classDefn->interp,
contextObj->accessCmd);
Tcl_AppendStringsToObj(objPtr, name, " ", mfunc->member->name,
(char*)NULL);
- }
- else {
+ } else {
Tcl_AppendStringsToObj(objPtr, "<object> ", mfunc->member->name,
(char*)NULL);
}
- }
- else {
+ } else {
Tcl_AppendToObj(objPtr, mfunc->member->fullname, -1);
}
@@ -1672,6 +1673,24 @@ Itcl_PushContext(interp, member, contextClass, contextObj, contextPtr)
framePtr->numCompiledLocals = localCt;
framePtr->compiledLocals = contextPtr->compiledLocals;
+ /*
+ * Invoking TclInitCompiledLocals with a framePtr->procPtr->bodyPtr
+ * that is not a compiled byte code type leads to a crash. So
+ * make sure that the body is compiled here. This needs to
+ * be done even if the body of the Itcl method is not implemented
+ * as a Tcl proc or has no implementation. The empty string should
+ * have been defined as the body if no implementation was defined.
+ */
+ assert(mcode->procPtr->bodyPtr != NULL);
+
+ result = TclProcCompileProc(interp, mcode->procPtr,
+ mcode->procPtr->bodyPtr, (Namespace*)member->classDefn->namesp,
+ "body for", member->fullname);
+
+ if (result != TCL_OK) {
+ return result;
+ }
+
TclInitCompiledLocals(interp, framePtr,
(Namespace*)contextClass->namesp);
}
@@ -1852,12 +1871,12 @@ Itcl_AssignArgs(interp, objc, objv, mfunc)
argPtr=argPtr->nextPtr, argsLeft--, varPtr++, objv++, objc--)
{
if (!TclIsVarArgument(argPtr)) {
- panic("local variable %s is not argument but should be",
+ Tcl_Panic("local variable %s is not argument but should be",
argPtr->name);
return TCL_ERROR;
}
if (TclIsVarTemporary(argPtr)) {
- panic("local variable is temporary but should be an argument");
+ Tcl_Panic("local variable is temporary but should be an argument");
return TCL_ERROR;
}
@@ -2171,7 +2190,7 @@ ItclHandleConfig(interp, argc, vars, vals, contextObj)
int result = TCL_OK;
int i;
- char *val;
+ CONST char *val;
Tcl_DString lastval;
ItclContext context;
Tcl_CallFrame *oldFramePtr, *uplevelFramePtr;
@@ -2360,7 +2379,7 @@ Itcl_ConstructBase(interp, contextObj, contextClass)
int
Itcl_InvokeMethodIfExists(interp, name, contextClass, contextObj, objc, objv)
Tcl_Interp *interp; /* interpreter */
- char *name; /* name of desired method */
+ CONST char *name; /* name of desired method */
ItclClass *contextClass; /* current class being constructed */
ItclObject *contextObj; /* object being constructed */
int objc; /* number of arguments */
diff --git a/itcl/itcl/generic/itcl_migrate.c b/itcl/itcl/generic/itcl_migrate.c
index 8eb5bc82433..0de8d32338d 100644
--- a/itcl/itcl/generic/itcl_migrate.c
+++ b/itcl/itcl/generic/itcl_migrate.c
@@ -49,7 +49,7 @@ _Tcl_GetCallFrame(interp, level)
CallFrame *framePtr;
if (level < 0) {
- panic("itcl: _Tcl_GetCallFrame called with bad number of levels");
+ Tcl_Panic("itcl: _Tcl_GetCallFrame called with bad number of levels");
}
framePtr = iPtr->varFramePtr;
diff --git a/itcl/itcl/generic/itcl_objects.c b/itcl/itcl/generic/itcl_objects.c
index fbcbc97121e..f5037236ee5 100644
--- a/itcl/itcl/generic/itcl_objects.c
+++ b/itcl/itcl/generic/itcl_objects.c
@@ -38,7 +38,7 @@ static void ItclReportObjectUsage _ANSI_ARGS_((Tcl_Interp *interp,
ItclObject* obj));
static char* ItclTraceThisVar _ANSI_ARGS_((ClientData cdata,
- Tcl_Interp *interp, char *name1, char *name2, int flags));
+ Tcl_Interp *interp, CONST char *name1, CONST char *name2, int flags));
static void ItclDestroyObject _ANSI_ARGS_((ClientData cdata));
static void ItclFreeObject _ANSI_ARGS_((char* cdata));
@@ -73,7 +73,7 @@ static void ItclCreateObjVar _ANSI_ARGS_((Tcl_Interp *interp,
int
Itcl_CreateObject(interp, name, cdefn, objc, objv, roPtr)
Tcl_Interp *interp; /* interpreter mananging new object */
- char* name; /* name of new object */
+ CONST char* name; /* name of new object */
ItclClass *cdefn; /* class for new object */
int objc; /* number of arguments */
Tcl_Obj *CONST objv[]; /* argument objects */
@@ -102,8 +102,8 @@ Itcl_CreateObject(interp, name, cdefn, objc, objv, roPtr)
* only in the current namespace context. Otherwise, we might
* find a global command, but that wouldn't be clobbered!
*/
- cmd = Tcl_FindCommand(interp, name, (Tcl_Namespace*)NULL,
- TCL_NAMESPACE_ONLY);
+ cmd = Tcl_FindCommand(interp, (CONST84 char *)name,
+ (Tcl_Namespace*)NULL, TCL_NAMESPACE_ONLY);
if (cmd != NULL && !Itcl_IsStub(cmd)) {
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
@@ -192,7 +192,7 @@ Itcl_CreateObject(interp, name, cdefn, objc, objv, roPtr)
if (cdPtr == cdefnPtr) {
ItclCreateObjVar(interp, vdefn, newObj);
Tcl_SetVar2(interp, "this", (char*)NULL, "", 0);
- Tcl_TraceVar2(interp, "this", (char*)NULL,
+ Tcl_TraceVar2(interp, "this", NULL,
TCL_TRACE_READS|TCL_TRACE_WRITES, ItclTraceThisVar,
(ClientData)newObj);
}
@@ -490,7 +490,7 @@ ItclDestructBase(interp, contextObj, contextClass, flags)
int
Itcl_FindObject(interp, name, roPtr)
Tcl_Interp *interp; /* interpreter containing this object */
- char *name; /* name of the object */
+ CONST char *name; /* name of the object */
ItclObject **roPtr; /* returns: object data or NULL */
{
Tcl_Namespace *contextNs = NULL;
@@ -522,9 +522,8 @@ Itcl_FindObject(interp, name, roPtr)
*roPtr = NULL;
}
- if (cmdName != name) {
- ckfree(cmdName);
- }
+ ckfree(cmdName);
+
return TCL_OK;
}
@@ -704,15 +703,15 @@ Itcl_HandleInstance(clientData, interp, objc, objv)
* anything goes wrong, this returns NULL.
* ------------------------------------------------------------------------
*/
-char*
+CONST char*
Itcl_GetInstanceVar(interp, name, contextObj, contextClass)
Tcl_Interp *interp; /* current interpreter */
- char *name; /* name of desired instance variable */
+ CONST char *name; /* name of desired instance variable */
ItclObject *contextObj; /* current object */
ItclClass *contextClass; /* name is interpreted in this scope */
{
ItclContext context;
- char *val;
+ CONST char *val;
/*
* Make sure that the current namespace context includes an
@@ -736,7 +735,8 @@ Itcl_GetInstanceVar(interp, name, contextObj, contextClass)
return NULL;
}
- val = Tcl_GetVar2(interp, name, (char*)NULL, TCL_LEAVE_ERR_MSG);
+ val = Tcl_GetVar2(interp, (CONST84 char *)name, (char*)NULL,
+ TCL_LEAVE_ERR_MSG);
Itcl_PopContext(interp, &context);
return val;
@@ -849,11 +849,11 @@ ItclReportObjectUsage(interp, contextObj)
/* ARGSUSED */
static char*
ItclTraceThisVar(cdata, interp, name1, name2, flags)
- ClientData cdata; /* object instance data */
- Tcl_Interp *interp; /* interpreter managing this variable */
- char *name1; /* variable name */
- char *name2; /* unused */
- int flags; /* flags indicating read/write */
+ ClientData cdata; /* object instance data */
+ Tcl_Interp *interp; /* interpreter managing this variable */
+ CONST char *name1; /* variable name */
+ CONST char *name2; /* unused */
+ int flags; /* flags indicating read/write */
{
ItclObject *contextObj = (ItclObject*)cdata;
char *objName;
@@ -871,8 +871,8 @@ ItclTraceThisVar(cdata, interp, name1, name2, flags)
contextObj->accessCmd, objPtr);
}
- objName = Tcl_GetStringFromObj(objPtr, (int*)NULL);
- Tcl_SetVar(interp, name1, objName, 0);
+ objName = Tcl_GetString(objPtr);
+ Tcl_SetVar(interp, (CONST84 char *)name1, objName, 0);
Tcl_DecrRefCount(objPtr);
return NULL;
@@ -1144,7 +1144,7 @@ ItclCreateObjVar(interp, vdefn, contextObj)
int
Itcl_ScopedVarResolver(interp, name, contextNs, flags, rPtr)
Tcl_Interp *interp; /* current interpreter */
- char *name; /* variable name being resolved */
+ CONST char *name; /* variable name being resolved */
Tcl_Namespace *contextNs; /* current namespace context */
int flags; /* TCL_LEAVE_ERR_MSG => leave error message */
Tcl_Var *rPtr; /* returns: resolved variable */
@@ -1175,7 +1175,8 @@ Itcl_ScopedVarResolver(interp, name, contextNs, flags, rPtr)
errs = NULL;
}
- if (Tcl_SplitList(errs, name, &namec, &namev) != TCL_OK) {
+ if (Tcl_SplitList(errs, (CONST84 char *)name, &namec, &namev)
+ != TCL_OK) {
return TCL_ERROR;
}
if (namec != 3) {
diff --git a/itcl/itcl/generic/itcl_parse.c b/itcl/itcl/generic/itcl_parse.c
index eb792e704b3..5695e166746 100644
--- a/itcl/itcl/generic/itcl_parse.c
+++ b/itcl/itcl/generic/itcl_parse.c
@@ -364,7 +364,7 @@ Itcl_ClassInheritCmd(clientData, interp, objc, objv)
* parent namespace (currently active). If not, try
* to autoload its definition.
*/
- token = Tcl_GetStringFromObj(*objv, (int*)NULL);
+ token = Tcl_GetString(*objv);
baseCdefnPtr = Itcl_FindClass(interp, token, /* autoload */ 1);
if (!baseCdefnPtr) {
Tcl_Obj *resultPtr = Tcl_GetObjResult(interp);
@@ -643,13 +643,13 @@ Itcl_ClassConstructorCmd(clientData, interp, objc, objv)
* If there is an object initialization statement, pick this
* out and take the last argument as the constructor body.
*/
- arglist = Tcl_GetStringFromObj(objv[1], (int*)NULL);
+ arglist = Tcl_GetString(objv[1]);
if (objc == 3) {
- body = Tcl_GetStringFromObj(objv[2], (int*)NULL);
+ body = Tcl_GetString(objv[2]);
} else {
cdefnPtr->initCode = objv[2];
Tcl_IncrRefCount(cdefnPtr->initCode);
- body = Tcl_GetStringFromObj(objv[3], (int*)NULL);
+ body = Tcl_GetString(objv[3]);
}
if (Itcl_CreateMethod(interp, cdefnPtr, name, arglist, body) != TCL_OK) {
@@ -960,10 +960,10 @@ Itcl_ClassCommonCmd(clientData, interp, objc, objv)
Itcl_BuildVirtualTables(cdefnPtr);
if (init) {
- init = Tcl_SetVar(interp, vdefn->member->name, init,
+ CONST char *val = Tcl_SetVar(interp, vdefn->member->name, init,
TCL_NAMESPACE_ONLY);
- if (!init) {
+ if (!val) {
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
"cannot initialize common variable \"",
vdefn->member->name, "\"",
@@ -1013,7 +1013,7 @@ Itcl_ClassCommonCmd(clientData, interp, objc, objv)
int
Itcl_ParseVarResolver(interp, name, contextNs, flags, rPtr)
Tcl_Interp *interp; /* current interpreter */
- char* name; /* name of the variable being accessed */
+ CONST char* name; /* name of the variable being accessed */
Tcl_Namespace *contextNs; /* namespace context */
int flags; /* TCL_GLOBAL_ONLY => global variable
* TCL_NAMESPACE_ONLY => namespace variable */
diff --git a/itcl/itcl/generic/itcl_util.c b/itcl/itcl/generic/itcl_util.c
index 40c7803ee11..64cef44be51 100644
--- a/itcl/itcl/generic/itcl_util.c
+++ b/itcl/itcl/generic/itcl_util.c
@@ -82,15 +82,12 @@ typedef struct InterpState {
void
Itcl_Assert(testExpr, fileName, lineNumber)
- char *testExpr; /* string representing test expression */
- char *fileName; /* file name containing this call */
- int lineNumber; /* line number containing this call */
+ CONST char *testExpr; /* string representing test expression */
+ CONST char *fileName; /* file name containing this call */
+ int lineNumber; /* line number containing this call */
{
-#ifndef NDEBUG
- fprintf(stderr, "Assertion failed: \"%s\" (line %d of %s)",
- testExpr, lineNumber, fileName);
- abort();
-#endif
+ Tcl_Panic("Itcl Assertion failed: \"%s\" (line %d of %s)",
+ testExpr, lineNumber, fileName);
}
@@ -699,7 +696,7 @@ Itcl_ReleaseData(cdata)
}
if (!entry) {
Tcl_MutexUnlock(&ItclPreservedListLock);
- panic("Itcl_ReleaseData can't find reference for 0x%x", cdata);
+ Tcl_Panic("Itcl_ReleaseData can't find reference for 0x%x", cdata);
}
/*
@@ -751,7 +748,11 @@ Itcl_SaveInterpState(interp, status)
Interp *iPtr = (Interp*)interp;
InterpState *info;
- char *val;
+ CONST char *val;
+
+#ifndef ERR_IN_PROGRESS /* this disappeared in 8.5a2 */
+ return (Itcl_InterpState) Tcl_SaveInterpState(interp, status);
+#endif
info = (InterpState*)ckalloc(sizeof(InterpState));
info->validate = TCL_STATE_VALID;
@@ -770,7 +771,11 @@ Itcl_SaveInterpState(interp, status)
/*
* If an error is in progress, preserve its state.
*/
+#ifdef ERR_IN_PROGRESS /* this disappeared in 8.5a2 */
if ((iPtr->flags & ERR_IN_PROGRESS) != 0) {
+#else
+ if (iPtr->errorInfo != NULL) {
+#endif
val = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
if (val) {
info->errorInfo = ckalloc((unsigned)(strlen(val)+1));
@@ -811,12 +816,15 @@ Itcl_RestoreInterpState(interp, state)
Tcl_Interp* interp; /* interpreter being modified */
Itcl_InterpState state; /* token representing interpreter state */
{
- Interp *iPtr = (Interp*)interp;
InterpState *info = (InterpState*)state;
int status;
+#ifndef ERR_IN_PROGRESS /* this disappeared in 8.5a2 */
+ return Tcl_RestoreInterpState(interp, (Tcl_InterpState)state);
+#endif
+
if (info->validate != TCL_STATE_VALID) {
- panic("bad token in Itcl_RestoreInterpState");
+ Tcl_Panic("bad token in Itcl_RestoreInterpState");
}
Tcl_ResetResult(interp);
@@ -832,10 +840,7 @@ Itcl_RestoreInterpState(interp, state)
}
if (info->errorCode) {
- (void) Tcl_SetVar2(interp, "errorCode", (char*)NULL,
- info->errorCode, TCL_GLOBAL_ONLY);
- iPtr->flags |= ERROR_CODE_SET;
-
+ Tcl_SetObjErrorCode(interp, Tcl_NewStringObj(info->errorCode, -1));
ckfree(info->errorCode);
}
@@ -871,8 +876,13 @@ Itcl_DiscardInterpState(state)
{
InterpState *info = (InterpState*)state;
+#ifndef ERR_IN_PROGRESS /* this disappeared in 8.5a2 */
+ Tcl_DiscardInterpState((Tcl_InterpState)state);
+ return;
+#endif
+
if (info->validate != TCL_STATE_VALID) {
- panic("bad token in Itcl_DiscardInterpState");
+ Tcl_Panic("bad token in Itcl_DiscardInterpState");
}
if (info->errorInfo) {
@@ -1149,12 +1159,12 @@ Itcl_GetTrueNamespace(interp, info)
*/
void
Itcl_ParseNamespPath(name, buffer, head, tail)
- char *name; /* path name to class member */
+ CONST char *name; /* path name to class member */
Tcl_DString *buffer; /* dynamic string buffer (uninitialized) */
char **head; /* returns "namesp::namesp::namesp" part */
char **tail; /* returns "element" part */
{
- register char *sep;
+ register char *sep, *newname;
Tcl_DStringInit(buffer);
@@ -1164,12 +1174,12 @@ Itcl_ParseNamespPath(name, buffer, head, tail)
* scope qualifier.
*/
Tcl_DStringAppend(buffer, name, -1);
- name = Tcl_DStringValue(buffer);
+ newname = Tcl_DStringValue(buffer);
- for (sep=name; *sep != '\0'; sep++)
+ for (sep=newname; *sep != '\0'; sep++)
;
- while (--sep > name) {
+ while (--sep > newname) {
if (*sep == ':' && *(sep-1) == ':') {
break;
}
@@ -1180,20 +1190,20 @@ Itcl_ParseNamespPath(name, buffer, head, tail)
* up until the head is found. This supports the Tcl namespace
* behavior, which allows names like "foo:::bar".
*/
- if (sep > name) {
+ if (sep > newname) {
*tail = sep+1;
- while (sep > name && *(sep-1) == ':') {
+ while (sep > newname && *(sep-1) == ':') {
sep--;
}
*sep = '\0';
- *head = name;
+ *head = newname;
}
/*
* No :: separators--the whole name is treated as a tail.
*/
else {
- *tail = name;
+ *tail = newname;
*head = NULL;
}
}
@@ -1218,19 +1228,21 @@ Itcl_ParseNamespPath(name, buffer, head, tail)
*/
int
Itcl_DecodeScopedCommand(interp, name, rNsPtr, rCmdPtr)
- Tcl_Interp *interp; /* current interpreter */
- char *name; /* string to be decoded */
- Tcl_Namespace **rNsPtr; /* returns: namespace for scoped value */
- char **rCmdPtr; /* returns: simple command word */
+ Tcl_Interp *interp; /* current interpreter */
+ CONST char *name; /* string to be decoded */
+ Tcl_Namespace **rNsPtr; /* returns: namespace for scoped value */
+ char **rCmdPtr; /* returns: simple command word */
{
Tcl_Namespace *nsPtr = NULL;
- char *cmdName = name;
+ char *cmdName;
int len = strlen(name);
-
- char *pos;
+ CONST char *pos;
int listc, result;
char **listv;
+ cmdName = ckalloc((unsigned)strlen(name)+1);
+ strcpy(cmdName, name);
+
if ((*name == 'n') && (len > 17) && (strncmp(name, "namespace", 9) == 0)) {
for (pos = (name + 9); (*pos == ' '); pos++) {
/* empty body: skip over spaces */
@@ -1238,7 +1250,8 @@ Itcl_DecodeScopedCommand(interp, name, rNsPtr, rCmdPtr)
if ((*pos == 'i') && ((pos + 7) <= (name + len))
&& (strncmp(pos, "inscope", 7) == 0)) {
- result = Tcl_SplitList(interp, name, &listc, &listv);
+ result = Tcl_SplitList(interp, (CONST84 char *)name, &listc,
+ &listv);
if (result == TCL_OK) {
if (listc != 4) {
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
@@ -1246,15 +1259,14 @@ Itcl_DecodeScopedCommand(interp, name, rNsPtr, rCmdPtr)
"namespace inscope namesp command\"",
(char*)NULL);
result = TCL_ERROR;
- }
- else {
+ } else {
nsPtr = Tcl_FindNamespace(interp, listv[2],
(Tcl_Namespace*)NULL, TCL_LEAVE_ERR_MSG);
if (!nsPtr) {
result = TCL_ERROR;
- }
- else {
+ } else {
+ ckfree(cmdName);
cmdName = ckalloc((unsigned)(strlen(listv[3])+1));
strcpy(cmdName, listv[3]);
}
@@ -1313,7 +1325,7 @@ Itcl_EvalArgs(interp, objc, objv)
cmdPtr = (Command*)cmd;
cmdlinec = objc;
- cmdlinev = (Tcl_Obj**)objv;
+ cmdlinev = (Tcl_Obj **) objv;
/*
* If the command is still not found, handle it with the
@@ -1327,16 +1339,13 @@ Itcl_EvalArgs(interp, objc, objv)
Tcl_ResetResult(interp);
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
"invalid command name \"",
- Tcl_GetStringFromObj(objv[0], (int*)NULL), "\"",
- (char*)NULL);
+ Tcl_GetStringFromObj(objv[0], NULL), "\"", NULL);
return TCL_ERROR;
}
cmdPtr = (Command*)cmd;
cmdlinePtr = Itcl_CreateArgs(interp, "unknown", objc, objv);
-
- (void) Tcl_ListObjGetElements((Tcl_Interp*)NULL, cmdlinePtr,
- &cmdlinec, &cmdlinev);
+ Tcl_ListObjGetElements(NULL, cmdlinePtr, &cmdlinec, &cmdlinev);
}
/*
@@ -1373,7 +1382,7 @@ Itcl_EvalArgs(interp, objc, objv)
Tcl_Obj*
Itcl_CreateArgs(interp, string, objc, objv)
Tcl_Interp *interp; /* current interpreter */
- char *string; /* first command word */
+ CONST char *string; /* first command word */
int objc; /* number of arguments */
Tcl_Obj *CONST objv[]; /* argument objects */
{
@@ -1382,7 +1391,7 @@ Itcl_CreateArgs(interp, string, objc, objv)
listPtr = Tcl_NewListObj(0, (Tcl_Obj**)NULL);
Tcl_ListObjAppendElement((Tcl_Interp*)NULL, listPtr,
- Tcl_NewStringObj(string, -1));
+ Tcl_NewStringObj((CONST84 char *)string, -1));
for (i=0; i < objc; i++) {
Tcl_ListObjAppendElement((Tcl_Interp*)NULL, listPtr, objv[i]);
diff --git a/itcl/itcl/itclConfig.sh.in b/itcl/itcl/itclConfig.sh.in
index f8a0ebe33f4..8ef9b064fc2 100644
--- a/itcl/itcl/itclConfig.sh.in
+++ b/itcl/itcl/itclConfig.sh.in
@@ -12,36 +12,51 @@
# The information in this file is specific to a single platform.
# Itcl's version number.
-ITCL_VERSION='@ITCL_VERSION@'
-ITCL_MAJOR_VERSION='@ITCL_MAJOR_VERSION@'
-ITCL_MINOR_VERSION='@ITCL_MINOR_VERSION@'
-ITCL_RELEASE_LEVEL='@ITCL_RELEASE_LEVEL@'
+itcl_VERSION='@PACKAGE_VERSION@'
+ITCL_VERSION='@PACKAGE_VERSION@'
# The name of the Itcl library (may be either a .a file or a shared library):
-ITCL_LIB_FILE=@ITCL_LIB_FILE@
+itcl_LIB_FILE=@itcl_LIB_FILE@
+ITCL_LIB_FILE=@itcl_LIB_FILE@
# String to pass to linker to pick up the Itcl library from its
# build directory.
-ITCL_BUILD_LIB_SPEC='@ITCL_BUILD_LIB_SPEC@'
+itcl_BUILD_LIB_SPEC='@itcl_BUILD_LIB_SPEC@'
+ITCL_BUILD_LIB_SPEC='@itcl_BUILD_LIB_SPEC@'
# String to pass to linker to pick up the Itcl library from its
# installed directory.
-ITCL_LIB_SPEC='@ITCL_LIB_SPEC@'
+itcl_LIB_SPEC='@itcl_LIB_SPEC@'
+ITCL_LIB_SPEC='@itcl_LIB_SPEC@'
# The name of the Itcl stub library (a .a file):
-ITCL_STUB_LIB_FILE=@ITCL_STUB_LIB_FILE@
+itcl_STUB_LIB_FILE=@itcl_STUB_LIB_FILE@
+ITCL_STUB_LIB_FILE=@itcl_STUB_LIB_FILE@
# String to pass to linker to pick up the Itcl stub library from its
# build directory.
-ITCL_BUILD_STUB_LIB_SPEC='@ITCL_BUILD_STUB_LIB_SPEC@'
+itcl_BUILD_STUB_LIB_SPEC='@itcl_BUILD_STUB_LIB_SPEC@'
+ITCL_BUILD_STUB_LIB_SPEC='@itcl_BUILD_STUB_LIB_SPEC@'
# String to pass to linker to pick up the Itcl stub library from its
# installed directory.
-ITCL_STUB_LIB_SPEC='@ITCL_STUB_LIB_SPEC@'
+itcl_STUB_LIB_SPEC='@itcl_STUB_LIB_SPEC@'
+ITCL_STUB_LIB_SPEC='@itcl_STUB_LIB_SPEC@'
+
+# String to pass to linker to pick up the Itcl stub library from its
+# build directory.
+itcl_BUILD_STUB_LIB_PATH='@itcl_BUILD_STUB_LIB_PATH@'
+ITCL_BUILD_STUB_LIB_PATH='@itcl_BUILD_STUB_LIB_PATH@'
+
+# String to pass to linker to pick up the Itcl stub library from its
+# installed directory.
+itcl_STUB_LIB_PATH='@itcl_STUB_LIB_PATH@'
+ITCL_STUB_LIB_PATH='@itcl_STUB_LIB_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@'
+itcl_SRC_DIR='@itcl_SRC_DIR@'
+ITCL_SRC_DIR='@itcl_SRC_DIR@'
diff --git a/itcl/itcl/library/itcl.tcl b/itcl/itcl/library/itcl.tcl
index 78cb48abe96..f398f5d5a24 100644
--- a/itcl/itcl/library/itcl.tcl
+++ b/itcl/itcl/library/itcl.tcl
@@ -50,19 +50,17 @@ proc ::itcl::local {class name args} {
# USAGE: itcl::class name body
# Adds an entry for the given class declaration.
#
-foreach cmd {itcl::class itcl_class} {
- auto_mkindex_parser::command $cmd {name body} {
- variable index
- variable scriptFile
- append index "set [list auto_index([fullname $name])]"
- append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
+auto_mkindex_parser::command itcl::class {name body} {
+ variable index
+ variable scriptFile
+ append index "set [list auto_index([fullname $name])]"
+ append index " \[list source \[file join \$dir [list $scriptFile]\]\]\n"
- variable parser
- variable contextStack
- set contextStack [linsert $contextStack 0 $name]
- $parser eval $body
- set contextStack [lrange $contextStack 1 end]
- }
+ variable parser
+ variable contextStack
+ set contextStack [linsert $contextStack 0 $name]
+ $parser eval $body
+ set contextStack [lrange $contextStack 1 end]
}
#
diff --git a/itcl/itcl/pkgIndex.tcl.in b/itcl/itcl/pkgIndex.tcl.in
index da688ab54a8..c8d3d0e7104 100644
--- a/itcl/itcl/pkgIndex.tcl.in
+++ b/itcl/itcl/pkgIndex.tcl.in
@@ -1,3 +1,3 @@
# Tcl package index file, version 1.0
-package ifneeded Itcl @VERSION@ [list load [file join $dir @RELPATH@ "@itcl_LIB_FILE@"] Itcl]
+package ifneeded Itcl @PACKAGE_VERSION@ [list load [file join $dir "@PKG_LIB_FILE@"] Itcl]
diff --git a/itcl/itcl/tclconfig/install-sh b/itcl/itcl/tclconfig/install-sh
new file mode 100755
index 00000000000..0ff4b6a08e8
--- /dev/null
+++ b/itcl/itcl/tclconfig/install-sh
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+#
+# install - install a program, script, or datafile
+# This comes from X11R5; it is not part of GNU.
+#
+# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+
+instcmd="$mvprog"
+chmodcmd=""
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+fi
+
+if [ x"$dst" = x ]
+then
+ echo "install: no destination specified"
+ exit 1
+fi
+
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+if [ -d $dst ]
+then
+ dst="$dst"/`basename $src`
+fi
+
+# Make a temp file name in the proper directory.
+
+dstdir=`dirname $dst`
+dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+$doit $instcmd $src $dsttmp
+
+# and set any options; do chmod last to preserve setuid bits
+
+if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
+if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
+if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
+if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
+
+# Now rename the file to the real destination.
+
+$doit $rmcmd $dst
+$doit $mvcmd $dsttmp $dst
+
+
+exit 0
diff --git a/itcl/itcl/tclconfig/tcl.m4 b/itcl/itcl/tclconfig/tcl.m4
new file mode 100644
index 00000000000..3d410763da2
--- /dev/null
+++ b/itcl/itcl/tclconfig/tcl.m4
@@ -0,0 +1,3827 @@
+# tcl.m4 --
+#
+# This file provides a set of autoconf macros to help TEA-enable
+# a Tcl extension.
+#
+# Copyright (c) 1999-2000 Ajuba Solutions.
+# Copyright (c) 2002-2005 ActiveState Corporation.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# RCS: @(#) $Id$
+
+AC_PREREQ(2.50)
+
+#------------------------------------------------------------------------
+# TEA_PATH_TCLCONFIG --
+#
+# Locate the tclConfig.sh file and perform a sanity check on
+# the Tcl compile flags
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-tcl=...
+#
+# Defines the following vars:
+# TCL_BIN_DIR Full path to the directory containing
+# the tclConfig.sh file
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_TCLCONFIG, [
+ dnl Make sure we are initialized
+ AC_REQUIRE([TEA_INIT])
+ #
+ # Ok, lets find the tcl configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tcl
+ #
+
+ if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+ AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
+ AC_MSG_CHECKING([for Tcl configuration])
+ AC_CACHE_VAL(ac_cv_c_tclconfig,[
+
+ # First check to see if --with-tcl was specified.
+ if test x"${with_tclconfig}" != x ; then
+ case ${with_tclconfig} in
+ */tclConfig.sh )
+ if test -f ${with_tclconfig}; then
+ AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself])
+ with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCL_BIN_DIR="# no Tcl configs found"
+ AC_MSG_WARN("Cannot find Tcl configuration definitions")
+ exit 0
+ else
+ no_tcl=
+ TCL_BIN_DIR=${ac_cv_c_tclconfig}
+ AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_TKCONFIG --
+#
+# Locate the tkConfig.sh file
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-tk=...
+#
+# Defines the following vars:
+# TK_BIN_DIR Full path to the directory containing
+# the tkConfig.sh file
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_TKCONFIG, [
+ #
+ # Ok, lets find the tk configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tk
+ #
+
+ if test x"${no_tk}" = x ; then
+ # we reset no_tk in case something fails here
+ no_tk=true
+ AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
+ AC_MSG_CHECKING([for Tk configuration])
+ AC_CACHE_VAL(ac_cv_c_tkconfig,[
+
+ # First check to see if --with-tkconfig was specified.
+ if test x"${with_tkconfig}" != x ; then
+ case ${with_tkconfig} in
+ */tkConfig.sh )
+ if test -f ${with_tkconfig}; then
+ AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
+ with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tkconfig}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
+ fi
+ fi
+
+ # then check for a private Tk library
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ../tk \
+ `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../tk \
+ `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../../tk \
+ `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ TK_BIN_DIR="# no Tk configs found"
+ AC_MSG_WARN("Cannot find Tk configuration definitions")
+ exit 0
+ else
+ no_tk=
+ TK_BIN_DIR=${ac_cv_c_tkconfig}
+ AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh])
+ fi
+ fi
+
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_TCLCONFIG --
+#
+# Load the tclConfig.sh file
+#
+# Arguments:
+#
+# Requires the following vars to be set:
+# TCL_BIN_DIR
+#
+# Results:
+#
+# Subst the following vars:
+# TCL_BIN_DIR
+# TCL_SRC_DIR
+# TCL_LIB_FILE
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_LOAD_TCLCONFIG, [
+ AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
+
+ if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
+ AC_MSG_RESULT([loading])
+ . $TCL_BIN_DIR/tclConfig.sh
+ else
+ AC_MSG_RESULT([file not found])
+ fi
+
+ #
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f $TCL_BIN_DIR/Makefile ; then
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ fi
+
+ #
+ # eval is required to do the TCL_DBGX substitution
+ #
+
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+ AC_SUBST(TCL_VERSION)
+ AC_SUBST(TCL_BIN_DIR)
+ AC_SUBST(TCL_SRC_DIR)
+
+ AC_SUBST(TCL_LIB_FILE)
+ AC_SUBST(TCL_LIB_FLAG)
+ AC_SUBST(TCL_LIB_SPEC)
+
+ AC_SUBST(TCL_STUB_LIB_FILE)
+ AC_SUBST(TCL_STUB_LIB_FLAG)
+ AC_SUBST(TCL_STUB_LIB_SPEC)
+
+ AC_SUBST(TCL_LIBS)
+ AC_SUBST(TCL_DEFS)
+ AC_SUBST(TCL_EXTRA_CFLAGS)
+ AC_SUBST(TCL_LD_FLAGS)
+ AC_SUBST(TCL_SHLIB_LD_LIBS)
+ #AC_SUBST(TCL_BUILD_LIB_SPEC)
+ #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_TKCONFIG --
+#
+# Load the tkConfig.sh file
+#
+# Arguments:
+#
+# Requires the following vars to be set:
+# TK_BIN_DIR
+#
+# Results:
+#
+# Sets the following vars that should be in tkConfig.sh:
+# TK_BIN_DIR
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_LOAD_TKCONFIG, [
+ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
+
+ if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
+ AC_MSG_RESULT([loading])
+ . $TK_BIN_DIR/tkConfig.sh
+ else
+ AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
+ fi
+
+ #
+ # If the TK_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TK_LIB_SPEC will be set to the value
+ # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
+ # instead of TK_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f $TK_BIN_DIR/Makefile ; then
+ TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
+ TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
+ TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
+ fi
+
+ #
+ # eval is required to do the TK_DBGX substitution
+ #
+
+ eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+ eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+ eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+
+ eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+ eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+ eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+ AC_SUBST(TK_VERSION)
+ AC_SUBST(TK_BIN_DIR)
+ AC_SUBST(TK_SRC_DIR)
+
+ AC_SUBST(TK_LIB_FILE)
+ AC_SUBST(TK_LIB_FLAG)
+ AC_SUBST(TK_LIB_SPEC)
+
+ AC_SUBST(TK_STUB_LIB_FILE)
+ AC_SUBST(TK_STUB_LIB_FLAG)
+ AC_SUBST(TK_STUB_LIB_SPEC)
+
+ AC_SUBST(TK_LIBS)
+ AC_SUBST(TK_XINCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_SHARED --
+#
+# Allows the building of shared libraries
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-shared=yes|no
+#
+# Defines the following vars:
+# STATIC_BUILD Used for building import/export libraries
+# on Windows.
+#
+# Sets the following vars:
+# SHARED_BUILD Value of 1 or 0
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_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=yes])
+
+ 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])
+ SHARED_BUILD=1
+ else
+ AC_MSG_RESULT([static])
+ SHARED_BUILD=0
+ AC_DEFINE(STATIC_BUILD)
+ fi
+ AC_SUBST(SHARED_BUILD)
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_THREADS --
+#
+# Specify if thread support should be enabled. If "yes" is
+# specified as an arg (optional), threads are enabled by default.
+# TCL_THREADS is checked so that if you are compiling an extension
+# against a threaded core, your extension must be compiled threaded
+# as well.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-threads
+#
+# Sets the following vars:
+# THREADS_LIBS Thread library(s)
+#
+# Defines the following vars:
+# TCL_THREADS
+# _REENTRANT
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_ENABLE_THREADS, [
+ AC_ARG_ENABLE(threads, [ --enable-threads build with threads],
+ [tcl_ok=$enableval], [tcl_ok=$1])
+
+ if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
+ TCL_THREADS=1
+
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ # We are always OK on Windows, so check what this platform wants.
+ AC_DEFINE(USE_THREAD_ALLOC)
+ AC_DEFINE(_REENTRANT)
+ AC_DEFINE(_THREAD_SAFE)
+ AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
+ if test "$tcl_ok" = "no"; then
+ # Check a little harder for __pthread_mutex_init in the
+ # same library, as some systems hide it there until
+ # pthread.h is defined. We could alternatively do an
+ # AC_TRY_COMPILE with pthread.h, but that will work with
+ # libpthread really doesn't exist, like AIX 4.2.
+ # [Bug: 4359]
+ AC_CHECK_LIB(pthread, __pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ fi
+
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthread"
+ else
+ AC_CHECK_LIB(pthreads, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthreads"
+ else
+ AC_CHECK_LIB(c, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "no"; then
+ AC_CHECK_LIB(c_r, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -pthread"
+ else
+ TCL_THREADS=0
+ AC_MSG_WARN("Don t know how to find pthread lib on your system - thread support disabled")
+ fi
+ fi
+ fi
+ fi
+
+ # Does the pthread-implementation provide
+ # 'pthread_attr_setstacksize' ?
+
+ ac_saved_libs=$LIBS
+ LIBS="$LIBS $THREADS_LIBS"
+ AC_CHECK_FUNCS(pthread_attr_setstacksize)
+ LIBS=$ac_saved_libs
+ AC_CHECK_FUNCS(readdir_r)
+ fi
+ else
+ TCL_THREADS=0
+ fi
+ # Do checking message here to not mess up interleaved configure output
+ AC_MSG_CHECKING([for building with threads])
+ if test "${TCL_THREADS}" = "1"; then
+ AC_DEFINE(TCL_THREADS)
+ #LIBS="$LIBS $THREADS_LIBS"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no (default)])
+ fi
+ # TCL_THREADS sanity checking. See if our request for building with
+ # threads is the same as the way Tcl was built. If not, warn the user.
+ case ${TCL_DEFS} in
+ *THREADS=1*)
+ if test "${TCL_THREADS}" = "0"; then
+ AC_MSG_WARN([
+ Building ${PACKAGE_NAME} without threads enabled, but building against a Tcl
+ that IS thread-enabled.])
+ fi
+ ;;
+ *)
+ if test "${TCL_THREADS}" = "1"; then
+ AC_MSG_WARN([
+ --enable-threads requested, but attempting building against a Tcl
+ that is NOT thread-enabled.])
+ fi
+ ;;
+ esac
+ AC_SUBST(TCL_THREADS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_SYMBOLS --
+#
+# Specify if debugging symbols should be used
+# Memory (TCL_MEM_DEBUG) debugging can also be enabled.
+#
+# Arguments:
+# none
+#
+# Requires the following vars to be set:
+# CFLAGS_DEBUG
+# CFLAGS_OPTIMIZE
+# LDFLAGS_DEBUG
+# LDFLAGS_OPTIMIZE
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-symbols
+#
+# Defines the following vars:
+# CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true
+# Sets to CFLAGS_OPTIMIZE if false
+# LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true
+# Sets to LDFLAGS_OPTIMIZE if false
+# DBGX Formerly used as debug library extension;
+# always blank now.
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_ENABLE_SYMBOLS, [
+ dnl Make sure we are initialized
+ AC_REQUIRE([TEA_CONFIG_CFLAGS])
+
+ DBGX=""
+
+ AC_MSG_CHECKING([for build with symbols])
+ AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no])
+ if test "$tcl_ok" = "no"; then
+ CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
+ LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
+ AC_MSG_RESULT([no])
+ else
+ CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
+ LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+ if test "$tcl_ok" = "yes"; then
+ AC_MSG_RESULT([yes (standard debugging)])
+ fi
+ fi
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ LDFLAGS_DEFAULT="${LDFLAGS}"
+ fi
+
+ AC_SUBST(TCL_DBGX)
+ AC_SUBST(CFLAGS_DEFAULT)
+ AC_SUBST(LDFLAGS_DEFAULT)
+
+ if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+ AC_DEFINE(TCL_MEM_DEBUG)
+ fi
+
+ if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+ if test "$tcl_ok" = "all"; then
+ AC_MSG_RESULT([enabled symbols mem debugging])
+ else
+ AC_MSG_RESULT([enabled $tcl_ok debugging])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_LANGINFO --
+#
+# Allows use of modern nl_langinfo check for better l10n.
+# This is only relevant for Unix.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-langinfo=yes|no (default is yes)
+#
+# Defines the following vars:
+# HAVE_LANGINFO Triggers use of nl_langinfo if defined.
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_ENABLE_LANGINFO, [
+ AC_ARG_ENABLE(langinfo,
+ [ --enable-langinfo use nl_langinfo if possible to determine
+ encoding at startup, otherwise use old heuristic],
+ [langinfo_ok=$enableval], [langinfo_ok=yes])
+
+ HAVE_LANGINFO=0
+ if test "$langinfo_ok" = "yes"; then
+ if test "$langinfo_ok" = "yes"; then
+ AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
+ fi
+ fi
+ AC_MSG_CHECKING([whether to use nl_langinfo])
+ if test "$langinfo_ok" = "yes"; then
+ AC_TRY_COMPILE([#include <langinfo.h>],
+ [nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
+ if test "$langinfo_ok" = "no"; then
+ langinfo_ok="no (could not compile with nl_langinfo)";
+ fi
+ if test "$langinfo_ok" = "yes"; then
+ AC_DEFINE(HAVE_LANGINFO)
+ fi
+ fi
+ AC_MSG_RESULT([$langinfo_ok])
+])
+
+#--------------------------------------------------------------------
+# TEA_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.
+# 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
+# ${PACKAGE_VERSION} variable to put the version in
+# the right place. This is used by platforms that
+# need non-standard library names.
+# Examples: ${PACKAGE_VERSION}.so.1.1 on NetBSD,
+# since it needs to have a version after the .so, and
+# ${PACKAGE_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
+# ${PACKAGE_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
+# CFLAGS - We add CFLAGS to pass to the compiler
+#
+# Subst's the following vars:
+# DL_LIBS
+# CFLAGS_DEBUG
+# CFLAGS_OPTIMIZE
+# CFLAGS_WARNING
+#
+# STLIB_LD
+# SHLIB_LD
+# SHLIB_CFLAGS
+# LDFLAGS_DEBUG
+# LDFLAGS_OPTIMIZE
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_CONFIG_CFLAGS, [
+ dnl Make sure we are initialized
+ AC_REQUIRE([TEA_INIT])
+
+ # Step 0: Enable 64 bit support?
+
+ AC_MSG_CHECKING([if 64bit support is enabled])
+ AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
+ AC_MSG_RESULT([$do64bit])
+
+ # Step 0.b: Enable Solaris 64 bit VIS support?
+
+ AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
+ AC_ARG_ENABLE(64bit-vis,[ --enable-64bit-vis enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no])
+ AC_MSG_RESULT([$do64bitVIS])
+
+ if test "$do64bitVIS" = "yes"; then
+ # Force 64bit on with VIS
+ do64bit=yes
+ fi
+
+ # Step 0.c: Cross-compiling options for Windows/CE builds?
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ AC_MSG_CHECKING([if Windows/CE build is requested])
+ AC_ARG_ENABLE(wince,[ --enable-wince enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no])
+ AC_MSG_RESULT($doWince)
+ fi
+
+ # 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
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ system=windows
+ 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.
+ # This is similar to Tcl's unix/tcl.m4 except that we've added a
+ # "windows" case and CC_SEARCH_FLAGS becomes LD_SEARCH_FLAGS for us
+ # (and we have no CC_SEARCH_FLAGS).
+
+ do64bit_ok=no
+ LDFLAGS_ORIG="$LDFLAGS"
+ TCL_EXPORT_FILE_SUFFIX=""
+ UNSHARED_LIB_SUFFIX=""
+ TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+ ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+ TCL_LIB_VERSIONS_OK=ok
+ CFLAGS_DEBUG=-g
+ if test "$GCC" = "yes" ; then
+ CFLAGS_OPTIMIZE=-O2
+ CFLAGS_WARNING="-Wall -Wno-implicit-int"
+ else
+ CFLAGS_OPTIMIZE=-O
+ CFLAGS_WARNING=""
+ fi
+ TCL_NEEDS_EXP_FILE=0
+ TCL_BUILD_EXP_FILE=""
+ TCL_EXP_FILE=""
+dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
+dnl AC_CHECK_TOOL(AR, ar, :)
+ AC_CHECK_PROG(AR, ar, ar)
+ STLIB_LD='${AR} cr'
+ LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+ case $system in
+ windows)
+ # This is a 2-stage check to make sure we have the 64-bit SDK
+ # We have to know where the SDK is installed.
+ if test "$do64bit" = "yes" ; then
+ if test "x${MSSDK}x" = "xx" ; then
+ MSSDK="C:/Progra~1/Microsoft SDK"
+ fi
+ # Ensure that this path has no spaces to work in autoconf
+ TEA_PATH_NOSPACE(MSSDK, ${MSSDK})
+ if test ! -d "${MSSDK}/bin/win64" ; then
+ AC_MSG_WARN([could not find 64-bit SDK to enable 64bit mode])
+ do64bit="no"
+ else
+ do64bit_ok="yes"
+ fi
+ fi
+
+ if test "$doWince" != "no" ; then
+ if test "$do64bit" = "yes" ; then
+ AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible])
+ fi
+ if test "$GCC" = "yes" ; then
+ AC_MSG_ERROR([Windows/CE and GCC builds incompatible])
+ fi
+ TEA_PATH_CELIB
+ # Set defaults for common evc4/PPC2003 setup
+ # Currently Tcl requires 300+, possibly 420+ for sockets
+ CEVERSION=420; # could be 211 300 301 400 420 ...
+ TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ...
+ ARCH=ARM; # could be ARM MIPS X86EM ...
+ PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
+ if test "$doWince" != "yes"; then
+ # If !yes then the user specified something
+ # Reset ARCH to allow user to skip specifying it
+ ARCH=
+ eval `echo $doWince | awk -F, '{ \
+ if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \
+ if ([$]1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
+ if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \
+ if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \
+ if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \
+ }'`
+ if test "x${ARCH}" = "x" ; then
+ ARCH=$TARGETCPU;
+ fi
+ fi
+ OSVERSION=WCE$CEVERSION;
+ if test "x${WCEROOT}" = "x" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
+ if test ! -d "${WCEROOT}" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
+ fi
+ fi
+ if test "x${SDKROOT}" = "x" ; then
+ SDKROOT="C:/Program Files/Windows CE Tools"
+ if test ! -d "${SDKROOT}" ; then
+ SDKROOT="C:/Windows CE Tools"
+ fi
+ fi
+ # Ensure that this path has no spaces to work in autoconf
+ TEA_PATH_NOSPACE(WCEROOT, ${WCEROOT})
+ TEA_PATH_NOSPACE(SDKROOT, ${SDKROOT})
+ if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
+ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
+ AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]])
+ doWince="no"
+ else
+ # We could PATH_NOSPACE these, but that's not important,
+ # as long as we quote them when used.
+ CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
+ if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
+ CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
+ fi
+ CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
+ fi
+ fi
+
+ if test "$GCC" != "yes" ; then
+ if test "${SHARED_BUILD}" = "0" ; then
+ runtime=-MT
+ else
+ runtime=-MD
+ fi
+
+ if test "$do64bit" = "yes" ; then
+ # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ CC="${MSSDK}/Bin/Win64/cl.exe"
+ CFLAGS="${CFLAGS} -I${MSSDK}/Include/prerelease \
+ -I${MSSDK}/Include/Win64/crt \
+ -I${MSSDK}/Include"
+ RC="${MSSDK}/bin/rc.exe"
+ lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
+ -LIBPATH:${MSSDK}/Lib/Prerelease/IA64 -nologo"
+ LINKBIN="${MSSDK}/bin/win64/link.exe"
+ CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ elif test "$doWince" != "no" ; then
+ CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
+ if test "${TARGETCPU}" = "X86"; then
+ CC="${CEBINROOT}/cl.exe"
+ else
+ CC="${CEBINROOT}/cl${ARCH}.exe"
+ fi
+ CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
+ RC="${WCEROOT}/Common/EVC/bin/rc.exe"
+ arch=`echo ${ARCH} | awk '{print tolower([$]0)}'`
+ defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
+ if test "${SHARED_BUILD}" = "1" ; then
+ # Static CE builds require static celib as well
+ defs="${defs} _DLL"
+ fi
+ for i in $defs ; do
+ AC_DEFINE_UNQUOTED($i)
+ done
+ AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION)
+ AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION)
+ CFLAGS_DEBUG="-nologo -Zi -Od"
+ CFLAGS_OPTIMIZE="-nologo -Ox"
+ lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
+ lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
+ LINKBIN="${CEBINROOT}/link.exe"
+ AC_SUBST(CELIB_DIR)
+ else
+ RC="rc"
+ lflags="-nologo"
+ LINKBIN="link"
+ CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ fi
+ fi
+
+ if test "$GCC" = "yes"; then
+ # mingw gcc mode
+ RC="windres"
+ CFLAGS_DEBUG="-g"
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ SHLIB_LD="$CC -shared"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
+ LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
+ else
+ SHLIB_LD="${LINKBIN} -dll ${lflags}"
+ # link -lib only works when -lib is the first arg
+ STLIB_LD="${LINKBIN} -lib ${lflags}"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
+ PATHTYPE=-w
+ # For information on what debugtype is most useful, see:
+ # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
+ # This essentially turns it all on.
+ LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
+ LDFLAGS_OPTIMIZE="-release"
+ if test "$doWince" != "no" ; then
+ LDFLAGS_CONSOLE="-link ${lflags}"
+ LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
+ else
+ LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
+ LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
+ fi
+ fi
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dll"
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+ TCL_LIB_VERSIONS_OK=nodots
+ # Bogus to avoid getting this turned off
+ DL_OBJS="tclLoadNone.obj"
+ ;;
+ AIX-*)
+ if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
+ # AIX requires the _r compiler when gcc isn't being used
+ if test "${CC}" != "cc_r" ; then
+ CC=${CC}_r
+ fi
+ AC_MSG_RESULT([Using $CC for compiling with threads])
+ fi
+ LIBS="$LIBS -lc"
+ SHLIB_CFLAGS=""
+ SHLIB_SUFFIX=".so"
+ SHLIB_LD_LIBS='${LIBS}'
+
+ DL_OBJS="tclLoadDl.o"
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+ #LIBOBJS="$LIBOBJS tclLoadAix.o"
+ AC_LIBOBJ([tclLoadAix])
+ DL_LIBS="-lld"
+ fi
+
+ # Check to enable 64-bit flags for compiler/linker on AIX 4+
+ if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
+ if test "$GCC" = "yes" ; then
+ AC_MSG_WARN("64bit mode not supported with GCC on $system")
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -q64"
+ LDFLAGS="$LDFLAGS -q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+ fi
+ fi
+
+ if test "`uname -m`" = "ia64" ; then
+ # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ # AIX-5 has dl* in libc.so
+ DL_LIBS=""
+ if test "$GCC" = "yes" ; then
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+ fi
+ else
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ else
+ SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
+ fi
+ SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+ DL_LIBS="-ldl"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ TCL_NEEDS_EXP_FILE=1
+ TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
+ fi
+
+ # On AIX <=v4 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.
+ #
+ # 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.
+
+ AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
+ if test $libbsd = yes; then
+ MATH_LIBS="$MATH_LIBS -lbsd"
+ AC_DEFINE(USE_DELTA_FOR_TZ)
+ fi
+ ;;
+ BeOS*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="${CC} -nostart"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ ;;
+ 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"
+ 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="$LDFLAGS -export-dynamic"
+ LD_SEARCH_FLAGS=""
+ ;;
+ dgux*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LD_SEARCH_FLAGS=""
+ ;;
+ HP-UX-*.11.*)
+ # Use updated header definitions where possible
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
+
+ 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='${LIBS}'
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ fi
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ fi
+
+ # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+ #CFLAGS="$CFLAGS +DAportable"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ hpux_arch=`${CC} -dumpmachine`
+ case $hpux_arch in
+ hppa64*)
+ # 64-bit gcc in use. Fix flags for GNU ld.
+ do64bit_ok=yes
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ ;;
+ *)
+ AC_MSG_WARN("64bit mode not supported with GCC on $system")
+ ;;
+ esac
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS +DD64"
+ LDFLAGS="$LDFLAGS +DD64"
+ fi
+ fi
+ ;;
+ HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
+ 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="$LDFLAGS -Wl,-E"
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ fi
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ ;;
+ 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="$LDFLAGS -Wl,-D,08000000"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ ;;
+ IRIX-5.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ ;;
+ IRIX-6.*|IRIX64-6.5*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mabi=n32"
+ LDFLAGS="$LDFLAGS -mabi=n32"
+ else
+ case $system in
+ IRIX-6.3)
+ # Use to build 6.2 compatible binaries on 6.3.
+ CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -n32"
+ ;;
+ esac
+ LDFLAGS="$LDFLAGS -n32"
+ fi
+ ;;
+ IRIX64-6.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+
+ # Check to enable 64-bit flags for compiler/linker
+
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ AC_MSG_WARN([64bit mode not supported by gcc])
+ else
+ do64bit_ok=yes
+ SHLIB_LD="ld -64 -shared -rdata_shared"
+ CFLAGS="$CFLAGS -64"
+ LDFLAGS="$LDFLAGS -64"
+ fi
+ fi
+ ;;
+ Linux*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ # 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="$LDFLAGS -Wl,--export-dynamic"
+ 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"
+ LD_SEARCH_FLAGS=""])
+ fi
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$CFLAGS -mieee"
+ fi
+
+ # The combo of gcc + glibc has a bug related
+ # to inlining of functions like strtod(). The
+ # -fno-builtin flag should address this problem
+ # but it does not work. The -fno-inline flag
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+ if test x"${USE_COMPAT}" != x ; then
+ CFLAGS="$CFLAGS -fno-inline"
+ fi
+
+ ;;
+ GNU*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ if test "$have_dl" = yes; then
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ LD_SEARCH_FLAGS=""
+ else
+ AC_CHECK_HEADER(dld.h, [
+ SHLIB_LD="ld -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldld"
+ LD_SEARCH_FLAGS=""])
+ fi
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$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"
+ 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="$LDFLAGS -Wl,-Bexport"
+ LD_SEARCH_FLAGS=""
+ ;;
+ NetBSD-*|FreeBSD-[[1-2]].*)
+ # Not available on all versions: check for include file.
+ AC_CHECK_HEADER(dlfcn.h, [
+ # NetBSD/SPARC needs -fPIC, -fpic will not do.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ AC_MSG_CHECKING([for ELF])
+ AC_EGREP_CPP(yes, [
+#ifdef __ELF__
+ yes
+#endif
+ ],
+ AC_MSG_RESULT([yes])
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so',
+ AC_MSG_RESULT([no])
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.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=""
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ ])
+
+ # FreeBSD doesn't handle version numbers with dots.
+
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ OpenBSD-*)
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ AC_MSG_CHECKING(for ELF)
+ AC_EGREP_CPP(yes, [
+#ifdef __ELF__
+ yes
+#endif
+ ],
+ [AC_MSG_RESULT(yes)
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'],
+ [AC_MSG_RESULT(no)
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0']
+ )
+
+ # OpenBSD doesn't do version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ FreeBSD-*)
+ # FreeBSD 3.* and greater have ELF.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -export-dynamic"
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ case $system in
+ FreeBSD-3.*)
+ # FreeBSD-3 doesn't handle version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ esac
+ ;;
+ Darwin-*)
+ SHLIB_CFLAGS="-fno-common"
+ SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dylib"
+ DL_OBJS="tclLoadDyld.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first"
+ LD_SEARCH_FLAGS=""
+ LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+ CFLAGS_OPTIMIZE="-Os"
+ ;;
+ NEXTSTEP-*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="cc -nostdlib -r"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadNext.o"
+ DL_LIBS=""
+ 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=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-1.*)
+ # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
+ SHLIB_CFLAGS="-fPIC"
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD="ld -shared"
+ else
+ SHLIB_LD="ld -non_shared"
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-V*)
+ # Digital OSF/1
+ SHLIB_CFLAGS=""
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD='ld -shared -expect_unresolved "*"'
+ else
+ SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mieee"
+ else
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
+ fi
+ # see pthread_intro(3) for pthread support on osf1, k.furukawa
+ if test "${TCL_THREADS}" = "1" ; then
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+ CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+ LIBS=`echo $LIBS | sed s/-lpthreads//`
+ if test "$GCC" = "yes" ; then
+ LIBS="$LIBS -lpthread -lmach -lexc"
+ else
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ fi
+
+ ;;
+ QNX-6*)
+ # QNX RTP
+ # This may work for all QNX, but it was only reported for v6.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ # dlopen is in -lc on QNX
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ 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="$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.
+ if test "$GCC" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+ fi
+ SHLIB_LD="ld -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ 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"
+ LD_SEARCH_FLAGS=""
+ ;;
+ SunOS-4*)
+ SHLIB_CFLAGS="-PIC"
+ SHLIB_LD="ld"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ 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}.so.1.0'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ SunOS-5.[[0-6]]*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT)
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # 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 "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ fi
+ ;;
+ SunOS-5*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT)
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ arch=`isainfo`
+ if test "$arch" = "sparcv9 sparc" ; then
+ if test "$GCC" = "yes" ; then
+ if test "`gcc -dumpversion` | awk -F. '{print $1}'" -lt "3" ; then
+ AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -m64 -mcpu=v9"
+ LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+ SHLIB_CFLAGS="-fPIC"
+ fi
+ else
+ do64bit_ok=yes
+ if test "$do64bitVIS" = "yes" ; then
+ CFLAGS="$CFLAGS -xarch=v9a"
+ LDFLAGS="$LDFLAGS -xarch=v9a"
+ else
+ CFLAGS="$CFLAGS -xarch=v9"
+ LDFLAGS="$LDFLAGS -xarch=v9"
+ fi
+ 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 "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ if test "$do64bit" = "yes" ; then
+ # We need to specify -static-libgcc or we need to
+ # add the path to the sparv9 libgcc.
+ # JH: static-libgcc is necessary for core Tcl, but may
+ # not be necessary for extensions.
+ SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
+ # for finding sparcv9 libgcc, get the regular libgcc
+ # path, remove so name and append 'sparcv9'
+ #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
+ #LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS},-R,$v9gcclibdir"
+ fi
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ 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="$LDFLAGS -Wl,-D,08000000"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ if test "$GCC" != "yes" ; then
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
+ fi
+ ;;
+ 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],
+ [LDFLAGS=$hold_ldflags found=no])
+ AC_MSG_RESULT([$found])
+ LD_SEARCH_FLAGS=""
+ ;;
+ esac
+
+ if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
+ AC_MSG_WARN("64bit support being disabled -- don\'t know magic for 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="$LDFLAGS_ORIG"
+ 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 "$GCC" = "yes" ; then
+ case $system in
+ AIX-*)
+ ;;
+ BSD/OS*)
+ ;;
+ IRIX*)
+ ;;
+ NetBSD-*|FreeBSD-*)
+ ;;
+ Darwin-*)
+ ;;
+ RISCos-*)
+ ;;
+ SCO_SV-3.2*)
+ ;;
+ ULTRIX-4.*)
+ ;;
+ windows)
+ ;;
+ *)
+ SHLIB_CFLAGS="-fPIC"
+ ;;
+ esac
+ fi
+ fi
+
+ if test "$SHARED_LIB_SUFFIX" = "" ; then
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
+ fi
+ if test "$UNSHARED_LIB_SUFFIX" = "" ; then
+ UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ fi
+
+ AC_SUBST(DL_LIBS)
+ AC_SUBST(CFLAGS_DEBUG)
+ AC_SUBST(CFLAGS_OPTIMIZE)
+ AC_SUBST(CFLAGS_WARNING)
+
+ AC_SUBST(STLIB_LD)
+ AC_SUBST(SHLIB_LD)
+ AC_SUBST(SHLIB_CFLAGS)
+ AC_SUBST(SHLIB_LD_LIBS)
+ AC_SUBST(LDFLAGS_DEBUG)
+ AC_SUBST(LDFLAGS_OPTIMIZE)
+ AC_SUBST(LD_LIBRARY_PATH_VAR)
+
+ # These must be called after we do the basic CFLAGS checks and
+ # verify any possible 64-bit or similar switches are necessary
+ TEA_TCL_EARLY_FLAGS
+ TEA_TCL_64BIT_FLAGS
+])
+
+#--------------------------------------------------------------------
+# TEA_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,
+# and some build environments have stdin not pointing at a
+# pseudo-terminal (usually /dev/null instead.)
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines only one of the following vars:
+# HAVE_SYS_MODEM_H
+# USE_TERMIOS
+# USE_TERMIO
+# USE_SGTTY
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_SERIAL_PORT, [
+ AC_CHECK_HEADERS(sys/modem.h)
+ AC_MSG_CHECKING([termios vs. termio vs. sgtty])
+ AC_CACHE_VAL(tcl_cv_api_serial, [
+ AC_TRY_RUN([
+#include <termios.h>
+
+int main() {
+ struct termios t;
+ if (tcgetattr(0, &t) == 0) {
+ cfsetospeed(&t, 0);
+ t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ if test $tcl_cv_api_serial = no ; then
+ AC_TRY_RUN([
+#include <termio.h>
+
+int main() {
+ struct termio t;
+ if (ioctl(0, TCGETA, &t) == 0) {
+ t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no ; then
+ AC_TRY_RUN([
+#include <sgtty.h>
+
+int main() {
+ struct sgttyb t;
+ if (ioctl(0, TIOCGETP, &t) == 0) {
+ t.sg_ospeed = 0;
+ t.sg_flags |= ODDP | EVENP | RAW;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
+ fi
+ if test $tcl_cv_api_serial = no ; then
+ AC_TRY_RUN([
+#include <termios.h>
+#include <errno.h>
+
+int main() {
+ struct termios t;
+ if (tcgetattr(0, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ cfsetospeed(&t, 0);
+ t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no; then
+ AC_TRY_RUN([
+#include <termio.h>
+#include <errno.h>
+
+int main() {
+ struct termio t;
+ if (ioctl(0, TCGETA, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+ }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no; then
+ AC_TRY_RUN([
+#include <sgtty.h>
+#include <errno.h>
+
+int main() {
+ struct sgttyb t;
+ if (ioctl(0, TIOCGETP, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ t.sg_ospeed = 0;
+ t.sg_flags |= ODDP | EVENP | RAW;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
+ fi])
+ case $tcl_cv_api_serial in
+ termios) AC_DEFINE(USE_TERMIOS);;
+ termio) AC_DEFINE(USE_TERMIO);;
+ sgtty) AC_DEFINE(USE_SGTTY);;
+ esac
+ AC_MSG_RESULT([$tcl_cv_api_serial])
+])
+
+#--------------------------------------------------------------------
+# TEA_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
+# HAVE_LIMITS_H or NO_LIMITS_H
+# NO_STDLIB_H
+# NO_STRING_H
+# NO_SYS_WAIT_H
+# NO_DLFCN_H
+# HAVE_SYS_PARAM_H
+#
+# HAVE_STRING_H ?
+#
+# tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and
+# CHECK on limits.h
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_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(HAVE_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(sys/param.h)
+
+])
+
+#--------------------------------------------------------------------
+# TEA_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.
+#
+# This should be called after TEA_CONFIG_CFLAGS as setting the
+# LIBS line can confuse some configure macro magic.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Sets the following vars:
+# XINCLUDES
+# XLIBSW
+# LIBS (appends to)
+# TEA_WINDOWINGSYSTEM
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_X, [
+ if test "${TEA_PLATFORM}" = "unix" ; then
+ case ${TK_DEFS} in
+ *MAC_OSX_TK*)
+ AC_DEFINE(MAC_OSX_TK)
+ TEA_WINDOWINGSYSTEM="aqua"
+ ;;
+ *)
+ TEA_PATH_UNIX_X
+ TEA_WINDOWINGSYSTEM="x11"
+ ;;
+ esac
+ elif test "${TEA_PLATFORM}" = "windows" ; then
+ TEA_WINDOWINGSYSTEM="windows"
+ fi
+])
+
+AC_DEFUN(TEA_PATH_UNIX_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([could not 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([could not find any! Using -lX11.])
+ XLIBSW=-lX11
+ fi
+ if test x"${XLIBSW}" != x ; then
+ PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_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(TEA_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
+])
+
+#--------------------------------------------------------------------
+# TEA_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(TEA_TIME_HANDLER, [
+ AC_CHECK_HEADERS(sys/time.h)
+ AC_HEADER_TIME
+ AC_STRUCT_TIMEZONE
+
+ AC_CHECK_FUNCS(gmtime_r localtime_r)
+
+ AC_MSG_CHECKING([tm_tzadj in struct tm])
+ AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
+ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
+ tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
+ AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
+ if test $tcl_cv_member_tm_tzadj = yes ; then
+ AC_DEFINE(HAVE_TM_TZADJ)
+ fi
+
+ AC_MSG_CHECKING([tm_gmtoff in struct tm])
+ AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
+ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
+ tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
+ AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
+ if test $tcl_cv_member_tm_gmtoff = yes ; then
+ AC_DEFINE(HAVE_TM_GMTOFF)
+ fi
+
+ #
+ # Its important to include time.h in this check, as some systems
+ # (like convex) have timezone functions, etc.
+ #
+ AC_MSG_CHECKING([long timezone variable])
+ AC_CACHE_VAL(tcl_cv_var_timezone,
+ AC_TRY_COMPILE([#include <time.h>],
+ [extern long timezone;
+ timezone += 1;
+ exit (0);],
+ tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
+ AC_MSG_RESULT([$tcl_cv_timezone_long])
+ if test $tcl_cv_timezone_long = yes ; then
+ AC_DEFINE(HAVE_TIMEZONE_VAR)
+ else
+ #
+ # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+ #
+ AC_MSG_CHECKING([time_t timezone variable])
+ AC_CACHE_VAL(tcl_cv_timezone_time,
+ AC_TRY_COMPILE([#include <time.h>],
+ [extern time_t timezone;
+ timezone += 1;
+ exit (0);],
+ tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
+ AC_MSG_RESULT([$tcl_cv_timezone_time])
+ if test $tcl_cv_timezone_time = yes ; then
+ AC_DEFINE(HAVE_TIMEZONE_VAR)
+ fi
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_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.
+# Also, on Compaq's Tru64 Unix 5.0,
+# strtod(" ") returns 0.0 instead of a failure to convert.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Might defines some of the following vars:
+# strtod (=fixstrtod)
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_BUGGY_STRTOD, [
+ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
+ if test "$tcl_strtod" = 1; then
+ AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
+ AC_TRY_RUN([
+ extern double strtod();
+ int main()
+ {
+ char *string = "NaN", *spaceString = " ";
+ char *term;
+ double value;
+ value = strtod(string, &term);
+ if ((term != string) && (term[-1] == 0)) {
+ exit(1);
+ }
+ value = strtod(spaceString, &term);
+ if (term == (spaceString+1)) {
+ exit(1);
+ }
+ exit(0);
+ }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
+ if test "$tcl_ok" = 1; then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([buggy])
+ #LIBOBJS="$LIBOBJS fixstrtod.o"
+ AC_LIBOBJ([fixstrtod])
+ USE_COMPAT=1
+ AC_DEFINE(strtod, fixstrtod)
+ fi
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_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(TEA_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"])
+
+ #--------------------------------------------------------------------
+ # 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_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
+ 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, gethostbyname,
+ [LIBS="$LIBS -lnsl"])])
+
+ # Don't perform the eval of the libraries here because DL_LIBS
+ # won't be set until we call TEA_CONFIG_CFLAGS
+
+ TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
+ AC_SUBST(TCL_LIBS)
+ AC_SUBST(MATH_LIBS)
+])
+
+#--------------------------------------------------------------------
+# TEA_TCL_EARLY_FLAGS
+#
+# Check for what flags are needed to be passed so the correct OS
+# features are available.
+#
+# Arguments:
+# None
+#
+# Results:
+#
+# Might define the following vars:
+# _ISOC99_SOURCE
+# _LARGEFILE64_SOURCE
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_TCL_EARLY_FLAG,[
+ AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
+ AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
+ AC_TRY_COMPILE([[#define ]$1[ 1
+]$2], $3,
+ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
+ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
+ if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
+ AC_DEFINE($1)
+ tcl_flags="$tcl_flags $1"
+ fi
+])
+
+AC_DEFUN(TEA_TCL_EARLY_FLAGS,[
+ AC_MSG_CHECKING([for required early compiler flags])
+ tcl_flags=""
+ TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
+ [char *p = (char *)strtoll; char *q = (char *)strtoull;])
+ TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
+ [struct stat64 buf; int i = stat64("/", &buf);])
+ if test "x${tcl_flags}" = "x" ; then
+ AC_MSG_RESULT([none])
+ else
+ AC_MSG_RESULT([${tcl_flags}])
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_TCL_64BIT_FLAGS
+#
+# Check for what is defined in the way of 64-bit features.
+#
+# Arguments:
+# None
+#
+# Results:
+#
+# Might define the following vars:
+# TCL_WIDE_INT_IS_LONG
+# TCL_WIDE_INT_TYPE
+# HAVE_STRUCT_DIRENT64
+# HAVE_STRUCT_STAT64
+# HAVE_TYPE_OFF64_T
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
+ AC_MSG_CHECKING([for 64-bit integer type])
+ AC_CACHE_VAL(tcl_cv_type_64bit,[
+ tcl_cv_type_64bit=none
+ # See if the compiler knows natively about __int64
+ AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
+ tcl_type_64bit=__int64, tcl_type_64bit="long long")
+ # See if we should use long anyway Note that we substitute in the
+ # type that is our current guess for a 64-bit type inside this check
+ # program, so it should be modified only carefully...
+ AC_TRY_COMPILE(,[switch (0) {
+ case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
+ }],tcl_cv_type_64bit=${tcl_type_64bit})])
+ if test "${tcl_cv_type_64bit}" = none ; then
+ AC_DEFINE(TCL_WIDE_INT_IS_LONG)
+ AC_MSG_RESULT([using long])
+ elif test "${tcl_cv_type_64bit}" = "__int64" \
+ -a "${TEA_PLATFORM}" = "windows" ; then
+ # We actually want to use the default tcl.h checks in this
+ # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
+ AC_MSG_RESULT([using Tcl header defaults])
+ else
+ AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
+ AC_MSG_RESULT([${tcl_cv_type_64bit}])
+
+ # Now check for auxiliary declarations
+ AC_MSG_CHECKING([for struct dirent64])
+ AC_CACHE_VAL(tcl_cv_struct_dirent64,[
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/dirent.h>],[struct dirent64 p;],
+ tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
+ if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_DIRENT64)
+ fi
+ AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
+
+ AC_MSG_CHECKING([for struct stat64])
+ AC_CACHE_VAL(tcl_cv_struct_stat64,[
+ AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
+],
+ tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
+ if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_STAT64)
+ fi
+ AC_MSG_RESULT([${tcl_cv_struct_stat64}])
+
+ AC_MSG_CHECKING([for off64_t])
+ AC_CACHE_VAL(tcl_cv_type_off64_t,[
+ AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
+],
+ tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
+ if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
+ AC_DEFINE(HAVE_TYPE_OFF64_T)
+ fi
+ AC_MSG_RESULT([${tcl_cv_type_off64_t}])
+ fi
+])
+
+##
+## Here ends the standard Tcl configuration bits and starts the
+## TEA specific functions
+##
+
+#------------------------------------------------------------------------
+# TEA_INIT --
+#
+# Init various Tcl Extension Architecture (TEA) variables.
+# This should be the first called TEA_* macro.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines and substs the following vars:
+# CYGPATH
+# EXEEXT
+# Defines only:
+# TEA_INITED
+# TEA_PLATFORM (windows or unix)
+#
+# "cygpath" is used on windows to generate native path names for include
+# files. These variables should only be used with the compiler and linker
+# since they generate native path names.
+#
+# EXEEXT
+# Select the executable extension based on the host type. This
+# is a lightweight replacement for AC_EXEEXT that doesn't require
+# a compiler.
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_INIT, [
+ # TEA extensions pass this us the version of TEA they think they
+ # are compatible with.
+ TEA_VERSION="3.2"
+
+ AC_MSG_CHECKING([for correct TEA configuration])
+ if test x"${PACKAGE_NAME}" = x ; then
+ AC_MSG_ERROR([
+The PACKAGE_NAME variable must be defined by your TEA configure.in])
+ fi
+ if test x"$1" = x ; then
+ AC_MSG_ERROR([
+TEA version not specified.])
+ elif test "$1" != "${TEA_VERSION}" ; then
+ AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"])
+ else
+ AC_MSG_RESULT([ok (TEA ${TEA_VERSION})])
+ fi
+ case "`uname -s`" in
+ *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
+ AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+ EXEEXT=".exe"
+ TEA_PLATFORM="windows"
+ ;;
+ *)
+ CYGPATH=echo
+ EXEEXT=""
+ TEA_PLATFORM="unix"
+ ;;
+ esac
+
+ # Check if exec_prefix is set. If not use fall back to prefix.
+ # Note when adjusted, so that TEA_PREFIX can correct for this.
+ # This is needed for recursive configures, since autoconf propagates
+ # $prefix, but not $exec_prefix (doh!).
+ if test x$exec_prefix = xNONE ; then
+ exec_prefix_default=yes
+ exec_prefix=$prefix
+ fi
+
+ AC_SUBST(EXEEXT)
+ AC_SUBST(CYGPATH)
+
+ # This package name must be replaced statically for AC_SUBST to work
+ AC_SUBST(PKG_LIB_FILE)
+ # Substitute STUB_LIB_FILE in case package creates a stub library too.
+ AC_SUBST(PKG_STUB_LIB_FILE)
+
+ # We AC_SUBST these here to ensure they are subst'ed,
+ # in case the user doesn't call TEA_ADD_...
+ AC_SUBST(PKG_STUB_SOURCES)
+ AC_SUBST(PKG_STUB_OBJECTS)
+ AC_SUBST(PKG_TCL_SOURCES)
+ AC_SUBST(PKG_HEADERS)
+ AC_SUBST(PKG_INCLUDES)
+ AC_SUBST(PKG_LIBS)
+ AC_SUBST(PKG_CFLAGS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_SOURCES --
+#
+# Specify one or more source files. Users should check for
+# the right platform before adding to their list.
+# It is not important to specify the directory, as long as it is
+# in the generic, win or unix subdirectory of $(srcdir).
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_SOURCES
+# PKG_OBJECTS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_SOURCES, [
+ vars="$@"
+ for i in $vars; do
+ case $i in
+ [\$]*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ AC_MSG_ERROR([could not find source file '$i'])
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+ AC_SUBST(PKG_SOURCES)
+ AC_SUBST(PKG_OBJECTS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_STUB_SOURCES --
+#
+# Specify one or more source files. Users should check for
+# the right platform before adding to their list.
+# It is not important to specify the directory, as long as it is
+# in the generic, win or unix subdirectory of $(srcdir).
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_STUB_SOURCES
+# PKG_STUB_OBJECTS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_STUB_SOURCES, [
+ vars="$@"
+ for i in $vars; do
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ AC_MSG_ERROR([could not find stub source file '$i'])
+ fi
+ PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
+ fi
+ PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
+ done
+ AC_SUBST(PKG_STUB_SOURCES)
+ AC_SUBST(PKG_STUB_OBJECTS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_TCL_SOURCES --
+#
+# Specify one or more Tcl source files. These should be platform
+# independent runtime files.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_TCL_SOURCES
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_TCL_SOURCES, [
+ vars="$@"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i'])
+ fi
+ PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
+ done
+ AC_SUBST(PKG_TCL_SOURCES)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_HEADERS --
+#
+# Specify one or more source headers. Users should check for
+# the right platform before adding to their list.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_HEADERS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_HEADERS, [
+ vars="$@"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ AC_MSG_ERROR([could not find header file '${srcdir}/$i'])
+ fi
+ PKG_HEADERS="$PKG_HEADERS $i"
+ done
+ AC_SUBST(PKG_HEADERS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_INCLUDES --
+#
+# Specify one or more include dirs. Users should check for
+# the right platform before adding to their list.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_INCLUDES
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_INCLUDES, [
+ vars="$@"
+ for i in $vars; do
+ PKG_INCLUDES="$PKG_INCLUDES $i"
+ done
+ AC_SUBST(PKG_INCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_LIBS --
+#
+# Specify one or more libraries. Users should check for
+# the right platform before adding to their list. For Windows,
+# libraries provided in "foo.lib" format will be converted to
+# "-lfoo" when using GCC (mingw).
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_LIBS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_LIBS, [
+ vars="$@"
+ for i in $vars; do
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
+ # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
+ i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'`
+ fi
+ PKG_LIBS="$PKG_LIBS $i"
+ done
+ AC_SUBST(PKG_LIBS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_CFLAGS --
+#
+# Specify one or more CFLAGS. Users should check for
+# the right platform before adding to their list.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_CFLAGS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_CFLAGS, [
+ PKG_CFLAGS="$PKG_CFLAGS $@"
+ AC_SUBST(PKG_CFLAGS)
+])
+
+#------------------------------------------------------------------------
+# TEA_PREFIX --
+#
+# Handle the --prefix=... option by defaulting to what Tcl gave
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# If --prefix or --exec-prefix was not specified, $prefix and
+# $exec_prefix will be set to the values given to Tcl when it was
+# configured.
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_PREFIX, [
+ if test "${prefix}" = "NONE"; then
+ prefix_default=yes
+ if test x"${TCL_PREFIX}" != x; then
+ AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
+ prefix=${TCL_PREFIX}
+ else
+ AC_MSG_NOTICE([--prefix defaulting to /usr/local])
+ prefix=/usr/local
+ fi
+ fi
+ if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
+ -o x"${exec_prefix_default}" = x"yes" ; then
+ if test x"${TCL_EXEC_PREFIX}" != x; then
+ AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
+ exec_prefix=${TCL_EXEC_PREFIX}
+ else
+ AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}])
+ exec_prefix=$prefix
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_SETUP_COMPILER_CC --
+#
+# Do compiler checks the way we want. This is just a replacement
+# for AC_PROG_CC in TEA configure.in files to make them cleaner.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Sets up CC var and other standard bits we need to make executables.
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_SETUP_COMPILER_CC, [
+ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
+ # in this macro, they need to go into TEA_SETUP_COMPILER instead.
+
+ # If the user did not set CFLAGS, set it now to keep
+ # the AC_PROG_CC macro from adding "-g -O2".
+ if test "${CFLAGS+set}" != "set" ; then
+ CFLAGS=""
+ fi
+
+ AC_PROG_CC
+ AC_PROG_CPP
+
+ AC_PROG_INSTALL
+
+ #--------------------------------------------------------------------
+ # Checks to see if the make program sets the $MAKE variable.
+ #--------------------------------------------------------------------
+
+ AC_PROG_MAKE_SET
+
+ #--------------------------------------------------------------------
+ # Find ranlib
+ #--------------------------------------------------------------------
+
+ AC_PROG_RANLIB
+
+ #--------------------------------------------------------------------
+ # Determines the correct binary file extension (.o, .obj, .exe etc.)
+ #--------------------------------------------------------------------
+
+ AC_OBJEXT
+ AC_EXEEXT
+])
+
+#------------------------------------------------------------------------
+# TEA_SETUP_COMPILER --
+#
+# Do compiler checks that use the compiler. This must go after
+# TEA_SETUP_COMPILER_CC, which does the actual compiler check.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Sets up CC var and other standard bits we need to make executables.
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_SETUP_COMPILER, [
+ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
+ AC_REQUIRE([TEA_SETUP_COMPILER_CC])
+
+ #------------------------------------------------------------------------
+ # If we're using GCC, see if the compiler understands -pipe. If so, use it.
+ # It makes compiling go faster. (This is only a performance feature.)
+ #------------------------------------------------------------------------
+
+ if test -z "$no_pipe" -a -n "$GCC"; then
+ AC_MSG_CHECKING([if the compiler understands -pipe])
+ OLDCC="$CC"
+ CC="$CC -pipe"
+ AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
+ AC_MSG_RESULT([no]))
+ fi
+
+ #--------------------------------------------------------------------
+ # Common compiler flag setup
+ #--------------------------------------------------------------------
+
+ AC_C_BIGENDIAN
+ if test "${TEA_PLATFORM}" = "unix" ; then
+ TEA_TCL_LINK_LIBS
+ TEA_MISSING_POSIX_HEADERS
+ # Let the user call this, because if it triggers, they will
+ # need a compat/strtod.c that is correct. Users can also
+ # use Tcl_GetDouble(FromObj) instead.
+ #TEA_BUGGY_STRTOD
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_MAKE_LIB --
+#
+# Generate a line that can be used to build a shared/unshared library
+# in a platform independent manner.
+#
+# Arguments:
+# none
+#
+# Requires:
+#
+# Results:
+#
+# Defines the following vars:
+# CFLAGS - Done late here to note disturb other AC macros
+# MAKE_LIB - Command to execute to build the Tcl library;
+# differs depending on whether or not Tcl is being
+# compiled as a shared library.
+# MAKE_SHARED_LIB Makefile rule for building a shared library
+# MAKE_STATIC_LIB Makefile rule for building a static library
+# MAKE_STUB_LIB Makefile rule for building a stub library
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_MAKE_LIB, [
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
+ MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)"
+ MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
+ else
+ MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
+ MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
+ fi
+
+ if test "${SHARED_BUILD}" = "1" ; then
+ MAKE_LIB="${MAKE_SHARED_LIB} "
+ else
+ MAKE_LIB="${MAKE_STATIC_LIB} "
+ fi
+
+ #--------------------------------------------------------------------
+ # Shared libraries and static libraries have different names.
+ # Use the double eval to make sure any variables in the suffix is
+ # substituted. (@@@ Might not be necessary anymore)
+ #--------------------------------------------------------------------
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ if test "${SHARED_BUILD}" = "1" ; then
+ # We force the unresolved linking of symbols that are really in
+ # the private libraries of Tcl and Tk.
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+ fi
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+ else
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+ fi
+ # Some packages build there own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ # These aren't needed on Windows (either MSVC or gcc)
+ RANLIB=:
+ RANLIB_STUB=:
+ else
+ RANLIB_STUB="${RANLIB}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
+ fi
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+ RANLIB=:
+ else
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+ fi
+ # Some packages build there own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ fi
+
+ # These are escaped so that only CFLAGS is picked up at configure time.
+ # The other values will be substituted at make time.
+ CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
+ fi
+
+ AC_SUBST(MAKE_LIB)
+ AC_SUBST(MAKE_SHARED_LIB)
+ AC_SUBST(MAKE_STATIC_LIB)
+ AC_SUBST(MAKE_STUB_LIB)
+ AC_SUBST(RANLIB_STUB)
+])
+
+#------------------------------------------------------------------------
+# TEA_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:
+# TEA_INIT and TEA_PREFIX must be called first.
+#
+# Results:
+#
+# Defines the following vars:
+# ${basename}_LIB_NAME The computed library name.
+# ${basename}_LIB_SPEC The computed linker flags.
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_LIB_SPEC, [
+ AC_MSG_CHECKING([for $1 library])
+
+ # Look in exec-prefix for the library (defined by TEA_PREFIX).
+
+ tea_lib_name_dir="${exec_prefix}/lib"
+
+ # Or in a user-specified location.
+
+ if test x"$2" != x ; then
+ tea_extra_lib_dir=$2
+ else
+ tea_extra_lib_dir=NONE
+ fi
+
+ for i in \
+ `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
+ `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
+ `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
+ `ls -dr ${tea_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
+ tea_lib_name_dir=`dirname $i`
+ $1_LIB_NAME=`basename $i`
+ $1_LIB_PATH_NAME=$i
+ break
+ fi
+ done
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
+ else
+ # Strip off the leading "lib" and trailing ".a" or ".so"
+
+ tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
+ $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
+ fi
+
+ if test "x${$1_LIB_NAME}" = x ; then
+ AC_MSG_ERROR([not found])
+ else
+ AC_MSG_RESULT([${$1_LIB_SPEC}])
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PRIVATE_TCL_HEADERS --
+#
+# Locate the private Tcl include files
+#
+# Arguments:
+#
+# Requires:
+# TCL_SRC_DIR Assumes that TEA_LOAD_TCLCONFIG has
+# already been called.
+#
+# Results:
+#
+# Substs the following vars:
+# TCL_TOP_DIR_NATIVE
+# TCL_GENERIC_DIR_NATIVE
+# TCL_UNIX_DIR_NATIVE
+# TCL_WIN_DIR_NATIVE
+# TCL_BMAP_DIR_NATIVE
+# TCL_TOOL_DIR_NATIVE
+# TCL_PLATFORM_DIR_NATIVE
+# TCL_BIN_DIR_NATIVE
+# TCL_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
+ AC_MSG_CHECKING([for Tcl private include files])
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ 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`\"
+ TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
+ TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
+ TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
+ TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
+ TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
+
+ TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+ else
+ TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
+ TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic'
+ TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix'
+ TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win'
+ TCL_BMAP_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/bitmaps'
+ TCL_TOOL_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/tools'
+ TCL_COMPAT_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/compat'
+ TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
+
+ # substitute these in "relaxed" so that TCL_INCLUDES still works
+ # without requiring the other vars to be defined in the Makefile
+ eval "TCL_INCLUDES=\"-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}\""
+ fi
+
+ AC_SUBST(TCL_TOP_DIR_NATIVE)
+ AC_SUBST(TCL_GENERIC_DIR_NATIVE)
+ AC_SUBST(TCL_UNIX_DIR_NATIVE)
+ AC_SUBST(TCL_WIN_DIR_NATIVE)
+ AC_SUBST(TCL_BMAP_DIR_NATIVE)
+ AC_SUBST(TCL_TOOL_DIR_NATIVE)
+ AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
+
+ AC_SUBST(TCL_INCLUDES)
+ AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
+])
+
+#------------------------------------------------------------------------
+# TEA_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(TEA_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})
+
+ AC_CACHE_VAL(ac_cv_c_tclh, [
+ # Use the value from --with-tclinclude, if it was given
+
+ 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.h])
+ fi
+ else
+ # Check order: pkg --prefix location, Tcl's --prefix location,
+ # directory of tclConfig.sh, and Tcl source directory.
+ # Looking in the source dir is not ideal, but OK.
+
+ eval "temp_includedir=${includedir}"
+ list="`ls -d ${temp_includedir} 2>/dev/null` \
+ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
+ `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
+ if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+ list="$list /usr/local/include /usr/include"
+ fi
+ for i in $list ; do
+ if test -f "$i/tcl.h" ; then
+ ac_cv_c_tclh=$i
+ break
+ fi
+ done
+ 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)
+])
+
+#------------------------------------------------------------------------
+# TEA_PRIVATE_TK_HEADERS --
+#
+# Locate the private Tk include files
+#
+# Arguments:
+#
+# Requires:
+# TK_SRC_DIR Assumes that TEA_LOAD_TKCONFIG has
+# already been called.
+#
+# Results:
+#
+# Substs the following vars:
+# TK_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [
+ AC_MSG_CHECKING([for Tk private include files])
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
+ 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`\"
+ TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
+ TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
+
+ TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
+ else
+ TK_TOP_DIR_NATIVE='${TK_SRC_DIR}'
+ TK_GENERIC_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/generic'
+ TK_UNIX_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/unix'
+ TK_WIN_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/win'
+ TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
+
+ # substitute these in "relaxed" so that TK_INCLUDES still works
+ # without requiring the other vars to be defined in the Makefile
+ eval "TK_INCLUDES=\"-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}\""
+ fi
+
+ AC_SUBST(TK_TOP_DIR_NATIVE)
+ AC_SUBST(TK_UNIX_DIR_NATIVE)
+ AC_SUBST(TK_WIN_DIR_NATIVE)
+ AC_SUBST(TK_GENERIC_DIR_NATIVE)
+ AC_SUBST(TK_XLIB_DIR_NATIVE)
+ AC_SUBST(TK_PLATFORM_DIR_NATIVE)
+
+ AC_SUBST(TK_INCLUDES)
+ AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
+])
+
+#------------------------------------------------------------------------
+# TEA_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(TEA_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})
+
+ AC_CACHE_VAL(ac_cv_c_tkh, [
+ # Use the value from --with-tkinclude, if it was given
+
+ 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.h])
+ fi
+ else
+ # Check order: pkg --prefix location, Tcl's --prefix location,
+ # directory of tclConfig.sh, and Tcl source directory.
+ # Looking in the source dir is not ideal, but OK.
+
+ eval "temp_includedir=${includedir}"
+ list="`ls -d ${temp_includedir} 2>/dev/null` \
+ `ls -d ${TK_PREFIX}/include 2>/dev/null` \
+ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
+ `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
+ if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+ list="$list /usr/local/include /usr/include"
+ fi
+ for i in $list ; do
+ if test -f "$i/tk.h" ; then
+ ac_cv_c_tkh=$i
+ break
+ fi
+ done
+ 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)
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # On Windows, we need the X compat headers
+ AC_MSG_CHECKING([for X11 header files])
+ if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
+ INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
+ TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
+ AC_SUBST(TK_XINCLUDES)
+ fi
+ AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}])
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_TCLSH
+# Locate a tclsh shell in the following directories:
+# ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin
+# ${exec_prefix}/bin ${prefix}/bin
+# ${PATH}
+#
+# Arguments
+# none
+#
+# Results
+# Subst's the following values:
+# TCLSH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PROG_TCLSH, [
+ # Allow the user to provide this setting in the env
+ if test "x${TCLSH_PROG}" = "x" ; then
+ AC_MSG_CHECKING([for tclsh])
+
+ AC_CACHE_VAL(ac_cv_path_tclsh, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ if test "${TEA_PLATFORM}" != "windows" -o \
+ \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
+ # Do not allow target tclsh in known cross-compile builds,
+ # as we need one we can run on this system
+ search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
+ fi
+ 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
+ fi
+ AC_SUBST(TCLSH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_WISH
+# Locate a wish shell in the following directories:
+# ${TK_BIN_DIR} ${TK_BIN_DIR}/../bin
+# ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin
+# ${exec_prefix}/bin ${prefix}/bin
+# ${PATH}
+#
+# Arguments
+# none
+#
+# Results
+# Subst's the following values:
+# WISH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PROG_WISH, [
+ # Allow the user to provide this setting in the env
+ if test "x${WISH_PROG}" = "x" ; then
+ AC_MSG_CHECKING([for wish])
+
+ AC_CACHE_VAL(ac_cv_path_wish, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ if test "${TEA_PLATFORM}" != "windows" -o \
+ \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
+ # Do not allow target wish in known cross-compile builds,
+ # as we need one we can run on this system
+ search_path="${TK_BIN_DIR} ${TK_BIN_DIR}/../bin ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
+ fi
+ 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
+ fi
+ AC_SUBST(WISH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_CONFIG --
+#
+# Locate the ${1}Config.sh file and perform a sanity check on
+# the ${1} compile flags. These are used by packages like
+# [incr Tk] that load *Config.sh files from more than Tcl and Tk.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-$1=...
+#
+# Defines the following vars:
+# $1_BIN_DIR Full path to the directory containing
+# the $1Config.sh file
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_CONFIG, [
+ #
+ # Ok, lets find the $1 configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-$1
+ #
+
+ if test x"${no_$1}" = x ; then
+ # we reset no_$1 in case something fails here
+ no_$1=true
+ AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
+ AC_MSG_CHECKING([for $1 configuration])
+ AC_CACHE_VAL(ac_cv_c_$1config,[
+
+ # First check to see if --with-$1 was specified.
+ if test x"${with_$1config}" != x ; then
+ case ${with_$1config} in
+ */$1Config.sh )
+ if test -f ${with_$1config}; then
+ AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself])
+ with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'`
+ fi;;
+ esac
+ if test -f "${with_$1config}/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
+ else
+ AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
+ fi
+ fi
+
+ # then check for a private $1 installation
+ if test x"${ac_cv_c_$1config}" = x ; then
+ for i in \
+ ../$1 \
+ `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ../../$1 \
+ `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ../../../$1 \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../$1 \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ; do
+ if test -f "$i/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd $i; pwd)`
+ break
+ fi
+ if test -f "$i/unix/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_$1config}" = x ; then
+ for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+
+ if test x"${ac_cv_c_$1config}" = x ; then
+ $1_BIN_DIR="# no $1 configs found"
+ AC_MSG_WARN("Cannot find $1 configuration definitions")
+ exit 0
+ else
+ no_$1=
+ $1_BIN_DIR=${ac_cv_c_$1config}
+ AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_CONFIG --
+#
+# Load the $1Config.sh file
+#
+# Arguments:
+#
+# Requires the following vars to be set:
+# $1_BIN_DIR
+#
+# Results:
+#
+# Subst the following vars:
+# $1_SRC_DIR
+# $1_LIB_FILE
+# $1_LIB_SPEC
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_LOAD_CONFIG, [
+ AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
+
+ if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
+ AC_MSG_RESULT([loading])
+ . ${$1_BIN_DIR}/$1Config.sh
+ else
+ AC_MSG_RESULT([file not found])
+ fi
+
+ #
+ # If the $1_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable $1_LIB_SPEC will be set to the value
+ # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
+ # instead of $1_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f ${$1_BIN_DIR}/Makefile ; then
+ AC_MSG_WARN([Found Makefile - using build library specs for $1])
+ $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
+ $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
+ $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
+ fi
+
+ AC_SUBST($1_VERSION)
+ AC_SUBST($1_BIN_DIR)
+ AC_SUBST($1_SRC_DIR)
+
+ AC_SUBST($1_LIB_FILE)
+ AC_SUBST($1_LIB_SPEC)
+
+ AC_SUBST($1_STUB_LIB_FILE)
+ AC_SUBST($1_STUB_LIB_SPEC)
+ AC_SUBST($1_STUB_LIB_PATH)
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_CELIB --
+#
+# Locate Keuchel's celib emulation layer for targeting Win/CE
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-celib=...
+#
+# Defines the following vars:
+# CELIB_DIR Full path to the directory containing
+# the include and platform lib files
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_CELIB, [
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-celib
+
+ if test x"${no_celib}" = x ; then
+ # we reset no_celib in case something fails here
+ no_celib=true
+ AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR], with_celibconfig=${withval})
+ AC_MSG_CHECKING([for Windows/CE celib directory])
+ AC_CACHE_VAL(ac_cv_c_celibconfig,[
+ # First check to see if --with-celibconfig was specified.
+ if test x"${with_celibconfig}" != x ; then
+ if test -d "${with_celibconfig}/inc" ; then
+ ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory])
+ fi
+ fi
+
+ # then check for a celib library
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ for i in \
+ ../celib-palm-3.0 \
+ ../celib \
+ ../../celib-palm-3.0 \
+ ../../celib \
+ `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../celib-palm-3.0 \
+ ${srcdir}/../celib \
+ `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \
+ ; do
+ if test -d "$i/inc" ; then
+ ac_cv_c_celibconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ AC_MSG_ERROR([Cannot find celib support library directory])
+ else
+ no_celib=
+ CELIB_DIR=${ac_cv_c_celibconfig}
+ AC_MSG_RESULT([found $CELIB_DIR])
+ TEA_PATH_NOSPACE(CELIB_DIR, ${ac_cv_c_celibconfig})
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_NOSPACE
+# Ensure that the given path has no spaces. This is necessary for
+# CC (and consitutuent vars that build it up) to work in the
+# tortured autoconf environment. Currently only for Windows use.
+#
+# Arguments
+# VAR - name of the variable to set
+# PATH - path to ensure no spaces in
+#
+# Results
+# Sets $VAR to short path of $PATH if it can be found.
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_NOSPACE], [
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+ AC_REQUIRE([TEA_PROG_TCLSH])
+
+ AC_MSG_CHECKING([short pathname for $1 ($2)])
+
+ shortpath=
+ case "$2" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [[file attributes {$2} -shortname]] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ AC_MSG_RESULT([not changed])
+ else
+ $1=$shortpath
+ AC_MSG_RESULT([${$1}])
+ fi
+ fi
+])
diff --git a/itcl/itcl/tests/all.tcl b/itcl/itcl/tests/all.tcl
index ddefa468dd7..3f36351e2f1 100644
--- a/itcl/itcl/tests/all.tcl
+++ b/itcl/itcl/tests/all.tcl
@@ -9,114 +9,9 @@
#
# RCS: @(#) $Id$
-package require tcltest
-namespace import -force ::tcltest::*
+package require tcltest 2.1
-# Look for the -exedir flag and find a suitable tclsh executable.
+tcltest::testsDirectory [file dir [info script]]
+tcltest::runAllTests
-if {(![info exists argv]) || ([llength $argv] < 1)} {
- set flagArray {}
-} else {
- set flagArray $argv
-}
-
-array set flag $flagArray
-if {[info exists flag(-exedir)]} {
- set shell [lindex \
- [glob -nocomplain \
- [file join $flag(-exedir) tclsh*.bin] \
- [file join $flag(-exedir) tclsh*]] 0]
-} else {
- set shell $::tcltest::tcltest
-}
-
-set ::tcltest::testSingleFile false
-
-# use [pwd] trick to expand relative file paths to absolute paths - MMc
-set cwd [pwd]
-cd [file dirname [info script]]
-set ::tcltest::testsDirectory [pwd]
-cd $cwd
-
-set logfile [file join $::tcltest::temporaryDirectory Log.txt]
-
-puts stdout "Using interp: $shell"
-puts stdout "Running tests in working dir: $::tcltest::testsDirectory"
-if {[llength $::tcltest::skip] > 0} {
- puts stdout "Skipping tests that match: $::tcltest::skip"
-}
-if {[llength $::tcltest::match] > 0} {
- puts stdout "Only running tests that match: $::tcltest::match"
-}
-
-if {[llength $::tcltest::skipFiles] > 0} {
- puts stdout "Skipping test files that match: $::tcltest::skipFiles"
-}
-if {[llength $::tcltest::matchFiles] > 0} {
- puts stdout "Only sourcing test files that match: $::tcltest::matchFiles"
-}
-
-set timeCmd {clock format [clock seconds]}
-puts stdout "Tests began at [eval $timeCmd]"
-
-# source each of the specified tests
-foreach file [lsort [::tcltest::getMatchingFiles]] {
- set tail [file tail $file]
- puts stdout $tail
-
- # Change to the tests directory so the value of the following
- # variable is set correctly when we spawn the child test processes
-
- cd $::tcltest::testsDirectory
- set cmd [concat [list | $shell $file] [split $argv] \
- [list -outfile $logfile]]
- if {[catch {
- set pipeFd [open $cmd "r"]
- while {[gets $pipeFd line] >= 0} {
- puts $::tcltest::outputChannel $line
- }
- close $pipeFd
- } msg]} {
- # Print results to ::tcltest::outputChannel.
- puts $::tcltest::outputChannel $msg
- }
-
- # Now concatenate the temporary log file to
- # ::tcltest::outputChannel
- if {[catch {
- set fd [open $logfile "r"]
- while {![eof $fd]} {
- gets $fd line
- if {![eof $fd]} {
- if {[regexp {^([^:]+):\tTotal\t([0-9]+)\tPassed\t([0-9]+)\tSkipped\t([0-9]+)\tFailed\t([0-9]+)} $line null testFile Total Passed Skipped Failed]} {
- foreach index [list "Total" "Passed" "Skipped" \
- "Failed"] {
- incr ::tcltest::numTests($index) [set $index]
- }
- incr ::tcltest::numTestFiles
- if {$Failed > 0} {
- lappend ::tcltest::failFiles $testFile
- }
- }
- puts $::tcltest::outputChannel $line
- }
- }
- close $fd
- } msg]} {
- puts $::tcltest::outputChannel $msg
- }
-}
-
-set numFailures [llength $::tcltest::failFiles]
-
-# cleanup
-puts stdout "\nTests ended at [eval $timeCmd]"
-::tcltest::cleanupTests 1
-
-if {$numFailures > 0} {
- return -code error -errorcode $numFailures \
- -errorinfo "Found $numFailures test file failures"
-} else {
- return
-}
-exit
+return
diff --git a/itcl/itcl/tests/basic.test b/itcl/itcl/tests/basic.test
index c60054644f6..ae5d83a0235 100644
--- a/itcl/itcl/tests/basic.test
+++ b/itcl/itcl/tests/basic.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Simple class definition
@@ -94,6 +94,33 @@ test basic-1.11 {find command supports object names starting with -} {
Counter -foo
itcl::find objects -class Counter -foo
} {-foo}
+test basic-1.12 {is command with class argument} {
+ itcl::is class Counter
+} {1}
+
+test basic-1.13 {is command with class argument (global namespace)} {
+ itcl::is class ::Counter
+} {1}
+
+test basic-1.14 {is command with class argument (wrapped in code command)} {
+ itcl::is class [itcl::code Counter]
+} {1}
+
+test basic-1.14 {is command with class argument (class does not exist)} {
+ itcl::is class Count
+} {0}
+
+test basic-1.15 {is command with object argument} {
+ itcl::is object -foo
+} {1}
+
+test basic-1.16 {is command with object argument (object does not exist)} {
+ itcl::is object xxx
+} {0}
+
+test basic-1.15 {is command with object argument (with code command)} {
+ itcl::is object [itcl::code -- -foo]
+} {1}
# ----------------------------------------------------------------------
# #auto names
@@ -186,7 +213,13 @@ test basic-4.4 {objects can be created from the new class} {
list [Counter #auto] [Counter #auto]
} {counter0 counter1}
-test basic-4.5 {when a class is destroyed, its objects are deleted} {
+test basic-4.5 {namespaces for #auto are prepended to the command name} {
+ namespace eval someNS1 {}
+ namespace eval someNS2 {}
+ list [Counter someNS1::#auto] [Counter someNS2::#auto]
+} [list someNS1::counter2 someNS2::counter3]
+
+test basic-4.6 {when a class is destroyed, its objects are deleted} {
list [lsort [itcl::find objects counter*]] \
[itcl::delete class Counter] \
[lsort [itcl::find objects counter*]]
@@ -297,7 +330,7 @@ test basic-6.2 {test array access for instance variables} {
test basic-6.3 {test array access for commons} {
lsort [test_arrays0 do array get colors]
-} {#0000ff #00ff00 #ff0000 blue green red}
+} [list #0000ff #00ff00 #ff0000 blue green red]
test basic-6.4 {test array access for instance variables via "upvar"} {
test_arrays0 do test_arrays_get nums
diff --git a/itcl/itcl/tests/body.test b/itcl/itcl/tests/body.test
index 079a69cf94b..f22b05ba79c 100644
--- a/itcl/itcl/tests/body.test
+++ b/itcl/itcl/tests/body.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Test "body" command
diff --git a/itcl/itcl/tests/chain.test b/itcl/itcl/tests/chain.test
index 12cd2660447..8f55fc45330 100644
--- a/itcl/itcl/tests/chain.test
+++ b/itcl/itcl/tests/chain.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Chaining methods and procs
diff --git a/itcl/itcl/tests/delete.test b/itcl/itcl/tests/delete.test
index dc320824643..1d2950cf563 100644
--- a/itcl/itcl/tests/delete.test
+++ b/itcl/itcl/tests/delete.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Deleting classes and objects
diff --git a/itcl/itcl/tests/ensemble.test b/itcl/itcl/tests/ensemble.test
index e818e123aca..eb19ec09eaf 100644
--- a/itcl/itcl/tests/ensemble.test
+++ b/itcl/itcl/tests/ensemble.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
test ensemble-1.1 {ensemble name must be specified} {
list [catch {itcl::ensemble} msg] $msg
@@ -45,8 +45,13 @@ test ensemble-1.4 {invoking ensemble parts} {
} {{one: 1} {two: 2 3} {three: 3 4 5}}
test ensemble-1.5 {invoking parts with improper arguments} {
- list [catch "test_numbers three x" msg] $msg
-} {1 {no value given for parameter "y" to "test_numbers three"}}
+ set res [catch "test_numbers three x" msg]
+ if {[package vsatisfies [package provide Tcl] 8.4]} {
+ lappend res [string match "wrong # args*" $msg]
+ } else {
+ lappend res [string match "no value given*" $msg]
+ }
+} {1 1}
test ensemble-1.6 {errors trigger a usage summary} {
list [catch "test_numbers foo x y" msg] $msg
diff --git a/itcl/itcl/tests/import.test b/itcl/itcl/tests/import.test
index af28b6e0f42..34c60885097 100644
--- a/itcl/itcl/tests/import.test
+++ b/itcl/itcl/tests/import.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
-
-if {[string compare test [info procs test]] == 1} then {source defs}
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Test "itcl::import::stub" command
@@ -40,15 +40,15 @@ test import-1.3 {"stub exists" requires one argument} {
} {1 {wrong # args: should be "itcl::import::stub exists name"} 1 {wrong # args: should be "itcl::import::stub exists name"}}
set interp [interp create]
-$interp eval {
- package require Itcl
+$interp eval [subst -novariables {
+ [::tcltest::configure -load]
proc auto_load {cmd {namespace {}}} {
global debug
- proc $cmd {args} [format {return "%s: $args"} $cmd]
+ proc $cmd {args} \[format {return "%s: $args"} $cmd\]
append debug "(auto_load: $cmd)"
return 1
}
-}
+}]
test import-1.4 {"stub create" creates a stub that triggers autoloading} {
$interp eval {
@@ -64,7 +64,7 @@ test import-1.5 {"stub exists" recognizes stubs created by "stub create"} {
$interp eval {
set debug ""
itcl::import::stub create foo::bar::stub1
- proc foo::bar::proc1 {args} {return "proc1: $args"}
+ proc foo::bar::proc1 {{args {}}} {return "proc1: $args"}
list [itcl::import::stub exists foo::bar::stub1] \
[itcl::import::stub exists foo::bar::proc1]
}
@@ -88,13 +88,13 @@ catch {interp delete $interp}
# Test "itcl::import::stub" command
# ----------------------------------------------------------------------
set interp [interp create]
-$interp eval {
- package require Itcl
+$interp eval [subst -novariables {
+ [::tcltest::configure -load]
proc auto_load {cmd {namespace {}}} {
- proc $cmd {args} [format {return "%s: $args"} $cmd]
+ proc $cmd {args} \[format {return "%s: $args"} $cmd\]
return 1
}
-}
+}]
test import-2.1 {initialize some commands for autoloading} {
$interp eval {
diff --git a/itcl/itcl/tests/info.test b/itcl/itcl/tests/info.test
index 628d890a284..e207ce208ed 100644
--- a/itcl/itcl/tests/info.test
+++ b/itcl/itcl/tests/info.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Class definition with one of everything
diff --git a/itcl/itcl/tests/inherit.test b/itcl/itcl/tests/inherit.test
index e20d5065e78..73a6339fe1c 100644
--- a/itcl/itcl/tests/inherit.test
+++ b/itcl/itcl/tests/inherit.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Test construction/destruction with inheritance
diff --git a/itcl/itcl/tests/interp.test b/itcl/itcl/tests/interp.test
index 8b0015203a7..3493c2ee4ef 100644
--- a/itcl/itcl/tests/interp.test
+++ b/itcl/itcl/tests/interp.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Make sure that slave interpreters can be created and loaded
diff --git a/itcl/itcl/tests/local.test b/itcl/itcl/tests/local.test
index 49430025431..4412ca9618a 100644
--- a/itcl/itcl/tests/local.test
+++ b/itcl/itcl/tests/local.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Test "local" to create objects that only exist within a proc
diff --git a/itcl/itcl/tests/methods.test b/itcl/itcl/tests/methods.test
index 9906e889080..625007b751c 100644
--- a/itcl/itcl/tests/methods.test
+++ b/itcl/itcl/tests/methods.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Methods with various argument lists
diff --git a/itcl/itcl/tests/mkindex.itcl b/itcl/itcl/tests/mkindex.itcl
index bef0fb5358e..5480c670af7 100644
--- a/itcl/itcl/tests/mkindex.itcl
+++ b/itcl/itcl/tests/mkindex.itcl
@@ -23,7 +23,6 @@
# they are prefaced with white space.
#
namespace import itcl::*
-namespace import blt::*
class Simple1 {
variable x 0
@@ -35,11 +34,6 @@ class Simple1 {
public method bump {}
}
-itcl_class OldStyle {
- public x 0
- method foo {args} {return $args}
-}
-
itcl::ensemble ens {
part one {x} {}
part two {x y} {}
diff --git a/itcl/itcl/tests/mkindex.test b/itcl/itcl/tests/mkindex.test
index bc20a242dbb..f63a1d6bbe0 100644
--- a/itcl/itcl/tests/mkindex.test
+++ b/itcl/itcl/tests/mkindex.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Test "auto_mkindex" in the presence of class definitions
@@ -29,7 +29,14 @@ test mkindex-1.1 {remove any existing tclIndex file} {
} {0}
test mkindex-1.2 {build tclIndex based on a test file} {
+ if {[pwd] != $::tcltest::testsDirectory} {
+ file copy -force [file join $::tcltest::testsDirectory mkindex.itcl] \
+ ./mkindex.itcl
+ }
auto_mkindex . mkindex.itcl
+ if {[pwd] != $::tcltest::testsDirectory} {
+ file delete -force ./mkindex.itcl
+ }
file exists tclIndex
} {1}
@@ -46,7 +53,8 @@ test mkindex-1.3 {examine tclIndex} {
}
set result
}
-} "{::Simple2::bump $element} {::Simple2::by $element} {::buried::deep::within $element} {::buried::ens $element} {::buried::inside $element} {::buried::inside::bump $element} {::buried::inside::by $element} {::buried::inside::find $element} {::buried::under::neath $element} {::top::find $element} {::top::notice $element} {OldStyle $element} {Simple1 $element} {Simple2 $element} {ens $element} {top $element}"
+} "{::Simple2::bump $element} {::Simple2::by $element} {::buried::deep::within $element} {::buried::ens $element} {::buried::inside $element} {::buried::inside::bump $element} {::buried::inside::by $element} {::buried::inside::find $element} {::buried::under::neath $element} {::top::find $element} {::top::notice $element} {Simple1 $element} {Simple2 $element} {ens $element} {top $element}"
+::tcltest::removeFile tclIndex
::tcltest::cleanupTests
return
diff --git a/itcl/itcl/tests/namespace.test b/itcl/itcl/tests/namespace.test
index 31150f0f19c..eb8fcd5e285 100644
--- a/itcl/itcl/tests/namespace.test
+++ b/itcl/itcl/tests/namespace.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Classes within namespaces
diff --git a/itcl/itcl/tests/protection.test b/itcl/itcl/tests/protection.test
index 180e1137852..8fe99d724bb 100644
--- a/itcl/itcl/tests/protection.test
+++ b/itcl/itcl/tests/protection.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Class members are protected by access restrictions
diff --git a/itcl/itcl/tests/scope.test b/itcl/itcl/tests/scope.test
index 345790fb806..bd0bc3d43e0 100644
--- a/itcl/itcl/tests/scope.test
+++ b/itcl/itcl/tests/scope.test
@@ -13,12 +13,12 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require tcltest
-namespace import -force ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2.1
+ namespace import -force ::tcltest::test
+}
-if {[string compare test [info procs test]] == 1} then {source defs}
-
-package require Itcl
+::tcltest::loadTestedCommands
# ----------------------------------------------------------------------
# Syntax of the "scope" command
diff --git a/itcl/itcl/tests/tclIndex b/itcl/itcl/tests/tclIndex
index f63ca93c630..4f6bdaeb971 100644
--- a/itcl/itcl/tests/tclIndex
+++ b/itcl/itcl/tests/tclIndex
@@ -8,7 +8,6 @@
set auto_index(Simple1) [list source [file join $dir mkindex.itcl]]
set auto_index(Simple2) [list source [file join $dir mkindex.itcl]]
-set auto_index(OldStyle) [list source [file join $dir mkindex.itcl]]
set auto_index(ens) [list source [file join $dir mkindex.itcl]]
set auto_index(::Simple2::bump) [list source [file join $dir mkindex.itcl]]
set auto_index(::Simple2::by) [list source [file join $dir mkindex.itcl]]
diff --git a/itcl/itcl/win/makefile.bc b/itcl/itcl/win/makefile.bc
index fd63b7e1c89..b8983a218e9 100644
--- a/itcl/itcl/win/makefile.bc
+++ b/itcl/itcl/win/makefile.bc
@@ -1,213 +1,212 @@
-# 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 92fb39c2eaf..e2749233085 100644
--- a/itcl/itcl/win/makefile.vc
+++ b/itcl/itcl/win/makefile.vc
@@ -1,297 +1,419 @@
-######################################################################
-# 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)
-
+#------------------------------------------------------------------------------
+# 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$
+#------------------------------------------------------------------------------
+# Do not modify this file!
+#------------------------------------------------------------------------------
+
+!if !exist("makefile.vc")
+MSG = ^
+You must run this makefile only from the directory it is in.^
+Please `cd` to its location first.
+!error $(MSG)
+!endif
+
+PROJECT = itcl
+!include "..\..\rules.vc"
+
+!if $(TCLINSTALL)
+!message *** Warning: [Incr Tcl] requires the source distribution of Tcl to build from,
+!message *** at this time, sorry. Please set the TCLDIR macro to point to the
+!message *** sources.
+!endif
+
+!if [nmakehlp -g ..\generic\itcl.h ITCL_VERSION] == 33
+ITCL_DOTVERSION = 3.3
+!elseif [nmakehlp -g ..\generic\itcl.h ITCL_VERSION] == 34
+ITCL_DOTVERSION = 3.4
+!elseif [nmakehlp -g ..\generic\itcl.h ITCL_VERSION] == 35
+ITCL_DOTVERSION = 3.5
+!elseif [nmakehlp -g ..\generic\itcl.h ITCL_VERSION] == 0
+MSG =^
+Can't get version string from ..\generic\itcl.h
+!error $(MSG)
+!endif
+ITCL_VERSION = $(ITCL_DOTVERSION:.=)
+
+
+BINROOT = .
+ROOT = ..
+STUBPREFIX = $(PROJECT)stub
+
+PKGINDEX = "$(TMP_DIR)\pkgIndex.tcl"
+
+!if $(TCL_DOES_STUBS)
+ITCLLIBNAME = $(PROJECT)$(ITCL_VERSION)$(SUFX).$(EXT)
+!else
+ITCLLIBNAME = $(PROJECT)$(ITCL_VERSION)80$(SUFX).$(EXT)
+!endif
+
+ITCLLIB = "$(OUT_DIR)\$(ITCLLIBNAME)"
+ITCLIMPLIB = "$(OUT_DIR)\$(PROJECT)$(ITCL_VERSION)$(SUFX).lib"
+
+!if $(TCL_DOES_STUBS)
+ITCLSTUBLIBNAME = $(STUBPREFIX)$(ITCL_VERSION).lib
+ITCLSTUBLIB = "$(OUT_DIR)\$(ITCLSTUBLIBNAME)"
+!else
+ITCLSTUBLIBNAME =
+ITCLSTUBLIB =
+TCLSTUBLIB = $(TCLIMPLIB)
+!endif
+
+BIN_INSTALL_DIR = $(_INSTALLDIR)\bin
+DOC_INSTALL_DIR = $(_INSTALLDIR)\doc
+LIB_INSTALL_DIR = $(_INSTALLDIR)\lib
+SCRIPT_INSTALL_DIR = $(_INSTALLDIR)\lib\itcl$(ITCL_DOTVERSION)
+INCLUDE_INSTALL_DIR = $(_INSTALLDIR)\include
+
+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_parse.obj \
+ $(TMP_DIR)\itcl_util.obj \
+!if $(TCL_DOES_STUBS)
+ $(TMP_DIR)\itclStubInit.obj \
+!endif
+!if !$(STATIC_BUILD)
+ $(TMP_DIR)\dllEntryPoint.obj \
+ $(TMP_DIR)\itcl.res
+!endif
+
+ITCLSTUBOBJS = \
+!if $(TCL_DOES_STUBS)
+ $(TMP_DIR)\itclStubLib.obj
+!endif
+
+GENERICDIR = $(ROOT)\generic
+DOCDIR = $(ROOT)\doc
+RCDIR = $(ROOT)\win\rc
+WINDIR = $(ROOT)\win
+TOOLSDIR = ..\..\tools
+
+#---------------------------------------------------------------------
+# Link flags
+#---------------------------------------------------------------------
+
+!if $(DEBUG)
+ldebug = -debug:full -debugtype:cv
+!else
+ldebug = -release -opt:ref -opt:icf,3
+!endif
+
+# declarations common to all linker options
+lflags = -nologo -machine:$(MACHINE) $(ldebug)
+
+!if $(PROFILE)
+lflags = $(lflags) -profile
+!endif
+
+!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
+# align sections for PE size savings.
+lflags = $(lflags) -opt:nowin98
+!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
+# align sections for speed in loading by choosing the virtual page size.
+lflags = $(lflags) -align:4096
+!endif
+
+!if $(LOIMPACT)
+lflags = $(lflags) -ws:aggressive
+!endif
+
+ITCL_LFLAGS = $(lflags) -subsystem:windows -dll
+
+!if exist("$(TCLDIR)\win\coffbase.txt")
+ITCL_DLLBASE = -base:@$(TCLDIR)\win\coffbase.txt,itcl
+!else
+ITCL_DLLBASE =
+!endif
+
+#---------------------------------------------------------------------
+# Compile flags
+#---------------------------------------------------------------------
+
+!if $(DEBUG)
+!if "$(MACHINE)" == "IA64"
+cdebug = -Od -Zi
+!else
+cdebug = -Z7 -Od -WX
+!endif
+!else
+# This cranks the optimization level up to max.
+cdebug = -O2
+!endif
+
+# declarations common to all compiler options
+cflags = -nologo -c -W3 -YX -Fp$(TMP_DIR)^\
+
+!if $(PENT_0F_ERRATA)
+cflags = $(cflags) -QI0f
+!endif
+
+!if $(ITAN_B_ERRATA)
+cflags = $(cflags) -QIA64_Bx
+!endif
+
+!if $(MSVCRT)
+crt = -MD$(DBGX)
+!else
+crt = -MT$(DBGX)
+!endif
+
+!if $(TCLINSTALL)
+TCL_INCLUDES = -I"$(TCLDIR)\include"
+!else
+TCL_INCLUDES = -I"$(TCLDIR)\generic" -I"$(TCLDIR)\win"
+!endif
+
+ITCL_INCLUDES = -I$(WINDIR) -I$(GENERICDIR)
+ITCL_DEFINES = -DBUILD_itcl -DTCL_THREADS=1
+ITCL_EXE_CFLAGS = $(cdebug) $(cflags) $(crt) $(ITCL_INCLUDES) $(ITCL_DEFINES) $(TCL_INCLUDES)
+
+### By convention, static builds do not use Stubs. This is just a practice,
+### not a technical limitation.
+!if $(STATIC_BUILD)
+ITCL_CFLAGS = $(ITCL_EXE_CFLAGS) -DSTATIC_BUILD
+!elseif $(TCL_DOES_STUBS)
+ITCL_CFLAGS = $(ITCL_EXE_CFLAGS) -DUSE_TCL_STUBS
+!else
+ITCL_CFLAGS = $(ITCL_EXE_CFLAGS)
+!endif
+
+#---------------------------------------------------------------------
+# TclTest flags
+#---------------------------------------------------------------------
+
+!if "$(TESTPAT)" != ""
+TESTFLAGS = -file $(TESTPAT)
+!endif
+
+#---------------------------------------------------------------------
+# Project specific targets
+#---------------------------------------------------------------------
+
+all : setup $(ITCLLIB) $(ITCLSTUBLIB)
+release : setup $(ITCLLIB) $(ITCLSTUBLIB)
+install : install-binaries install-docs
+
+setup :
+ @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
+ @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
+
+$(ITCLLIB): $(ITCLOBJS)
+!if $(STATIC_BUILD)
+ $(lib32) -nologo -machine:$(MACHINE) -out:$@ @<<
+$(ITCLOBJS)
+<<
+!else
+ $(link32) $(ITCL_LFLAGS) $(ITCL_DLLBASE) -out:$@ $(TCLSTUBLIB) @<<
+$(ITCLOBJS)
+<<
+ -@del $*.exp
+!endif
+
+!if $(TCL_DOES_STUBS)
+$(ITCLSTUBLIB) : $(ITCLSTUBOBJS)
+ $(lib32) -nologo -out:$@ $(ITCLSTUBOBJS)
+!endif
+
+install-binaries :
+ 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 $(ITCLLIB) "$(SCRIPT_INSTALL_DIR)"
+!if ""$(ITCLSTUBLIB)"" != """"
+ copy $(ITCLSTUBLIB) "$(LIB_INSTALL_DIR)"
+!endif
+ copy $(ROOT)\generic\itcl.h "$(INCLUDE_INSTALL_DIR)"
+ copy $(ROOT)\generic\itclDecls.h "$(INCLUDE_INSTALL_DIR)"
+ copy $(ROOT)\library\*.* "$(SCRIPT_INSTALL_DIR)"
+ echo if {[package vsatisfies 8.0 [package provide Tcl]]} {\
+ > "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ set add 80>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo } else {>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ set add {}>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo }>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo if {[info exists ::tcl_platform(debug)] ^&^&\
+ $$::tcl_platform(debug) ^&^& \>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ ^ ^ ^ ^ [file exists [file join $$dir\
+ $(PROJECT)$(ITCL_VERSION)$${add}g.dll]]}\
+ {>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ package ifneeded Itcl $(ITCL_DOTVERSION) [list load\
+ [file join $$dir $(PROJECT)$(ITCL_VERSION)$${add}g.dll]\
+ Itcl]>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo } else {>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ package ifneeded Itcl $(ITCL_DOTVERSION) [list load\
+ [file join $$dir $(PROJECT)$(ITCL_VERSION)$${add}.dll]\
+ Itcl]>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo }>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo unset add>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+
+!if $(STATIC_BUILD)
+test :
+ @echo test target not supported for a static library.
+!else
+test : setup $(ITCLLIB) $(ITCLSTUBLIB)
+ $(TCLSH) ..\tests\all.tcl $(TESTFLAGS) -loadfile <<
+ set env(ITCL_LIBRARY) [file normalize [file join $(MAKEDIR:\=/) .. library]]
+ load [file normalize [file join $(MAKEDIR:\=/) $(ITCLLIB:\=/)]]
+<<
+!endif
+
+#---------------------------------------------------------------------
+# Regenerate the stubs files.
+#---------------------------------------------------------------------
+
+genstubs:
+!if $(TCLINSTALL)
+ @echo Need the source distribution to regenerate the Stubs table.
+!else
+ $(TCLSH) $(TOOLSDIR)\genStubs.tcl $(GENERICDIR) \
+ $(GENERICDIR)\$(PROJECT).decls $(GENERICDIR)\$(PROJECT)Int.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$@ $?
+
+#---------------------------------------------------------------------
+# Inference rules. Use batch-mode when supported.
+#---------------------------------------------------------------------
+
+{$(WINDIR)}.c{$(TMP_DIR)}.obj ::
+ $(cc32) $(ITCL_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(GENERICDIR)}.c{$(TMP_DIR)}.obj ::
+ $(cc32) $(ITCL_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(RCDIR)}.rc{$(TMP_DIR)}.res :
+ $(rc32) -fo $@ -d DEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
+ $(ITCL_INCLUDES) $(TCL_INCLUDES) $(ITCL_DEFINES) $<
+
+#---------------------------------------------------------------------
+# Generate the windows help files.
+#---------------------------------------------------------------------
+
+HLPBASE = $(PROJECT)$(ITCL_VERSION)
+HELPFILE = $(OUT_DIR)\$(HLPBASE).hlp
+HELPCNT = $(OUT_DIR)\$(HLPBASE).cnt
+DOCTMP_DIR = $(OUT_DIR)\$(PROJECT)_docs
+HELPRTF = $(DOCTMP_DIR)\$(PROJECT).rtf
+MAN2HELP = $(DOCTMP_DIR)\man2help.tcl
+MAN2HELP2 = $(DOCTMP_DIR)\man2help2.tcl
+INDEX = $(DOCTMP_DIR)\index.tcl
+BMP = $(DOCTMP_DIR)\toaster.bmp
+BMP_NOPATH = toaster.bmp
+MAN2TCL = $(DOCTMP_DIR)\man2tcl.exe
+
+winhelp: docsetup $(HELPFILE)
+
+docsetup:
+ @if not exist $(DOCTMP_DIR)\nul mkdir $(DOCTMP_DIR)
+
+$(MAN2HELP) $(MAN2HELP2) $(INDEX): $(TCLTOOLSDIR)\$$(@F)
+ copy $(TCLTOOLSDIR)\$(@F) $(@D)
+
+$(BMP):
+ copy $(WINDIR)\$(@F) $(@D)
+
+$(HELPFILE): $(HELPRTF) $(BMP)
+ cd $(DOCTMP_DIR)
+ start /wait hcrtf.exe -x <<$(PROJECT).hpj
+[OPTIONS]
+COMPRESS=12 Hall Zeck
+LCID=0x409 0x0 0x0 ; English (United States)
+TITLE=[Incr Tcl] Reference Manual
+BMROOT=.
+CNT=$(@B).cnt
+HLP=$(@B).hlp
+
+[FILES]
+$(PROJECT).rtf
+
+[WINDOWS]
+main="[Incr Tcl] Reference Manual",,27648,(r15263976),(r65280)
+
+[CONFIG]
+BrowseButtons()
+CreateButton(1, "Web", ExecFile("http://www.tcl.tk"))
+CreateButton(2, "SF", ExecFile("http://sf.net/projects/incrtcl"))
+CreateButton(3, "Wiki", ExecFile("http://wiki.tcl.tk"))
+CreateButton(4, "FAQ", ExecFile("http://www.purl.org/NET/Tcl-FAQ/"))
+<<
+ cd $(MAKEDIR)
+ copy "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)"
+ copy "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)"
+
+$(MAN2TCL): $(TCLTOOLSDIR)\$$(@B).c
+ $(cc32) -nologo -G4 -ML -O2 -Fo$(@D)\ $(TCLTOOLSDIR)\$(@B).c -link -out:$@
+
+$(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX)
+ $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(ITCL_VERSION) $(DOCDIR:\=/)
+
+install-docs:
+!if exist($(HELPFILE))
+ @xcopy /i /y "$(HELPFILE)" "$(DOC_INSTALL_DIR)\"
+ @xcopy /i /y "$(HELPCNT)" "$(DOC_INSTALL_DIR)\"
+ $(TCLSH) <<
+puts "Installing $(PROJECT)'s helpfile contents into Tcl's ..."
+set f [open {$(DOC_INSTALL_DIR:\=/)/tcl$(TCL_VERSION).cnt} r]
+while {![eof $$f]} {
+ if {[regexp {:Include $(PROJECT)([0-9]{2}).cnt} [gets $$f] dummy ver]} {
+ if {$$ver == $(ITCL_VERSION)} {
+ puts "Already installed."
+ exit
+ } else {
+ # do something here logical to remove (or replace) it.
+ puts "$$ver != $(ITCL_VERSION), unfinished code path, die, die!"
+ exit 1
+ }
+ }
+}
+close $$f
+set f [open {$(DOC_INSTALL_DIR:\=/)/tcl$(TCL_VERSION).cnt} a]
+puts $$f {:Include $(HLPBASE).cnt}
+close $$f
+<<
+ start /wait winhlp32 -g $(DOC_INSTALL_DIR)\tcl$(TCL_VERSION).hlp
+!endif
+
+
+#---------------------------------------------------------------------
+# 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/nmakehlp.c b/itcl/itcl/win/nmakehlp.c
new file mode 100644
index 00000000000..547b1c17520
--- /dev/null
+++ b/itcl/itcl/win/nmakehlp.c
@@ -0,0 +1,359 @@
+/* ----------------------------------------------------------------------------
+ * nmakehlp.c --
+ *
+ * This is used to fix limitations within nmake and the environment.
+ *
+ * Copyright (c) 2002 by David Gravereaux.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * ----------------------------------------------------------------------------
+ * RCS: @(#) $Id$
+ * ----------------------------------------------------------------------------
+ */
+#include <windows.h>
+#pragma comment (lib, "user32.lib")
+#pragma comment (lib, "kernel32.lib")
+#include <stdio.h>
+#include <math.h>
+
+/* protos */
+int CheckForCompilerFeature (const char *option);
+int CheckForLinkerFeature (const char *option);
+int IsIn (const char *string, const char *substring);
+int GrepForDefine (const char *file, const char *string);
+DWORD WINAPI ReadFromPipe (LPVOID args);
+
+/* globals */
+#define CHUNK 25
+#define STATICBUFFERSIZE 1000
+typedef struct {
+ HANDLE pipe;
+ char buffer[STATICBUFFERSIZE];
+} pipeinfo;
+
+pipeinfo Out = {INVALID_HANDLE_VALUE, '\0'};
+pipeinfo Err = {INVALID_HANDLE_VALUE, '\0'};
+
+
+
+/* exitcodes: 0 == no, 1 == yes, 2 == error */
+int
+main (int argc, char *argv[])
+{
+ char msg[300];
+ DWORD dwWritten;
+ int chars;
+
+ /* make sure children (cl.exe and link.exe) are kept quiet. */
+ SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
+
+ /* Make sure the compiler and linker aren't effected by the outside world. */
+ SetEnvironmentVariable("CL", "");
+ SetEnvironmentVariable("LINK", "");
+
+ if (argc > 1 && *argv[1] == '-') {
+ switch (*(argv[1]+1)) {
+ case 'c':
+ if (argc != 3) {
+ chars = wsprintf(msg, "usage: %s -c <compiler option>\n"
+ "Tests for whether cl.exe supports an option\n"
+ "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+ }
+ return CheckForCompilerFeature(argv[2]);
+ case 'l':
+ if (argc != 3) {
+ chars = wsprintf(msg, "usage: %s -l <linker option>\n"
+ "Tests for whether link.exe supports an option\n"
+ "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+ }
+ return CheckForLinkerFeature(argv[2]);
+ case 'f':
+ if (argc == 2) {
+ chars = wsprintf(msg, "usage: %s -f <string> <substring>\n"
+ "Find a substring within another\n"
+ "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+ } else if (argc == 3) {
+ /* if the string is blank, there is no match */
+ return 0;
+ } else {
+ return IsIn(argv[2], argv[3]);
+ }
+ case 'g':
+ if (argc == 2) {
+ chars = wsprintf(msg, "usage: %s -g <file> <string>\n"
+ "grep for a #define\n"
+ "exitcodes: integer of the found string (no decimals)\n", argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+ }
+ return GrepForDefine(argv[2], argv[3]);
+ }
+ }
+ chars = wsprintf(msg, "usage: %s -c|-l|-f ...\n"
+ "This is a little helper app to equalize shell differences between WinNT and\n"
+ "Win9x and get nmake.exe to accomplish its job.\n",
+ argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+}
+
+int
+CheckForCompilerFeature (const char *option)
+{
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ SECURITY_ATTRIBUTES sa;
+ DWORD threadID;
+ char msg[300];
+ BOOL ok;
+ HANDLE hProcess, h, pipeThreads[2];
+ char cmdline[100];
+
+ hProcess = GetCurrentProcess();
+
+ ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
+ ZeroMemory(&si, sizeof(STARTUPINFO));
+ si.cb = sizeof(STARTUPINFO);
+ si.dwFlags = STARTF_USESTDHANDLES;
+ si.hStdInput = INVALID_HANDLE_VALUE;
+
+ ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = FALSE;
+
+ /* create a non-inheritible pipe. */
+ CreatePipe(&Out.pipe, &h, &sa, 0);
+
+ /* dupe the write side, make it inheritible, and close the original. */
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* Same as above, but for the error side. */
+ CreatePipe(&Err.pipe, &h, &sa, 0);
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdError,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* base command line */
+ strcpy(cmdline, "cl.exe -nologo -c -TC -Zs -X ");
+ /* append our option for testing */
+ strcat(cmdline, option);
+ /* filename to compile, which exists, but is nothing and empty. */
+ strcat(cmdline, " .\\nul");
+
+ ok = CreateProcess(
+ NULL, /* Module name. */
+ cmdline, /* Command line. */
+ NULL, /* Process handle not inheritable. */
+ NULL, /* Thread handle not inheritable. */
+ TRUE, /* yes, inherit handles. */
+ DETACHED_PROCESS, /* No console for you. */
+ NULL, /* Use parent's environment block. */
+ NULL, /* Use parent's starting directory. */
+ &si, /* Pointer to STARTUPINFO structure. */
+ &pi); /* Pointer to PROCESS_INFORMATION structure. */
+
+ if (!ok) {
+ DWORD err = GetLastError();
+ int chars = wsprintf(msg, "Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
+
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS |
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID) &msg[chars],
+ (300-chars), 0);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, strlen(msg), &err, NULL);
+ return 2;
+ }
+
+ /* close our references to the write handles that have now been inherited. */
+ CloseHandle(si.hStdOutput);
+ CloseHandle(si.hStdError);
+
+ WaitForInputIdle(pi.hProcess, 5000);
+ CloseHandle(pi.hThread);
+
+ /* start the pipe reader threads. */
+ pipeThreads[0] = CreateThread(NULL, 0, ReadFromPipe, &Out, 0, &threadID);
+ pipeThreads[1] = CreateThread(NULL, 0, ReadFromPipe, &Err, 0, &threadID);
+
+ /* block waiting for the process to end. */
+ WaitForSingleObject(pi.hProcess, INFINITE);
+ CloseHandle(pi.hProcess);
+
+ /* wait for our pipe to get done reading, should it be a little slow. */
+ WaitForMultipleObjects(2, pipeThreads, TRUE, 500);
+ CloseHandle(pipeThreads[0]);
+ CloseHandle(pipeThreads[1]);
+
+ /* look for the commandline warning code in both streams. */
+ return !(strstr(Out.buffer, "D4002") != NULL || strstr(Err.buffer, "D4002") != NULL);
+}
+
+int
+CheckForLinkerFeature (const char *option)
+{
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ SECURITY_ATTRIBUTES sa;
+ DWORD threadID;
+ char msg[300];
+ BOOL ok;
+ HANDLE hProcess, h, pipeThreads[2];
+ char cmdline[100];
+
+ hProcess = GetCurrentProcess();
+
+ ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
+ ZeroMemory(&si, sizeof(STARTUPINFO));
+ si.cb = sizeof(STARTUPINFO);
+ si.dwFlags = STARTF_USESTDHANDLES;
+ si.hStdInput = INVALID_HANDLE_VALUE;
+
+ ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = TRUE;
+
+ /* create a non-inheritible pipe. */
+ CreatePipe(&Out.pipe, &h, &sa, 0);
+
+ /* dupe the write side, make it inheritible, and close the original. */
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* Same as above, but for the error side. */
+ CreatePipe(&Err.pipe, &h, &sa, 0);
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdError,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* base command line */
+ strcpy(cmdline, "link.exe -nologo ");
+ /* append our option for testing */
+ strcat(cmdline, option);
+
+ ok = CreateProcess(
+ NULL, /* Module name. */
+ cmdline, /* Command line. */
+ NULL, /* Process handle not inheritable. */
+ NULL, /* Thread handle not inheritable. */
+ TRUE, /* yes, inherit handles. */
+ DETACHED_PROCESS, /* No console for you. */
+ NULL, /* Use parent's environment block. */
+ NULL, /* Use parent's starting directory. */
+ &si, /* Pointer to STARTUPINFO structure. */
+ &pi); /* Pointer to PROCESS_INFORMATION structure. */
+
+ if (!ok) {
+ DWORD err = GetLastError();
+ int chars = wsprintf(msg, "Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
+
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS |
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID) &msg[chars],
+ (300-chars), 0);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, strlen(msg), &err, NULL);
+ return 2;
+ }
+
+ /* close our references to the write handles that have now been inherited. */
+ CloseHandle(si.hStdOutput);
+ CloseHandle(si.hStdError);
+
+ WaitForInputIdle(pi.hProcess, 5000);
+ CloseHandle(pi.hThread);
+
+ /* start the pipe reader threads. */
+ pipeThreads[0] = CreateThread(NULL, 0, ReadFromPipe, &Out, 0, &threadID);
+ pipeThreads[1] = CreateThread(NULL, 0, ReadFromPipe, &Err, 0, &threadID);
+
+ /* block waiting for the process to end. */
+ WaitForSingleObject(pi.hProcess, INFINITE);
+ CloseHandle(pi.hProcess);
+
+ /* wait for our pipe to get done reading, should it be a little slow. */
+ WaitForMultipleObjects(2, pipeThreads, TRUE, 500);
+ CloseHandle(pipeThreads[0]);
+ CloseHandle(pipeThreads[1]);
+
+ /* look for the commandline warning code in the stderr stream. */
+ return !(strstr(Out.buffer, "LNK1117") != NULL || strstr(Err.buffer, "LNK1117") != NULL);
+}
+
+DWORD WINAPI
+ReadFromPipe (LPVOID args)
+{
+ pipeinfo *pi = (pipeinfo *) args;
+ char *lastBuf = pi->buffer;
+ DWORD dwRead;
+ BOOL ok;
+
+again:
+ if (lastBuf - pi->buffer + CHUNK > STATICBUFFERSIZE) {
+ CloseHandle(pi->pipe);
+ return -1;
+ }
+ ok = ReadFile(pi->pipe, lastBuf, CHUNK, &dwRead, 0L);
+ if (!ok || dwRead == 0) {
+ CloseHandle(pi->pipe);
+ return 0;
+ }
+ lastBuf += dwRead;
+ goto again;
+
+ return 0; /* makes the compiler happy */
+}
+
+int
+IsIn (const char *string, const char *substring)
+{
+ return (strstr(string, substring) != NULL);
+}
+
+/*
+ * Find a specified #define by name.
+ *
+ * If the line is '#define TCL_VERSION "8.5"', it returns
+ * 85 as the result.
+ */
+
+int
+GrepForDefine (const char *file, const char *string)
+{
+ FILE *f;
+ char s1[51], s2[51], s3[51];
+ int r = 0;
+ double d1;
+
+ f = fopen(file, "rt");
+ if (f == NULL) {
+ return 0;
+ }
+
+ do {
+ r = fscanf(f, "%50s", s1);
+ if (r == 1 && !strcmp(s1, "#define")) {
+ /* get next two words */
+ r = fscanf(f, "%50s %50s", s2, s3);
+ if (r != 2) continue;
+ /* is the first word what we're looking for? */
+ if (!strcmp(s2, string)) {
+ fclose(f);
+ /* add 1 past first double quote char. "8.5" */
+ d1 = atof(s3 + 1); /* 8.5 */
+ while (floor(d1) != d1) {
+ d1 *= 10.0;
+ }
+ return ((int) d1); /* 85 */
+ }
+ }
+ } while (!feof(f));
+
+ fclose(f);
+ return 0;
+}
diff --git a/itcl/itcl/win/rc/itcl.rc b/itcl/itcl/win/rc/itcl.rc
index 6c2be6bff85..cf9488a9a5b 100644
--- a/itcl/itcl/win/rc/itcl.rc
+++ b/itcl/itcl/win/rc/itcl.rc
@@ -1,60 +1,56 @@
-// 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
-
-
-
-
-
+// RCS: @(#) $Id$
+//
+// Version resource script.
+//
+
+#include <winver.h>
+#include <itcl.h>
+
+//
+// build-up the name suffix that defines the type of build this is.
+//
+#if DEBUG && !UNCHECKED
+#define SUFFIX_DEBUG "g"
+#else
+#define SUFFIX_DEBUG ""
+#endif
+
+#define SUFFIX SUFFIX_DEBUG
+
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,ITCL_RELEASE_SERIAL
+ PRODUCTVERSION ITCL_MAJOR_VERSION,ITCL_MINOR_VERSION,ITCL_RELEASE_LEVEL,ITCL_RELEASE_SERIAL
+ FILEFLAGSMASK 0x3fL
+#ifdef 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", "Itcl language extension for Tcl\0"
+ VALUE "Authors", "Michael McLennan\0"
+ VALUE "OriginalFilename", "itcl" STRINGIFY(ITCL_MAJOR_VERSION) STRINGIFY(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-2004\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/itcl/win/toaster.bmp b/itcl/itcl/win/toaster.bmp
new file mode 100644
index 00000000000..5ea80e6e353
--- /dev/null
+++ b/itcl/itcl/win/toaster.bmp
Binary files differ
diff --git a/itcl/itk/CHANGES b/itcl/itk/CHANGES
new file mode 100644
index 00000000000..b0cbdafe85d
--- /dev/null
+++ b/itcl/itk/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/itk/ChangeLog b/itcl/itk/ChangeLog
new file mode 100644
index 00000000000..777cced389c
--- /dev/null
+++ b/itcl/itk/ChangeLog
@@ -0,0 +1,1902 @@
+2005-03-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * Makefile.in: OS X patches from Steffen
+ * itcl/generic/itcl_cmds.c (initScript):
+ * itk/generic/itk_cmds.c (initScript):
+
+2005-03-18 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/Makefile.in, itk/Makefile.in (AR): use @AR@
+ * tclconfig/tcl.m4, itcl/configure, itk/configure: update to TEA 3.2
+
+2005-02-14 Jean-Claude Wippler <jcw@equi4.com>
+
+ * configure.in, tclconfig/tcl.m4: update to TEA 3.2
+ * configure, itcl/configure, itk/configure: regen with autoconf 2.59
+
+2005-02-11 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/generic/itcl_methods.c (Itcl_GetMemberCode): fixed c99 var
+ decl from previous patch.
+
+2005-02-10 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/generic/itclInt.h: [Bug 1115085] (dejong) Fix crash
+ * itcl/generic/itcl_bicmds.c: with TclInitCompiledLocals reliance
+ * itcl/generic/itcl_methods.c: on bytecode ptr type
+
+2005-01-24 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/configure, itk/configure: update to TEA 3.1 r1.54, removes
+ * configure, tclconfig/tcl.m4: DBGX, updates default opt levels
+
+2004-12-11 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itc_class.c: instansiation of an object must return
+ an FQN.
+
+2004-11-23 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl_cmds.c: Fix for [Bug 1047544] Forward loading
+ * itcl/generic/itcl_util.c: from an 8.4 build loading into in 8.5
+ is not possible at this time.
+
+2004-11-11 David Gravereaux <davygrvy@pobox.com>
+
+ * itk/Makefile.in: Possible fix for 1049579, but untested.
+
+2004-09-21 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl_utils.c: Error code internal flag abuse
+ fixed. From Don Porter. [Bug 1032210]
+
+ * makefile.vc: Some VC7 support.
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc: Had to include the win directory to Tcl's
+ includes since Tcl has had an order change recently.
+
+2004-09-19 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/doc/*.n: Tree name for commands changed from "[Incr Tcl]"
+ to "[Incr Tcl] Commands". Started to add exported API docs under
+ the new "[Incr Tcl] Library Procedures" tree.
+
+ * itcl/doc/RegisterC.3 (new): docs for Itcl_RegisterC and
+ Itcl_RegisterObjC. More to be added over time.
+
+2004-09-07 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/configure, itk/configure, tclconfig/tcl.m4: updated TEA m4
+ to support evc4 Win/CE builds
+
+2004-08-31 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/doc/body.n
+ * itcl/doc/class.n:
+ * itcl/doc/configbody.n::
+ * itcl/doc/delete.n:
+ * itcl/doc/ensemble.n:
+ * itcl/doc/find.n:
+ * itcl/doc/is.n:
+ * itcl/doc/local.n: Updated code examples to use the fully
+ qualified Itcl command names. A few references to the itcl
+ namespace command are still there and need to be changed at
+ some point.
+
+ * itk/doc/Archetype.n:
+ * itk/doc/Toplevel.n:
+ * itk/doc/usual.n:
+ * itk/doc/Widget.n: Ditto as above.
+
+2004-08-17 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * */Makefile.in (install-doc): sed in man.macros on doc install
+ [Bug 631378] (rmax)
+
+ * */Makefile.in (VPATH): move $(srcdir)/unix to front (unused) to
+ get around bug in autoconf that strips $(srcdir) from first
+ element when building in the source directory.
+
+ * itk/configure: remove extraneous --with-itcl AC macro
+ * itk/configure.in: TEA_PATH_CONFIG handles this for us
+
+ * itcl/itclConfig.sh.in: must be absolute path to
+ * itcl/configure.in (itcl_SRC_DIR): configure in the srcdir.
+ * itcl/configure: [Bug 582951]
+
+2004-08-10 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * README, TODO: version, info updates
+
+ * Makefile.in, configure, configure.in: Update to TEA 3.1
+ * tcl.m4 (removed): cleanup build system to only
+ * config/config.guess (removed): provide the parts that are
+ * config/config.sub (removed): necessary to itcl and itk.
+ * config/install-sh (removed): Update to 3.3.0 as version
+ * tclconfig/install-sh (added): throughout.
+ * tclconfig/tcl.m4 (added):
+ * itcl/generic/itcl.h:
+ * itcl/Makefile.in, itcl/aclocal.m4, itcl/configure:
+ * itcl/configure.in, itcl/itclConfig.sh.in, itcl/pkgIndex.tcl.in:
+ * itk/Makefile.in, itk/aclocal.m4, itk/configure, itk/configure.in:
+ * itk/itkConfig.sh.in, itk/pkgIndex.tcl.in, itk/generic/itk.h:
+
+ * itcl/mac/MW_ItclHeader.pch (removed) Removed Mac Classic
+ * itcl/mac/itclMacApplication.r (removed) sources. There were
+ * itcl/mac/itclMacLibrary.r (removed) no longer maintained,
+ * itcl/mac/itclMacResource.r (removed) and Tcl has dropped
+ * itcl/mac/itclMacTclCode.r (removed) ongoing Mac Classic
+ * itcl/mac/itclStaticApplication.r (removed) support as well (in
+ * itcl/mac/pkgIndex.tcl (removed) favor of OS X).
+ * itk/mac/MW_ItkHeader.pch (removed)
+ * itk/mac/itkMacApplication.r (removed)
+ * itk/mac/itkMacLibrary.r (removed)
+ * itk/mac/itkMacResource.r (removed)
+ * itk/mac/itkMacTclCode.r (removed)
+ * itk/mac/itkStaticApplication.r (removed)
+ * itk/mac/pkgIndex.tcl (removed)
+ * itk/mac/tclIndex (removed)
+
+2004-04-29 davygrvy
+
+ * itcl/tests/import.test: fixed [subst] problem.
+
+ * itcl/win/makefile.vc:
+ * itcl/win/nmakehlp.c:
+ * itk/win/makefile.vc:
+ * itk/win/nmakehlp.c:
+ * rules.vc: brain dump
+
+ * itcl/Makefile.in: test target now calling tcltest correctly
+
+2004-02-13 davygrvy
+ * itcl/tests/all:
+ * itcl/tests/defs (deleted): This serves no purpose today with
+ tcltest being so powerful.
+
+ * itcl/tests/import.test: more load precision with
+ ::tcltest::loadTestedCommands in sub interps.
+
+ * itcl/tests/mkindex.itcl:
+ * itcl/tests/mkindex.test:
+ * itcl/tests/tclIndex: reference to itcl_class removed from
+ mkindex.test so 1.3 can now pass.
+
+2004-02-12 davygrvy
+ * itcl/win/makefile.vc:
+ * itcl/win/rc/itcl.rc: rc file work
+
+ * itcl/tests/all.tcl:
+ * itcl/tests/import.test:
+ * itcl/tests/mkindex.test: some cleanup.
+
+ * itcl/generic/itclInt.h: commentary
+
+ * itcl/win/makefile.vc: now runs the test suite, OMG!
+
+ * itcl/tests/all.tcl:
+ * itcl/tests/basic.test:
+ * itcl/tests/body.test:
+ * itcl/tests/chain.test:
+ * itcl/tests/delete.test:
+ * itcl/tests/ensemble.test:
+ * itcl/tests/import.test:
+ * itcl/tests/info.test:
+ * itcl/tests/inherit.test:
+ * itcl/tests/interp.test:
+ * itcl/tests/local.test:
+ * itcl/tests/methods.test:
+ * itcl/tests/mkindex.test:
+ * itcl/tests/namespace.test:
+ * itcl/tests/protection.test:
+ * itcl/tests/scope.test: Modified test suite to use -loadfile and
+ ::tcltest:: loadTestedCommands in each test file.
+
+2003-12-24 davygrvy
+ * itcl/generic/itcl.h:
+ * itcl/generic/itcl_ensemble.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_migrate.c:
+ * itcl/generic/itcl_util.c:
+ * itcl/win/makefile.vc: Changed deprecated 'panic' to 'Tcl_Panic'.
+
+ * itcl/generic/itclStubLib.c:
+ * itk/generic/itkStubLib.c:
+ * itk/win/makefile.vc: Small 'const' issue with Tcl_PkgRequireEx
+ under 8.1.0
+
+2003-12-23 davygrvy
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc:
+ 8.0 build needs a different output name for the binaries.
+
+ * itcl/win/nmakehlp.c:
+ * itk/win/nmakehlp.c:
+ * rules.vc: sync'd to Tcl.
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclStubLib.c:
+ * itk/generic/itk.h:
+ * itk/generic/itkStubLib.c: Some It*_InitStubs adjustments for CONST.
+
+ * itcl/win/makefile.vc: temp help merge script should be deleted
+ after use.
+
+ * tools/genStubs.tcl: we need this.
+
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc: install target bugs fixed
+
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc:
+ * pkg.vc: Uses new features of nmakehlp to get the version strings
+ from header files without the use of hardcoded values.
+
+ * itk/generic/itk_archetype.c:
+ * itk/generic/itk_cmds.c:
+ * itk/win/makefile.vc: changes to support building against 8.0.5
+
+ * itcl/doc/itclsh.1:
+ * itcl/mac/tclMacAppInit.c:
+ * itk/doc/itkwish.1:
+ * itk/mac/tkMacAppInit.c: custom shell no longer exists
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/win/makefile.vc:
+ * itcl/win/rc/itcl.rc:
+ * itk/generic/itk.h:
+ * itk/generic/itkDecls.h:
+ * itk/win/makefile.vc:
+ * makefile.vc: winhelp targets fixed and Stubs table issues resolved.
+
+ * itcl/win/makefile.vc:
+ * itk/win/makefile.vc: some pkgIndex.tcl generation work.
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclInt.h:
+ * itcl/generic/itcl_bicmds.c:
+ * itcl/generic/itcl_cmds.c:
+ * itcl/generic/itcl_ensemble.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_objects.c:
+ * itcl/generic/itcl_util.c:
+ * itcl/win/makefile.vc:
+ * itk/generic/itk_cmds.c:
+ * itk/win/makefile.vc: Now builds against Tcl 8.0! Unbeleivable,
+ but true :) Tcl bug #803489 now suppressed with grotesque macros
+ in itclInt.h
+
+ * itcl/win/makefile.vc:
+ * itcl/win/rc/itcl.rc:
+ * itk/win/rc/itk.rc:
+ * itk/win/rc/itk.rc: some resource bugs fixed
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclInt.h: moved some backward compat macros to
+ itclInt.h
+
+ * itcl/win/nmakehlp.c:
+ * itk/win/nmakehlp.c: prevent static buffer overflow (Doh!)
+
+ * itcl/generic/itclInt.h:
+ * itcl/generic/itcl_cmds.c:
+ changes to support Itk building against 8.0.5
+
+2003-12-22 davygrvy
+ * itcl/generic/itcl.h:
+ * itcl/generic/itcl_class.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_objects.c:
+ * itcl/generic/itcl_util.c:
+ * itk/generic/itk_archetype.c:
+ Now builds with 8.3 regarding CONST84 trims on some Tcl API calls.
+
+ * itcl/generic/itcl_cmds.c:
+ * itk/generic/itk_cmds.c:
+ Because the Tcl_Namespace APIs in Tcl have moved to the public
+ space in 8.5, the stub slots have shifted. This now causes Itcl
+ when built against 8.5 to core when loaded into 8.4. What genius
+ you developers! The absolute first rule with Stubs is not to EVER
+ move the slots, but now you did. Previously, one could build Itcl
+ against 8.4 and load into any core 8.1+. Now we can't do this.
+ Gee, thank you all for the support...
+
+ Now, what we compile against is the lowest we can load
+ into.. Sorry! send heated complaints to tcl-core@lists.sf.net
+
+2003-12-17 davygrvy
+ * itcl/generic/itcl.h:
+ Use fancy STRINGIFY macros for version string.
+
+ * itcl/generic/itcl_cmds.c:
+ * itcl/generic/itcl_objects.c:
+ Needed to fix usage of Itcl_DecodeScopedCommand as rCmdPtr always
+ needs to be freed.
+
+ * itcl/generic/itcl_cmd.c (Itcl_FindClassesCmd) : Memory leaking
+ Tcl_Obj plugged. [Bug 738189]
+
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itcl_util.c:
+ Itcl_DecodeScopedCommand now fixed.
+
+ * itcl/generic/itcl.decls:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itclInt.h:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itcl_class.c:
+ * itcl/generic/itcl_ensemble.c:
+ * itcl/generic/itcl_linkage.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_objects.c:
+ * itcl/generic/itcl_util.c:
+ full brain dump. All CONST issues fixed except for
+ Itcl_DecodeScopedCommand. Will address this next.
+
+2003-04-04 andreas_kupries
+ * itcl/configure:
+ * itk/configure:
+ * tcl.m4:
+ * itcl/configure.in:
+ * itk/configure.in:
+ * tclconfig/tcl.m4: Updated to newest tcl.m4, regenerated configure's.
+
+2003-01-28 davygrvy
+ * itcl/configure:
+ * itk/configure:
+ * itk/configure.in:
+ Make sure threading is always on for compiling.
+
+2002-10-16 andreas_kupries
+ * itcl/configure:
+ * itk/configure:
+ * tcl.m4: tcl.m4 typo correction, Regen'd. aix fix
+
+2002-10-15 andreas_kupries
+ * itcl/configure:
+ * itk/configure:
+ * tcl.m4: Regen'd configure for new tcl.m4.
+
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in:
+ Changed to propagate an initial CFLAGS value
+ to the final definition. A TEA condition (SHARED_BUILD == 1)
+ squashed it, causing it the build system to loose the
+ +DAportable we specify for the AS PA-RISC2.2 build host. This is
+ a problem for _all_ TEA and TEA 2 based configure files.
+
+2002-10-15 hobbs
+ * itcl/configure: move the CFLAGS definition into
+ * itcl/configure.in: TEA_ENABLE_SHARED and make it pick up the env
+ * itk/configure: CFLAGS at configure time.
+ * itk/configure.in:
+ * tcl.m4:
+
+2002-09-29 davygrvy
+ * itcl/win/makefile.vc:
+ needed `if !exist` logic for the non-8.4 case.
+
+ * itcl/win/makefile.vc:
+ Use virtual base address rule from the master file contained in
+ the Tcl source.
+
+ * itcl/library/itcl.tcl:
+ Reference to [itcl_class] removed.
+
+2002-08-12 andreas_kupries
+ * itcl/generic/itcl_class.c (ItclDestroyClassNamesp): Applied itcl
+ patch 593112 provided by Reinhard Max
+ <rmax@users.sourceforge.net>. This fixes the segfault in itcl bug
+ 577719, reported by Simon White <s_a_white@users.sourceforge.net>.
+
+2002-08-11 davygrvy
+ * itcl/generic/itcl_class.c (Itcl_ClassVarResolver,
+ Itcl_ClassCompiledVarResolver):
+ * itcl/generic/itcl_object.c (Itcl_ScopedVarResolver,
+ ItclTraceThisVar):
+ * itcl/generic/itcl_parse.c (Itcl_ParseVarResolver):
+ * itcl/generic/itclInt.decls:
+ Signiture changes to match 8.4b2 CONST'ification of the
+ Tcl_ResolveVarProc typedef. Stubs slot positions nor sizes
+ have changed -- just the sigs.
+
+ * itk/win/makefile.vc:
+ more install target fixes
+
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itclStubInit.c: Re-gen from modified genStubs.tcl
+ for the special TCL_EXTERN macro changes that Itcl has.
+
+ * itk/generic/itk.h: speling error.
+
+ * README.vc.txt: This no longer is needed.
+
+ * itcl/generic/itcl.h: Borland TCL_EXTERN support revistited and
+ refreshed.
+
+ * itcl/win/makefile.vc:
+ * itcl/Makefile.in: Removed itcl_obsolete.c from the build
+ instructions.
+
+ * itcl/generic/itcl_obsolete.c (deleted):
+ * itcl/generic/itcl_cmds.c: Removed old [itcl_class] command
+ and old backward support that came with it.
+
+ * itk/generic/itk.h:
+ * itk/generic/itcl.h: Borland TCL_EXTERN support revistited and
+ refreshed.
+
+ * itk/generic/itkDecls.h:
+ * itk/generic/itkStubInit.c: regenerated for newer Borland TCL_EXTERN
+ support refreshing.
+
+ * itk/generic/itk_option.c (Itk_TraceClassDestroy):
+ Signiture change to match 8.4b2 CONST'ification.
+
+ * itk/generic/itk_archetype.c: CONST`ification updates.
+
+ * itk/win/makefile.vc: genstubs target fixed.
+
+ * itcl/doc/itcl_class.n:
+ * itcl/doc/itcl_info.n: old docs for old commands removed, removed.
+
+ * itk/win/makefile.vc: install target fixed
+
+2002-07-17 hobbs
+
+ * itcl/itclConfig.sh.in: dupped vars to have both itcl_* and
+ ITCL_* to support apps that used old-style itclConfig.sh.
+
+2002-06-13 davygrvy
+ * itk/library/Toplevel.itk (destructor):
+ * itk/library/Widget.itk (destructor): Remove the
+ hull component after possibly destroying the hull.
+ Destroy any component that still exists after
+ destroying the hull since it must have been
+ created outside the hull.
+ * itk/tests/toplevel.test:
+ * itk/tests/widget.test: Test that a component
+ outside the hull is destroyed when the mega-widget
+ is destroyed. Also check for case where one external
+ widget contains another.
+ [Patch 515010]
+
+2002-05-14 davygrvy
+ * itk/generic/itk_archetype.c:
+ * itk/library/itk.tcl:
+
+2002-05-14 Mo DeJong <mdejong@users.sourceforge.net>
+
+ * itk/generic/itk_archetype.c (ArchComponent, Itk_ArchCompDeleteCmd,
+ Itk_CreateArchComponent, Itk_DelArchComponent): Save a copy
+ of the window path name in the ArchComponent struct and use
+ it in the Itk_ArchCompDeleteCmd method. The old code was
+ invoking Tk_PathName(tkwin) on a Tk_Window which lead to
+ a memory access on memory that has already been free'd
+ when the widget was destroyed.
+ * itk/library/itk.tcl (itk::remove_destroy_hook): Don't attempt
+ to remove the widget binding if the widget has already been
+ destroyed.
+
+2002-05-02 davygrvy
+ * itcl/configure:
+ * itk/configure:
+ re'gened with autoconf 2.13-4
+
+2002-04-25 davygrvy
+ * itcl/win/makefile.vc:
+ install bug set pkgIndex.tcl to load itcl33.dll.dll. corrected.
+
+ * itcl/doc/is.n:
+ Changed "last update" to be 3.3 instead 3.2
+
+ * itcl/generic/itcl_cmds.c:
+ Patch from Brett Schwarz for not exporting itcl::is [Patch
+ 548757]
+
+ * itcl/doc/is.n:
+ small format fix.
+
+2002-04-20 davygrvy
+ * config.vc:
+ * itcl/win/.cvsignore:
+ * itcl/win/makefile.vc:
+ * itcl/win/nmakehlp.c:
+ * itcl/win/toaster.bmp:
+ * makefile.vc:
+ * rules.vc:
+ makefile.vc changes.
+
+ * pkg.vc:
+ missed this file..
+
+ * itcl/configure.in:
+ * itcl/generic/itcl.h:
+ With a new command, we need to bump up the version to 3.3.0
+
+ * itcl/generic/itcl_objects.c:
+ I missed a CONST for ItclTraceThisVar()
+
+ * itcl/doc/is.n:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itclStubInit.c:
+ * itcl/generic/itcl_cmds.c:
+ * itcl/tests/basic.test:
+ Added the itcl::is command from Brett Schwarz.
+ Untested by me, but looks great.
+ [Patch 546343 546344 546345 546346]
+
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itclIntDecls.h:
+ * itcl/generic/itcl_class.c:
+ * itcl/generic/itcl_objects.c:
+ * itk/generic/itk_option.c:
+ minor changes for CONST'ification project.
+
+ * itk/win/.cvsignore:
+ * itk/win/makefile.vc:
+ * itk/win/nmakehlp.c:
+ * itk/win/toaster.bmp:
+ makefile.vc changes to match the core.
+
+ * itk/configure.in:
+ missed this file, too
+
+2002-04-11 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/configure:
+ * itk/configure:
+ * tcl.m4: Enabled COFF as well as CV style debug info with
+ --enable-symbols to allow Dr. Watson users to see function info.
+ More info on debugging levels can be obtained at:
+ http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
+
+2002-04-03 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * */configure: regend
+ * configure.in: removed prefix default calls
+ * itcl/configure.in:
+ * itk/configure.in:
+ * tcl.m4: updated of TEA base
+
+ * itcl/tests/mkindex.test: corrected to work tests are run from a
+ different build dir
+
+ * itcl/Makefile.in:
+ * itk/Makefile.in: updated to use DESTDIR for install everywhere
+ and added shell and gdb targets
+
+2002-04-01 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/Makefile.in (install-lib-binaries):
+ * itk/Makefile.in (install-lib-binaries): ensure that dynamic
+ library is installed executable
+
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in: redid generation of itclConfig.sh (making it
+ work on Windows broke Unix). Retested so that it is happy on
+ Windows and Unix (calls ${CYGPATH} only when necessary).
+
+2002-03-29 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * */configure: regenerated
+ * tcl.m4: updated from sample changes
+
+2002-03-28 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure:
+ * configure.in:
+ * tcl.m4:
+ * itcl/Makefile.in:
+ * itcl/configure:
+ * itcl/configure.in:
+ * itcl/itclConfig.sh.in:
+ * itcl/pkgIndex.tcl.in:
+ * itcl/generic/itclStubLib.c:
+ * itcl/tests/all.tcl:
+ * itk/Makefile.in:
+ * itk/configure:
+ * itk/configure.in:
+ * itk/pkgIndex.tcl.in:
+ * itk/tests/all.tcl:
+ * config/installFile.tcl (removed):
+ * config/mkinstalldirs (removed): Massive overhaul (and
+ simplification) of the build framework to adapt to TEA 2002
+ specs. Dynamic libraries now install in the pkglibdir (before it
+ was libdir), itclConfig.sh is properly generated and itk uses it.
+ Stubs libraries are now correctly generated and used. You can now
+ build and test itcl/itk against built but not installed Tcl/Tk.
+
+2002-03-27 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure:
+ * tcl.m4: corrected pointer to ldAix to use Tcl version and add
+ -lc for AIX builds
+
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in: corrected to use SHLIB_LD_LIBS instead of
+ TCL_SHLIB_LD_LIBS.
+
+2002-03-02 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * itcl/Makefile.in:
+ * itcl/generic/itclInt.decls:
+ * itcl/generic/itcl_bicmds.c:
+ * itcl/generic/itcl_class.c:
+ * itcl/generic/itcl_ensemble.c:
+ * itcl/generic/itcl_methods.c:
+ * itcl/generic/itcl_objects.c:
+ * itcl/generic/itcl_obsolete.c:
+ * itcl/generic/itcl_parse.c:
+ * itcl/generic/itcl_util.c:
+ * itk/Makefile.in:
+ * itk/generic/itk.decls:
+ * itk/generic/itk_archetype.c:
+ * itk/generic/itk_option.c: Applied SF patch #511035 (provided by
+ Don Porter <dgp@users.sourceforge.net>) to remove warnings
+ related to TIP 27.
+
+2002-01-16 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * tcl.m4: Fix from patch #501979 applied.
+
+ * itcl/configure:
+ * itk/configure: Regenerated.
+
+2002-01-10 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl_cmds.c (Itcl_FindObjectsCmd, Itcl_FindClassesCmd):
+ optimized use of Tcl_Objs to remove the creation of new ones that ended
+ just being set to the interp's result. Let it use the result obj
+ instead. Changed a few Tcl_GetStringFromObj() calls to Tcl_GetString()
+ when a length int* isn't used.
+
+ * itcl/generic/itcl.h: fix from patch #501979 applied.
+
+2001-11-24 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclIntDecls.h:
+ * itk/generic/itk.h:
+ * itk/generic/itkDecls.h:
+ * itk/generic/itk.decls: Changed redefining the macro EXTERN to
+ making a new macro called TCL_EXTERN to get this Borland problem
+ squashed without breaking all headers included after itcl.h that
+ use the EXTERN macro.
+
+2001-11-05 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/tests/ensemble.test: fixed 1.5 to work with 8.4 updated
+ warning messages
+
+2001-10-29 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure:
+ * itcl/configure:
+ * itk/configure: regen'ed
+ * tcl.m4: changed MSSDK cygpath check to use pipe instead of
+ subshell to only occur at the right point.
+
+2001-10-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure:
+ * tcl.m4:
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in: added Win64 build support.
+
+ * itcl/generic/itcl_methods.c (Itcl_GetMemberFuncUsage): corrected
+ casting of CONST char * to prevent compile warnings.
+
+ * itcl/generic/itcl_ensemble.c (CreateEnsemble, AddEnsemblePart):
+ made the <8.4 Tcl header version changes easier in the code.
+
+2001-10-24 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * itcl/generic/itcl_cmds.c (Itcl_FindObjectsCmd): fixed potential
+ crash where cmdName was never initialized
+
+2001-09-06 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclDecls.h:
+ * itcl/generic/itclInt.h:
+ * itcl/generic/itclIntDecls.h:
+ * itk/generic/itk.h:
+ * itk/generic/itkDecls.h: EXTERN macro changed to support TIP#60
+ in draft form. [Incr Tcl] will be the "successful implementation"
+ part of the TIP.
+
+2001-09-06 David Gravereaux <davygrvy@pobox.com>
+
+ * itcl/generic/itcl_util.c: Threading patch from "Haneef Mohammed"
+ <haneef@mindspringx.com>.
+ [Patch: 445670]
+
+ -=[ 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-05-28 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * 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-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.
+
+ * 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.
+
+ * 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
+
+ * itcl/configure:
+ * 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.
+
+ * .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.
+
+ * itcl/.cvsignore:
+ * itcl/configure:
+ * itcl/configure.in:
+ * itk/.cvsignore:
+ * itk/configure:
+ * itk/configure.in:
+ Updated patch level to 3.2.1 in prep for a release.
+
+ * itcl/win/makefile.vc:
+ * itcl/win/rc/itcl.rc:
+ yet another rc problem repaired
+
+ * itcl/win/makefile.vc:
+ rc problem repaired
+
+2001-05-22 davygrvy
+ * itcl/generic/itcl_objects.c:
+ * itcl/tests/interp.test:
+ patch #426205, self deleting class caused core dump.
+
+ * 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.
+
+ * 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/win/pkgIndex.tcl:
+ * itk/win/pkgIndex.tcl:
+ we'll auto gen these from the makefile
+
+ * 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:
+ * itcl/configure.in:
+ * itk/configure:
+ * itk/configure.in:
+ 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 <a.kupries@westend.com>
+
+ * itk/generic/itk_archetype.c: Fixed bug 227876.
+
+ * itcl/generic/itcl_objects.c: Fixed bug 227824 (and several
+ duplicates).
+
+ * 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 rcs 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:
+ 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:
+ 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.
+
+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 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:
+ Changed this to use installFiles.tcl instead of install-sh
+
+ * itcl/generic/itclStubLib.c:
+ Fix for new Itcl_InitStubs.c
+
+ * 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.
+
+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
+
+ * config/install-sh: 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_objects.c:
+ * itcl/tests/all:
+ * 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.
+
+2000-06-01 wart
+ * itcl/Makefile.in:
+ * itcl/tests/basic.test:
+ * itcl/tests/body.test:
+ * itcl/tests/chain.test:
+ * itcl/tests/delete.test:
+ * itcl/tests/ensemble.test:
+ * itcl/tests/import.test:
+ * itcl/tests/info.test:
+ * itcl/tests/inherit.test:
+ * itcl/tests/interp.test:
+ * itcl/tests/local.test:
+ * itcl/tests/methods.test:
+ * itcl/tests/mkindex.test:
+ * itcl/tests/namespace.test:
+ * itcl/tests/protection.test:
+ * itcl/tests/scope.test:
+ * 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:
+ 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\
+
+ * 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
+
+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
+
+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)
+
+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-24 wart
+ * itcl/configure:
+ * itk/configure:
+ Regenerated configure scripts to pick up changes to tcl.m4
+
+ * itcl/configure:
+ * itk/configure:
+ Regenerated configure scripts to pick up recent changes to tcl.m4
+
+ * tcl.m4:
+ * tcl.m4:
+ Updated to reflect recent TEA changes
+
+2000-01-18 wart
+ * tcl.m4:
+ Updated to reflect recent TEA changes
+
+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/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.
+
+ * 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/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-11-24 wart
+ * itcl/configure:
+ * itk/configure:
+ regenerated configure scripts to pick up tcl.m4 changes
+
+ * 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
+
+ * tcl.m4:
+ Updated to reflect recent TEA changes
+
+1999-09-21 wart
+ * itk/Makefile.in:
+ Itk now installs appropriate library files.
+
+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-09-17 wart
+ * tcl.m4:
+ Updated to reflect recent changes
+
+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-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.
+
+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.
+
+ * itcl/Makefile.in:
+ * itk/Makefile.in:
+ Temporarily removed pkg_mkIndex step from Makefile since it causes a
+ crash on Windows.
+
+1999-08-21 matt
+ * itcl/unix/Makefile.in:
+ Fixed mismatch between configure script and makefile for stub
+ enabled builds
+
+ * itk/unix/Makefile.in:
+ Fixed mismatch between conifgure script and Makefile for stub
+ enabled builds.
+
+1999-06-28 hershey
+ * itk/unix/configure.in:
+ * itk/unix/itkConfig.sh:
+ remove version number from comments
+
+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-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.
+
+ * 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.
+
+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.
+
+1999-02-05 stanton
+ * itk/unix/itkConfig.sh:
+ updated version to itcl3.0.1
+
+1999-01-15 rjohnson
+ * itcl/tests/mkindex.itcl:
+
+ Fixed typo in tcl file.
+
+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-08-23 stanton
+ * itcl/doc/scope.n:
+ fixed section
+
+1998-08-20 welch
+ * itcl/generic/itcl.h:
+ Patchlevel 3.0.1
+
+1998-08-18 welch
+ * itk/win/pkgIndex.tcl:
+ Fixed loading .dll
+
+ * itcl/win/pkgIndex.tcl:
+ fixed loading .dll
+
+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".
+
+1998-08-12 welch
+ * itk/win/makefile.bc:
+ * itk/win/makefile.vc:
+ Fixes for tkConsole
+
+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
+
+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/generic/itclInt.h:
+ changed to reflect new resolver api
+
+ * itcl/generic/itcl_bicmds.c:
+ * itcl/generic/itcl_ensemble.c:
+ changed to reflect new CompiledLocal structure
+
+ * itcl/generic/itcl_class.c:
+ changed to reflect changes in resolver api
+
+ * itcl/doc/scope.n: fixed section name
+
+ * itcl/generic/itcl_cmds.c:
+ * itcl/generic/itcl_util.c:
+ * itk/doc/Toplevel.n: lint
+
+1998-08-04 escoffon
+ * itcl/generic/itcl.h:
+ * itcl/generic/itclInt.h:
+ * itk/generic/itk.h: EXPORT is now TCL_STORAGE_CLASS
+
+1998-07-29 escoffon
+ * itcl/generic/itcl.h:
+ added setting of EXPORT to DLLEXPORT if we are building the
+ itcl lib.
+
+ * 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/generic/itclInt.h:
+ - added setting of EXPORT to DLLEXPORT if we are building the itcl lib.
+ - use EXTERN instead of extern for Itcl_Assert
+
+1998-07-28 stanton
+ * itcl/generic/itcl_cmds.c:
+ * itk/generic/itk_cmds.c: changed search order
+
diff --git a/itcl/itk/INCOMPATIBLE b/itcl/itk/INCOMPATIBLE
new file mode 100644
index 00000000000..b0e2bd15d3a
--- /dev/null
+++ b/itcl/itk/INCOMPATIBLE
@@ -0,0 +1,102 @@
+
+As much as possible, I've tried to make itcl3.0 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 namespaces. John Ousterhout
+adopted a slightly different namespace model for Tcl8. The syntax
+of the "namespace" command is different, as well as the semantics
+for command/variable lookups and imports. Also, John Ousterhout
+failed to adopt ensembles into the Tcl core, so itcl can't add
+functions like "info objects" and "info classes" into the usual "info"
+command. These functions have been moved to a new "itcl::find" command.
+
+The [incr Widgets] package has changed quite a bit. There are many
+new widgets, and some of the existing widgets were streamlined--some
+of the widget options were removed to improve performance. For details,
+see the "CHANGES" file in the iwidgets3.0.0 directory. Because there
+are a lot of changes, this distribution contains the iwidgets2.2.0
+package, which is backward-compatible with the existing [incr Widgets].
+
+Following is a quick summary of changes, to serve as a porting guide.
+
+
+----------------------------------|-------------------------------------
+ You have code like this... | change to this...
+----------------------------------|-------------------------------------
+ namespace foo {...} | namespace eval foo {...}
+ |
+ delete namespace foo | namespace delete foo
+ |
+ info which -namespace $name | if {![string match ::* $name]} {
+ | set name [namespace current]::$name
+ | }
+ |
+ info context | namespace current
+ |
+ info objects ... | itcl::find objects ...
+ |
+ info classes ... | itcl::find classes ...
+ |
+ In itcl2.2, commands/classes | In Tcl8.0, all commands/classes that
+ could be found in any namespace | are not in the global namespace must
+ in a hierarchy. So within a | be qualified. For example, the
+ namespace like "iwidgets" you | "iwidgets" namespace has a bunch of
+ could use simple names like: | classes within it. You must always
+ | refer to these classes with qualified
+ | names, like this:
+ |
+ Labeledwidget::alignlabels ... | iwidgets::Labeledwidget::alignlabels ...
+ Pane #auto | iwidgets::Pane #auto
+ |
+ |
+ In itcl2.2, the "global" | In Tcl8.0, the "variable" command is
+ command was used to access | used to access variables in a namespace:
+ variables in a namespace: |
+ |
+ namespace foo { | namespace eval foo {
+ variable x 0 | variable x 0
+ proc example {} { | proc example {} {
+ global x | variable x
+ return $x | return $x
+ } | }
+ } | }
+ |
+ |
+ public itk_component add... | itk_component add ...
+ protected itk_component add... | itk_component add -protected ...
+ private itk_component add... | itk_component add -private ...
+ |
+ |
+
+ OTHER DIFFERENCES
+------------------------------------------------------------------------
+- You can now use instance variables (along with the usual common
+ variables) with the "scope" command. Thus, you're no longer forced
+ to use the trick with a common array like: [scope modes($this)]
+
+- All widget/mega-widget access commands (e.g., ".foo.bar") are
+ installed in the global namespace. Therefore, they can be accessed
+ from any namespace context.
+
+- The [incr Widgets] package used to be loaded by default. You must
+ now use the "package require" command to load it explicitly:
+
+ package require Iwidgets <-- loads the lastest (iwidgets3.0.0)
+ package require -exact Iwidgets 2.2 <-- loads the older release
+
+- Command/variable names are now reported with fully-qualified names
+ in "info" inquiries and in error messages.
+
+- No public/protected/private declarations outside of class definitions
+
+- The "scope" command used to be more or less the same as the "code"
+ command. In itcl3.x, "scope" is only for variables, and if a variable
+ is not recognized, you'll get an error.
+
+- The "code" command used to return a value like "@scope ...". It now
+ returns "namespace inscope ...", to be compatible with Tcl8.
+
+- The prototypes for Itcl_RegisterC and Itcl_FindC have changed. You
+ can now include ClientData when you register C functions. Also, there
+ is a new Itcl_RegisterObjC function for (objc,objv)-style command
+ handlers.
diff --git a/itcl/itk/Makefile.in b/itcl/itk/Makefile.in
index 25439841256..338822bd491 100644
--- a/itcl/itk/Makefile.in
+++ b/itcl/itk/Makefile.in
@@ -7,6 +7,7 @@
# replaced in the actual Makefile.
#
# Copyright (c) 1999 Scriptics Corporation.
+# Copyright (c) 2002-2004 ActiveState Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -14,100 +15,52 @@
# RCS: @(#) $Id$
#========================================================================
-# Edit the following few lines when writing a new extension
+# The names of the source files is defined in the configure script.
+# The object files are used for linking into the final library.
+# This will be used when a dist target is added to the Makefile.
+# It is not important to specify the directory, as long as it is the
+# $(srcdir) or in the generic, win or unix subdirectory.
#========================================================================
-#========================================================================
-# Change the name of the variable "exampleA_LIB_FILE" to match the one
-# used in the configure script. This is the parameterized name of the
-# library that we are building.
-#========================================================================
+PKG_SOURCES = @PKG_SOURCES@
+PKG_OBJECTS = @PKG_OBJECTS@
-lib_BINARIES=$(itk_LIB_FILE) $(itkstub_LIB_FILE)
-BINARIES=$(lib_BINARIES)
+PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
+PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
#========================================================================
-# Enumerate the names of the source files included in this package.
-# This will be used when a dist target is added to the Makefile.
-#========================================================================
-
-WIN_DIR=$(srcdir)/win
-UNIX_DIR=$(srcdir)/unix
-GENERIC_DIR=$(srcdir)/generic
-PLATFORM_DIR=@PLATFORM_DIR@
-
-WIN_SOURCES=$(PLATFORM_DIR)/tclAppInit.c \
- $(PLATFORM_DIR)/dllEntryPoint.c
-UNIX_SOURCES=$(PLATFORM_DIR)/tclAppInit.c
-GENERIC_SOURCES = $(GENERIC_DIR)/itk_cmds.c \
- $(GENERIC_DIR)/itk_option.c \
- $(GENERIC_DIR)/itk_archetype.c \
- $(GENERIC_DIR)/itk_util.c \
- $(GENERIC_DIR)/itkStubInit.c \
- $(GENERIC_DIR)/itkStubLib.c
-PLATFORM_SOURCES = @PLATFORM_SOURCES@
-itk_SOURCES = $(PLATFORM_SOURCES) $(GENERIC_SOURCES)
-SOURCES = $(itk_SOURCES)
-
-#========================================================================
-# Enumerate the names of the object files included in this package.
-# These objects are created and linked into the final library. In
-# most cases these object files will correspond to the source files
-# above.
-#
+# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
+# this package that need to be installed, if any.
#========================================================================
-WIN_OBJECTS = dllEntryPoint.$(OBJEXT)
-UNIX_OBJECTS =
-GENERIC_OBJECTS = itk_cmds.$(OBJEXT) \
- itk_option.$(OBJEXT) \
- itk_archetype.$(OBJEXT) \
- itk_util.$(OBJEXT) \
- itkStubInit.$(OBJEXT) \
- itkStubLib.$(OBJEXT)
-PLATFORM_OBJECTS = @PLATFORM_OBJECTS@
-itk_OBJECTS = $(PLATFORM_OBJECTS) $(GENERIC_OBJECTS)
-itkstub_OBJECTS = itkStubLib.$(OBJEXT)
-OBJECTS = $(itk_OBJECTS) $(itkstub_OBJECTS)
+PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
#========================================================================
-# The substitution of "exampleA_LIB_FILE" into the variable name below
-# let's us refer to the objects for the library without knowing the name
-# of the library in advance. It also lets us use the "$@" variable in
-# the rule for building the library, so we can refer to both the list of
-# objects and the library itself in a platform-independent manner.
+# This is a list of header files to be installed
+# itk.h includes itclInt.h, which needs itclIntDecls.h,
+# so we must install them.
#========================================================================
-itk_LIB_FILE = @itk_LIB_FILE@
-$(itk_LIB_FILE)_OBJECTS = $(itk_OBJECTS)
-
-itkstub_LIB_FILE = @itkstub_LIB_FILE@
-$(itkstub_LIB_FILE)_OBJECTS = $(itkstub_OBJECTS)
-
-itclstub_LIB_FILE = @itclstub_LIB_FILE@
-
-tkstub_LIB_SPEC = @tkstub_LIB_SPEC@
+PKG_HEADERS = @PKG_HEADERS@
#========================================================================
-# This is a list of header files to be installed
+# Nothing of the variables below this line should need to be changed.
+# Please check the TARGETS section below to make sure the make targets
+# are correct.
#========================================================================
-GENERIC_HDRS= \
- $(srcdir)/generic/itk.h \
- $(srcdir)/generic/itkDecls.h
+itk_LIB_FILE = @itk_LIB_FILE@
+itkstub_LIB_FILE = @itkstub_LIB_FILE@
+itclstub_LIB_FILE = @itclstub_LIB_FILE@
#========================================================================
# Add additional lines to handle any additional AC_SUBST cases that
# have been added to the configure script.
#========================================================================
-SAMPLE_NEW_VAR=@SAMPLE_NEW_VAR@
-
-ITK_LIBRARY = $(prefix)/lib/itk$(VERSION)
-
-ITK_GENERIC_DIR_NATIVE = @ITK_GENERIC_DIR_NATIVE@
-ITK_UNIX_DIR_NATIVE = @ITK_UNIX_DIR_NATIVE@
-ITK_WIN_DIR_NATIVE = @ITK_WIN_DIR_NATIVE@
+ITK_GENERIC_DIR_NATIVE = @ITK_GENERIC_DIR_NATIVE@
+ITK_UNIX_DIR_NATIVE = @ITK_UNIX_DIR_NATIVE@
+ITK_WIN_DIR_NATIVE = @ITK_WIN_DIR_NATIVE@
#========================================================================
# Nothing of the variables below this line need to be changed. Please
@@ -115,118 +68,110 @@ ITK_WIN_DIR_NATIVE = @ITK_WIN_DIR_NATIVE@
# correct.
#========================================================================
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@@VERSION@
-pkglibdir = $(libdir)/@PACKAGE@@VERSION@
-pkgincludedir = $(includedir)/@PACKAGE@@VERSION@
-
-top_builddir = .
-
-#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@
-INSTALL_STRIP_FLAG =
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-CC = @CC@
-CFLAGS_DEBUG = @CFLAGS_DEBUG@
-CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
-CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
-CLEANFILES = @CLEANFILES@
-EXEEXT = @EXEEXT@
-LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
-LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
-LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
-MAKE_LIB = @MAKE_LIB@
-MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
-MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
-OBJEXT = @OBJEXT@
-RANLIB = @RANLIB@
-SHLIB_CFLAGS = @SHLIB_CFLAGS@
-SHLIB_LD = @SHLIB_LD@
-SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
-SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
-STLIB_LD = @STLIB_LD@
-TCL_BIN_DIR = @TCL_BIN_DIR@
-TCL_DEFS = @TCL_DEFS@
-TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@
-TCL_LD_FLAGS = @TCL_LD_FLAGS@
-TCL_LIBS = @TCL_LIBS@
-TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@
-TCL_SRC_DIR = @TCL_SRC_DIR@
-TCL_DBGX = @TCL_DBGX@
-TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
-TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
-TCL_TOOL_DIR_NATIVE = @TCL_TOOL_DIR_NATIVE@
+#========================================================================
+# Change the name of the variable "exampleA_LIB_FILE" to match the one
+# used in the configure script. This is the parameterized name of the
+# library that we are building.
+#========================================================================
+
+PKG_LIB_FILE = @PKG_LIB_FILE@
+PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
+
+lib_BINARIES = $(PKG_LIB_FILE)
+BINARIES = $(lib_BINARIES)
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+libdir = @libdir@
+datadir = @datadir@
+mandir = @mandir@
+includedir = @includedir@
+
+DESTDIR =
+
+PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
+pkgdatadir = $(datadir)/$(PKG_DIR)
+pkglibdir = $(libdir)/$(PKG_DIR)
+pkgincludedir = $(includedir)/$(PKG_DIR)
+
+top_builddir = .
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+CC = @CC@
+CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
+CFLAGS_WARNING = @CFLAGS_WARNING@
+CLEANFILES = @CLEANFILES@
+EXEEXT = @EXEEXT@
+LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
+MAKE_LIB = @MAKE_LIB@
+MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
+MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
+MAKE_STUB_LIB = @MAKE_STUB_LIB@
+OBJEXT = @OBJEXT@
+RANLIB = @RANLIB@
+RANLIB_STUB = @RANLIB_STUB@
+SHLIB_CFLAGS = @SHLIB_CFLAGS@
+SHLIB_LD = @SHLIB_LD@
+SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@
+SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+STLIB_LD = @STLIB_LD@
+TCL_DEFS = @TCL_DEFS@
+TCL_BIN_DIR = @TCL_BIN_DIR@
+TCL_SRC_DIR = @TCL_SRC_DIR@
+TK_SRC_DIR = @TK_SRC_DIR@
+TK_BIN_DIR = @TK_BIN_DIR@
+# This is necessary for packages that use private headers
TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@
-TCL_UNIX_DIR_NATIVE = @TCL_UNIX_DIR_NATIVE@
-TCL_WIN_DIR_NATIVE = @TCL_WIN_DIR_NATIVE@
-INCLUDE_DIR_NATIVE = @INCLUDE_DIR_NATIVE@
-TCL_BMAP_DIR_NATIVE = @TCL_BMAP_DIR_NATIVE@
-TCL_PLATFORM_DIR_NATIVE = @TCL_PLATFORM_DIR_NATIVE@
-TCL_GENERIC_DIR_NATIVE = @TCL_GENERIC_DIR_NATIVE@
-TK_TOP_DIR_NATIVE = $(TK_SRC_DIR)
-TK_SRC_DIR = @TK_SRC_DIR@
-TCLSH_PROG = @TCLSH_PROG@
-WISH_PROG = @WISH_PROG@
-TK_XINCLUDES = @TK_XINCLUDES@
-TCL_INCLUDES = @TCL_INCLUDES@
-TK_INCLUDES = @TK_INCLUDES@
-ITCL_INCLUDES = @ITCL_INCLUDES@
-ITK_INCLUDES = @ITCL_INCLUDES@ @ITK_INCLUDES@ @TK_XINCLUDES@
+TK_TOP_DIR_NATIVE = @TK_TOP_DIR_NATIVE@
-AUTOCONF = autoconf
+# Not used, but retained for reference of what libs Tcl required
+TCL_LIBS = @TCL_LIBS@
-LDFLAGS = $(LDFLAGS_DEFAULT)
+#========================================================================
+# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
+# package without installing. The other environment variables allow us
+# to test against an uninstalled Tcl. Add special env vars that you
+# require for testing here (like TCLX_LIBRARY).
+#========================================================================
-INCLUDES = @TCL_INCLUDES@ @TK_INCLUDES@ $(ITK_INCLUDES)
+EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
+TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
+ TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
+ ITCL_LIBRARY=`@CYGPATH@ @itcl_SRC_DIR@/library` \
+ ITK_LIBRARY=`@CYGPATH@ $(srcdir)/library` \
+ @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
+ PATH="$(EXTRA_PATH):$(PATH)" \
+ TCLLIBPATH="$(top_builddir) @itcl_BIN_DIR@"
+TCLSH_PROG = @TCLSH_PROG@
+WISH_PROG = @WISH_PROG@
+TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
+WISH = $(TCLSH_ENV) $(WISH_PROG)
-EXTRA_CFLAGS = $(AC_FLAGS) $(PROTO_FLAGS) $(MEM_DEBUG_FLAGS) $(NO_DEPRECATED_FLAGS) $(TCL_EXTRA_CFLAGS)
+INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
-DEFS = @DEFS@ $(EXTRA_CFLAGS) -DITK_LIBRARY=\"$(ITK_LIBRARY)\"
+PKG_CFLAGS = @PKG_CFLAGS@
-ACLOCAL_M4 = $(srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../config/mkinstalldirs
+DEFS = @DEFS@ $(PKG_CFLAGS) \
+ -DITK_LIBRARY=\"$(pkglibdir)\" -DUSE_NON_CONST
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-AR = ar
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+CONFIG_CLEAN_FILES = @CONFIG_CLEAN_FILES@ Makefile itkConfig.sh pkgIndex.tcl
+
+CPPFLAGS = @CPPFLAGS@
+LIBS = @PKG_LIBS@ @LIBS@
+AR = @AR@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
#========================================================================
# Start of user-definable TARGETS section
@@ -264,16 +209,11 @@ install-binaries: binaries install-lib-binaries install-bin-binaries
#========================================================================
install-libraries: libraries
- $(mkinstalldirs) $(includedir)
- @echo "Installing header files in $(includedir)"
- @for i in $(GENERIC_HDRS) ; do \
- echo "Installing $$i" ; \
- $(INSTALL_DATA) $$i $(includedir) ; \
- done;
- @echo "Installing library files in $(ITK_LIBRARY)"
- @for i in $(srcdir)/library/*.* $(srcdir)/library/tclIndex ; do \
- echo "Installing $$i" ; \
- $(INSTALL_DATA) $$i $(ITK_LIBRARY) ; \
+ @mkdir -p $(DESTDIR)$(includedir)
+ @echo "Installing header files in $(DESTDIR)$(includedir)"
+ @list='$(PKG_HEADERS)'; for i in $$list; do \
+ echo "Installing $(srcdir)/$$i" ; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
done;
#========================================================================
@@ -282,50 +222,49 @@ install-libraries: libraries
#========================================================================
install-doc: doc
- $(mkinstalldirs) $(mandir)/mann
- @echo "Installing man pages in $(mandir)"
- @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
-
-test: $(TCLSH_PROG)
- $(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` \
- -exedir `@CYGPATH@ $(bindir)` $(TESTFLAGS)
+ @mkdir -p $(DESTDIR)$(mandir)/mann
+ @echo "Installing man pages in $(DESTDIR)$(mandir)"
+ @cd $(srcdir)/doc; for i in *.n; do \
+ echo "Installing $$i"; \
+ rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
+ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
+ $$i > $(DESTDIR)$(mandir)/mann/$$i; \
+ chmod 444 $(DESTDIR)$(mandir)/mann/$$i; \
+ done
+
+test: binaries libraries
+ $(WISH) `@CYGPATH@ $(srcdir)/tests/all.tcl` -load "package require Itk" $(TESTFLAGS) | cat
+
+shell: binaries libraries
+ @$(WISH) $(SCRIPT)
+
+gdb:
+ $(TCLSH_ENV) gdb $(WISH_PROG) $(SCRIPT)
depend:
#========================================================================
-# Enumerate the names of the object files included in this package.
-# These objects are created and linked into the final library. In
-# most cases these object files will correspond to the source files
-# above.
-#
-# $(exampleA_LIB_FILE) should be listed as part of the BINARIES variable
-# at the top of the Makefile. That will ensure that this target is built
-# when you run "make binaries".
+# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
+# mentioned above. That will ensure that this target is built when you
+# run "make binaries".
#
-# You shouldn't need to modify this target, except to change the package
-# name from "exampleA" to your package's name.
+# The $(PKG_OBJECTS) objects are created and linked into the final
+# library. In most cases these object files will correspond to the
+# source files above.
#========================================================================
-$(itk_LIB_FILE): $(itk_OBJECTS)
- -rm -f $(itk_LIB_FILE)
- @MAKE_LIB@
- $(RANLIB) $(itk_LIB_FILE)
+$(PKG_LIB_FILE): $(PKG_OBJECTS)
+ -rm -f $(PKG_LIB_FILE)
+ ${MAKE_LIB}
+ $(RANLIB) $(PKG_LIB_FILE)
-$(itkstub_LIB_FILE): $(itkstub_OBJECTS)
- -rm -f $(itkstub_LIB_FILE)
- @MAKE_STATIC_LIB@
- $(RANLIB) $(itkstub_LIB_FILE)
+$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
+ -rm -f $(PKG_STUB_LIB_FILE)
+ ${MAKE_STUB_LIB}
+ $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
#========================================================================
# We need to enumerate the list of .c to .o lines here.
-# Unfortunately, there does not seem to be any other way to do this
-# in a Makefile-independent way. We can't use VPATH because it picks up
-# object files that may be located in the source directory.
#
# In the following lines, $(srcdir) refers to the toplevel directory
# containing your extension. If your sources are in a subdirectory,
@@ -333,32 +272,63 @@ $(itkstub_LIB_FILE): $(itkstub_OBJECTS)
#
# exampleA.$(OBJEXT): $(srcdir)/src/win/exampleA.c
# $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/win/exampleA.c` -o $@
+#
+# Setting the VPATH variable to a list of paths will cause the makefile
+# to look into these paths when resolving .c to .obj dependencies.
+# As necessary, add $(srcdir):$(srcdir)/compat:....
#========================================================================
-dllEntryPoint.$(OBJEXT): $(WIN_DIR)/dllEntryPoint.c
- $(COMPILE) -c `@CYGPATH@ $(WIN_DIR)/dllEntryPoint.c` -o $@
+VPATH = $(srcdir)/unix:$(srcdir)/generic:$(srcdir)/win
-tclAppInit.$(OBJEXT): $(PLATFORM_DIR)/tclAppInit.c
- $(COMPILE) -c `@CYGPATH@ $(PLATFORM_DIR)/tclAppInit.c` -o $@
+.c.$(OBJEXT):
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
-itkStubInit.$(OBJEXT): $(GENERIC_DIR)/itkStubInit.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itkStubInit.c` -o $@
+#========================================================================
+# Distribution creation
+# You may need to tweak this target to make it work correctly.
+#========================================================================
-itkStubLib.$(OBJEXT): $(GENERIC_DIR)/itkStubLib.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itkStubLib.c` -o $@
+#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
+COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
+DIST_ROOT = /tmp/dist
+DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
-itk_cmds.$(OBJEXT): $(GENERIC_DIR)/itk_cmds.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itk_cmds.c` -o $@
+dist-clean:
+ rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-itk_option.$(OBJEXT): $(GENERIC_DIR)/itk_option.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itk_option.c` -o $@
+dist: dist-clean doc
+ mkdir -p $(DIST_DIR)
+ cp -p $(srcdir)/license* $(srcdir)/aclocal.m4 $(srcdir)/configure \
+ $(srcdir)/*.in $(DIST_DIR)/
+ chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
+ chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
-itk_archetype.$(OBJEXT): $(GENERIC_DIR)/itk_archetype.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itk_archetype.c` -o $@
+ mkdir $(DIST_DIR)/tclconfig
+ cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
+ $(DIST_DIR)/tclconfig/
+ chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
+ chmod +x $(DIST_DIR)/tclconfig/install-sh
-itk_util.$(OBJEXT): $(GENERIC_DIR)/itk_util.c
- $(COMPILE) -c `@CYGPATH@ $(GENERIC_DIR)/itk_util.c` -o $@
+ list='demos doc examples generic library tests win win/rc'; \
+ for p in $$list; do \
+ if test -d $(srcdir)/$$p ; then \
+ mkdir $(DIST_DIR)/$$p; \
+ for q in $(srcdir)/$$p/*; do \
+ if test -f $$q ; then \
+ cp -p $$q $(DIST_DIR)/$$p/; \
+ fi; \
+ done; \
+ fi; \
+ done
+ list='CHANGES ChangeLog INCOMPATIBLE README TODO'; \
+ for p in $$list; do \
+ if test -f $(srcdir)/../$$p ; then \
+ cp -p $(srcdir)/../$$p $(DIST_DIR)/; \
+ fi; \
+ done
+
+ (cd $(DIST_ROOT); $(COMPRESS);)
#========================================================================
# End of user-definable section
@@ -377,9 +347,8 @@ clean:
distclean: clean
-rm -f *.tab.c
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
- -rm -f config.status
+ -rm -f $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log config.status
#========================================================================
# Install binary object libraries. On Windows this includes both .dll and
@@ -393,31 +362,39 @@ distclean: clean
# You should not have to modify this target.
#========================================================================
-install-lib-binaries: installdirs
+install-lib-binaries:
+ @mkdir -p $(DESTDIR)$(pkglibdir)
@list='$(lib_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
+ stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
+ if test "x$$stub" = "xstub"; then \
+ echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
+ else \
+ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
+ fi; \
ext=`echo $$p|sed -e "s/.*\.//"`; \
if test "x$$ext" = "xdll"; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
if test -f $$lib; then \
- echo " $(INSTALL_PROGRAM) $$lib $(DESTDIR)$(libdir)/$$lib"; \
- $(INSTALL_PROGRAM) $$lib $(DESTDIR)$(libdir)/$$lib; \
+ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
+ $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
fi; \
- else \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \
fi; \
- else :; fi; \
+ fi; \
done
- @list='$(lib_BINARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
+ @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ destp=`basename $$p`; \
+ echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
+ fi; \
done
- $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir)
+ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
+ : $(INSTALL_DATA) itkConfig.sh $(DESTDIR)$(libdir)
#========================================================================
# Install binary executables (e.g. .exe files)
@@ -425,40 +402,34 @@ install-lib-binaries: installdirs
# You should not have to modify this target.
#========================================================================
-install-bin-binaries: installdirs
+install-bin-binaries:
+ @mkdir -p $(DESTDIR)$(bindir)
@list='$(bin_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
- else :; fi; \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
+ fi; \
done
-.SUFFIXES: .c .o .obj
+.SUFFIXES: .c .$(OBJEXT)
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-#config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-# $(SHELL) ./config.status --recheck
-#$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
-# cd $(srcdir) && $(AUTOCONF)
-
-
uninstall-binaries:
- @$(NORMAL_UNINSTALL)
- list='$(BINARIES)'; for p in $$list; do \
- rm -f $(DESTDIR)$(libdir)/$$p; \
+ list='$(lib_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ p=`basename $$p`; \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(bin_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/$$p; \
done
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
- $(mkinstalldirs) $(ITK_LIBRARY)
-
-.PHONY: all binaries clean depend distclean doc install installdirs \
-libraries test
+.PHONY: all binaries clean depend distclean doc install libraries test
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/itcl/itk/README b/itcl/itk/README
new file mode 100644
index 00000000000..fee26d2851e
--- /dev/null
+++ b/itcl/itk/README
@@ -0,0 +1,311 @@
+------------------------------------------------------------------------
+ [incr Tcl] - version 3.3 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://incrtcl.sourceforge.net/
+ 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://incrtcl.sourceforge.net/
+
+ Installation on Unix Systems
+------------------------------------------------------------------------
+ 1) Obtain this distribution from an archive site like this:
+
+ http://incrtcl.sourceforge.net/
+ http://sourceforge.net/project/showfiles.php?group_id=13244
+
+ 2) Uncompress and untar the distribution:
+
+ gunzip itcl<version>.tar.gz
+ tar xvf itcl<version>.tar
+
+ 3) Run the configuration script:
+
+ cd itcl<version>
+ ./configure
+
+ or, for systems that don't recognize "#!" in shell scripts:
+
+ cd itcl<version>
+ /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 want to debug, you can add this option as well:
+
+ ./configure --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
+------------------------------------------------------------------------
+ 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/itk/TODO b/itcl/itk/TODO
new file mode 100644
index 00000000000..8183f73c10d
--- /dev/null
+++ b/itcl/itk/TODO
@@ -0,0 +1,89 @@
+=======================================================================
+ Following is a list of notes describing things which might be
+ fixed or changed in a future release of [incr Tcl]
+=======================================================================
+
+Handle this case more elegantly:
+
+class Foo {
+ constructor {args} {
+ _init
+ }
+ proc _init {} {
+ puts "once!"
+ proc _init {} {}
+ }
+}
+Foo #auto
+Foo #auto
+
+
+itcl "wish" list
+------------------------------------------------------------------
+- add virtual inheritance
+- add "border" type to canvas widget
+- add "validate" and "valid" commands for type validation
+- add "unknownvar" and provide access to object data members: "obj.var"
+- check namespace [info class] {...} as a replacement for "virtual"
+- fix "auto_load_all" problem in Tcl-DP
+ (Their implementation uses "info commands" to verify that a command
+ has been successfully autoloaded, but absolute command names like
+ "::iwidgets::fileselectiondialog" don't show up.)
+- fix "auto_load" mechanism to be extensible like "unknown"
+- fix Itcl_RegisterC() to support ClientData
+- core dump with "cmdtrace" (tclX thing?)
+
+- ideas from Nelson Macy:
+ - add "delegate" keyword for inheritance via composition?
+ - add "forward" keyword for implementing error handlers
+ - add "get" code to public variables for "cget" access
+
+- equivalent of constructor/destructor for classes
+- protected/private recognized for constructor/destructor
+- add something like Tk_CreateWidgetCommand() for widget developers
+
+
+itcl documentation cleanup
+------------------------------------------------------------------
+- add "Finance: Trading Systems" to commercial uses of Itcl (Deshaw)
+- update doc: "config" code also gets invoked on startup for itk widgets
+- update doc: add to FAQ: class with common array interacts with Tk widget
+
+itcl "to do" list
+------------------------------------------------------------------
+
+- write "auto_load_all" proc for Tcl-DP
+
+- bad errorInfo:
+ > More specifically, the constructor for the class did the following:
+ >
+ > set hull [info namespace tail $this]
+ > ::frame $hull
+ >
+ > One of the class variables had a configuration script:
+ >
+ > public variable textvariable "" {
+ > if { $textvariable != "" } {
+ > regsub "\\(.*\\)" $textvariable "" global
+ > global ::$global
+ > trace variable $textvariable w "$hull adjust"
+ > }
+ > }
+
+- add "@body" in as many places as possible to support Tcl compiler
+
+- check out itcl with Tix:
+ lappend auto_path $env(TIX_LIBRARY)
+ source "$env(IWIDGETS_LIBRARY)/init.iwidgets"
+
+ iwidgets::Dialog ._Arcattributes -title "Code: Arc Annotations"
+ -modality application
+
+ set attrframe [._Arcattributes childsite]
+
+ tixScrolledHList $attrframe.ports
+ [$attrframe.ports subwidget hlist] configure -selectmode browse
+
+ pack $attrframe.ports -expand yes -fill both -padx 10 -pady 10
+
+ ._Arcattributes activate
diff --git a/itcl/itk/aclocal.m4 b/itcl/itk/aclocal.m4
index 7ca9320395f..0f09fb8c447 100644
--- a/itcl/itk/aclocal.m4
+++ b/itcl/itk/aclocal.m4
@@ -1 +1 @@
-builtin(include,../tcl.m4)
+builtin(include,tclconfig/tcl.m4)
diff --git a/itcl/itk/configure b/itcl/itk/configure
index 4703c2aca36..23c21329479 100755
--- a/itcl/itk/configure
+++ b/itcl/itk/configure
@@ -1,40 +1,324 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.59 for itk 3.3.
#
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
-# Defaults:
-ac_help=
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
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
- --enable-threads build with threads"
-ac_help="$ac_help
- --enable-shared build and link with shared libraries [--enable-shared]"
-ac_help="$ac_help
- --enable-symbols build with debugging symbols [--disable-symbols]"
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='itk'
+PACKAGE_TARNAME='itk'
+PACKAGE_VERSION='3.3'
+PACKAGE_STRING='itk 3.3'
+PACKAGE_BUGREPORT=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS LN_S CONFIG_CLEAN_FILES TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_LIBS TK_XINCLUDES itcl_VERSION itcl_BIN_DIR itcl_SRC_DIR itcl_LIB_FILE itcl_LIB_SPEC itcl_STUB_LIB_FILE itcl_STUB_LIB_SPEC itcl_STUB_LIB_PATH CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS CLEANFILES TCL_TOP_DIR_NATIVE TCL_GENERIC_DIR_NATIVE TCL_UNIX_DIR_NATIVE TCL_WIN_DIR_NATIVE TCL_BMAP_DIR_NATIVE TCL_TOOL_DIR_NATIVE TCL_PLATFORM_DIR_NATIVE TCL_INCLUDES TK_TOP_DIR_NATIVE TK_UNIX_DIR_NATIVE TK_WIN_DIR_NATIVE TK_GENERIC_DIR_NATIVE TK_XLIB_DIR_NATIVE TK_PLATFORM_DIR_NATIVE TK_INCLUDES SHARED_BUILD AR TCLSH_PROG CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LD_LIBS LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB itkstub_LIB_FILE itk_LIB_FILE WISH_PROG LTLIBOBJS'
+ac_subst_files=''
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -43,10 +327,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -60,17 +349,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -78,59 +359,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -139,95 +420,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -236,19 +469,19 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -262,26 +495,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -298,7 +531,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -308,7 +541,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -319,58 +552,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -381,99 +613,110 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-exec 5>./config.log
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=generic/itk.h
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -483,13 +726,481 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures itk 3.3 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+X features:
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of itk 3.3:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-shared build and link with shared libraries --enable-shared
+ --enable-64bit enable 64bit support (where applicable)
+ --enable-64bit-vis enable 64bit Sparc VIS support
+ --enable-wince enable Win/CE support (where applicable)
+ --disable-load disallow dynamic loading and "load" command
+ --enable-symbols build with debugging symbols --disable-symbols
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-tcl directory containing tcl configuration (tclConfig.sh)
+ --with-tk directory containing tk configuration (tkConfig.sh)
+ --with-itcl directory containing itcl configuration (itclConfig.sh)
+ --with-x use the X Window System
+ --with-celib=DIR use Windows/CE support library from DIR
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+itk configure 3.3
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by itk $as_me 3.3, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -500,43 +1211,245 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#--------------------------------------------------------------------
+# Call TEA_INIT as the first TEA_ macro to set up initial vars.
+# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
+# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
+#--------------------------------------------------------------------
+
+
+ # TEA extensions pass this us the version of TEA they think they
+ # are compatible with.
+ TEA_VERSION="3.2"
+
+ echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
+echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6
+ if test x"${PACKAGE_NAME}" = x ; then
+ { { echo "$as_me:$LINENO: error:
+The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
+echo "$as_me: error:
+The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test x"3.2" = x ; then
+ { { echo "$as_me:$LINENO: error:
+TEA version not specified." >&5
+echo "$as_me: error:
+TEA version not specified." >&2;}
+ { (exit 1); exit 1; }; }
+ elif test "3.2" != "${TEA_VERSION}" ; then
+ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.2\", have \"${TEA_VERSION}\"" >&5
+echo "${ECHO_T}warning: requested TEA version \"3.2\", have \"${TEA_VERSION}\"" >&6
+ else
+ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
+echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
+ fi
+ case "`uname -s`" in
+ *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
+ # Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CYGPATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CYGPATH"; then
+ ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CYGPATH="cygpath -w"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
+
+ test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
+fi
+fi
+CYGPATH=$ac_cv_prog_CYGPATH
+if test -n "$CYGPATH"; then
+ echo "$as_me:$LINENO: result: $CYGPATH" >&5
+echo "${ECHO_T}$CYGPATH" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ EXEEXT=".exe"
+ TEA_PLATFORM="windows"
+ ;;
+ *)
+ CYGPATH=echo
+ EXEEXT=""
+ TEA_PLATFORM="unix"
+ ;;
+ esac
+
+ # Check if exec_prefix is set. If not use fall back to prefix.
+ # Note when adjusted, so that TEA_PREFIX can correct for this.
+ # This is needed for recursive configures, since autoconf propagates
+ # $prefix, but not $exec_prefix (doh!).
+ if test x$exec_prefix = xNONE ; then
+ exec_prefix_default=yes
+ exec_prefix=$prefix
+ fi
+
+
+
+
+ # This package name must be replaced statically for AC_SUBST to work
+
+ # Substitute STUB_LIB_FILE in case package creates a stub library too.
+
+
+ # We AC_SUBST these here to ensure they are subst'ed,
+ # in case the user doesn't call TEA_ADD_...
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- ac_n= ac_c='\c' ac_t=
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+CONFIG_CLEAN_FILES=
+if test ! -d $srcdir/tclconfig ; then
+ if test -d $srcdir/../tclconfig ; then
+ $LN_S $srcdir/../tclconfig tclconfig
+ CONFIG_CLEAN_FILES=tclconfig
+ fi
fi
ac_aux_dir=
-for ac_dir in ../config $srcdir/../config; do
+for ac_dir in tclconfig $srcdir/tclconfig; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -545,295 +1458,1218 @@ for ac_dir in ../config $srcdir/../config; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../config $srcdir/../config" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&2;}
+ { (exit 1); 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.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
#--------------------------------------------------------------------
-# __CHANGE__
-# Set your package name and version numbers here. The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows). The VERSION variable is used on the
-# other systems.
+# Load the tclConfig.sh file
#--------------------------------------------------------------------
-PACKAGE=itk
-MAJOR_VERSION=3
-MINOR_VERSION=2
-PATCHLEVEL=.1
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
+ #
+ # Ok, lets find the tcl configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tcl
+ #
+
+ if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+
+# Check whether --with-tcl or --without-tcl was given.
+if test "${with_tcl+set}" = set; then
+ withval="$with_tcl"
+ with_tclconfig=${withval}
+fi;
+ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
+echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
+ if test "${ac_cv_c_tclconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ # First check to see if --with-tcl was specified.
+ if test x"${with_tclconfig}" != x ; then
+ case ${with_tclconfig} in
+ */tclConfig.sh )
+ if test -f ${with_tclconfig}; then
+ { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
+echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
+ with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
+echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCL_BIN_DIR="# no Tcl configs found"
+ { echo "$as_me:$LINENO: WARNING: \"Cannot find Tcl configuration definitions\"" >&5
+echo "$as_me: WARNING: \"Cannot find Tcl configuration definitions\"" >&2;}
+ exit 0
+ else
+ no_tcl=
+ TCL_BIN_DIR=${ac_cv_c_tclconfig}
+ echo "$as_me:$LINENO: result: found $TCL_BIN_DIR/tclConfig.sh" >&5
+echo "${ECHO_T}found $TCL_BIN_DIR/tclConfig.sh" >&6
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
+echo $ECHO_N "checking for existence of $TCL_BIN_DIR/tclConfig.sh... $ECHO_C" >&6
+
+ if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
+ echo "$as_me:$LINENO: result: loading" >&5
+echo "${ECHO_T}loading" >&6
+ . $TCL_BIN_DIR/tclConfig.sh
+ else
+ echo "$as_me:$LINENO: result: file not found" >&5
+echo "${ECHO_T}file not found" >&6
+ fi
+
+ #
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f $TCL_BIN_DIR/Makefile ; then
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ fi
+
+ #
+ # eval is required to do the TCL_DBGX substitution
+ #
+
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #AC_SUBST(TCL_BUILD_LIB_SPEC)
+ #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
+
+
#--------------------------------------------------------------------
-# We put this here so that you can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
+# Load the tkConfig.sh file
#--------------------------------------------------------------------
-eval cat >> confdefs.h <<EOF
-#define VERSION "${VERSION}"
-EOF
+ #
+ # Ok, lets find the tk configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tk
+ #
-#------------------------------------------------------------------------
-# Handle the --prefix=... option
-#------------------------------------------------------------------------
+ if test x"${no_tk}" = x ; then
+ # we reset no_tk in case something fails here
+ no_tk=true
+
+# Check whether --with-tk or --without-tk was given.
+if test "${with_tk+set}" = set; then
+ withval="$with_tk"
+ with_tkconfig=${withval}
+fi;
+ echo "$as_me:$LINENO: checking for Tk configuration" >&5
+echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
+ if test "${ac_cv_c_tkconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ # First check to see if --with-tkconfig was specified.
+ if test x"${with_tkconfig}" != x ; then
+ case ${with_tkconfig} in
+ */tkConfig.sh )
+ if test -f ${with_tkconfig}; then
+ { echo "$as_me:$LINENO: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
+echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
+ with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tkconfig}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ else
+ { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
+echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a private Tk library
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ../tk \
+ `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
+ ../../tk \
+ `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
+ ../../../tk \
+ `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
-if test "${prefix}" = "NONE"; then
- prefix=/usr/local
fi
-if test "${exec_prefix}" = "NONE"; then
- exec_prefix=$prefix
+
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ TK_BIN_DIR="# no Tk configs found"
+ { echo "$as_me:$LINENO: WARNING: \"Cannot find Tk configuration definitions\"" >&5
+echo "$as_me: WARNING: \"Cannot find Tk configuration definitions\"" >&2;}
+ exit 0
+ else
+ no_tk=
+ TK_BIN_DIR=${ac_cv_c_tkconfig}
+ echo "$as_me:$LINENO: result: found $TK_BIN_DIR/tkConfig.sh" >&5
+echo "${ECHO_T}found $TK_BIN_DIR/tkConfig.sh" >&6
+ fi
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
+echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
+
+ if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
+ echo "$as_me:$LINENO: result: loading" >&5
+echo "${ECHO_T}loading" >&6
+ . $TK_BIN_DIR/tkConfig.sh
+ else
+ echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
+echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
+ fi
+
+ #
+ # If the TK_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TK_LIB_SPEC will be set to the value
+ # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
+ # instead of TK_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f $TK_BIN_DIR/Makefile ; then
+ TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
+ TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
+ TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
+ fi
+
+ #
+ # eval is required to do the TK_DBGX substitution
+ #
+
+ eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+ eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+ eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+
+ eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+ eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+ eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #
+ # Ok, lets find the itcl configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-itcl
+ #
+
+ if test x"${no_itcl}" = x ; then
+ # we reset no_itcl in case something fails here
+ no_itcl=true
+
+# Check whether --with-itcl or --without-itcl was given.
+if test "${with_itcl+set}" = set; then
+ withval="$with_itcl"
+ with_itclconfig=${withval}
+fi;
+ echo "$as_me:$LINENO: checking for itcl configuration" >&5
+echo $ECHO_N "checking for itcl configuration... $ECHO_C" >&6
+ if test "${ac_cv_c_itclconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ # First check to see if --with-itcl was specified.
+ if test x"${with_itclconfig}" != x ; then
+ case ${with_itclconfig} in
+ */itclConfig.sh )
+ if test -f ${with_itclconfig}; then
+ { echo "$as_me:$LINENO: WARNING: --with-itcl argument should refer to directory containing itclConfig.sh, not to itclConfig.sh itself" >&5
+echo "$as_me: WARNING: --with-itcl argument should refer to directory containing itclConfig.sh, not to itclConfig.sh itself" >&2;}
+ with_itclconfig=`echo ${with_itclconfig} | sed 's!/itclConfig\.sh$!!'`
+ fi;;
+ esac
+ if test -f "${with_itclconfig}/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
+ else
+ { { echo "$as_me:$LINENO: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" >&5
+echo "$as_me: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a private itcl installation
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in \
+ ../itcl \
+ `ls -dr ../itcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
+ `ls -dr ../itcl*[0-9].[0-9][0-9] 2>/dev/null` \
+ `ls -dr ../itcl*[0-9].[0-9] 2>/dev/null` \
+ `ls -dr ../itcl*[0-9].[0-9]* 2>/dev/null` \
+ ../../itcl \
+ `ls -dr ../../itcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
+ `ls -dr ../../itcl*[0-9].[0-9][0-9] 2>/dev/null` \
+ `ls -dr ../../itcl*[0-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../itcl*[0-9].[0-9]* 2>/dev/null` \
+ ../../../itcl \
+ `ls -dr ../../../itcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
+ `ls -dr ../../../itcl*[0-9].[0-9][0-9] 2>/dev/null` \
+ `ls -dr ../../../itcl*[0-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../../itcl*[0-9].[0-9]* 2>/dev/null` \
+ ${srcdir}/../itcl \
+ `ls -dr ${srcdir}/../itcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../itcl*[0-9].[0-9][0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../itcl*[0-9].[0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../itcl*[0-9].[0-9]* 2>/dev/null` \
+ ; do
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ if test -f "$i/unix/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i/unix; 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 ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
fi
+
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ itcl_BIN_DIR="# no itcl configs found"
+ { echo "$as_me:$LINENO: WARNING: \"Cannot find itcl configuration definitions\"" >&5
+echo "$as_me: WARNING: \"Cannot find itcl configuration definitions\"" >&2;}
+ exit 0
+ else
+ no_itcl=
+ itcl_BIN_DIR=${ac_cv_c_itclconfig}
+ echo "$as_me:$LINENO: result: found $itcl_BIN_DIR/itclConfig.sh" >&5
+echo "${ECHO_T}found $itcl_BIN_DIR/itclConfig.sh" >&6
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for existence of ${itcl_BIN_DIR}/itclConfig.sh" >&5
+echo $ECHO_N "checking for existence of ${itcl_BIN_DIR}/itclConfig.sh... $ECHO_C" >&6
+
+ if test -f "${itcl_BIN_DIR}/itclConfig.sh" ; then
+ echo "$as_me:$LINENO: result: loading" >&5
+echo "${ECHO_T}loading" >&6
+ . ${itcl_BIN_DIR}/itclConfig.sh
+ else
+ echo "$as_me:$LINENO: result: file not found" >&5
+echo "${ECHO_T}file not found" >&6
+ fi
+
+ #
+ # If the itcl_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable itcl_LIB_SPEC will be set to the value
+ # of itcl_BUILD_LIB_SPEC. An extension should make use of itcl_LIB_SPEC
+ # instead of itcl_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f ${itcl_BIN_DIR}/Makefile ; then
+ { echo "$as_me:$LINENO: WARNING: Found Makefile - using build library specs for itcl" >&5
+echo "$as_me: WARNING: Found Makefile - using build library specs for itcl" >&2;}
+ itcl_LIB_SPEC=${itcl_BUILD_LIB_SPEC}
+ itcl_STUB_LIB_SPEC=${itcl_BUILD_STUB_LIB_SPEC}
+ itcl_STUB_LIB_PATH=${itcl_BUILD_STUB_LIB_PATH}
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ITCL_INCLUDES="-I\"`${CYGPATH} ${itcl_SRC_DIR}/generic`\""
+
#--------------------------------------------------------------------
-# Check whether --enable-gcc or --disable-gcc was given. Do this
-# before AC_CYGWIN is called so the compiler can
-# be fully tested by built-in autoconf tools.
-# This macro also calls AC_PROG_CC to set the compiler if --enable-gcc
-# was not used.
+# Handle the --prefix=... option by defaulting to what Tcl gave.
+# Must be called after TEA_LOAD_TCLCONFIG and before $prefix is used.
#--------------------------------------------------------------------
- # Check whether --enable-gcc or --disable-gcc was given.
-if test "${enable_gcc+set}" = set; then
- enableval="$enable_gcc"
- ok=$enableval
+ if test "${prefix}" = "NONE"; then
+ prefix_default=yes
+ if test x"${TCL_PREFIX}" != x; then
+ { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
+echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
+ prefix=${TCL_PREFIX}
+ else
+ { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
+echo "$as_me: --prefix defaulting to /usr/local" >&6;}
+ prefix=/usr/local
+ fi
+ fi
+ if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
+ -o x"${exec_prefix_default}" = x"yes" ; then
+ if test x"${TCL_EXEC_PREFIX}" != x; then
+ { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
+echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
+ exec_prefix=${TCL_EXEC_PREFIX}
+ else
+ { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
+echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
+ exec_prefix=$prefix
+ fi
+ fi
+
+
+#------------------------------------------------------------------------
+# Standard compiler checks.
+# This sets up CC by using the CC env var, or looks for gcc otherwise.
+# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
+# the basic setup necessary to compile executables.
+#------------------------------------------------------------------------
+
+
+ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
+ # in this macro, they need to go into TEA_SETUP_COMPILER instead.
+
+ # If the user did not set CFLAGS, set it now to keep
+ # the AC_PROG_CC macro from adding "-g -O2".
+ if test "${CFLAGS+set}" != "set" ; then
+ CFLAGS=""
+ fi
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ok=no
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
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.
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # 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: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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # 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_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
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: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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
- if test $# -gt 0; then
+ if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # 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: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
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # 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_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- ;;
- esac
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ test -n "$ac_ct_CC" && break
+done
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 757 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-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
- ac_cv_prog_cc_cross=no
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
else
- ac_cv_prog_cc_cross=yes
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-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: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: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
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-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
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
else
- ac_cv_prog_gcc=no
-fi
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- GCC=
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-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: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
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
else
- ac_cv_prog_cc_g=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
+ CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
@@ -847,791 +2683,3812 @@ else
CFLAGS=
fi
fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-# Find a good install program. We prefer a C program (faster),
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ # 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:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
# ./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:865: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
fi
fi
done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-#--------------------------------------------------------------------
-# Checks to see if the make program sets the $MAKE variable.
-#--------------------------------------------------------------------
+ #--------------------------------------------------------------------
+ # Checks to see if the make program sets the $MAKE variable.
+ #--------------------------------------------------------------------
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-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
+ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftestmake <<\EOF
+ cat >conftest.make <<\_ACEOF
all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 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
+rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
-#--------------------------------------------------------------------
-# Find ranlib
-#--------------------------------------------------------------------
+ #--------------------------------------------------------------------
+ # Find ranlib
+ #--------------------------------------------------------------------
-# 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: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
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-#--------------------------------------------------------------------
-# This macro performs additional compiler tests.
-#--------------------------------------------------------------------
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-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
+ RANLIB=$ac_ct_RANLIB
else
- cat > conftest.$ac_ext <<EOF
-#line 995 "configure"
-#include "confdefs.h"
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
-int main() {
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
+ #--------------------------------------------------------------------
+ # Determines the correct binary file extension (.o, .obj, .exe etc.)
+ #--------------------------------------------------------------------
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
fi
rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
rm -f conftest*
+
fi
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
-#--------------------------------------------------------------------
-# Determines the correct binary file extension (.o, .obj, .exe etc.)
-#--------------------------------------------------------------------
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-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:1034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-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 1057 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
fi
-rm -f conftest*
-rm -f conftest*
+
+done
+
+
+
+ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
+
+
+ #------------------------------------------------------------------------
+ # If we're using GCC, see if the compiler understands -pipe. If so, use it.
+ # It makes compiling go faster. (This is only a performance feature.)
+ #------------------------------------------------------------------------
+
+ if test -z "$no_pipe" -a -n "$GCC"; then
+ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
+echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
+ OLDCC="$CC"
+ CC="$CC -pipe"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CC="$OLDCC"
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
+ #--------------------------------------------------------------------
+ # Common compiler flag setup
+ #--------------------------------------------------------------------
+ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-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
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=yes
else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- 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) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+ if test "${TEA_PLATFORM}" = "unix" ; then
-#--------------------------------------------------------------------
-# "cygpath" is used on windows to generate native path names for include
-# files.
-# These variables should only be used with the compiler and linker since
-# they generate native path names.
-#
-# Unix tclConfig.sh points SRC_DIR at the top-level directory of
-# the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at
-# the win subdirectory. Hence the different usages of SRC_DIR below.
-#
-# This must be done before calling SC_PUBLIC_TCL_HEADERS
-#--------------------------------------------------------------------
+ #--------------------------------------------------------------------
+ # 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").
+ #--------------------------------------------------------------------
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
- CYGPATH="cygpath -w"
- RELPATH=".. .. bin"
- ;;
- *)
- CYGPATH=echo
- RELPATH=..
- ;;
-esac
+ echo "$as_me:$LINENO: checking for sin" >&5
+echo $ECHO_N "checking for sin... $ECHO_C" >&6
+if test "${ac_cv_func_sin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define sin to an innocuous variant, in case <limits.h> declares sin.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define sin innocuous_sin
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sin (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef sin
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_sin) || defined (__stub___sin)
+choke me
+#else
+char (*f) () = sin;
+#endif
+#ifdef __cplusplus
+}
+#endif
+int
+main ()
+{
+return f != sin;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_sin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-#--------------------------------------------------------------------
-# Includes for this package
-#--------------------------------------------------------------------
+ac_cv_func_sin=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
+echo "${ECHO_T}$ac_cv_func_sin" >&6
+if test $ac_cv_func_sin = yes; then
+ MATH_LIBS=""
+else
+ MATH_LIBS="-lm"
+fi
+
+ echo "$as_me:$LINENO: checking for main in -lieee" >&5
+echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
+if test "${ac_cv_lib_ieee_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lieee $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ieee_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ieee_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
+echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6
+if test $ac_cv_lib_ieee_main = yes; then
+ MATH_LIBS="-lieee $MATH_LIBS"
+fi
-ITK_GENERIC_DIR_NATIVE=`${CYGPATH} ${srcdir}/generic`
-ITK_WIN_DIR_NATIVE=`${CYGPATH} ${srcdir}/win`
-ITK_UNIX_DIR_NATIVE=`${CYGPATH} ${srcdir}/unix`
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
- ITK_PLATFORM_DIR_NATIVE=${ITK_WIN_DIR_NATIVE}
+ #--------------------------------------------------------------------
+ # Interactive UNIX requires -linet instead of -lsocket, plus it
+ # needs net/errno.h to define the socket-related error codes.
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking for main in -linet" >&5
+echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
+if test "${ac_cv_lib_inet_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
+echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
+if test $ac_cv_lib_inet_main = yes; then
+ LIBS="$LIBS -linet"
+fi
+
+ if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for net/errno.h" >&5
+echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking net/errno.h usability" >&5
+echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <net/errno.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking net/errno.h presence" >&5
+echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <net/errno.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- *)
- ITK_PLATFORM_DIR_NATIVE=${ITK_UNIX_DIR_NATIVE}
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: net/errno.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
;;
esac
+echo "$as_me:$LINENO: checking for net/errno.h" >&5
+echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_net_errno_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
-ITK_INCLUDES="-I\"${ITK_GENERIC_DIR_NATIVE}\" -I\"${ITK_PLATFORM_DIR_NATIVE}\""
+fi
+if test $ac_cv_header_net_errno_h = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_NET_ERRNO_H 1
+_ACEOF
+fi
+ #--------------------------------------------------------------------
+ # 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
+ echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef connect
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
- #
- # Ok, lets find the tcl configuration
- # First, look for one uninstalled.
- # the alternative search directory is invoked by --with-tcl
- #
+int
+main ()
+{
+return f != connect;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- if test x"${no_tcl}" = x ; then
- # we reset no_tcl in case something fails here
- no_tcl=true
- # Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
- withval="$with_tcl"
- with_tclconfig=${withval}
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+if test $ac_cv_func_connect = yes; then
+ tcl_checkSocket=0
+else
+ tcl_checkSocket=1
fi
- echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-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
+ if test "$tcl_checkSocket" = 1; then
+ echo "$as_me:$LINENO: checking for setsockopt" >&5
+echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
+if test "${ac_cv_func_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define setsockopt innocuous_setsockopt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setsockopt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
- # First check to see if --with-tcl was specified.
- if test x"${with_tclconfig}" != x ; then
- if test -f "${with_tclconfig}/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
- else
- { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
- fi
- fi
+#undef setsockopt
- # then check for a private Tcl installation
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ../tcl \
- `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
- ../../tcl \
- `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
- ../../../tcl \
- `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
+choke me
+#else
+char (*f) () = setsockopt;
+#endif
+#ifdef __cplusplus
+}
+#endif
- # check in a few common install locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in `ls -d ${prefix}/lib 2>/dev/null` \
- `ls -d /usr/local/lib 2>/dev/null` ; do
- if test -f "$i/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i; pwd)`
- break
- fi
- done
- fi
+int
+main ()
+{
+return f != setsockopt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- # check in a few other private locations
- if test x"${ac_cv_c_tclconfig}" = x ; then
- for i in \
- ${srcdir}/../tcl \
- `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/unix/tclConfig.sh" ; then
- ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
-
+ac_cv_func_setsockopt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
+if test $ac_cv_func_setsockopt = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
+echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt ();
+int
+main ()
+{
+setsockopt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_setsockopt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
+if test $ac_cv_lib_socket_setsockopt = yes; then
+ LIBS="$LIBS -lsocket"
+else
+ tcl_checkBoth=1
+fi
+
+fi
- if test x"${ac_cv_c_tclconfig}" = x ; then
- TCL_BIN_DIR="# no Tcl configs found"
- echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
- exit 0
- else
- no_tcl=
- TCL_BIN_DIR=${ac_cv_c_tclconfig}
- echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
- fi
fi
+ if test "$tcl_checkBoth" = 1; then
+ tk_oldLibs=$LIBS
+ LIBS="$LIBS -lsocket -lnsl"
+ echo "$as_me:$LINENO: checking for accept" >&5
+echo $ECHO_N "checking for accept... $ECHO_C" >&6
+if test "${ac_cv_func_accept+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define accept to an innocuous variant, in case <limits.h> declares accept.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define accept innocuous_accept
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char accept (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef accept
- echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:1256: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char accept ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_accept) || defined (__stub___accept)
+choke me
+#else
+char (*f) () = accept;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != accept;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_accept=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_accept=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
+echo "${ECHO_T}$ac_cv_func_accept" >&6
+if test $ac_cv_func_accept = yes; then
+ tcl_checkNsl=0
+else
+ LIBS=$tk_oldLibs
+fi
- if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
- echo "$ac_t""loading" 1>&6
- . $TCL_BIN_DIR/tclConfig.sh
- else
- echo "$ac_t""file not found" 1>&6
fi
+ echo "$as_me:$LINENO: checking for gethostbyname" >&5
+echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
- #
- # The eval is required to do the TCL_DBGX substitution in the
- # TCL_LIB_FILE variable
- #
+#undef gethostbyname
- eval TCL_LIB_FILE=${TCL_LIB_FILE}
- eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+char (*f) () = gethostbyname;
+#endif
+#ifdef __cplusplus
+}
+#endif
+int
+main ()
+{
+return f != gethostbyname;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-#--------------------------------------------------------------------
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
+ac_cv_func_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
+if test $ac_cv_func_gethostbyname = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- #
- # Ok, lets find the tk configuration
- # First, look for one uninstalled.
- # the alternative search directory is invoked by --with-tk
- #
+ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+ LIBS="$LIBS -lnsl"
+fi
- if test x"${no_tk}" = x ; then
- # we reset no_tk in case something fails here
- no_tk=true
- # Check whether --with-tk or --without-tk was given.
-if test "${with_tk+set}" = set; then
- withval="$with_tk"
- with_tkconfig=${withval}
fi
- echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-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
-
- # First check to see if --with-tkconfig was specified.
- if test x"${with_tkconfig}" != x ; then
- if test -f "${with_tkconfig}/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
- else
- { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
- fi
- fi
+ # Don't perform the eval of the libraries here because DL_LIBS
+ # won't be set until we call TEA_CONFIG_CFLAGS
- # then check for a private Tk library
- if test x"${ac_cv_c_tkconfig}" = x ; then
- for i in \
- ../tk \
- `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
- ../../tk \
- `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
- ../../../tk \
- `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/unix/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
- # check in a few common install locations
- if test x"${ac_cv_c_tkconfig}" = x ; then
- for i in `ls -d ${prefix}/lib 2>/dev/null` \
- `ls -d /usr/local/lib 2>/dev/null` ; do
- if test -f "$i/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i; pwd)`
- break
- fi
- done
- fi
- # check in a few other private locations
- if test x"${ac_cv_c_tkconfig}" = x ; then
- for i in \
- ${srcdir}/../tk \
- `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
- if test -f "$i/unix/tkConfig.sh" ; then
- ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
- break
- fi
- done
- fi
-
+ TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
+
+
+
+
+ echo "$as_me:$LINENO: checking dirent.h" >&5
+echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <dirent.h>
+int
+main ()
+{
+
+#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);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_ok=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_ok=no
fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ if test $tcl_ok = no; then
+ cat >>confdefs.h <<\_ACEOF
+#define NO_DIRENT_H 1
+_ACEOF
- if test x"${ac_cv_c_tkconfig}" = x ; then
- TK_BIN_DIR="# no Tk configs found"
- echo "configure: warning: Can't find Tk configuration definitions" 1>&2
- exit 0
- else
- no_tk=
- TK_BIN_DIR=${ac_cv_c_tkconfig}
- echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
- fi
fi
+ echo "$as_me:$LINENO: result: $tcl_ok" >&5
+echo "${ECHO_T}$tcl_ok" >&6
+ if test "${ac_cv_header_errno_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking errno.h usability" >&5
+echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <errno.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking errno.h presence" >&5
+echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: errno.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_errno_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+fi
+if test $ac_cv_header_errno_h = yes; then
+ :
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_ERRNO_H 1
+_ACEOF
- echo $ac_n "checking for existence of $TK_BIN_DIR/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:1379: checking for existence of $TK_BIN_DIR/tkConfig.sh" >&5
+fi
- if test -f "$TK_BIN_DIR/tkConfig.sh" ; then
- echo "$ac_t""loading" 1>&6
- . $TK_BIN_DIR/tkConfig.sh
- else
- echo "$ac_t""could not find $TK_BIN_DIR/tkConfig.sh" 1>&6
- fi
-
-
-
-
+ if test "${ac_cv_header_float_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for float.h" >&5
+echo $ECHO_N "checking for float.h... $ECHO_C" >&6
+if test "${ac_cv_header_float_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
+echo "${ECHO_T}$ac_cv_header_float_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking float.h usability" >&5
+echo $ECHO_N "checking float.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <float.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking float.h presence" >&5
+echo $ECHO_N "checking float.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <float.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-# Check whether --with-itcl or --without-itcl was given.
-if test "${with_itcl+set}" = set; then
- withval="$with_itcl"
- ITCL_LIB_DIR=$withval
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: float.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for float.h" >&5
+echo $ECHO_N "checking for float.h... $ECHO_C" >&6
+if test "${ac_cv_header_float_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ITCL_LIB_DIR=`cd ${srcdir}/../itcl; pwd`
+ ac_cv_header_float_h=$ac_header_preproc
fi
+echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
+echo "${ECHO_T}$ac_cv_header_float_h" >&6
+fi
+if test $ac_cv_header_float_h = yes; then
+ :
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_FLOAT_H 1
+_ACEOF
-if test ! -r "${ITCL_LIB_DIR}/generic/itclInt.h" ; then
- { echo "configure: error: Can't find Itcl private header files. Use --with-itclinclude to specify the directory containing the Itcl private headers on your system." 1>&2; exit 1; }
fi
-ITCL_INCLUDES=-I\"`${CYGPATH} ${ITCL_LIB_DIR}/generic`\"
+ if test "${ac_cv_header_values_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for values.h" >&5
+echo $ECHO_N "checking for values.h... $ECHO_C" >&6
+if test "${ac_cv_header_values_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
+echo "${ECHO_T}$ac_cv_header_values_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking values.h usability" >&5
+echo $ECHO_N "checking values.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <values.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-#--------------------------------------------------------------------
-# 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.
-#--------------------------------------------------------------------
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking values.h presence" >&5
+echo $ECHO_N "checking values.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <values.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-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
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: values.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for values.h" >&5
+echo $ECHO_N "checking for values.h... $ECHO_C" >&6
+if test "${ac_cv_header_values_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_itclstub_LIB_FILE="NONE"
+ ac_cv_header_values_h=$ac_header_preproc
fi
+echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
+echo "${ECHO_T}$ac_cv_header_values_h" >&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; }
+fi
+if test $ac_cv_header_values_h = yes; then
+ :
else
- echo "$ac_t""${ac_cv_itclstub_LIB_FILE}" 1>&6
+ cat >>confdefs.h <<\_ACEOF
+#define NO_VALUES_H 1
+_ACEOF
+
fi
-itclstub_LIB_FILE=${ac_cv_itclstub_LIB_FILE}
+ if test "${ac_cv_header_limits_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for limits.h" >&5
+echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
+if test "${ac_cv_header_limits_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
+echo "${ECHO_T}$ac_cv_header_limits_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking limits.h usability" >&5
+echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <limits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- echo $ac_n "checking for tkstub library""... $ac_c" 1>&6
-echo "configure:1434: checking for tkstub library" >&5
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking limits.h presence" >&5
+echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <limits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&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)
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: limits.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for limits.h" >&5
+echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
+if test "${ac_cv_header_limits_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_limits_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
+echo "${ECHO_T}$ac_cv_header_limits_h" >&6
- 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
+fi
+if test $ac_cv_header_limits_h = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIMITS_H 1
+_ACEOF
- if test x"${TK_BIN_DIR}" != x ; then
- sc_extra_lib_dir=${TK_BIN_DIR}
- else
- sc_extra_lib_dir=NONE
- fi
-
- for i in \
- `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
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_LIMITS_H 1
+_ACEOF
- 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"
+fi
+
+
+ if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking stdlib.h usability" >&5
+echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <stdlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking stdlib.h presence" >&5
+echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_stdlib_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+
+fi
+if test $ac_cv_header_stdlib_h = yes; then
+ tcl_ok=1
+else
+ tcl_ok=0
+fi
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtol" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtoul" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtod" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ if test $tcl_ok = 0; then
+ cat >>confdefs.h <<\_ACEOF
+#define NO_STDLIB_H 1
+_ACEOF
- 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 "${ac_cv_header_string_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking string.h usability" >&5
+echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <string.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking string.h presence" >&5
+echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_string_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+fi
+if test $ac_cv_header_string_h = yes; then
+ tcl_ok=1
+else
+ tcl_ok=0
+fi
- echo $ac_n "checking for itclstub library""... $ac_c" 1>&6
-echo "configure:1494: checking for itclstub library" >&5
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
- # 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)
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strstr" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strerror" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+
+ # See also memmove check below for a place where NO_STRING_H can be
+ # set and why.
+
+ if test $tcl_ok = 0; then
+ cat >>confdefs.h <<\_ACEOF
+#define NO_STRING_H 1
+_ACEOF
- 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
-
- 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
+ if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
+echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
+echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/wait.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- 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"
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
+echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/wait.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- 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
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/wait.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/wait.h" >&5
+echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_wait_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+
+fi
+if test $ac_cv_header_sys_wait_h = yes; then
+ :
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
+echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dlfcn.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
+echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dlfcn.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dlfcn_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+
+fi
+if test $ac_cv_header_dlfcn_h = yes; then
+ :
+else
+ cat >>confdefs.h <<\_ACEOF
+#define NO_DLFCN_H 1
+_ACEOF
+
+fi
+
+
+
+ # OS/390 lacks sys/param.h (and doesn't need it, by chance).
+
+for ac_header in sys/param.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ # Let the user call this, because if it triggers, they will
+ # need a compat/strtod.c that is correct. Users can also
+ # use Tcl_GetDouble(FromObj) instead.
+ #TEA_BUGGY_STRTOD
fi
-#--------------------------------------------------------------------
+#-----------------------------------------------------------------------
# __CHANGE__
-# Choose which headers you need. Extension authors should try very
-# hard to only rely on the Tcl public header files. Internal headers
-# contain private data structures and are subject to change without
-# notice.
-# This must be done AFTER calling SC_PATH_TCLCONFIG/SC_LOAD_TCLCONFIG
-# so that we can extract TCL_SRC_DIR from the config file (in the case
-# of private headers
-#--------------------------------------------------------------------
+# Specify the C source files to compile in TEA_ADD_SOURCES,
+# public headers that need to be installed in TEA_ADD_HEADERS,
+# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
+# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
+# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
+# and PKG_TCL_SOURCES.
+#-----------------------------------------------------------------------
+
+
+ vars="itk_cmds.c
+ itk_option.c
+ itk_archetype.c
+ itk_util.c
+ itkStubInit.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
-#SC_PUBLIC_TCL_HEADERS
- echo $ac_n "checking for Tcl private include files""... $ac_c" 1>&6
-echo "configure:1565: checking for Tcl private include files" >&5
- 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`\"
- TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
- TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
- TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
- TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
- TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
- ;;
- *)
- TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
- TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic'
- TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix'
- TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win'
- TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps'
- TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools'
- TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat'
- TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
- ;;
- esac
-
-
-
-
-
-
-
+ vars="generic/itk.h generic/itkDecls.h"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
+echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_HEADERS="$PKG_HEADERS $i"
+ done
- TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-
- echo "$ac_t""Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" 1>&6
-#SC_PUBLIC_TK_HEADERS
+ vars="${ITCL_INCLUDES} -I\"`${CYGPATH} ${srcdir}/generic`\""
+ for i in $vars; do
+ PKG_INCLUDES="$PKG_INCLUDES $i"
+ done
- echo $ac_n "checking for Tk private include files""... $ac_c" 1>&6
-echo "configure:1606: checking for Tk private include files" >&5
- 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`\"
- TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
- TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
- TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
- ;;
- *)
- TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic'
- TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix'
- TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win'
- TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
- TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
- ;;
- esac
+ vars=""
+ for i in $vars; do
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
+ # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
+ i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
+ fi
+ PKG_LIBS="$PKG_LIBS $i"
+ done
+
+
+
+ PKG_CFLAGS="$PKG_CFLAGS "
-
-
-
-
-
-
- echo "$ac_t""Using srcdir found in tkConfig.sh" 1>&6
+#TEA_ADD_STUB_SOURCES([itkStubLib.c])
+
+ vars="library/Archetype.itk
+ library/Toplevel.itk
+ library/Widget.itk
+ library/itk.tcl
+ library/tclIndex"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
+echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
+ done
+
#--------------------------------------------------------------------
@@ -1651,121 +6508,625 @@ echo "configure:1606: checking for Tk private include files" >&5
# your system.
#--------------------------------------------------------------------
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
- cat >> confdefs.h <<EOF
-#define BUILD_${PACKAGE} 1
-EOF
+if test "${TEA_PLATFORM}" = "windows" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define BUILD_itk 1
+_ACEOF
- CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch"
- PLATFORM_SOURCES='$(WIN_SOURCES)'
- PLATFORM_OBJECTS='$(WIN_OBJECTS)'
- PLATFORM_DIR='$(WIN_DIR)'
- ;;
- *)
- CLEANFILES=
- PLATFORM_SOURCES='$(UNIX_SOURCES)'
- PLATFORM_OBJECTS='$(UNIX_OBJECTS)'
- PLATFORM_DIR='$(UNIX_DIR)'
- ;;
-esac
+ CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
+
+ vars="dllEntryPoint.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+else
+ CLEANFILES=
+fi
#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
+# __CHANGE__
+# Choose which headers you need. Extension authors should try very
+# hard to only rely on the Tcl public header files. Internal headers
+# contain private data structures and are subject to change without
+# notice.
+# This must be done AFTER calling TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG
+# so that we can extract TCL_SRC_DIR from the config file (in the case
+# of private headers
#--------------------------------------------------------------------
+#TEA_PUBLIC_TCL_HEADERS
- echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-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"
- tcl_ok=$enableval
-else
- tcl_ok=no
-fi
+ echo "$as_me:$LINENO: checking for Tcl private include files" >&5
+echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6
+ if test "${TEA_PLATFORM}" = "windows"; then
+ 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`\"
+ TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
+ TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
+ TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
+ TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
+ TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
- if test "$tcl_ok" = "yes"; then
- TCL_THREADS=1
- cat >> confdefs.h <<\EOF
-#define TCL_THREADS 1
-EOF
+ TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+ else
+ TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
+ TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic'
+ TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix'
+ TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win'
+ TCL_BMAP_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/bitmaps'
+ TCL_TOOL_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/tools'
+ TCL_COMPAT_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/compat'
+ TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
+
+ # substitute these in "relaxed" so that TCL_INCLUDES still works
+ # without requiring the other vars to be defined in the Makefile
+ eval "TCL_INCLUDES=\"-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}\""
+ fi
- cat >> confdefs.h <<\EOF
-#define _REENTRANT 1
-EOF
- case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*)
- echo "$ac_t""yes" 1>&6
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: result: Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" >&5
+echo "${ECHO_T}Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" >&6
+
+
+#TEA_PUBLIC_TK_HEADERS
+
+ echo "$as_me:$LINENO: checking for Tk private include files" >&5
+echo $ECHO_N "checking for Tk private include files... $ECHO_C" >&6
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
+ 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`\"
+ TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
+ TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
+
+ TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
+ else
+ TK_TOP_DIR_NATIVE='${TK_SRC_DIR}'
+ TK_GENERIC_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/generic'
+ TK_UNIX_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/unix'
+ TK_WIN_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/win'
+ TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
+
+ # substitute these in "relaxed" so that TK_INCLUDES still works
+ # without requiring the other vars to be defined in the Makefile
+ eval "TK_INCLUDES=\"-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}\""
+ fi
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: result: Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" >&5
+echo "${ECHO_T}Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" >&6
+
+
+#--------------------------------------------------------------------
+# For Unix/Tk builds, make sure that the X libraries/headers are found.
+#--------------------------------------------------------------------
+
+
+ if test "${TEA_PLATFORM}" = "unix" ; then
+ case ${TK_DEFS} in
+ *MAC_OSX_TK*)
+ cat >>confdefs.h <<\_ACEOF
+#define MAC_OSX_TK 1
+_ACEOF
+
+ TEA_WINDOWINGSYSTEM="aqua"
;;
*)
- echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lpthread $LIBS"
-cat > conftest.$ac_ext <<EOF
-#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
- builtin and then its argument prototype would still apply. */
-char pthread_mutex_init();
-
-int main() {
-pthread_mutex_init()
-; return 0; }
-EOF
-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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+
+ echo "$as_me:$LINENO: checking for X" >&5
+echo $ECHO_N "checking for X... $ECHO_C" >&6
+
+
+# Check whether --with-x or --without-x was given.
+if test "${with_x+set}" = set; then
+ withval="$with_x"
+
+fi;
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+ # Both variables are already set.
+ have_x=yes
+ else
+ if test "${ac_cv_have_x+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -fr conftest.dir
+if mkdir conftest.dir; then
+ cd conftest.dir
+ # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+ cat >Imakefile <<'_ACEOF'
+acfindx:
+ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+_ACEOF
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl; do
+ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+ test -f $ac_im_libdir/libX11.$ac_extension; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case $ac_im_incroot in
+ /usr/include) ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+ esac
+ case $ac_im_usrlibdir in
+ /usr/lib | /lib) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+ esac
+ fi
+ cd ..
+ rm -fr conftest.dir
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+ # Guess where to find include files, by looking for Intrinsic.h.
+ # First, try using that file with no special directory specified.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/Intrinsic.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_ok=yes
+if test -z "$ac_cpp_err"; then
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
else
- echo "$ac_t""no" 1>&6
-tcl_ok=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ for ac_dir in $ac_x_header_dirs; do
+ if test -r "$ac_dir/X11/Intrinsic.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+done
fi
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+ # Check for the libraries.
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+ LIBS="-lXt $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/Intrinsic.h>
+int
+main ()
+{
+XtMalloc (0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -lpthread"
- echo "$ac_t""yes" 1>&6
- else
- TCL_THREADS=0
- echo "$ac_t""no" 1>&6
- echo "configure: warning: "Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..."" 1>&2
+LIBS=$ac_save_LIBS
+for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+ # Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl; do
+ if test -r $ac_dir/libXt.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
+ # Didn't find X anywhere. Cache the known absence of X.
+ ac_cv_have_x="have_x=no"
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+
+ fi
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ echo "$as_me:$LINENO: result: $have_x" >&5
+echo "${ECHO_T}$have_x" >&6
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+ echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
+fi
+
+ not_really_there=""
+ if test "$no_x" = ""; then
+ if test "$x_includes" = ""; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/XIntrinsic.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ not_really_there="yes"
+fi
+rm -f conftest.err conftest.$ac_ext
+ 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
+ echo "$as_me:$LINENO: checking for X11 header files" >&5
+echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6
+ XINCLUDES="# no special path needed"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/Intrinsic.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ XINCLUDES="nope"
+fi
+rm -f conftest.err conftest.$ac_ext
+ 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
+ echo "$as_me:$LINENO: result: $i" >&5
+echo "${ECHO_T}$i" >&6
+ 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
+ echo "$as_me:$LINENO: result: could not find any!" >&5
+echo "${ECHO_T}could not find any!" >&6
+ XINCLUDES="# no include files found"
+ fi
+
+ if test "$no_x" = yes; then
+ echo "$as_me:$LINENO: checking for X11 libraries" >&5
+echo $ECHO_N "checking for X11 libraries... $ECHO_C" >&6
+ 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
+ echo "$as_me:$LINENO: result: $i" >&5
+echo "${ECHO_T}$i" >&6
+ 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
+ echo "$as_me:$LINENO: checking for XCreateWindow in -lXwindow" >&5
+echo $ECHO_N "checking for XCreateWindow in -lXwindow... $ECHO_C" >&6
+if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXwindow $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XCreateWindow ();
+int
+main ()
+{
+XCreateWindow ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_Xwindow_XCreateWindow=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_Xwindow_XCreateWindow=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
+echo "${ECHO_T}$ac_cv_lib_Xwindow_XCreateWindow" >&6
+if test $ac_cv_lib_Xwindow_XCreateWindow = yes; then
+ XLIBSW=-lXwindow
+fi
+
+ fi
+ if test "$XLIBSW" = nope ; then
+ echo "$as_me:$LINENO: result: could not find any! Using -lX11." >&5
+echo "${ECHO_T}could not find any! Using -lX11." >&6
+ XLIBSW=-lX11
+ fi
+ if test x"${XLIBSW}" != x ; then
+ PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
+ fi
+
+ TEA_WINDOWINGSYSTEM="x11"
;;
esac
- else
- TCL_THREADS=0
- echo "$ac_t""no (default)" 1>&6
+ elif test "${TEA_PLATFORM}" = "windows" ; then
+ TEA_WINDOWINGSYSTEM="windows"
fi
+#--------------------------------------------------------------------
+# We need to enable the threading macros found in tcl.h and tclInt.h.
+# The use of the threading features is determined by the core the
+# extension is loaded into, but we need to compile with these macros
+# turned on.
+#--------------------------------------------------------------------
+
+cat >>confdefs.h <<\_ACEOF
+#define TCL_THREADS 1
+_ACEOF
+
+#--------------------------------------------------------------------
+# Check whether --enable-threads or --disable-threads was given.
+# This auto-enables if Tcl was compiled threaded.
+#--------------------------------------------------------------------
+
+#TEA_ENABLE_THREADS
#--------------------------------------------------------------------
# The statement below defines a collection of symbols related to
@@ -1773,16 +7134,15 @@ fi
#--------------------------------------------------------------------
- echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:1778: checking how to build libraries" >&5
+ echo "$as_me:$LINENO: checking how to build libraries" >&5
+echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
# 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=yes
-fi
-
+fi;
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
@@ -1792,88 +7152,2963 @@ fi
fi
if test "$tcl_ok" = "yes" ; then
- echo "$ac_t""shared" 1>&6
+ echo "$as_me:$LINENO: result: shared" >&5
+echo "${ECHO_T}shared" >&6
SHARED_BUILD=1
else
- echo "$ac_t""static" 1>&6
+ echo "$as_me:$LINENO: result: static" >&5
+echo "${ECHO_T}static" >&6
SHARED_BUILD=0
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define STATIC_BUILD 1
-EOF
+_ACEOF
fi
+
#--------------------------------------------------------------------
# This macro figures out what flags to use with the compiler/linker
# when building shared/static debug/optimized objects. This information
# is all taken from the tclConfig.sh file.
#--------------------------------------------------------------------
-CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
-CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
-LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
-LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
-SHLIB_LD=${TCL_SHLIB_LD}
-STLIB_LD=${TCL_STLIB_LD}
-SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
+ # Allow the user to provide this setting in the env
+ if test "x${TCLSH_PROG}" = "x" ; then
+ echo "$as_me:$LINENO: checking for tclsh" >&5
+echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
+
+ if test "${ac_cv_path_tclsh+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ if test "${TEA_PLATFORM}" != "windows" -o \
+ \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
+ # Do not allow target tclsh in known cross-compile builds,
+ # as we need one we can run on this system
+ search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
+ fi
+ 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
+
+
+ if test -f "$ac_cv_path_tclsh" ; then
+ TCLSH_PROG=$ac_cv_path_tclsh
+ echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
+echo "${ECHO_T}$TCLSH_PROG" >&6
+ else
+ { { echo "$as_me:$LINENO: error: No tclsh found in PATH: $search_path" >&5
+echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+ # Step 0: Enable 64 bit support?
+
+ echo "$as_me:$LINENO: checking if 64bit support is enabled" >&5
+echo $ECHO_N "checking if 64bit support is enabled... $ECHO_C" >&6
+ # Check whether --enable-64bit or --disable-64bit was given.
+if test "${enable_64bit+set}" = set; then
+ enableval="$enable_64bit"
+ do64bit=$enableval
+else
+ do64bit=no
+fi;
+ echo "$as_me:$LINENO: result: $do64bit" >&5
+echo "${ECHO_T}$do64bit" >&6
+
+ # Step 0.b: Enable Solaris 64 bit VIS support?
+
+ echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
+echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6
+ # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
+if test "${enable_64bit_vis+set}" = set; then
+ enableval="$enable_64bit_vis"
+ do64bitVIS=$enableval
+else
+ do64bitVIS=no
+fi;
+ echo "$as_me:$LINENO: result: $do64bitVIS" >&5
+echo "${ECHO_T}$do64bitVIS" >&6
+
+ if test "$do64bitVIS" = "yes"; then
+ # Force 64bit on with VIS
+ do64bit=yes
+ fi
+
+ # Step 0.c: Cross-compiling options for Windows/CE builds?
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
+echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6
+ # Check whether --enable-wince or --disable-wince was given.
+if test "${enable_wince+set}" = set; then
+ enableval="$enable_wince"
+ doWince=$enableval
+else
+ doWince=no
+fi;
+ echo "$as_me:$LINENO: result: $doWince" >&5
+echo "${ECHO_T}$doWince" >&6
+ fi
+
+ # 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.
+
+ echo "$as_me:$LINENO: checking system version (for dynamic loading)" >&5
+echo $ECHO_N "checking system version (for dynamic loading)... $ECHO_C" >&6
+ 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
+ echo "$as_me:$LINENO: result: unknown (can't find uname command)" >&5
+echo "${ECHO_T}unknown (can't find uname command)" >&6
+ 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 }' /etc/.relid'`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+ fi
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ system=windows
+ fi
+ echo "$as_me:$LINENO: result: $system" >&5
+echo "${ECHO_T}$system" >&6
+ fi
+ fi
+
+ # Step 2: check for existence of -ldl library. This is needed because
+ # Linux can use either -ldl or -ldld for dynamic loading.
+
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ have_dl=yes
+else
+ have_dl=no
+fi
+
+
+ # Step 3: set configuration options based on system name and version.
+ # This is similar to Tcl's unix/tcl.m4 except that we've added a
+ # "windows" case and CC_SEARCH_FLAGS becomes LD_SEARCH_FLAGS for us
+ # (and we have no CC_SEARCH_FLAGS).
+
+ do64bit_ok=no
+ LDFLAGS_ORIG="$LDFLAGS"
+ TCL_EXPORT_FILE_SUFFIX=""
+ UNSHARED_LIB_SUFFIX=""
+ TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+ ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+ TCL_LIB_VERSIONS_OK=ok
+ CFLAGS_DEBUG=-g
+ if test "$GCC" = "yes" ; then
+ CFLAGS_OPTIMIZE=-O2
+ CFLAGS_WARNING="-Wall -Wno-implicit-int"
+ else
+ CFLAGS_OPTIMIZE=-O
+ CFLAGS_WARNING=""
+ fi
+ TCL_NEEDS_EXP_FILE=0
+ TCL_BUILD_EXP_FILE=""
+ TCL_EXP_FILE=""
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STLIB_LD='${AR} cr'
+ LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+ case $system in
+ windows)
+ # This is a 2-stage check to make sure we have the 64-bit SDK
+ # We have to know where the SDK is installed.
+ if test "$do64bit" = "yes" ; then
+ if test "x${MSSDK}x" = "xx" ; then
+ MSSDK="C:/Progra~1/Microsoft SDK"
+ fi
+ # Ensure that this path has no spaces to work in autoconf
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+
+
+ echo "$as_me:$LINENO: checking short pathname for MSSDK (${MSSDK})" >&5
+echo $ECHO_N "checking short pathname for MSSDK (${MSSDK})... $ECHO_C" >&6
+
+ shortpath=
+ case "${MSSDK}" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [file attributes {${MSSDK}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ echo "$as_me:$LINENO: result: not changed" >&5
+echo "${ECHO_T}not changed" >&6
+ else
+ MSSDK=$shortpath
+ echo "$as_me:$LINENO: result: ${MSSDK}" >&5
+echo "${ECHO_T}${MSSDK}" >&6
+ fi
+ fi
+
+ if test ! -d "${MSSDK}/bin/win64" ; then
+ { echo "$as_me:$LINENO: WARNING: could not find 64-bit SDK to enable 64bit mode" >&5
+echo "$as_me: WARNING: could not find 64-bit SDK to enable 64bit mode" >&2;}
+ do64bit="no"
+ else
+ do64bit_ok="yes"
+ fi
+ fi
+
+ if test "$doWince" != "no" ; then
+ if test "$do64bit" = "yes" ; then
+ { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
+echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test "$GCC" = "yes" ; then
+ { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
+echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-celib
+
+ if test x"${no_celib}" = x ; then
+ # we reset no_celib in case something fails here
+ no_celib=true
+
+# Check whether --with-celib or --without-celib was given.
+if test "${with_celib+set}" = set; then
+ withval="$with_celib"
+ with_celibconfig=${withval}
+fi;
+ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
+echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6
+ if test "${ac_cv_c_celibconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # First check to see if --with-celibconfig was specified.
+ if test x"${with_celibconfig}" != x ; then
+ if test -d "${with_celibconfig}/inc" ; then
+ ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
+ else
+ { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
+echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a celib library
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ for i in \
+ ../celib-palm-3.0 \
+ ../celib \
+ ../../celib-palm-3.0 \
+ ../../celib \
+ `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
+ ${srcdir}/../celib-palm-3.0 \
+ ${srcdir}/../celib \
+ `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
+ ; do
+ if test -d "$i/inc" ; then
+ ac_cv_c_celibconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
+echo "$as_me: error: Cannot find celib support library directory" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ no_celib=
+ CELIB_DIR=${ac_cv_c_celibconfig}
+ echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
+echo "${ECHO_T}found $CELIB_DIR" >&6
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+
+
+ echo "$as_me:$LINENO: checking short pathname for CELIB_DIR (${ac_cv_c_celibconfig})" >&5
+echo $ECHO_N "checking short pathname for CELIB_DIR (${ac_cv_c_celibconfig})... $ECHO_C" >&6
+
+ shortpath=
+ case "${ac_cv_c_celibconfig}" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [file attributes {${ac_cv_c_celibconfig}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ echo "$as_me:$LINENO: result: not changed" >&5
+echo "${ECHO_T}not changed" >&6
+ else
+ CELIB_DIR=$shortpath
+ echo "$as_me:$LINENO: result: ${CELIB_DIR}" >&5
+echo "${ECHO_T}${CELIB_DIR}" >&6
+ fi
+ fi
+
+ fi
+ fi
+
+ # Set defaults for common evc4/PPC2003 setup
+ # Currently Tcl requires 300+, possibly 420+ for sockets
+ CEVERSION=420; # could be 211 300 301 400 420 ...
+ TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ...
+ ARCH=ARM; # could be ARM MIPS X86EM ...
+ PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
+ if test "$doWince" != "yes"; then
+ # If !yes then the user specified something
+ # Reset ARCH to allow user to skip specifying it
+ ARCH=
+ eval `echo $doWince | awk -F, '{ \
+ if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
+ if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
+ if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
+ if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
+ if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
+ }'`
+ if test "x${ARCH}" = "x" ; then
+ ARCH=$TARGETCPU;
+ fi
+ fi
+ OSVERSION=WCE$CEVERSION;
+ if test "x${WCEROOT}" = "x" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
+ if test ! -d "${WCEROOT}" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
+ fi
+ fi
+ if test "x${SDKROOT}" = "x" ; then
+ SDKROOT="C:/Program Files/Windows CE Tools"
+ if test ! -d "${SDKROOT}" ; then
+ SDKROOT="C:/Windows CE Tools"
+ fi
+ fi
+ # Ensure that this path has no spaces to work in autoconf
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+
+
+ echo "$as_me:$LINENO: checking short pathname for WCEROOT (${WCEROOT})" >&5
+echo $ECHO_N "checking short pathname for WCEROOT (${WCEROOT})... $ECHO_C" >&6
+
+ shortpath=
+ case "${WCEROOT}" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [file attributes {${WCEROOT}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ echo "$as_me:$LINENO: result: not changed" >&5
+echo "${ECHO_T}not changed" >&6
+ else
+ WCEROOT=$shortpath
+ echo "$as_me:$LINENO: result: ${WCEROOT}" >&5
+echo "${ECHO_T}${WCEROOT}" >&6
+ fi
+ fi
+
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+
+
+ echo "$as_me:$LINENO: checking short pathname for SDKROOT (${SDKROOT})" >&5
+echo $ECHO_N "checking short pathname for SDKROOT (${SDKROOT})... $ECHO_C" >&6
+
+ shortpath=
+ case "${SDKROOT}" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [file attributes {${SDKROOT}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ echo "$as_me:$LINENO: result: not changed" >&5
+echo "${ECHO_T}not changed" >&6
+ else
+ SDKROOT=$shortpath
+ echo "$as_me:$LINENO: result: ${SDKROOT}" >&5
+echo "${ECHO_T}${SDKROOT}" >&6
+ fi
+ fi
+
+ if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
+ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
+ { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
+echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
+ { (exit 1); exit 1; }; }
+ doWince="no"
+ else
+ # We could PATH_NOSPACE these, but that's not important,
+ # as long as we quote them when used.
+ CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
+ if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
+ CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
+ fi
+ CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
+ fi
+ fi
+
+ if test "$GCC" != "yes" ; then
+ if test "${SHARED_BUILD}" = "0" ; then
+ runtime=-MT
+ else
+ runtime=-MD
+ fi
+
+ if test "$do64bit" = "yes" ; then
+ # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ CC="${MSSDK}/Bin/Win64/cl.exe"
+ CFLAGS="${CFLAGS} -I${MSSDK}/Include/prerelease \
+ -I${MSSDK}/Include/Win64/crt \
+ -I${MSSDK}/Include"
+ RC="${MSSDK}/bin/rc.exe"
+ lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
+ -LIBPATH:${MSSDK}/Lib/Prerelease/IA64 -nologo"
+ LINKBIN="${MSSDK}/bin/win64/link.exe"
+ CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ elif test "$doWince" != "no" ; then
+ CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
+ if test "${TARGETCPU}" = "X86"; then
+ CC="${CEBINROOT}/cl.exe"
+ else
+ CC="${CEBINROOT}/cl${ARCH}.exe"
+ fi
+ CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
+ RC="${WCEROOT}/Common/EVC/bin/rc.exe"
+ arch=`echo ${ARCH} | awk '{print tolower($0)}'`
+ defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
+ if test "${SHARED_BUILD}" = "1" ; then
+ # Static CE builds require static celib as well
+ defs="${defs} _DLL"
+ fi
+ for i in $defs ; do
+ cat >>confdefs.h <<_ACEOF
+#define $i 1
+_ACEOF
+
+ done
+ cat >>confdefs.h <<_ACEOF
+#define _WIN32_WCE $CEVERSION
+_ACEOF
+
+ cat >>confdefs.h <<_ACEOF
+#define UNDER_CE $CEVERSION
+_ACEOF
+
+ CFLAGS_DEBUG="-nologo -Zi -Od"
+ CFLAGS_OPTIMIZE="-nologo -Ox"
+ lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
+ lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
+ LINKBIN="${CEBINROOT}/link.exe"
+
+ else
+ RC="rc"
+ lflags="-nologo"
+ LINKBIN="link"
+ CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ fi
+ fi
+
+ if test "$GCC" = "yes"; then
+ # mingw gcc mode
+ RC="windres"
+ CFLAGS_DEBUG="-g"
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ SHLIB_LD="$CC -shared"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
+ LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
+ else
+ SHLIB_LD="${LINKBIN} -dll ${lflags}"
+ # link -lib only works when -lib is the first arg
+ STLIB_LD="${LINKBIN} -lib ${lflags}"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
+ PATHTYPE=-w
+ # For information on what debugtype is most useful, see:
+ # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
+ # This essentially turns it all on.
+ LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
+ LDFLAGS_OPTIMIZE="-release"
+ if test "$doWince" != "no" ; then
+ LDFLAGS_CONSOLE="-link ${lflags}"
+ LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
+ else
+ LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
+ LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
+ fi
+ fi
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dll"
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+ TCL_LIB_VERSIONS_OK=nodots
+ # Bogus to avoid getting this turned off
+ DL_OBJS="tclLoadNone.obj"
+ ;;
+ AIX-*)
+ if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
+ # AIX requires the _r compiler when gcc isn't being used
+ if test "${CC}" != "cc_r" ; then
+ CC=${CC}_r
+ fi
+ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
+echo "${ECHO_T}Using $CC for compiling with threads" >&6
+ fi
+ LIBS="$LIBS -lc"
+ SHLIB_CFLAGS=""
+ SHLIB_SUFFIX=".so"
+ SHLIB_LD_LIBS='${LIBS}'
+
+ DL_OBJS="tclLoadDl.o"
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+ #LIBOBJS="$LIBOBJS tclLoadAix.o"
+ case $LIBOBJS in
+ "tclLoadAix.$ac_objext" | \
+ *" tclLoadAix.$ac_objext" | \
+ "tclLoadAix.$ac_objext "* | \
+ *" tclLoadAix.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;;
+esac
+
+ DL_LIBS="-lld"
+ fi
+
+ # Check to enable 64-bit flags for compiler/linker on AIX 4+
+ if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
+ if test "$GCC" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: \"64bit mode not supported with GCC on $system\"" >&5
+echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;}
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -q64"
+ LDFLAGS="$LDFLAGS -q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+ fi
+ fi
+
+ if test "`uname -m`" = "ia64" ; then
+ # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ # AIX-5 has dl* in libc.so
+ DL_LIBS=""
+ if test "$GCC" = "yes" ; then
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+ fi
+ else
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ else
+ SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
+ fi
+ SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+ DL_LIBS="-ldl"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ TCL_NEEDS_EXP_FILE=1
+ TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
+ fi
+
+ # On AIX <=v4 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.
+ #
+ # 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.
+
+ echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
+echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
+if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettimeofday ();
+int
+main ()
+{
+gettimeofday ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_bsd_gettimeofday=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_bsd_gettimeofday=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
+if test $ac_cv_lib_bsd_gettimeofday = yes; then
+ libbsd=yes
+else
+ libbsd=no
+fi
+
+ if test $libbsd = yes; then
+ MATH_LIBS="$MATH_LIBS -lbsd"
+ cat >>confdefs.h <<\_ACEOF
+#define USE_DELTA_FOR_TZ 1
+_ACEOF
+
+ fi
+ ;;
+ BeOS*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="${CC} -nostart"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ ;;
+ 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"
+ 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="$LDFLAGS -export-dynamic"
+ LD_SEARCH_FLAGS=""
+ ;;
+ dgux*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LD_SEARCH_FLAGS=""
+ ;;
+ HP-UX-*.11.*)
+ # Use updated header definitions where possible
+ cat >>confdefs.h <<\_ACEOF
+#define _XOPEN_SOURCE_EXTENDED 1
+_ACEOF
+
+
+ SHLIB_SUFFIX=".sl"
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = yes; then
+ SHLIB_CFLAGS="+z"
+ SHLIB_LD="ld -b"
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ fi
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ fi
+
+ # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+ #CFLAGS="$CFLAGS +DAportable"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ hpux_arch=`${CC} -dumpmachine`
+ case $hpux_arch in
+ hppa64*)
+ # 64-bit gcc in use. Fix flags for GNU ld.
+ do64bit_ok=yes
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ ;;
+ *)
+ { echo "$as_me:$LINENO: WARNING: \"64bit mode not supported with GCC on $system\"" >&5
+echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;}
+ ;;
+ esac
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS +DD64"
+ LDFLAGS="$LDFLAGS +DD64"
+ fi
+ fi
+ ;;
+ HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
+ SHLIB_SUFFIX=".sl"
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = yes; then
+ SHLIB_CFLAGS="+z"
+ SHLIB_LD="ld -b"
+ SHLIB_LD_LIBS=""
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ fi
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ ;;
+ 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="$LDFLAGS -Wl,-D,08000000"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ ;;
+ IRIX-5.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ ;;
+ IRIX-6.*|IRIX64-6.5*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mabi=n32"
+ LDFLAGS="$LDFLAGS -mabi=n32"
+ else
+ case $system in
+ IRIX-6.3)
+ # Use to build 6.2 compatible binaries on 6.3.
+ CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -n32"
+ ;;
+ esac
+ LDFLAGS="$LDFLAGS -n32"
+ fi
+ ;;
+ IRIX64-6.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+
+ # Check to enable 64-bit flags for compiler/linker
+
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
+echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
+ else
+ do64bit_ok=yes
+ SHLIB_LD="ld -64 -shared -rdata_shared"
+ CFLAGS="$CFLAGS -64"
+ LDFLAGS="$LDFLAGS -64"
+ fi
+ fi
+ ;;
+ Linux*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ # 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="$LDFLAGS -Wl,--export-dynamic"
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ else
+ if test "${ac_cv_header_dld_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dld.h" >&5
+echo $ECHO_N "checking for dld.h... $ECHO_C" >&6
+if test "${ac_cv_header_dld_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
+echo "${ECHO_T}$ac_cv_header_dld_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dld.h usability" >&5
+echo $ECHO_N "checking dld.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dld.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dld.h presence" >&5
+echo $ECHO_N "checking dld.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dld.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dld.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dld.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dld.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dld.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dld.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dld.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dld.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dld.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dld.h" >&5
+echo $ECHO_N "checking for dld.h... $ECHO_C" >&6
+if test "${ac_cv_header_dld_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dld_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
+echo "${ECHO_T}$ac_cv_header_dld_h" >&6
+
+fi
+if test $ac_cv_header_dld_h = yes; then
+
+ SHLIB_LD="ld -shared"
+ DL_OBJS="tclLoadDld.o"
+ DL_LIBS="-ldld"
+ LD_SEARCH_FLAGS=""
+fi
+
+
+ fi
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$CFLAGS -mieee"
+ fi
+
+ # The combo of gcc + glibc has a bug related
+ # to inlining of functions like strtod(). The
+ # -fno-builtin flag should address this problem
+ # but it does not work. The -fno-inline flag
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+ if test x"${USE_COMPAT}" != x ; then
+ CFLAGS="$CFLAGS -fno-inline"
+ fi
+
+ ;;
+ GNU*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ if test "$have_dl" = yes; then
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ LD_SEARCH_FLAGS=""
+ else
+ if test "${ac_cv_header_dld_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dld.h" >&5
+echo $ECHO_N "checking for dld.h... $ECHO_C" >&6
+if test "${ac_cv_header_dld_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
+echo "${ECHO_T}$ac_cv_header_dld_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dld.h usability" >&5
+echo $ECHO_N "checking dld.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dld.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dld.h presence" >&5
+echo $ECHO_N "checking dld.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dld.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dld.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dld.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dld.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dld.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dld.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dld.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dld.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dld.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dld.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dld.h" >&5
+echo $ECHO_N "checking for dld.h... $ECHO_C" >&6
+if test "${ac_cv_header_dld_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dld_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
+echo "${ECHO_T}$ac_cv_header_dld_h" >&6
+
+fi
+if test $ac_cv_header_dld_h = yes; then
+
+ SHLIB_LD="ld -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldld"
+ LD_SEARCH_FLAGS=""
+fi
+
+
+ fi
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$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"
+ 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="$LDFLAGS -Wl,-Bexport"
+ LD_SEARCH_FLAGS=""
+ ;;
+ NetBSD-*|FreeBSD-[1-2].*)
+ # Not available on all versions: check for include file.
+ if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
+echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dlfcn.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
+echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dlfcn.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the itk lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dlfcn_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+
+fi
+if test $ac_cv_header_dlfcn_h = yes; then
+
+ # NetBSD/SPARC needs -fPIC, -fpic will not do.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ echo "$as_me:$LINENO: checking for ELF" >&5
+echo $ECHO_N "checking for ELF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __ELF__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+
+fi
+rm -f conftest*
+
+
+else
+
+ 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=""
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+
+fi
+
+
+
+ # FreeBSD doesn't handle version numbers with dots.
+
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ OpenBSD-*)
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ echo "$as_me:$LINENO: checking for ELF" >&5
+echo $ECHO_N "checking for ELF... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __ELF__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+
+fi
+rm -f conftest*
+
+
+ # OpenBSD doesn't do version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ FreeBSD-*)
+ # FreeBSD 3.* and greater have ELF.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -export-dynamic"
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ case $system in
+ FreeBSD-3.*)
+ # FreeBSD-3 doesn't handle version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ esac
+ ;;
+ Darwin-*)
+ SHLIB_CFLAGS="-fno-common"
+ SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dylib"
+ DL_OBJS="tclLoadDyld.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first"
+ LD_SEARCH_FLAGS=""
+ LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+ CFLAGS_OPTIMIZE="-Os"
+ ;;
+ NEXTSTEP-*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="cc -nostdlib -r"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadNext.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OS/390-*)
+ CFLAGS_OPTIMIZE="" # Optimizer is buggy
+ cat >>confdefs.h <<\_ACEOF
+#define _OE_SOCKETS 1
+_ACEOF
+ # 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=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-1.*)
+ # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
+ SHLIB_CFLAGS="-fPIC"
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD="ld -shared"
+ else
+ SHLIB_LD="ld -non_shared"
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-V*)
+ # Digital OSF/1
+ SHLIB_CFLAGS=""
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD='ld -shared -expect_unresolved "*"'
+ else
+ SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mieee"
+ else
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
+ fi
+ # see pthread_intro(3) for pthread support on osf1, k.furukawa
+ if test "${TCL_THREADS}" = "1" ; then
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+ CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+ LIBS=`echo $LIBS | sed s/-lpthreads//`
+ if test "$GCC" = "yes" ; then
+ LIBS="$LIBS -lpthread -lmach -lexc"
+ else
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ fi
+
+ ;;
+ QNX-6*)
+ # QNX RTP
+ # This may work for all QNX, but it was only reported for v6.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ # dlopen is in -lc on QNX
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ 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="$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.
+ if test "$GCC" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+ fi
+ SHLIB_LD="ld -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ 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"
+ LD_SEARCH_FLAGS=""
+ ;;
+ SunOS-4*)
+ SHLIB_CFLAGS="-PIC"
+ SHLIB_LD="ld"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ 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}.so.1.0'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ SunOS-5.[0-6]*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # 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 "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ fi
+ ;;
+ SunOS-5*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ arch=`isainfo`
+ if test "$arch" = "sparcv9 sparc" ; then
+ if test "$GCC" = "yes" ; then
+ if test "`gcc -dumpversion` | awk -F. '{print }'" -lt "3" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
+echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -m64 -mcpu=v9"
+ LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+ SHLIB_CFLAGS="-fPIC"
+ fi
+ else
+ do64bit_ok=yes
+ if test "$do64bitVIS" = "yes" ; then
+ CFLAGS="$CFLAGS -xarch=v9a"
+ LDFLAGS="$LDFLAGS -xarch=v9a"
+ else
+ CFLAGS="$CFLAGS -xarch=v9"
+ LDFLAGS="$LDFLAGS -xarch=v9"
+ fi
+ fi
+ else
+ { echo "$as_me:$LINENO: WARNING: \"64bit mode only supported sparcv9 system\"" >&5
+echo "$as_me: WARNING: \"64bit mode only supported sparcv9 system\"" >&2;}
+ 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 "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ if test "$do64bit" = "yes" ; then
+ # We need to specify -static-libgcc or we need to
+ # add the path to the sparv9 libgcc.
+ # JH: static-libgcc is necessary for core Tcl, but may
+ # not be necessary for extensions.
+ SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
+ # for finding sparcv9 libgcc, get the regular libgcc
+ # path, remove so name and append 'sparcv9'
+ #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
+ #LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS},-R,$v9gcclibdir"
+ fi
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ 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="$LDFLAGS -Wl,-D,08000000"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ if test "$GCC" != "yes" ; then
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
+ fi
+ ;;
+ 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
+ echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
+echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
+ LDFLAGS="$LDFLAGS -Wl,-Bexport"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ found=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+LDFLAGS=$hold_ldflags found=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $found" >&5
+echo "${ECHO_T}$found" >&6
+ LD_SEARCH_FLAGS=""
+ ;;
+ esac
+
+ if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
+ { echo "$as_me:$LINENO: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&5
+echo "$as_me: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&2;}
+ 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
+ echo "$as_me:$LINENO: checking sys/exec.h" >&5
+echo $ECHO_N "checking sys/exec.h... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/exec.h>
+int
+main ()
+{
+
+ 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;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_ok=usable
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_ok=unusable
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $tcl_ok" >&5
+echo "${ECHO_T}$tcl_ok" >&6
+ if test $tcl_ok = usable; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_SYS_EXEC_H 1
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: checking a.out.h" >&5
+echo $ECHO_N "checking a.out.h... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <a.out.h>
+int
+main ()
+{
+
+ 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;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_ok=usable
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_ok=unusable
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $tcl_ok" >&5
+echo "${ECHO_T}$tcl_ok" >&6
+ if test $tcl_ok = usable; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_A_OUT_H 1
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: checking sys/exec_aout.h" >&5
+echo $ECHO_N "checking sys/exec_aout.h... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/exec_aout.h>
+int
+main ()
+{
+
+ 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;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_ok=usable
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_ok=unusable
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $tcl_ok" >&5
+echo "${ECHO_T}$tcl_ok" >&6
+ if test $tcl_ok = usable; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_SYS_EXEC_AOUT_H 1
+_ACEOF
+
+ else
+ DL_OBJS=""
+ fi
+ fi
+ fi
+ fi
+
+ # Step 5: disable dynamic loading if requested via a command-line switch.
+
+ # Check whether --enable-load or --disable-load was given.
+if test "${enable_load+set}" = set; then
+ enableval="$enable_load"
+ tcl_ok=$enableval
+else
+ tcl_ok=yes
+fi;
+ 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="$LDFLAGS_ORIG"
+ 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 "$GCC" = "yes" ; then
+ case $system in
+ AIX-*)
+ ;;
+ BSD/OS*)
+ ;;
+ IRIX*)
+ ;;
+ NetBSD-*|FreeBSD-*)
+ ;;
+ Darwin-*)
+ ;;
+ RISCos-*)
+ ;;
+ SCO_SV-3.2*)
+ ;;
+ ULTRIX-4.*)
+ ;;
+ windows)
+ ;;
+ *)
+ SHLIB_CFLAGS="-fPIC"
+ ;;
+ esac
+ fi
+ fi
+
+ if test "$SHARED_LIB_SUFFIX" = "" ; then
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
+ fi
+ if test "$UNSHARED_LIB_SUFFIX" = "" ; then
+ UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # These must be called after we do the basic CFLAGS checks and
+ # verify any possible 64-bit or similar switches are necessary
+
+ echo "$as_me:$LINENO: checking for required early compiler flags" >&5
+echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
+ tcl_flags=""
+
+ if test "${tcl_cv_flag__isoc99_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__isoc99_source=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _ISOC99_SOURCE 1
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__isoc99_source=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_flag__isoc99_source=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define _ISOC99_SOURCE 1
+_ACEOF
+
+ tcl_flags="$tcl_flags _ISOC99_SOURCE"
+ fi
+
+
+ if test "${tcl_cv_flag__largefile64_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__largefile64_source=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGEFILE64_SOURCE 1
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__largefile64_source=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_flag__largefile64_source=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define _LARGEFILE64_SOURCE 1
+_ACEOF
+
+ tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
+ fi
+
+ if test "x${tcl_flags}" = "x" ; then
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+ else
+ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
+echo "${ECHO_T}${tcl_flags}" >&6
+ fi
+
+
+ echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
+echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
+ if test "${tcl_cv_type_64bit+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ tcl_cv_type_64bit=none
+ # See if the compiler knows natively about __int64
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+__int64 value = (__int64) 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_type_64bit=__int64
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_type_64bit="long long"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ # See if we should use long anyway Note that we substitute in the
+ # type that is our current guess for a 64-bit type inside this check
+ # program, so it should be modified only carefully...
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+switch (0) {
+ case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
+ }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_type_64bit=${tcl_type_64bit}
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "${tcl_cv_type_64bit}" = none ; then
+ cat >>confdefs.h <<\_ACEOF
+#define TCL_WIDE_INT_IS_LONG 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: using long" >&5
+echo "${ECHO_T}using long" >&6
+ elif test "${tcl_cv_type_64bit}" = "__int64" \
+ -a "${TEA_PLATFORM}" = "windows" ; then
+ # We actually want to use the default tcl.h checks in this
+ # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
+ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
+echo "${ECHO_T}using Tcl header defaults" >&6
+ else
+ cat >>confdefs.h <<_ACEOF
+#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
+_ACEOF
+
+ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
+echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
+
+ # Now check for auxiliary declarations
+ echo "$as_me:$LINENO: checking for struct dirent64" >&5
+echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
+ if test "${tcl_cv_struct_dirent64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/dirent.h>
+int
+main ()
+{
+struct dirent64 p;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_struct_dirent64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_struct_dirent64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_DIRENT64 1
+_ACEOF
+
+ fi
+ echo "$as_me:$LINENO: result: ${tcl_cv_struct_dirent64}" >&5
+echo "${ECHO_T}${tcl_cv_struct_dirent64}" >&6
+
+ echo "$as_me:$LINENO: checking for struct stat64" >&5
+echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
+ if test "${tcl_cv_struct_stat64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 p;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_struct_stat64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_struct_stat64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_STAT64 1
+_ACEOF
+
+ fi
+ echo "$as_me:$LINENO: result: ${tcl_cv_struct_stat64}" >&5
+echo "${ECHO_T}${tcl_cv_struct_stat64}" >&6
+
+ echo "$as_me:$LINENO: checking for off64_t" >&5
+echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
+ if test "${tcl_cv_type_off64_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+off64_t offset;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_type_off64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_type_off64_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TYPE_OFF64_T 1
+_ACEOF
+
+ fi
+ echo "$as_me:$LINENO: result: ${tcl_cv_type_off64_t}" >&5
+echo "${ECHO_T}${tcl_cv_type_off64_t}" >&6
+ fi
+
#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols
+# Set the default compiler switches based on the --enable-symbols
# option.
#--------------------------------------------------------------------
- case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*)
- tcl_dbgx=d
- ;;
- *)
- tcl_dbgx=g
- ;;
- esac
- echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:1845: checking for build with symbols" >&5
+
+ DBGX=""
+
+ echo "$as_me:$LINENO: checking for build with symbols" >&5
+echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
# Check whether --enable-symbols or --disable-symbols was given.
if test "${enable_symbols+set}" = set; then
enableval="$enable_symbols"
tcl_ok=$enableval
else
tcl_ok=no
-fi
-
- if test "$tcl_ok" = "yes"; then
- CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
- LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
- DBGX=${tcl_dbgx}
- TCL_DBGX=${tcl_dbgx}
- echo "$ac_t""yes" 1>&6
- else
+fi;
+ if test "$tcl_ok" = "no"; then
CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
- DBGX=""
- TCL_DBGX=""
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ else
+ CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
+ LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+ if test "$tcl_ok" = "yes"; then
+ echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
+echo "${ECHO_T}yes (standard debugging)" >&6
+ fi
+ fi
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ LDFLAGS_DEFAULT="${LDFLAGS}"
fi
-
-
-
-if test "${SHARED_BUILD}" = "1" ; then
- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
-else
- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
-fi
+
+
+ if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+ cat >>confdefs.h <<\_ACEOF
+#define TCL_MEM_DEBUG 1
+_ACEOF
+
+ fi
+
+ if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+ if test "$tcl_ok" = "all"; then
+ echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
+echo "${ECHO_T}enabled symbols mem debugging" >&6
+ else
+ echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
+echo "${ECHO_T}enabled $tcl_ok debugging" >&6
+ fi
+ fi
+
#--------------------------------------------------------------------
# Everyone should be linking against the Tcl stub library. If you
@@ -1883,84 +10118,106 @@ fi
#--------------------------------------------------------------------
if test "${SHARED_BUILD}" = "1" ; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USE_TCL_STUBS 1
-EOF
+_ACEOF
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USE_TK_STUBS 1
-EOF
+_ACEOF
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USE_ITCL_STUBS 1
-EOF
+_ACEOF
fi
#--------------------------------------------------------------------
# This macro generates a line to use when building a library. It
-# depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS,
-# and SC_LOAD_TCLCONFIG macros above.
+# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
+# and TEA_LOAD_TCLCONFIG macros above.
#--------------------------------------------------------------------
- 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) "
- fi
- ;;
- *)
- MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$@_OBJECTS)"
- MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
- ;;
- esac
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
+ MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
+ MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
+ else
+ MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
+ MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
+ fi
if test "${SHARED_BUILD}" = "1" ; then
- MAKE_LIB=${MAKE_SHARED_LIB}
+ MAKE_LIB="${MAKE_SHARED_LIB} "
else
- MAKE_LIB=${MAKE_STATIC_LIB}
+ MAKE_LIB="${MAKE_STATIC_LIB} "
fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# eval these two values to dereference the ${DBGX} variable.
-#--------------------------------------------------------------------
-
-eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
-eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
-
-#--------------------------------------------------------------------
-# Shared libraries and static libraries have different names.
-#--------------------------------------------------------------------
+ #--------------------------------------------------------------------
+ # Shared libraries and static libraries have different names.
+ # Use the double eval to make sure any variables in the suffix is
+ # substituted. (@@@ Might not be necessary anymore)
+ #--------------------------------------------------------------------
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
+ if test "${TEA_PLATFORM}" = "windows" ; then
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=:
+ # We force the unresolved linking of symbols that are really in
+ # the private libraries of Tcl and Tk.
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+ fi
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
else
- eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
fi
- eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
- ;;
- *)
+ # Some packages build there own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ # These aren't needed on Windows (either MSVC or gcc)
+ RANLIB=:
+ RANLIB_STUB=:
+ else
+ RANLIB_STUB="${RANLIB}"
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}"
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
+ fi
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
RANLIB=:
else
- eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
fi
- eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}"
- ;;
-esac
+ # Some packages build there own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ fi
+
+ # These are escaped so that only CFLAGS is picked up at configure time.
+ # The other values will be substituted at make time.
+ CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
+ fi
+
+
+
+
+
+
+
+
+#--------------------------------------------------------------------
+# __CHANGE__
+# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
+#--------------------------------------------------------------------
+
+if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${itcl_STUB_LIB_PATH}`\""
+else
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${itcl_STUB_LIB_SPEC}"
+fi
#--------------------------------------------------------------------
# __CHANGE__
@@ -1972,7 +10229,6 @@ esac
-
#--------------------------------------------------------------------
# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
# file during the install process. Don't run the TCLSH_PROG through
@@ -1982,14 +10238,22 @@ esac
#--------------------------------------------------------------------
- echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:1987: checking for tclsh" >&5
+ # Allow the user to provide this setting in the env
+ if test "x${TCLSH_PROG}" = "x" ; then
+ echo "$as_me:$LINENO: checking for tclsh" >&5
+echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
- if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ if test "${ac_cv_path_tclsh+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ if test "${TEA_PLATFORM}" != "windows" -o \
+ \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
+ # Do not allow target tclsh in known cross-compile builds,
+ # as we need one we can run on this system
+ search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
+ fi
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
@@ -2001,32 +10265,39 @@ else
fi
done
done
-
+
fi
- 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; }
+ if test -f "$ac_cv_path_tclsh" ; then
+ TCLSH_PROG=$ac_cv_path_tclsh
+ echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
+echo "${ECHO_T}$TCLSH_PROG" >&6
+ else
+ { { echo "$as_me:$LINENO: error: No tclsh found in PATH: $search_path" >&5
+echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
-
-
-#--------------------------------------------------------------------
-# A wish shell is needed to run the test suite.
-#--------------------------------------------------------------------
- echo $ac_n "checking for wish""... $ac_c" 1>&6
-echo "configure:2024: checking for wish" >&5
+ # Allow the user to provide this setting in the env
+ if test "x${WISH_PROG}" = "x" ; then
+ echo "$as_me:$LINENO: checking for wish" >&5
+echo $ECHO_N "checking for wish... $ECHO_C" >&6
- if eval "test \"`echo '$''{'ac_cv_path_wish'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ if test "${ac_cv_path_wish+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ if test "${TEA_PLATFORM}" != "windows" -o \
+ \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
+ # Do not allow target wish in known cross-compile builds,
+ # as we need one we can run on this system
+ search_path="${TK_BIN_DIR} ${TK_BIN_DIR}/../bin ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
+ fi
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
@@ -2038,350 +10309,1037 @@ else
fi
done
done
-
+
fi
- if test -f "$ac_cv_path_wish" ; then
+ 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; }
+ echo "$as_me:$LINENO: result: $WISH_PROG" >&5
+echo "${ECHO_T}$WISH_PROG" >&6
+ else
+ { { echo "$as_me:$LINENO: error: No wish found in PATH: $search_path" >&5
+echo "$as_me: error: No wish found in PATH: $search_path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
-
+
#--------------------------------------------------------------------
# Finally, substitute all of the various values into the Makefile.
#--------------------------------------------------------------------
-trap '' 1 2 15
-cat > confcache <<\EOF
+ ac_config_files="$ac_config_files Makefile pkgIndex.tcl itkConfig.sh"
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile \
- pkgIndex.tcl itkConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@OBJEXT@%$OBJEXT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@CYGPATH@%$CYGPATH%g
-s%@RELPATH@%$RELPATH%g
-s%@ITK_GENERIC_DIR_NATIVE@%$ITK_GENERIC_DIR_NATIVE%g
-s%@ITK_WIN_DIR_NATIVE@%$ITK_WIN_DIR_NATIVE%g
-s%@ITK_UNIX_DIR_NATIVE@%$ITK_UNIX_DIR_NATIVE%g
-s%@ITK_INCLUDES@%$ITK_INCLUDES%g
-s%@TCL_DBGX@%$TCL_DBGX%g
-s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
-s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
-s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
-s%@TCL_LIBS@%$TCL_LIBS%g
-s%@TCL_DEFS@%$TCL_DEFS%g
-s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
-s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
-s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
-s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
-s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
-s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
-s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
-s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
-s%@TK_BIN_DIR@%$TK_BIN_DIR%g
-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%@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
-s%@TCL_GENERIC_DIR_NATIVE@%$TCL_GENERIC_DIR_NATIVE%g
-s%@TCL_UNIX_DIR_NATIVE@%$TCL_UNIX_DIR_NATIVE%g
-s%@TCL_WIN_DIR_NATIVE@%$TCL_WIN_DIR_NATIVE%g
-s%@TCL_BMAP_DIR_NATIVE@%$TCL_BMAP_DIR_NATIVE%g
-s%@TCL_TOOL_DIR_NATIVE@%$TCL_TOOL_DIR_NATIVE%g
-s%@TCL_PLATFORM_DIR_NATIVE@%$TCL_PLATFORM_DIR_NATIVE%g
-s%@TCL_INCLUDES@%$TCL_INCLUDES%g
-s%@TK_UNIX_DIR_NATIVE@%$TK_UNIX_DIR_NATIVE%g
-s%@TK_WIN_DIR_NATIVE@%$TK_WIN_DIR_NATIVE%g
-s%@TK_GENERIC_DIR_NATIVE@%$TK_GENERIC_DIR_NATIVE%g
-s%@TK_XLIB_DIR_NATIVE@%$TK_XLIB_DIR_NATIVE%g
-s%@TK_PLATFORM_DIR_NATIVE@%$TK_PLATFORM_DIR_NATIVE%g
-s%@TK_INCLUDES@%$TK_INCLUDES%g
-s%@CLEANFILES@%$CLEANFILES%g
-s%@PLATFORM_SOURCES@%$PLATFORM_SOURCES%g
-s%@PLATFORM_OBJECTS@%$PLATFORM_OBJECTS%g
-s%@PLATFORM_DIR@%$PLATFORM_DIR%g
-s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
-s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
-s%@STLIB_LD@%$STLIB_LD%g
-s%@SHLIB_LD@%$SHLIB_LD%g
-s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
-s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
-s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
-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%@itkstub_LIB_FILE@%$itkstub_LIB_FILE%g
-s%@itk_LIB_FILE@%$itk_LIB_FILE%g
-s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
-s%@TCLSH_PROG@%$TCLSH_PROG%g
-s%@WISH_PROG@%$WISH_PROG%g
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ PATH_SEPARATOR=:
fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by itk $as_me 3.3, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+itk config.status 3.3
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
-CONFIG_FILES=\${CONFIG_FILES-"Makefile \
- pkgIndex.tcl itkConfig.sh"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "pkgIndex.tcl" ) CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
+ "itkConfig.sh" ) CONFIG_FILES="$CONFIG_FILES itkConfig.sh" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
+done
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@CYGPATH@,$CYGPATH,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@PKG_LIB_FILE@,$PKG_LIB_FILE,;t t
+s,@PKG_STUB_LIB_FILE@,$PKG_STUB_LIB_FILE,;t t
+s,@PKG_STUB_SOURCES@,$PKG_STUB_SOURCES,;t t
+s,@PKG_STUB_OBJECTS@,$PKG_STUB_OBJECTS,;t t
+s,@PKG_TCL_SOURCES@,$PKG_TCL_SOURCES,;t t
+s,@PKG_HEADERS@,$PKG_HEADERS,;t t
+s,@PKG_INCLUDES@,$PKG_INCLUDES,;t t
+s,@PKG_LIBS@,$PKG_LIBS,;t t
+s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
+s,@LN_S@,$LN_S,;t t
+s,@CONFIG_CLEAN_FILES@,$CONFIG_CLEAN_FILES,;t t
+s,@TCL_VERSION@,$TCL_VERSION,;t t
+s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
+s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
+s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
+s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
+s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
+s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
+s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
+s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
+s,@TCL_LIBS@,$TCL_LIBS,;t t
+s,@TCL_DEFS@,$TCL_DEFS,;t t
+s,@TCL_EXTRA_CFLAGS@,$TCL_EXTRA_CFLAGS,;t t
+s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
+s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
+s,@TK_VERSION@,$TK_VERSION,;t t
+s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
+s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
+s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
+s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
+s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
+s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
+s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
+s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
+s,@TK_LIBS@,$TK_LIBS,;t t
+s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
+s,@itcl_VERSION@,$itcl_VERSION,;t t
+s,@itcl_BIN_DIR@,$itcl_BIN_DIR,;t t
+s,@itcl_SRC_DIR@,$itcl_SRC_DIR,;t t
+s,@itcl_LIB_FILE@,$itcl_LIB_FILE,;t t
+s,@itcl_LIB_SPEC@,$itcl_LIB_SPEC,;t t
+s,@itcl_STUB_LIB_FILE@,$itcl_STUB_LIB_FILE,;t t
+s,@itcl_STUB_LIB_SPEC@,$itcl_STUB_LIB_SPEC,;t t
+s,@itcl_STUB_LIB_PATH@,$itcl_STUB_LIB_PATH,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CPP@,$CPP,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@EGREP@,$EGREP,;t t
+s,@MATH_LIBS@,$MATH_LIBS,;t t
+s,@PKG_SOURCES@,$PKG_SOURCES,;t t
+s,@PKG_OBJECTS@,$PKG_OBJECTS,;t t
+s,@CLEANFILES@,$CLEANFILES,;t t
+s,@TCL_TOP_DIR_NATIVE@,$TCL_TOP_DIR_NATIVE,;t t
+s,@TCL_GENERIC_DIR_NATIVE@,$TCL_GENERIC_DIR_NATIVE,;t t
+s,@TCL_UNIX_DIR_NATIVE@,$TCL_UNIX_DIR_NATIVE,;t t
+s,@TCL_WIN_DIR_NATIVE@,$TCL_WIN_DIR_NATIVE,;t t
+s,@TCL_BMAP_DIR_NATIVE@,$TCL_BMAP_DIR_NATIVE,;t t
+s,@TCL_TOOL_DIR_NATIVE@,$TCL_TOOL_DIR_NATIVE,;t t
+s,@TCL_PLATFORM_DIR_NATIVE@,$TCL_PLATFORM_DIR_NATIVE,;t t
+s,@TCL_INCLUDES@,$TCL_INCLUDES,;t t
+s,@TK_TOP_DIR_NATIVE@,$TK_TOP_DIR_NATIVE,;t t
+s,@TK_UNIX_DIR_NATIVE@,$TK_UNIX_DIR_NATIVE,;t t
+s,@TK_WIN_DIR_NATIVE@,$TK_WIN_DIR_NATIVE,;t t
+s,@TK_GENERIC_DIR_NATIVE@,$TK_GENERIC_DIR_NATIVE,;t t
+s,@TK_XLIB_DIR_NATIVE@,$TK_XLIB_DIR_NATIVE,;t t
+s,@TK_PLATFORM_DIR_NATIVE@,$TK_PLATFORM_DIR_NATIVE,;t t
+s,@TK_INCLUDES@,$TK_INCLUDES,;t t
+s,@SHARED_BUILD@,$SHARED_BUILD,;t t
+s,@AR@,$AR,;t t
+s,@TCLSH_PROG@,$TCLSH_PROG,;t t
+s,@CELIB_DIR@,$CELIB_DIR,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@DL_LIBS@,$DL_LIBS,;t t
+s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
+s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
+s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
+s,@STLIB_LD@,$STLIB_LD,;t t
+s,@SHLIB_LD@,$SHLIB_LD,;t t
+s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
+s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
+s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
+s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
+s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
+s,@TCL_DBGX@,$TCL_DBGX,;t t
+s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
+s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
+s,@MAKE_LIB@,$MAKE_LIB,;t t
+s,@MAKE_SHARED_LIB@,$MAKE_SHARED_LIB,;t t
+s,@MAKE_STATIC_LIB@,$MAKE_STATIC_LIB,;t t
+s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
+s,@RANLIB_STUB@,$RANLIB_STUB,;t t
+s,@itkstub_LIB_FILE@,$itkstub_LIB_FILE,;t t
+s,@itk_LIB_FILE@,$itk_LIB_FILE,;t t
+s,@WISH_PROG@,$WISH_PROG,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+done
+_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-exit 0
-EOF
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
diff --git a/itcl/itk/configure.in b/itcl/itk/configure.in
index 87d309f74b2..ddc30c5aa0a 100644
--- a/itcl/itk/configure.in
+++ b/itcl/itk/configure.in
@@ -1,191 +1,124 @@
+#!/bin/bash -norc
#--------------------------------------------------------------------
# Sample configure.in for Tcl Extensions. The only places you should
# need to modify this file are marked by the string __CHANGE__
#--------------------------------------------------------------------
-#--------------------------------------------------------------------
-# __CHANGE__
-# This very first macro is used to verify that the configure script can
-# find the sources. The argument to AC_INIT should be a unique filename
-# for this package, and can be a relative path, such as:
-#
-# AC_INIT(../generic/tcl.h)
-#--------------------------------------------------------------------
+#-----------------------------------------------------------------------
+# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
+# set as provided. These will also be added as -D defs in your Makefile
+# so you can encode the package version directly into the source files.
+#-----------------------------------------------------------------------
-AC_INIT(generic/itk.h)
-AC_CONFIG_AUX_DIR(../config)
+AC_INIT([itk], [3.3])
#--------------------------------------------------------------------
-# __CHANGE__
-# Set your package name and version numbers here. The NODOT_VERSION is
-# required for constructing the library name on systems that don't like
-# dots in library names (Windows). The VERSION variable is used on the
-# other systems.
+# Call TEA_INIT as the first TEA_ macro to set up initial vars.
+# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
+# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------
-PACKAGE=itk
-
-MAJOR_VERSION=3
-MINOR_VERSION=2
-PATCHLEVEL=.1
-
-VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
-NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
+TEA_INIT([3.2])
+AC_PROG_LN_S
+CONFIG_CLEAN_FILES=
+if test ! -d $srcdir/tclconfig ; then
+ if test -d $srcdir/../tclconfig ; then
+ $LN_S $srcdir/../tclconfig tclconfig
+ CONFIG_CLEAN_FILES=tclconfig
+ fi
+fi
+AC_SUBST(CONFIG_CLEAN_FILES)
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
+AC_CONFIG_AUX_DIR(tclconfig)
#--------------------------------------------------------------------
-# We put this here so that you can compile with -DVERSION="1.2" to
-# encode the package version directly into the source files.
+# Load the tclConfig.sh file
#--------------------------------------------------------------------
-eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
-
-#------------------------------------------------------------------------
-# Handle the --prefix=... option
-#------------------------------------------------------------------------
-
-if test "${prefix}" = "NONE"; then
- prefix=/usr/local
-fi
-if test "${exec_prefix}" = "NONE"; then
- exec_prefix=$prefix
-fi
+TEA_PATH_TCLCONFIG
+TEA_LOAD_TCLCONFIG
#--------------------------------------------------------------------
-# Check whether --enable-gcc or --disable-gcc was given. Do this
-# before AC_CYGWIN is called so the compiler can
-# be fully tested by built-in autoconf tools.
-# This macro also calls AC_PROG_CC to set the compiler if --enable-gcc
-# was not used.
+# Load the tkConfig.sh file
#--------------------------------------------------------------------
-SC_ENABLE_GCC
-AC_PROG_INSTALL
+TEA_PATH_TKCONFIG
+TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-# Checks to see if the make program sets the $MAKE variable.
-#--------------------------------------------------------------------
+TEA_PATH_CONFIG(itcl)
+TEA_LOAD_CONFIG(itcl)
-AC_PROG_MAKE_SET
+ITCL_INCLUDES="-I\"`${CYGPATH} ${itcl_SRC_DIR}/generic`\""
#--------------------------------------------------------------------
-# Find ranlib
+# Handle the --prefix=... option by defaulting to what Tcl gave.
+# Must be called after TEA_LOAD_TCLCONFIG and before $prefix is used.
#--------------------------------------------------------------------
-AC_PROG_RANLIB
-
-#--------------------------------------------------------------------
-# This macro performs additional compiler tests.
-#--------------------------------------------------------------------
+TEA_PREFIX
-AC_CYGWIN
+#------------------------------------------------------------------------
+# Standard compiler checks.
+# This sets up CC by using the CC env var, or looks for gcc otherwise.
+# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
+# the basic setup necessary to compile executables.
+#------------------------------------------------------------------------
-#--------------------------------------------------------------------
-# Determines the correct binary file extension (.o, .obj, .exe etc.)
-#--------------------------------------------------------------------
+TEA_SETUP_COMPILER
-AC_OBJEXT
-AC_EXEEXT
+#-----------------------------------------------------------------------
+# __CHANGE__
+# Specify the C source files to compile in TEA_ADD_SOURCES,
+# public headers that need to be installed in TEA_ADD_HEADERS,
+# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
+# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
+# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
+# and PKG_TCL_SOURCES.
+#-----------------------------------------------------------------------
+
+TEA_ADD_SOURCES([itk_cmds.c
+ itk_option.c
+ itk_archetype.c
+ itk_util.c
+ itkStubInit.c])
+TEA_ADD_HEADERS([generic/itk.h generic/itkDecls.h])
+TEA_ADD_INCLUDES([${ITCL_INCLUDES} -I\"`${CYGPATH} ${srcdir}/generic`\"])
+TEA_ADD_LIBS([])
+TEA_ADD_CFLAGS([])
+#TEA_ADD_STUB_SOURCES([itkStubLib.c])
+TEA_ADD_TCL_SOURCES([library/Archetype.itk
+ library/Toplevel.itk
+ library/Widget.itk
+ library/itk.tcl
+ library/tclIndex])
#--------------------------------------------------------------------
-# "cygpath" is used on windows to generate native path names for include
-# files.
-# These variables should only be used with the compiler and linker since
-# they generate native path names.
+# __CHANGE__
+# A few miscellaneous platform-specific items:
#
-# Unix tclConfig.sh points SRC_DIR at the top-level directory of
-# the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at
-# the win subdirectory. Hence the different usages of SRC_DIR below.
+# Define a special symbol for Windows (BUILD_itk in this case) so
+# that we create the export library with the dll. See sha1.h on how
+# to use this.
#
-# This must be done before calling SC_PUBLIC_TCL_HEADERS
-#--------------------------------------------------------------------
-
-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"
- ;;
- *)
- CYGPATH=echo
- RELPATH=..
- ;;
-esac
-
-AC_SUBST(CYGPATH)
-AC_SUBST(RELPATH)
-
-#--------------------------------------------------------------------
-# Includes for this package
-#--------------------------------------------------------------------
-
-ITK_GENERIC_DIR_NATIVE=`${CYGPATH} ${srcdir}/generic`
-ITK_WIN_DIR_NATIVE=`${CYGPATH} ${srcdir}/win`
-ITK_UNIX_DIR_NATIVE=`${CYGPATH} ${srcdir}/unix`
-
-case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
- ITK_PLATFORM_DIR_NATIVE=${ITK_WIN_DIR_NATIVE}
- ;;
- *)
- ITK_PLATFORM_DIR_NATIVE=${ITK_UNIX_DIR_NATIVE}
- ;;
-esac
-
-ITK_INCLUDES="-I\"${ITK_GENERIC_DIR_NATIVE}\" -I\"${ITK_PLATFORM_DIR_NATIVE}\""
-
-AC_SUBST(ITK_GENERIC_DIR_NATIVE)
-AC_SUBST(ITK_WIN_DIR_NATIVE)
-AC_SUBST(ITK_UNIX_DIR_NATIVE)
-AC_SUBST(ITK_INCLUDES)
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-SC_PATH_TCLCONFIG
-SC_LOAD_TCLCONFIG
-
-#--------------------------------------------------------------------
-# Load the tkConfig.sh file
-#--------------------------------------------------------------------
-
-SC_PATH_TKCONFIG
-SC_LOAD_TKCONFIG
-
-AC_ARG_WITH(itcl, [ --with-itclinclude=DIR use Itcl headers from DIR],
- ITCL_LIB_DIR=$withval, ITCL_LIB_DIR=`cd ${srcdir}/../itcl; pwd`)
-
-if test ! -r "${ITCL_LIB_DIR}/generic/itclInt.h" ; then
- AC_MSG_ERROR(Can't find Itcl private header files. Use --with-itclinclude to specify the directory containing the Itcl private headers on your system.)
-fi
-
-ITCL_INCLUDES=-I\"`${CYGPATH} ${ITCL_LIB_DIR}/generic`\"
-AC_SUBST(ITCL_INCLUDES)
-
-#--------------------------------------------------------------------
-# 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.
+# Windows creates a few extra files that need to be cleaned up.
+# You can add more files to clean if your extension creates any extra
+# files.
+#
+# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
+# These will be appended to the current set of compiler flags for
+# your system.
#--------------------------------------------------------------------
-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?)
+if test "${TEA_PLATFORM}" = "windows" ; then
+ AC_DEFINE(BUILD_itk)
+ CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
+ TEA_ADD_SOURCES([dllEntryPoint.c])
else
- AC_MSG_RESULT(${ac_cv_itclstub_LIB_FILE})
+ CLEANFILES=
fi
-itclstub_LIB_FILE=${ac_cv_itclstub_LIB_FILE}
-AC_SUBST(itclstub_LIB_FILE)
-
-SC_LIB_SPEC(tkstub, ${TK_BIN_DIR})
-AC_SUBST(tkstub_LIB_SPEC)
-SC_LIB_SPEC(itclstub, ../itcl)
+AC_SUBST(CLEANFILES)
#--------------------------------------------------------------------
# __CHANGE__
@@ -193,68 +126,44 @@ SC_LIB_SPEC(itclstub, ../itcl)
# hard to only rely on the Tcl public header files. Internal headers
# contain private data structures and are subject to change without
# notice.
-# This must be done AFTER calling SC_PATH_TCLCONFIG/SC_LOAD_TCLCONFIG
+# This must be done AFTER calling TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG
# so that we can extract TCL_SRC_DIR from the config file (in the case
# of private headers
#--------------------------------------------------------------------
-#SC_PUBLIC_TCL_HEADERS
-SC_PRIVATE_TCL_HEADERS
+#TEA_PUBLIC_TCL_HEADERS
+TEA_PRIVATE_TCL_HEADERS
-#SC_PUBLIC_TK_HEADERS
-SC_PRIVATE_TK_HEADERS
+#TEA_PUBLIC_TK_HEADERS
+TEA_PRIVATE_TK_HEADERS
#--------------------------------------------------------------------
-# __CHANGE__
-# A few miscellaneous platform-specific items:
-#
-# Define a special symbol for Windows (BUILD_itk in this case) so
-# that we create the export library with the dll. See sha1.h on how
-# to use this.
-#
-# Windows creates a few extra files that need to be cleaned up.
-# You can add more files to clean if your extension creates any extra
-# files.
-#
-# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
-# These will be appended to the current set of compiler flags for
-# your system.
+# For Unix/Tk builds, make sure that the X libraries/headers are found.
#--------------------------------------------------------------------
-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)'
- PLATFORM_OBJECTS='$(WIN_OBJECTS)'
- PLATFORM_DIR='$(WIN_DIR)'
- ;;
- *)
- CLEANFILES=
- PLATFORM_SOURCES='$(UNIX_SOURCES)'
- PLATFORM_OBJECTS='$(UNIX_OBJECTS)'
- PLATFORM_DIR='$(UNIX_DIR)'
- ;;
-esac
+TEA_PATH_X
-AC_SUBST(CLEANFILES)
-AC_SUBST(PLATFORM_SOURCES)
-AC_SUBST(PLATFORM_OBJECTS)
-AC_SUBST(PLATFORM_DIR)
+#--------------------------------------------------------------------
+# We need to enable the threading macros found in tcl.h and tclInt.h.
+# The use of the threading features is determined by the core the
+# extension is loaded into, but we need to compile with these macros
+# turned on.
+#--------------------------------------------------------------------
+AC_DEFINE(TCL_THREADS)
#--------------------------------------------------------------------
# Check whether --enable-threads or --disable-threads was given.
-# So far only Tcl responds to this one.
+# This auto-enables if Tcl was compiled threaded.
#--------------------------------------------------------------------
-SC_ENABLE_THREADS
+#TEA_ENABLE_THREADS
#--------------------------------------------------------------------
# The statement below defines a collection of symbols related to
# building as a shared library instead of a static library.
#--------------------------------------------------------------------
-SC_ENABLE_SHARED
+TEA_ENABLE_SHARED
#--------------------------------------------------------------------
# This macro figures out what flags to use with the compiler/linker
@@ -262,33 +171,14 @@ SC_ENABLE_SHARED
# is all taken from the tclConfig.sh file.
#--------------------------------------------------------------------
-CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
-CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
-LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
-LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
-SHLIB_LD=${TCL_SHLIB_LD}
-STLIB_LD=${TCL_STLIB_LD}
-SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
-
-AC_SUBST(CFLAGS_DEBUG)
-AC_SUBST(CFLAGS_OPTIMIZE)
-AC_SUBST(STLIB_LD)
-AC_SUBST(SHLIB_LD)
-AC_SUBST(SHLIB_CFLAGS)
-AC_SUBST(SHLIB_LDFLAGS)
+TEA_CONFIG_CFLAGS
#--------------------------------------------------------------------
# Set the default compiler switches based on the --enable-symbols
# option.
#--------------------------------------------------------------------
-SC_ENABLE_SYMBOLS
-
-if test "${SHARED_BUILD}" = "1" ; then
- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
-else
- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
-fi
+TEA_ENABLE_SYMBOLS
#--------------------------------------------------------------------
# Everyone should be linking against the Tcl stub library. If you
@@ -305,45 +195,22 @@ fi
#--------------------------------------------------------------------
# This macro generates a line to use when building a library. It
-# depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS,
-# and SC_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-SC_MAKE_LIB
-
-#--------------------------------------------------------------------
-# eval these two values to dereference the ${DBGX} variable.
+# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
+# and TEA_LOAD_TCLCONFIG macros above.
#--------------------------------------------------------------------
-eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
-eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
+TEA_MAKE_LIB
#--------------------------------------------------------------------
-# Shared libraries and static libraries have different names.
+# __CHANGE__
+# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
#--------------------------------------------------------------------
-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}"
- ;;
- *)
- 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
+if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${itcl_STUB_LIB_PATH}`\""
+else
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${itcl_STUB_LIB_SPEC}"
+fi
#--------------------------------------------------------------------
# __CHANGE__
@@ -354,7 +221,6 @@ esac
AC_SUBST(itkstub_LIB_FILE)
AC_SUBST(itk_LIB_FILE)
-AC_SUBST(SHLIB_LD_LIBS)
#--------------------------------------------------------------------
# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
@@ -364,17 +230,11 @@ AC_SUBST(SHLIB_LD_LIBS)
# versions have bugs in the pkg_mkIndex routine.
#--------------------------------------------------------------------
-SC_PROG_TCLSH
-
-#--------------------------------------------------------------------
-# A wish shell is needed to run the test suite.
-#--------------------------------------------------------------------
-
-SC_PROG_WISH
+TEA_PROG_TCLSH
+TEA_PROG_WISH
#--------------------------------------------------------------------
# Finally, substitute all of the various values into the Makefile.
#--------------------------------------------------------------------
-AC_OUTPUT([Makefile \
- pkgIndex.tcl itkConfig.sh])
+AC_OUTPUT([Makefile pkgIndex.tcl itkConfig.sh])
diff --git a/itcl/itk/doc/Archetype.n b/itcl/itk/doc/Archetype.n
index 5389d32d19f..fe035a6a636 100644
--- a/itcl/itk/doc/Archetype.n
+++ b/itcl/itk/doc/Archetype.n
@@ -192,7 +192,7 @@ override settings determined from the X11 resource database.
The arguments to the constructor are usually passed along
to this method as follows:
.CS
-class MyWidget {
+itcl::class MyWidget {
inherit Widget
constructor {args} {
@@ -230,7 +230,7 @@ for their "hull" component: -background and -cursor. A derived
class can override this decision, and add options that control
the border of the "hull" component as well:
.CS
-class MyWidget {
+itcl::class MyWidget {
inherit Widget
constructor {args} {
@@ -267,7 +267,7 @@ new value is reported to standard output. Note that this synthetic
option is integrated with the rest of the "-background" options
that have been kept from component widgets:
.CS
-class MyWidget {
+itcl::class MyWidget {
inherit Widget
constructor {args} {
itk_component add label {
@@ -295,8 +295,8 @@ used to remove options at a later time. For example, a derived
class can override an option defined in a base class by removing
and redefining the option:
.CS
-class Base {
- inherit Widget
+itcl::class Base {
+ inherit itk::Widget
constructor {args} {
eval itk_initialize $args
}
@@ -306,7 +306,7 @@ class Base {
}
}
-class Derived {
+itcl::class Derived {
inherit Base
constructor {args} {
diff --git a/itcl/itk/doc/Toplevel.n b/itcl/itk/doc/Toplevel.n
index b11c4b2d029..51aeb64251a 100644
--- a/itcl/itk/doc/Toplevel.n
+++ b/itcl/itk/doc/Toplevel.n
@@ -68,7 +68,7 @@ user can dismiss by pushing the "Dismiss" button.
.CS
option add *MessageInfo.title "Notice" widgetDefault
-class MessageInfo {
+itcl::class MessageInfo {
inherit itk::Toplevel
constructor {args} {
@@ -117,7 +117,7 @@ class MessageInfo {
}
}
-usual MessageInfo {
+itk::usual MessageInfo {
keep -background -cursor -foreground -font
keep -activebackground -activeforeground -disabledforeground
keep -highlightcolor -highlightthickness
diff --git a/itcl/itk/doc/Widget.n b/itcl/itk/doc/Widget.n
index 0c74fd92ebe..a65bf3eda66 100644
--- a/itcl/itk/doc/Widget.n
+++ b/itcl/itk/doc/Widget.n
@@ -60,7 +60,7 @@ option add *TextDisplay.textBackground ivory widgetDefault
option add *TextDisplay.width 40 widgetDefault
option add *TextDisplay.height 10 widgetDefault
-class TextDisplay {
+itcl::class TextDisplay {
inherit itk::Widget
constructor {args} {
@@ -87,20 +87,20 @@ class TextDisplay {
public method append {info}
}
-body TextDisplay::display {info} {
+itcl::body TextDisplay::display {info} {
$itk_component(text) configure -state normal
$itk_component(text) delete 1.0 end
$itk_component(text) insert 1.0 $info
$itk_component(text) configure -state disabled
}
-body TextDisplay::append {info} {
+itcl::body TextDisplay::append {info} {
$itk_component(text) configure -state normal
$itk_component(text) insert end $info
$itk_component(text) configure -state disabled
}
-usual TextDisplay {
+itk::usual TextDisplay {
keep -background -cursor -foreground -font
keep -activebackground -activerelief
keep -highlightcolor -highlightthickness
diff --git a/itcl/itk/doc/usual.n b/itcl/itk/doc/usual.n
index 0e2c4646c6c..e75adee6f38 100644
--- a/itcl/itk/doc/usual.n
+++ b/itcl/itk/doc/usual.n
@@ -61,7 +61,7 @@ all \fItag\fR names previously registered.
Following is the \fBusual\fR declaration for the standard
Tk button widget:
.CS
-usual Button {
+itk::usual Button {
keep -background -cursor -foreground -font
keep -activebackground -activeforeground -disabledforeground
keep -highlightcolor -highlightthickness
diff --git a/itcl/itk/generic/itk.decls b/itcl/itk/generic/itk.decls
index 0d24be045d8..91de1a868fe 100644
--- a/itcl/itk/generic/itk.decls
+++ b/itcl/itk/generic/itk.decls
@@ -4,8 +4,6 @@
# functions that are exported by the Itk library via the stubs table.
# This file is used to generate the itkDecls.h file.
#
-#
-# Copyright (c) 1998-1999 by XXXX
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
@@ -59,7 +57,7 @@ declare 5 generic {
}
declare 6 generic {
int Itk_ConfigClassOption (Tcl_Interp *interp, ItclObject *contextObj, \
- ClientData cdata, char* newVal)
+ ClientData cdata, CONST char* newVal)
}
declare 7 generic {
ItkClassOptTable* Itk_CreateClassOptTable( Tcl_Interp *interp, \
diff --git a/itcl/itk/generic/itk.h b/itcl/itk/generic/itk.h
index c96f61930c0..1f7bcd4f80a 100644
--- a/itcl/itk/generic/itk.h
+++ b/itcl/itk/generic/itk.h
@@ -48,6 +48,26 @@
#ifndef ITK_H
#define ITK_H
+#ifndef TCL_ALPHA_RELEASE
+# define TCL_ALPHA_RELEASE 0
+#endif
+#ifndef TCL_BETA_RELEASE
+# define TCL_BETA_RELEASE 1
+#endif
+#ifndef TCL_FINAL_RELEASE
+# define TCL_FINAL_RELEASE 2
+#endif
+
+
+#define ITK_MAJOR_VERSION 3
+#define ITK_MINOR_VERSION 3
+#define ITK_RELEASE_LEVEL TCL_FINAL_RELEASE
+#define ITK_RELEASE_SERIAL 0
+
+#define ITK_VERSION "3.3"
+#define ITK_PATCH_LEVEL "3.3.0"
+
+
/*
* A special definition used to allow this header file to be included
* in resource files so that they can get obtain version information from
@@ -57,12 +77,18 @@
#ifndef RC_INVOKED
-#include "itclInt.h"
#include "tk.h"
+#include "itclInt.h"
+#undef TCL_STORAGE_CLASS
#ifdef BUILD_itk
-# undef TCL_STORAGE_CLASS
-# define TCL_STORAGE_CLASS DLLEXPORT
+# define TCL_STORAGE_CLASS DLLEXPORT
+#else
+# ifdef USE_ITK_STUBS
+# define TCL_STORAGE_CLASS
+# else
+# define TCL_STORAGE_CLASS DLLIMPORT
+# endif
#endif
/*
@@ -100,17 +126,20 @@ typedef struct ItkClassOption {
*/
#ifdef USE_ITK_STUBS
-
-CONST char * Itk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
- char *version, int exact));
+TCL_EXTERNC CONST char *
+ Itk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST char *version, int exact));
+#else
+#define Itk_InitStubs(interp, version, exact) \
+ Tcl_PkgRequire(interp, "Itk", version, exact)
#endif
/*
* Public functions that are not accessible via the stubs table.
*/
-# undef TCL_STORAGE_CLASS
-# define TCL_STORAGE_CLASS DLLIMPORT
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
#endif /* RC_INVOKED */
#endif /* ITK_H */
diff --git a/itcl/itk/generic/itkDecls.h b/itcl/itk/generic/itkDecls.h
index 625ad39dfcb..bd390edfec5 100644
--- a/itcl/itk/generic/itkDecls.h
+++ b/itcl/itk/generic/itkDecls.h
@@ -3,8 +3,6 @@
*
* Declarations of functions in the platform independent public Itk API.
*
- * Copyright (c) 1998-1999 by XXXX
- *
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
@@ -31,61 +29,112 @@
* Exported function declarations:
*/
+#ifndef Itk_Init_TCL_DECLARED
+#define Itk_Init_TCL_DECLARED
/* 0 */
-EXTERN int Itk_Init _ANSI_ARGS_((Tcl_Interp * interp));
+TCL_EXTERN(int) Itk_Init _ANSI_ARGS_((Tcl_Interp * interp));
+#endif
+#ifndef Itk_SafeInit_TCL_DECLARED
+#define Itk_SafeInit_TCL_DECLARED
/* 1 */
-EXTERN int Itk_SafeInit _ANSI_ARGS_((Tcl_Interp * interp));
+TCL_EXTERN(int) Itk_SafeInit _ANSI_ARGS_((Tcl_Interp * interp));
+#endif
+#ifndef Itk_ConfigBodyCmd_TCL_DECLARED
+#define Itk_ConfigBodyCmd_TCL_DECLARED
/* 2 */
-EXTERN int Itk_ConfigBodyCmd _ANSI_ARGS_((ClientData cdata,
+TCL_EXTERN(int) Itk_ConfigBodyCmd _ANSI_ARGS_((ClientData cdata,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itk_UsualCmd_TCL_DECLARED
+#define Itk_UsualCmd_TCL_DECLARED
/* 3 */
-EXTERN int Itk_UsualCmd _ANSI_ARGS_((ClientData cdata,
+TCL_EXTERN(int) Itk_UsualCmd _ANSI_ARGS_((ClientData cdata,
Tcl_Interp * interp, int objc,
Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itk_ClassOptionDefineCmd_TCL_DECLARED
+#define Itk_ClassOptionDefineCmd_TCL_DECLARED
/* 4 */
-EXTERN int Itk_ClassOptionDefineCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itk_ClassOptionDefineCmd _ANSI_ARGS_((
ClientData cdata, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itk_ClassOptionIllegalCmd_TCL_DECLARED
+#define Itk_ClassOptionIllegalCmd_TCL_DECLARED
/* 5 */
-EXTERN int Itk_ClassOptionIllegalCmd _ANSI_ARGS_((
+TCL_EXTERN(int) Itk_ClassOptionIllegalCmd _ANSI_ARGS_((
ClientData cdata, Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[]));
+#endif
+#ifndef Itk_ConfigClassOption_TCL_DECLARED
+#define Itk_ConfigClassOption_TCL_DECLARED
/* 6 */
-EXTERN int Itk_ConfigClassOption _ANSI_ARGS_((
+TCL_EXTERN(int) Itk_ConfigClassOption _ANSI_ARGS_((
Tcl_Interp * interp, ItclObject * contextObj,
- ClientData cdata, char* newVal));
+ ClientData cdata, CONST char* newVal));
+#endif
+#ifndef Itk_CreateClassOptTable_TCL_DECLARED
+#define Itk_CreateClassOptTable_TCL_DECLARED
/* 7 */
-EXTERN ItkClassOptTable* Itk_CreateClassOptTable _ANSI_ARGS_((
+TCL_EXTERN(ItkClassOptTable*) Itk_CreateClassOptTable _ANSI_ARGS_((
Tcl_Interp * interp, ItclClass * cdefn));
+#endif
+#ifndef Itk_FindClassOptTable_TCL_DECLARED
+#define Itk_FindClassOptTable_TCL_DECLARED
/* 8 */
-EXTERN ItkClassOptTable* Itk_FindClassOptTable _ANSI_ARGS_((
+TCL_EXTERN(ItkClassOptTable*) Itk_FindClassOptTable _ANSI_ARGS_((
ItclClass * cdefn));
+#endif
/* Slot 9 is reserved */
+#ifndef Itk_CreateClassOption_TCL_DECLARED
+#define Itk_CreateClassOption_TCL_DECLARED
/* 10 */
-EXTERN int Itk_CreateClassOption _ANSI_ARGS_((
+TCL_EXTERN(int) Itk_CreateClassOption _ANSI_ARGS_((
Tcl_Interp * interp, ItclClass * cdefn,
char * switchName, char * resName,
char * resClass, char * defVal,
char * config, ItkClassOption ** optPtr));
+#endif
+#ifndef Itk_FindClassOption_TCL_DECLARED
+#define Itk_FindClassOption_TCL_DECLARED
/* 11 */
-EXTERN ItkClassOption* Itk_FindClassOption _ANSI_ARGS_((ItclClass * cdefn,
- char * switchName));
+TCL_EXTERN(ItkClassOption*) Itk_FindClassOption _ANSI_ARGS_((
+ ItclClass * cdefn, char * switchName));
+#endif
+#ifndef Itk_DelClassOption_TCL_DECLARED
+#define Itk_DelClassOption_TCL_DECLARED
/* 12 */
-EXTERN void Itk_DelClassOption _ANSI_ARGS_((ItkClassOption * opt));
+TCL_EXTERN(void) Itk_DelClassOption _ANSI_ARGS_((ItkClassOption * opt));
+#endif
+#ifndef Itk_ArchetypeInit_TCL_DECLARED
+#define Itk_ArchetypeInit_TCL_DECLARED
/* 13 */
-EXTERN int Itk_ArchetypeInit _ANSI_ARGS_((Tcl_Interp* interp));
+TCL_EXTERN(int) Itk_ArchetypeInit _ANSI_ARGS_((Tcl_Interp* interp));
+#endif
+#ifndef Itk_OptListInit_TCL_DECLARED
+#define Itk_OptListInit_TCL_DECLARED
/* 14 */
-EXTERN void Itk_OptListInit _ANSI_ARGS_((ItkOptList* olist,
+TCL_EXTERN(void) Itk_OptListInit _ANSI_ARGS_((ItkOptList* olist,
Tcl_HashTable * options));
+#endif
+#ifndef Itk_OptListFree_TCL_DECLARED
+#define Itk_OptListFree_TCL_DECLARED
/* 15 */
-EXTERN void Itk_OptListFree _ANSI_ARGS_((ItkOptList* olist));
+TCL_EXTERN(void) Itk_OptListFree _ANSI_ARGS_((ItkOptList* olist));
+#endif
+#ifndef Itk_OptListAdd_TCL_DECLARED
+#define Itk_OptListAdd_TCL_DECLARED
/* 16 */
-EXTERN void Itk_OptListAdd _ANSI_ARGS_((ItkOptList* olist,
+TCL_EXTERN(void) Itk_OptListAdd _ANSI_ARGS_((ItkOptList* olist,
Tcl_HashEntry * entry));
+#endif
+#ifndef Itk_OptListRemove_TCL_DECLARED
+#define Itk_OptListRemove_TCL_DECLARED
/* 17 */
-EXTERN void Itk_OptListRemove _ANSI_ARGS_((ItkOptList* olist,
+TCL_EXTERN(void) Itk_OptListRemove _ANSI_ARGS_((ItkOptList* olist,
Tcl_HashEntry * entry));
+#endif
typedef struct ItkStubs {
int magic;
@@ -97,7 +146,7 @@ typedef struct ItkStubs {
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 */
int (*itk_ClassOptionIllegalCmd) _ANSI_ARGS_((ClientData cdata, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 5 */
- int (*itk_ConfigClassOption) _ANSI_ARGS_((Tcl_Interp * interp, ItclObject * contextObj, ClientData cdata, char* newVal)); /* 6 */
+ int (*itk_ConfigClassOption) _ANSI_ARGS_((Tcl_Interp * interp, ItclObject * contextObj, ClientData cdata, CONST char* newVal)); /* 6 */
ItkClassOptTable* (*itk_CreateClassOptTable) _ANSI_ARGS_((Tcl_Interp * interp, ItclClass * cdefn)); /* 7 */
ItkClassOptTable* (*itk_FindClassOptTable) _ANSI_ARGS_((ItclClass * cdefn)); /* 8 */
void *reserved9;
@@ -111,13 +160,7 @@ typedef struct ItkStubs {
void (*itk_OptListRemove) _ANSI_ARGS_((ItkOptList* olist, Tcl_HashEntry * entry)); /* 17 */
} ItkStubs;
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern ItkStubs *itkStubsPtr;
-#ifdef __cplusplus
-}
-#endif
+TCL_EXTERNC ItkStubs *itkStubsPtr;
#if defined(USE_ITK_STUBS) && !defined(USE_ITK_STUB_PROCS)
diff --git a/itcl/itk/generic/itkStubLib.c b/itcl/itk/generic/itkStubLib.c
index 3d3e9814006..8b95707d1e9 100644
--- a/itcl/itk/generic/itkStubLib.c
+++ b/itcl/itk/generic/itkStubLib.c
@@ -56,12 +56,12 @@ ItkStubs *itkStubsPtr;
CONST char *
Itk_InitStubs (interp, version, exact)
Tcl_Interp *interp;
- char *version;
+ CONST char *version;
int exact;
{
CONST char *actualVersion;
- actualVersion = Tcl_PkgRequireEx(interp, "Itk", version, exact,
+ actualVersion = Tcl_PkgRequireEx(interp, "Itk", (CONST84 char *)version, exact,
(ClientData *) &itkStubsPtr);
if (actualVersion == NULL) {
diff --git a/itcl/itk/generic/itk_archetype.c b/itcl/itk/generic/itk_archetype.c
index 7356dba7989..38c6bdd20ae 100644
--- a/itcl/itk/generic/itk_archetype.c
+++ b/itcl/itk/generic/itk_archetype.c
@@ -54,6 +54,11 @@ typedef struct ArchComponent {
ItclMember *member; /* contains protection level for this comp */
Tcl_Command accessCmd; /* access command for component widget */
Tk_Window tkwin; /* Tk window for this component widget */
+ char *pathName; /* Tk path name for this component widget.
+ We can't use the tkwin pointer after
+ the window has been destroyed so we
+ need to save a copy for use in
+ Itk_ArchCompDeleteCmd() */
} ArchComponent;
/*
@@ -77,7 +82,7 @@ typedef struct ArchOption {
* Various parts of a composite option in an Archetype mega-widget:
*/
typedef int (Itk_ConfigOptionPartProc) _ANSI_ARGS_((Tcl_Interp *interp,
- ItclObject *contextObj, ClientData cdata, char* newVal));
+ ItclObject *contextObj, ClientData cdata, CONST char* newVal));
typedef struct ArchOptionPart {
ClientData clientData; /* data associated with this part */
@@ -169,12 +174,12 @@ static int Itk_ArchConfigureCmd _ANSI_ARGS_((ClientData cdata,
static int Itk_ArchCgetCmd _ANSI_ARGS_((ClientData cdata,
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
static int Itk_PropagateOption _ANSI_ARGS_((Tcl_Interp *interp,
- ItclObject *contextObj, ClientData cdata, char *newval));
+ ItclObject *contextObj, ClientData cdata, CONST char *newval));
static int Itk_PropagatePublicVar _ANSI_ARGS_((Tcl_Interp *interp,
- ItclObject *contextObj, ClientData cdata, char *newval));
+ ItclObject *contextObj, ClientData cdata, CONST char *newval));
static int Itk_ArchSetOption _ANSI_ARGS_((Tcl_Interp *interp,
- ArchInfo *info, char *name, char *value));
+ ArchInfo *info, CONST char *name, CONST char *value));
static int Itk_ArchConfigOption _ANSI_ARGS_((Tcl_Interp *interp,
ArchInfo *info, char *name, char *value));
static void Itk_ArchOptConfigError _ANSI_ARGS_((Tcl_Interp *interp,
@@ -192,9 +197,9 @@ static void Itk_DelArchComponent _ANSI_ARGS_((ArchComponent *archComp));
static int Itk_GetArchOption _ANSI_ARGS_((Tcl_Interp *interp,
ArchInfo *info, char *switchName, char *resName, char *resClass,
- char *defVal, char *currVal, ArchOption **aoPtr));
+ CONST char *defVal, char *currVal, ArchOption **aoPtr));
static void Itk_InitArchOption _ANSI_ARGS_((Tcl_Interp *interp,
- ArchInfo *info, ArchOption *archOpt, char *defVal,
+ ArchInfo *info, ArchOption *archOpt, CONST char *defVal,
char *currVal));
static void Itk_DelArchOption _ANSI_ARGS_((ArchOption *archOpt));
@@ -203,7 +208,7 @@ static ArchOptionPart* Itk_CreateOptionPart _ANSI_ARGS_((
Tcl_CmdDeleteProc *dproc, ClientData from));
static int Itk_AddOptionPart _ANSI_ARGS_((Tcl_Interp *interp,
ArchInfo *info, char *switchName, char *resName, char *resClass,
- char *defVal, char *currVal, ArchOptionPart *optPart,
+ CONST char *defVal, char *currVal, ArchOptionPart *optPart,
ArchOption **raOpt));
static ArchOptionPart* Itk_FindArchOptionPart _ANSI_ARGS_((
ArchInfo *info, char *switchName, ClientData from));
@@ -676,7 +681,8 @@ Itk_ArchCompAddCmd(dummy, interp, objc, objv)
int pLevel = ITCL_PUBLIC;
int newEntry, result;
- char *cmd, *token, *name, *resultStr;
+ CONST char *cmd, *token, *resultStr;
+ char *name;
Tcl_Namespace *parserNs;
ItclClass *contextClass, *ownerClass;
ItclObject *contextObj;
@@ -1141,7 +1147,7 @@ Itk_ArchCompDeleteCmd(dummy, interp, objc, objv)
*/
Tcl_DStringInit(&buffer);
Tcl_DStringAppend(&buffer, "itk::remove_destroy_hook ", -1);
- Tcl_DStringAppend(&buffer, Tk_PathName(archComp->tkwin), -1);
+ Tcl_DStringAppend(&buffer, archComp->pathName, -1);
(void) Tcl_Eval(interp, Tcl_DStringValue(&buffer));
Tcl_ResetResult(interp);
Tcl_DStringFree(&buffer);
@@ -1527,7 +1533,7 @@ Itk_ArchOptUsualCmd(clientData, interp, objc, objv)
{
ArchMergeInfo *mergeInfo = (ArchMergeInfo*)clientData;
- char *tag;
+ CONST char *tag;
Tcl_HashEntry *entry;
Tcl_Obj *codePtr;
@@ -1698,7 +1704,8 @@ Itk_ArchInitCmd(dummy, interp, objc, objv)
ArchInfo *info;
int i, result;
- char *token, *val;
+ CONST char *val;
+ char *token;
Tcl_CallFrame *framePtr;
ItkClassOption *opt;
ItkClassOptTable *optTable;
@@ -1807,6 +1814,7 @@ Itk_ArchInitCmd(dummy, interp, objc, objv)
*/
if (objc > 1) {
for (objc--,objv++; objc > 0; objc-=2, objv+=2) {
+ char *value;
token = Tcl_GetStringFromObj(objv[0], (int*)NULL);
if (objc < 2) {
/* Bug 227814
@@ -1820,8 +1828,8 @@ Itk_ArchInitCmd(dummy, interp, objc, objv)
return TCL_ERROR;
}
- val = Tcl_GetStringFromObj(objv[1], (int*)NULL);
- if (Itk_ArchConfigOption(interp, info, token, val) != TCL_OK) {
+ value = Tcl_GetStringFromObj(objv[1], (int*)NULL);
+ if (Itk_ArchConfigOption(interp, info, token, value) != TCL_OK) {
return TCL_ERROR;
}
}
@@ -2326,7 +2334,8 @@ Itk_ArchCompAccessCmd(dummy, interp, objc, objv)
Tcl_Obj *CONST objv[]; /* argument objects */
{
int i, result;
- char *token, *name, *val;
+ char *token;
+ CONST char *name, *val;
Tcl_Namespace *callingNs;
ItclClass *contextClass;
ItclObject *contextObj;
@@ -2371,7 +2380,7 @@ Itk_ArchCompAccessCmd(dummy, interp, objc, objv)
archComp = (ArchComponent*)Tcl_GetHashValue(entry);
if (Itcl_CanAccess(archComp->member, callingNs)) {
name = Tcl_GetHashKey(&info->components, entry);
- Tcl_AppendElement(interp, name);
+ Tcl_AppendElement(interp, (CONST84 char *)name);
}
entry = Tcl_NextHashEntry(&place);
}
@@ -2425,7 +2434,11 @@ Itk_ArchCompAccessCmd(dummy, interp, objc, objv)
}
return TCL_ERROR;
}
- Tcl_SetResult(interp, val, TCL_VOLATILE);
+ /*
+ * Casting away CONST is safe because TCL_VOLATILE guarantees
+ * CONST treatment.
+ */
+ Tcl_SetResult(interp, (char *) val, TCL_VOLATILE);
return TCL_OK;
}
@@ -2479,7 +2492,8 @@ Itk_ArchConfigureCmd(dummy, interp, objc, objv)
Tcl_Obj *CONST objv[]; /* argument objects */
{
int i;
- char *token, *val;
+ CONST char *val;
+ char *token;
ItclClass *contextClass;
ItclObject *contextObj;
ArchInfo *info;
@@ -2565,7 +2579,7 @@ Itk_ArchConfigureCmd(dummy, interp, objc, objv)
(archOpt->resClass) ? archOpt->resClass : "");
Tcl_AppendElement(interp,
(archOpt->init) ? archOpt->init : "");
- Tcl_AppendElement(interp, val);
+ Tcl_AppendElement(interp, (CONST84 char *)val);
return TCL_OK;
}
@@ -2575,6 +2589,7 @@ Itk_ArchConfigureCmd(dummy, interp, objc, objv)
* Look up each option and assign the new value.
*/
for (objc--,objv++; objc > 0; objc-=2, objv+=2) {
+ char *value;
token = Tcl_GetStringFromObj(objv[0], (int*)NULL);
if (objc < 2) {
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
@@ -2582,9 +2597,9 @@ Itk_ArchConfigureCmd(dummy, interp, objc, objv)
(char*)NULL);
return TCL_ERROR;
}
- val = Tcl_GetStringFromObj(objv[1], (int*)NULL);
+ value = Tcl_GetStringFromObj(objv[1], (int*)NULL);
- if (Itk_ArchConfigOption(interp, info, token, val) != TCL_OK) {
+ if (Itk_ArchConfigOption(interp, info, token, value) != TCL_OK) {
return TCL_ERROR;
}
}
@@ -2614,7 +2629,7 @@ Itk_ArchCgetCmd(dummy, interp, objc, objv)
int objc; /* number of arguments */
Tcl_Obj *CONST objv[]; /* argument objects */
{
- char *token, *val;
+ CONST char *token, *val;
ItclClass *contextClass;
ItclObject *contextObj;
ArchInfo *info;
@@ -2660,7 +2675,11 @@ Itk_ArchCgetCmd(dummy, interp, objc, objv)
return TCL_ERROR;
}
- Tcl_SetResult(interp, val, TCL_VOLATILE);
+ /*
+ * Casting away CONST is safe because TCL_VOLATILE guarantees
+ * CONST treatment.
+ */
+ Tcl_SetResult(interp, (char *) val, TCL_VOLATILE);
return TCL_OK;
}
@@ -2684,13 +2703,13 @@ Itk_PropagateOption(interp, contextObj, cdata, newval)
Tcl_Interp *interp; /* interpreter managing the class */
ItclObject *contextObj; /* itcl object being configured */
ClientData cdata; /* command prefix to use for configuration */
- char *newval; /* new value for this option */
+ CONST char *newval; /* new value for this option */
{
ConfigCmdline *cmdlinePtr = (ConfigCmdline*)cdata;
int result;
Tcl_Obj *objPtr;
- objPtr = Tcl_NewStringObj(newval, -1);
+ objPtr = Tcl_NewStringObj((CONST84 char *)newval, -1);
Tcl_IncrRefCount(objPtr);
cmdlinePtr->objv[3] = objPtr;
@@ -2720,12 +2739,12 @@ Itk_PropagatePublicVar(interp, contextObj, cdata, newval)
Tcl_Interp *interp; /* interpreter managing the class */
ItclObject *contextObj; /* itcl object being configured */
ClientData cdata; /* command prefix to use for configuration */
- char *newval; /* new value for this option */
+ CONST char *newval; /* new value for this option */
{
ItclVarDefn *vdefn = (ItclVarDefn*)cdata;
int result;
- char *val;
+ CONST char *val;
ItclContext context;
ItclMemberCode *mcode;
Tcl_CallFrame *uplevelFramePtr, *oldFramePtr;
@@ -2741,8 +2760,12 @@ Itk_PropagatePublicVar(interp, contextObj, cdata, newval)
contextObj->classDefn, contextObj, &context);
if (result == TCL_OK) {
- val = Tcl_SetVar2(interp, vdefn->member->fullname, (char*)NULL,
- newval, TCL_LEAVE_ERR_MSG);
+ /*
+ * Casting away CONST of newval only to satisfy Tcl 8.3 and
+ * earlier headers.
+ */
+ val = Tcl_SetVar2(interp, vdefn->member->fullname, (char *) NULL,
+ (char *) newval, TCL_LEAVE_ERR_MSG);
if (!val) {
result = TCL_ERROR;
@@ -2813,8 +2836,8 @@ static int
Itk_ArchSetOption(interp, info, name, value)
Tcl_Interp *interp; /* interpreter managing this widget */
ArchInfo *info; /* Archetype info */
- char *name; /* name of configuration option */
- char *value; /* new value for configuration option */
+ CONST char *name; /* name of configuration option */
+ CONST char *value; /* new value for configuration option */
{
Tcl_HashEntry *entry;
ArchOption *archOpt;
@@ -2828,7 +2851,8 @@ Itk_ArchSetOption(interp, info, name, value)
}
archOpt = (ArchOption*)Tcl_GetHashValue(entry);
- if (!Tcl_SetVar2(interp, "itk_option", archOpt->switchName, value, 0)) {
+ if (!Tcl_SetVar2(interp, "itk_option", archOpt->switchName,
+ (CONST84 char *)value, 0)) {
Itk_ArchOptAccessError(interp, info, archOpt);
return TCL_ERROR;
}
@@ -2860,11 +2884,12 @@ static int
Itk_ArchConfigOption(interp, info, name, value)
Tcl_Interp *interp; /* interpreter managing this widget */
ArchInfo *info; /* Archetype info */
- char *name; /* name of configuration option */
+ char *name; /* name of configuration option */
char *value; /* new value for configuration option */
{
int result;
- char *v, *lastval;
+ CONST char *v;
+ char *lastval;
Tcl_HashEntry *entry;
ArchOption *archOpt;
Itcl_ListElem *part;
@@ -3085,7 +3110,7 @@ Itk_CreateArchComponent(interp, info, name, cdefn, accessCmd)
ItclClass *cdefn; /* component created in this class */
Tcl_Command accessCmd; /* access command for component */
{
- char *init;
+ CONST char *init;
CONST char *wname;
ArchComponent *archComp;
ArchOption *archOpt;
@@ -3164,6 +3189,8 @@ Itk_CreateArchComponent(interp, info, name, cdefn, accessCmd)
archComp->member = memPtr;
archComp->accessCmd = accessCmd;
archComp->tkwin = tkwin;
+ archComp->pathName = (char *) ckalloc((unsigned)(strlen(wname)+1));
+ strcpy(archComp->pathName, wname);
return archComp;
}
@@ -3182,6 +3209,7 @@ Itk_DelArchComponent(archComp)
ArchComponent *archComp; /* pointer to component data */
{
ckfree((char*)archComp->member);
+ ckfree((char*)archComp->pathName);
ckfree((char*)archComp);
}
@@ -3215,7 +3243,7 @@ Itk_GetArchOption(interp, info, switchName, resName, resClass,
char *switchName; /* name of command-line switch */
char *resName; /* resource name in X11 database */
char *resClass; /* resource class name in X11 database */
- char *defVal; /* last-resort default value */
+ CONST char *defVal; /* last-resort default value */
char *currVal; /* current option value */
ArchOption **aoPtr; /* returns: option record */
{
@@ -3346,13 +3374,14 @@ Itk_InitArchOption(interp, info, archOpt, defVal, currVal)
Tcl_Interp *interp; /* interpreter managing the object */
ArchInfo *info; /* info for Archetype mega-widget */
ArchOption *archOpt; /* option to initialize */
- char *defVal; /* last-resort default value */
+ CONST char *defVal; /* last-resort default value */
char *currVal; /* current option value */
{
- char *init = NULL;
+ CONST char *init = NULL;
int result;
- char c, *ival;
+ CONST char *ival;
+ char c;
ItclContext context;
/*
@@ -3402,8 +3431,12 @@ Itk_InitArchOption(interp, info, archOpt, defVal, currVal)
info->itclObj->classDefn, info->itclObj, &context);
if (result == TCL_OK) {
+ /*
+ * Casting away CONST of ival only to satisfy Tcl 8.3 and
+ * earlier headers.
+ */
Tcl_SetVar2(interp, "itk_option", archOpt->switchName,
- (ival) ? ival : "", 0);
+ (char *)((ival) ? ival : ""), 0);
Itcl_PopContext(interp, &context);
}
@@ -3521,12 +3554,12 @@ Itk_AddOptionPart(interp, info, switchName, resName, resClass,
char *switchName; /* name of command-line switch */
char *resName; /* resource name in X11 database */
char *resClass; /* resource class name in X11 database */
- char *defVal; /* last-resort default value */
+ CONST char *defVal; /* last-resort default value */
char *currVal; /* current value (or NULL) */
ArchOptionPart *optPart; /* part to be added in */
ArchOption **raOpt; /* returns: option containing new part */
{
- char *init = NULL;
+ CONST char *init = NULL;
int result;
ArchOption *archOpt;
diff --git a/itcl/itk/generic/itk_cmds.c b/itcl/itk/generic/itk_cmds.c
index 878c3ee7fa6..c28d47640dc 100644
--- a/itcl/itk/generic/itk_cmds.c
+++ b/itcl/itk/generic/itk_cmds.c
@@ -73,6 +73,13 @@ namespace eval ::itk {\n\
lappend dirs [file join $bindir .. library]\n\
lappend dirs [file join $bindir .. .. library]\n\
lappend dirs [file join $bindir .. .. itk library]\n\
+ # On MacOSX, check the directories in the tcl_pkgPath\n\
+ if {[string equal $::tcl_platform(platform) \"unix\"] && \
+ [string equal $::tcl_platform(os) \"Darwin\"]} {\n\
+ foreach d $::tcl_pkgPath {\n\
+ lappend dirs [file join $d itk$version]\n\
+ }\n\
+ }\n\
}\n\
foreach i $dirs {\n\
set library $i\n\
@@ -111,17 +118,28 @@ Initialize(interp)
{
Tcl_Namespace *itkNs, *parserNs;
ClientData parserInfo;
- extern ItkStubs itkStubs;
+#ifndef USE_TCL_STUBS
+ if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL) {
+ return TCL_ERROR;
+ }
+ if (Tcl_PkgRequire(interp, "Tk", TK_VERSION, 0) == NULL) {
+ return TCL_ERROR;
+ }
+ if (Tcl_PkgRequire(interp, "Itcl", ITCL_VERSION, 0) == NULL) {
+ return TCL_ERROR;
+ }
+#else
if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
- return TCL_ERROR;
- };
+ return TCL_ERROR;
+ }
if (Tk_InitStubs(interp, "8.1", 0) == NULL) {
return TCL_ERROR;
};
if (Itcl_InitStubs(interp, ITCL_VERSION, 1) == NULL) {
return TCL_ERROR;
}
+#endif
/*
@@ -199,8 +217,8 @@ Initialize(interp)
Tcl_CreateObjCommand(interp, "::itcl::configbody", Itk_ConfigBodyCmd,
(ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
- Tcl_SetVar(interp, "::itk::version", ITCL_VERSION, 0);
- Tcl_SetVar(interp, "::itk::patchLevel", ITCL_PATCH_LEVEL, 0);
+ Tcl_SetVar(interp, "::itk::version", ITK_VERSION, 0);
+ Tcl_SetVar(interp, "::itk::patchLevel", ITK_PATCH_LEVEL, 0);
/*
* Signal that the package has been loaded and provide the Itk Stubs table
@@ -208,10 +226,20 @@ Initialize(interp)
* 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) {
+
+#if TCL_DOES_STUBS
+ {
+ extern ItkStubs itkStubs;
+ if (Tcl_PkgProvideEx(interp, "Itk", ITK_VERSION,
+ (ClientData) &itkStubs) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+#else
+ if (Tcl_PkgProvide(interp, "Itk", ITK_VERSION) != TCL_OK) {
return TCL_ERROR;
}
+#endif
return TCL_OK;
}
diff --git a/itcl/itk/generic/itk_option.c b/itcl/itk/generic/itk_option.c
index d329b59348c..d82135aab4f 100644
--- a/itcl/itk/generic/itk_option.c
+++ b/itcl/itk/generic/itk_option.c
@@ -29,7 +29,7 @@
* FORWARD DECLARATIONS
*/
static char* ItkTraceClassDestroy _ANSI_ARGS_((ClientData cdata,
- Tcl_Interp *interp, char *name1, char *name2, int flags));
+ Tcl_Interp *interp, CONST char *name1, CONST char *name2, int flags));
static Tcl_HashTable* ItkGetClassesWithOptInfo _ANSI_ARGS_((
Tcl_Interp *interp));
static void ItkFreeClassesWithOptInfo _ANSI_ARGS_((ClientData cdata,
@@ -204,7 +204,7 @@ Itk_ConfigClassOption(interp, contextObj, cdata, newval)
Tcl_Interp *interp; /* interpreter managing the class */
ItclObject *contextObj; /* object being configured */
ClientData cdata; /* class option */
- char *newval; /* new value for this option */
+ CONST char *newval; /* new value for this option */
{
ItkClassOption *opt = (ItkClassOption*)cdata;
int result = TCL_OK;
@@ -340,8 +340,8 @@ static char*
ItkTraceClassDestroy(cdata, interp, name1, name2, flags)
ClientData cdata; /* class definition data */
Tcl_Interp *interp; /* interpreter managing the class */
- char *name1; /* name of variable involved in trace */
- char *name2; /* name of array element within variable */
+ CONST char *name1; /* name of variable involved in trace */
+ CONST char *name2; /* name of array element within variable */
int flags; /* flags describing trace */
{
ItclClass *cdefn = (ItclClass*)cdata;
diff --git a/itcl/itk/itkConfig.sh.in b/itcl/itk/itkConfig.sh.in
index e9b1f026fcb..f88caa9a115 100644
--- a/itcl/itk/itkConfig.sh.in
+++ b/itcl/itk/itkConfig.sh.in
@@ -13,8 +13,6 @@
# Itcl's version number.
ITCL_VERSION='@ITCL_VERSION@'
-ITCL_MAJOR_VERSION='@ITCL_MAJOR_VERSION@'
-ITCL_MINOR_VERSION='@ITCL_MINOR_VERSION@'
# The name of the Itk library (may be either a .a file or a shared library):
ITK_LIB_FILE=@ITK_LIB_FILE@
diff --git a/itcl/itk/library/Toplevel.itk b/itcl/itk/library/Toplevel.itk
index cb01a6db79d..1cd8bee874e 100644
--- a/itcl/itk/library/Toplevel.itk
+++ b/itcl/itk/library/Toplevel.itk
@@ -63,6 +63,17 @@ itcl::class itk::Toplevel {
}
destroy $itk_hull
}
+ itk_component delete hull
+
+ set components [component]
+ foreach component $components {
+ set path($component) [component $component]
+ }
+ foreach component $components {
+ if {[winfo exists $path($component)]} {
+ destroy $path($component)
+ }
+ }
}
itk_option define -title title Title "" {
diff --git a/itcl/itk/library/Widget.itk b/itcl/itk/library/Widget.itk
index 8c455e3211e..cad19868ddc 100644
--- a/itcl/itk/library/Widget.itk
+++ b/itcl/itk/library/Widget.itk
@@ -64,6 +64,17 @@ itcl::class itk::Widget {
}
destroy $itk_hull
}
+ itk_component delete hull
+
+ set components [component]
+ foreach component $components {
+ set path($component) [component $component]
+ }
+ foreach component $components {
+ if {[winfo exists $path($component)]} {
+ destroy $path($component)
+ }
+ }
}
private variable itk_hull ""
diff --git a/itcl/itk/library/itk.tcl b/itcl/itk/library/itk.tcl
index dea0f669bb6..4e4ec004d49 100644
--- a/itcl/itk/library/itk.tcl
+++ b/itcl/itk/library/itk.tcl
@@ -37,6 +37,7 @@ if {$tcl_platform(os) == "MacOS"} {
# Tcl than C.
# ----------------------------------------------------------------------
proc ::itk::remove_destroy_hook {widget} {
+ if {![winfo exists $widget]} {return}
set tags [bindtags $widget]
set i [lsearch $tags "itk-destroy-$widget"]
if {$i >= 0} {
diff --git a/itcl/itk/pkgIndex.tcl.in b/itcl/itk/pkgIndex.tcl.in
index d9d57d47399..6ed38e4a020 100644
--- a/itcl/itk/pkgIndex.tcl.in
+++ b/itcl/itk/pkgIndex.tcl.in
@@ -1,3 +1,3 @@
# Tcl package index file, version 1.0
-package ifneeded Itk @VERSION@ [list load [file join $dir @RELPATH@ "@itk_LIB_FILE@"] Itk]
+package ifneeded Itk @PACKAGE_VERSION@ [list load [file join $dir "@PKG_LIB_FILE@"] Itk]
diff --git a/itcl/itk/tclconfig/install-sh b/itcl/itk/tclconfig/install-sh
new file mode 100755
index 00000000000..0ff4b6a08e8
--- /dev/null
+++ b/itcl/itk/tclconfig/install-sh
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+#
+# install - install a program, script, or datafile
+# This comes from X11R5; it is not part of GNU.
+#
+# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+
+instcmd="$mvprog"
+chmodcmd=""
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+fi
+
+if [ x"$dst" = x ]
+then
+ echo "install: no destination specified"
+ exit 1
+fi
+
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+if [ -d $dst ]
+then
+ dst="$dst"/`basename $src`
+fi
+
+# Make a temp file name in the proper directory.
+
+dstdir=`dirname $dst`
+dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+$doit $instcmd $src $dsttmp
+
+# and set any options; do chmod last to preserve setuid bits
+
+if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
+if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
+if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
+if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
+
+# Now rename the file to the real destination.
+
+$doit $rmcmd $dst
+$doit $mvcmd $dsttmp $dst
+
+
+exit 0
diff --git a/itcl/itk/tclconfig/tcl.m4 b/itcl/itk/tclconfig/tcl.m4
new file mode 100644
index 00000000000..3d410763da2
--- /dev/null
+++ b/itcl/itk/tclconfig/tcl.m4
@@ -0,0 +1,3827 @@
+# tcl.m4 --
+#
+# This file provides a set of autoconf macros to help TEA-enable
+# a Tcl extension.
+#
+# Copyright (c) 1999-2000 Ajuba Solutions.
+# Copyright (c) 2002-2005 ActiveState Corporation.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# RCS: @(#) $Id$
+
+AC_PREREQ(2.50)
+
+#------------------------------------------------------------------------
+# TEA_PATH_TCLCONFIG --
+#
+# Locate the tclConfig.sh file and perform a sanity check on
+# the Tcl compile flags
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-tcl=...
+#
+# Defines the following vars:
+# TCL_BIN_DIR Full path to the directory containing
+# the tclConfig.sh file
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_TCLCONFIG, [
+ dnl Make sure we are initialized
+ AC_REQUIRE([TEA_INIT])
+ #
+ # Ok, lets find the tcl configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tcl
+ #
+
+ if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+ AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
+ AC_MSG_CHECKING([for Tcl configuration])
+ AC_CACHE_VAL(ac_cv_c_tclconfig,[
+
+ # First check to see if --with-tcl was specified.
+ if test x"${with_tclconfig}" != x ; then
+ case ${with_tclconfig} in
+ */tclConfig.sh )
+ if test -f ${with_tclconfig}; then
+ AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself])
+ with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCL_BIN_DIR="# no Tcl configs found"
+ AC_MSG_WARN("Cannot find Tcl configuration definitions")
+ exit 0
+ else
+ no_tcl=
+ TCL_BIN_DIR=${ac_cv_c_tclconfig}
+ AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_TKCONFIG --
+#
+# Locate the tkConfig.sh file
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-tk=...
+#
+# Defines the following vars:
+# TK_BIN_DIR Full path to the directory containing
+# the tkConfig.sh file
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_TKCONFIG, [
+ #
+ # Ok, lets find the tk configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tk
+ #
+
+ if test x"${no_tk}" = x ; then
+ # we reset no_tk in case something fails here
+ no_tk=true
+ AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
+ AC_MSG_CHECKING([for Tk configuration])
+ AC_CACHE_VAL(ac_cv_c_tkconfig,[
+
+ # First check to see if --with-tkconfig was specified.
+ if test x"${with_tkconfig}" != x ; then
+ case ${with_tkconfig} in
+ */tkConfig.sh )
+ if test -f ${with_tkconfig}; then
+ AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
+ with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tkconfig}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
+ fi
+ fi
+
+ # then check for a private Tk library
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ../tk \
+ `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../tk \
+ `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../../tk \
+ `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ TK_BIN_DIR="# no Tk configs found"
+ AC_MSG_WARN("Cannot find Tk configuration definitions")
+ exit 0
+ else
+ no_tk=
+ TK_BIN_DIR=${ac_cv_c_tkconfig}
+ AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh])
+ fi
+ fi
+
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_TCLCONFIG --
+#
+# Load the tclConfig.sh file
+#
+# Arguments:
+#
+# Requires the following vars to be set:
+# TCL_BIN_DIR
+#
+# Results:
+#
+# Subst the following vars:
+# TCL_BIN_DIR
+# TCL_SRC_DIR
+# TCL_LIB_FILE
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_LOAD_TCLCONFIG, [
+ AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
+
+ if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
+ AC_MSG_RESULT([loading])
+ . $TCL_BIN_DIR/tclConfig.sh
+ else
+ AC_MSG_RESULT([file not found])
+ fi
+
+ #
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f $TCL_BIN_DIR/Makefile ; then
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ fi
+
+ #
+ # eval is required to do the TCL_DBGX substitution
+ #
+
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+ AC_SUBST(TCL_VERSION)
+ AC_SUBST(TCL_BIN_DIR)
+ AC_SUBST(TCL_SRC_DIR)
+
+ AC_SUBST(TCL_LIB_FILE)
+ AC_SUBST(TCL_LIB_FLAG)
+ AC_SUBST(TCL_LIB_SPEC)
+
+ AC_SUBST(TCL_STUB_LIB_FILE)
+ AC_SUBST(TCL_STUB_LIB_FLAG)
+ AC_SUBST(TCL_STUB_LIB_SPEC)
+
+ AC_SUBST(TCL_LIBS)
+ AC_SUBST(TCL_DEFS)
+ AC_SUBST(TCL_EXTRA_CFLAGS)
+ AC_SUBST(TCL_LD_FLAGS)
+ AC_SUBST(TCL_SHLIB_LD_LIBS)
+ #AC_SUBST(TCL_BUILD_LIB_SPEC)
+ #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_TKCONFIG --
+#
+# Load the tkConfig.sh file
+#
+# Arguments:
+#
+# Requires the following vars to be set:
+# TK_BIN_DIR
+#
+# Results:
+#
+# Sets the following vars that should be in tkConfig.sh:
+# TK_BIN_DIR
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_LOAD_TKCONFIG, [
+ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
+
+ if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
+ AC_MSG_RESULT([loading])
+ . $TK_BIN_DIR/tkConfig.sh
+ else
+ AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
+ fi
+
+ #
+ # If the TK_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TK_LIB_SPEC will be set to the value
+ # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
+ # instead of TK_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f $TK_BIN_DIR/Makefile ; then
+ TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
+ TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
+ TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
+ fi
+
+ #
+ # eval is required to do the TK_DBGX substitution
+ #
+
+ eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+ eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+ eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+
+ eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+ eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+ eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+ AC_SUBST(TK_VERSION)
+ AC_SUBST(TK_BIN_DIR)
+ AC_SUBST(TK_SRC_DIR)
+
+ AC_SUBST(TK_LIB_FILE)
+ AC_SUBST(TK_LIB_FLAG)
+ AC_SUBST(TK_LIB_SPEC)
+
+ AC_SUBST(TK_STUB_LIB_FILE)
+ AC_SUBST(TK_STUB_LIB_FLAG)
+ AC_SUBST(TK_STUB_LIB_SPEC)
+
+ AC_SUBST(TK_LIBS)
+ AC_SUBST(TK_XINCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_SHARED --
+#
+# Allows the building of shared libraries
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-shared=yes|no
+#
+# Defines the following vars:
+# STATIC_BUILD Used for building import/export libraries
+# on Windows.
+#
+# Sets the following vars:
+# SHARED_BUILD Value of 1 or 0
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_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=yes])
+
+ 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])
+ SHARED_BUILD=1
+ else
+ AC_MSG_RESULT([static])
+ SHARED_BUILD=0
+ AC_DEFINE(STATIC_BUILD)
+ fi
+ AC_SUBST(SHARED_BUILD)
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_THREADS --
+#
+# Specify if thread support should be enabled. If "yes" is
+# specified as an arg (optional), threads are enabled by default.
+# TCL_THREADS is checked so that if you are compiling an extension
+# against a threaded core, your extension must be compiled threaded
+# as well.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-threads
+#
+# Sets the following vars:
+# THREADS_LIBS Thread library(s)
+#
+# Defines the following vars:
+# TCL_THREADS
+# _REENTRANT
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_ENABLE_THREADS, [
+ AC_ARG_ENABLE(threads, [ --enable-threads build with threads],
+ [tcl_ok=$enableval], [tcl_ok=$1])
+
+ if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
+ TCL_THREADS=1
+
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ # We are always OK on Windows, so check what this platform wants.
+ AC_DEFINE(USE_THREAD_ALLOC)
+ AC_DEFINE(_REENTRANT)
+ AC_DEFINE(_THREAD_SAFE)
+ AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
+ if test "$tcl_ok" = "no"; then
+ # Check a little harder for __pthread_mutex_init in the
+ # same library, as some systems hide it there until
+ # pthread.h is defined. We could alternatively do an
+ # AC_TRY_COMPILE with pthread.h, but that will work with
+ # libpthread really doesn't exist, like AIX 4.2.
+ # [Bug: 4359]
+ AC_CHECK_LIB(pthread, __pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ fi
+
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthread"
+ else
+ AC_CHECK_LIB(pthreads, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthreads"
+ else
+ AC_CHECK_LIB(c, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "no"; then
+ AC_CHECK_LIB(c_r, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -pthread"
+ else
+ TCL_THREADS=0
+ AC_MSG_WARN("Don t know how to find pthread lib on your system - thread support disabled")
+ fi
+ fi
+ fi
+ fi
+
+ # Does the pthread-implementation provide
+ # 'pthread_attr_setstacksize' ?
+
+ ac_saved_libs=$LIBS
+ LIBS="$LIBS $THREADS_LIBS"
+ AC_CHECK_FUNCS(pthread_attr_setstacksize)
+ LIBS=$ac_saved_libs
+ AC_CHECK_FUNCS(readdir_r)
+ fi
+ else
+ TCL_THREADS=0
+ fi
+ # Do checking message here to not mess up interleaved configure output
+ AC_MSG_CHECKING([for building with threads])
+ if test "${TCL_THREADS}" = "1"; then
+ AC_DEFINE(TCL_THREADS)
+ #LIBS="$LIBS $THREADS_LIBS"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no (default)])
+ fi
+ # TCL_THREADS sanity checking. See if our request for building with
+ # threads is the same as the way Tcl was built. If not, warn the user.
+ case ${TCL_DEFS} in
+ *THREADS=1*)
+ if test "${TCL_THREADS}" = "0"; then
+ AC_MSG_WARN([
+ Building ${PACKAGE_NAME} without threads enabled, but building against a Tcl
+ that IS thread-enabled.])
+ fi
+ ;;
+ *)
+ if test "${TCL_THREADS}" = "1"; then
+ AC_MSG_WARN([
+ --enable-threads requested, but attempting building against a Tcl
+ that is NOT thread-enabled.])
+ fi
+ ;;
+ esac
+ AC_SUBST(TCL_THREADS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_SYMBOLS --
+#
+# Specify if debugging symbols should be used
+# Memory (TCL_MEM_DEBUG) debugging can also be enabled.
+#
+# Arguments:
+# none
+#
+# Requires the following vars to be set:
+# CFLAGS_DEBUG
+# CFLAGS_OPTIMIZE
+# LDFLAGS_DEBUG
+# LDFLAGS_OPTIMIZE
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-symbols
+#
+# Defines the following vars:
+# CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true
+# Sets to CFLAGS_OPTIMIZE if false
+# LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true
+# Sets to LDFLAGS_OPTIMIZE if false
+# DBGX Formerly used as debug library extension;
+# always blank now.
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_ENABLE_SYMBOLS, [
+ dnl Make sure we are initialized
+ AC_REQUIRE([TEA_CONFIG_CFLAGS])
+
+ DBGX=""
+
+ AC_MSG_CHECKING([for build with symbols])
+ AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no])
+ if test "$tcl_ok" = "no"; then
+ CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
+ LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
+ AC_MSG_RESULT([no])
+ else
+ CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
+ LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+ if test "$tcl_ok" = "yes"; then
+ AC_MSG_RESULT([yes (standard debugging)])
+ fi
+ fi
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ LDFLAGS_DEFAULT="${LDFLAGS}"
+ fi
+
+ AC_SUBST(TCL_DBGX)
+ AC_SUBST(CFLAGS_DEFAULT)
+ AC_SUBST(LDFLAGS_DEFAULT)
+
+ if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+ AC_DEFINE(TCL_MEM_DEBUG)
+ fi
+
+ if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+ if test "$tcl_ok" = "all"; then
+ AC_MSG_RESULT([enabled symbols mem debugging])
+ else
+ AC_MSG_RESULT([enabled $tcl_ok debugging])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_LANGINFO --
+#
+# Allows use of modern nl_langinfo check for better l10n.
+# This is only relevant for Unix.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-langinfo=yes|no (default is yes)
+#
+# Defines the following vars:
+# HAVE_LANGINFO Triggers use of nl_langinfo if defined.
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_ENABLE_LANGINFO, [
+ AC_ARG_ENABLE(langinfo,
+ [ --enable-langinfo use nl_langinfo if possible to determine
+ encoding at startup, otherwise use old heuristic],
+ [langinfo_ok=$enableval], [langinfo_ok=yes])
+
+ HAVE_LANGINFO=0
+ if test "$langinfo_ok" = "yes"; then
+ if test "$langinfo_ok" = "yes"; then
+ AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
+ fi
+ fi
+ AC_MSG_CHECKING([whether to use nl_langinfo])
+ if test "$langinfo_ok" = "yes"; then
+ AC_TRY_COMPILE([#include <langinfo.h>],
+ [nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
+ if test "$langinfo_ok" = "no"; then
+ langinfo_ok="no (could not compile with nl_langinfo)";
+ fi
+ if test "$langinfo_ok" = "yes"; then
+ AC_DEFINE(HAVE_LANGINFO)
+ fi
+ fi
+ AC_MSG_RESULT([$langinfo_ok])
+])
+
+#--------------------------------------------------------------------
+# TEA_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.
+# 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
+# ${PACKAGE_VERSION} variable to put the version in
+# the right place. This is used by platforms that
+# need non-standard library names.
+# Examples: ${PACKAGE_VERSION}.so.1.1 on NetBSD,
+# since it needs to have a version after the .so, and
+# ${PACKAGE_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
+# ${PACKAGE_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
+# CFLAGS - We add CFLAGS to pass to the compiler
+#
+# Subst's the following vars:
+# DL_LIBS
+# CFLAGS_DEBUG
+# CFLAGS_OPTIMIZE
+# CFLAGS_WARNING
+#
+# STLIB_LD
+# SHLIB_LD
+# SHLIB_CFLAGS
+# LDFLAGS_DEBUG
+# LDFLAGS_OPTIMIZE
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_CONFIG_CFLAGS, [
+ dnl Make sure we are initialized
+ AC_REQUIRE([TEA_INIT])
+
+ # Step 0: Enable 64 bit support?
+
+ AC_MSG_CHECKING([if 64bit support is enabled])
+ AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
+ AC_MSG_RESULT([$do64bit])
+
+ # Step 0.b: Enable Solaris 64 bit VIS support?
+
+ AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
+ AC_ARG_ENABLE(64bit-vis,[ --enable-64bit-vis enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no])
+ AC_MSG_RESULT([$do64bitVIS])
+
+ if test "$do64bitVIS" = "yes"; then
+ # Force 64bit on with VIS
+ do64bit=yes
+ fi
+
+ # Step 0.c: Cross-compiling options for Windows/CE builds?
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ AC_MSG_CHECKING([if Windows/CE build is requested])
+ AC_ARG_ENABLE(wince,[ --enable-wince enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no])
+ AC_MSG_RESULT($doWince)
+ fi
+
+ # 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
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ system=windows
+ 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.
+ # This is similar to Tcl's unix/tcl.m4 except that we've added a
+ # "windows" case and CC_SEARCH_FLAGS becomes LD_SEARCH_FLAGS for us
+ # (and we have no CC_SEARCH_FLAGS).
+
+ do64bit_ok=no
+ LDFLAGS_ORIG="$LDFLAGS"
+ TCL_EXPORT_FILE_SUFFIX=""
+ UNSHARED_LIB_SUFFIX=""
+ TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+ ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+ TCL_LIB_VERSIONS_OK=ok
+ CFLAGS_DEBUG=-g
+ if test "$GCC" = "yes" ; then
+ CFLAGS_OPTIMIZE=-O2
+ CFLAGS_WARNING="-Wall -Wno-implicit-int"
+ else
+ CFLAGS_OPTIMIZE=-O
+ CFLAGS_WARNING=""
+ fi
+ TCL_NEEDS_EXP_FILE=0
+ TCL_BUILD_EXP_FILE=""
+ TCL_EXP_FILE=""
+dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
+dnl AC_CHECK_TOOL(AR, ar, :)
+ AC_CHECK_PROG(AR, ar, ar)
+ STLIB_LD='${AR} cr'
+ LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+ case $system in
+ windows)
+ # This is a 2-stage check to make sure we have the 64-bit SDK
+ # We have to know where the SDK is installed.
+ if test "$do64bit" = "yes" ; then
+ if test "x${MSSDK}x" = "xx" ; then
+ MSSDK="C:/Progra~1/Microsoft SDK"
+ fi
+ # Ensure that this path has no spaces to work in autoconf
+ TEA_PATH_NOSPACE(MSSDK, ${MSSDK})
+ if test ! -d "${MSSDK}/bin/win64" ; then
+ AC_MSG_WARN([could not find 64-bit SDK to enable 64bit mode])
+ do64bit="no"
+ else
+ do64bit_ok="yes"
+ fi
+ fi
+
+ if test "$doWince" != "no" ; then
+ if test "$do64bit" = "yes" ; then
+ AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible])
+ fi
+ if test "$GCC" = "yes" ; then
+ AC_MSG_ERROR([Windows/CE and GCC builds incompatible])
+ fi
+ TEA_PATH_CELIB
+ # Set defaults for common evc4/PPC2003 setup
+ # Currently Tcl requires 300+, possibly 420+ for sockets
+ CEVERSION=420; # could be 211 300 301 400 420 ...
+ TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ...
+ ARCH=ARM; # could be ARM MIPS X86EM ...
+ PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
+ if test "$doWince" != "yes"; then
+ # If !yes then the user specified something
+ # Reset ARCH to allow user to skip specifying it
+ ARCH=
+ eval `echo $doWince | awk -F, '{ \
+ if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \
+ if ([$]1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
+ if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \
+ if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \
+ if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \
+ }'`
+ if test "x${ARCH}" = "x" ; then
+ ARCH=$TARGETCPU;
+ fi
+ fi
+ OSVERSION=WCE$CEVERSION;
+ if test "x${WCEROOT}" = "x" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
+ if test ! -d "${WCEROOT}" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
+ fi
+ fi
+ if test "x${SDKROOT}" = "x" ; then
+ SDKROOT="C:/Program Files/Windows CE Tools"
+ if test ! -d "${SDKROOT}" ; then
+ SDKROOT="C:/Windows CE Tools"
+ fi
+ fi
+ # Ensure that this path has no spaces to work in autoconf
+ TEA_PATH_NOSPACE(WCEROOT, ${WCEROOT})
+ TEA_PATH_NOSPACE(SDKROOT, ${SDKROOT})
+ if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
+ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
+ AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]])
+ doWince="no"
+ else
+ # We could PATH_NOSPACE these, but that's not important,
+ # as long as we quote them when used.
+ CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
+ if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
+ CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
+ fi
+ CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
+ fi
+ fi
+
+ if test "$GCC" != "yes" ; then
+ if test "${SHARED_BUILD}" = "0" ; then
+ runtime=-MT
+ else
+ runtime=-MD
+ fi
+
+ if test "$do64bit" = "yes" ; then
+ # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ CC="${MSSDK}/Bin/Win64/cl.exe"
+ CFLAGS="${CFLAGS} -I${MSSDK}/Include/prerelease \
+ -I${MSSDK}/Include/Win64/crt \
+ -I${MSSDK}/Include"
+ RC="${MSSDK}/bin/rc.exe"
+ lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
+ -LIBPATH:${MSSDK}/Lib/Prerelease/IA64 -nologo"
+ LINKBIN="${MSSDK}/bin/win64/link.exe"
+ CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ elif test "$doWince" != "no" ; then
+ CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
+ if test "${TARGETCPU}" = "X86"; then
+ CC="${CEBINROOT}/cl.exe"
+ else
+ CC="${CEBINROOT}/cl${ARCH}.exe"
+ fi
+ CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
+ RC="${WCEROOT}/Common/EVC/bin/rc.exe"
+ arch=`echo ${ARCH} | awk '{print tolower([$]0)}'`
+ defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
+ if test "${SHARED_BUILD}" = "1" ; then
+ # Static CE builds require static celib as well
+ defs="${defs} _DLL"
+ fi
+ for i in $defs ; do
+ AC_DEFINE_UNQUOTED($i)
+ done
+ AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION)
+ AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION)
+ CFLAGS_DEBUG="-nologo -Zi -Od"
+ CFLAGS_OPTIMIZE="-nologo -Ox"
+ lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
+ lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
+ LINKBIN="${CEBINROOT}/link.exe"
+ AC_SUBST(CELIB_DIR)
+ else
+ RC="rc"
+ lflags="-nologo"
+ LINKBIN="link"
+ CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ fi
+ fi
+
+ if test "$GCC" = "yes"; then
+ # mingw gcc mode
+ RC="windres"
+ CFLAGS_DEBUG="-g"
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ SHLIB_LD="$CC -shared"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
+ LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
+ else
+ SHLIB_LD="${LINKBIN} -dll ${lflags}"
+ # link -lib only works when -lib is the first arg
+ STLIB_LD="${LINKBIN} -lib ${lflags}"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
+ PATHTYPE=-w
+ # For information on what debugtype is most useful, see:
+ # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
+ # This essentially turns it all on.
+ LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
+ LDFLAGS_OPTIMIZE="-release"
+ if test "$doWince" != "no" ; then
+ LDFLAGS_CONSOLE="-link ${lflags}"
+ LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
+ else
+ LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
+ LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
+ fi
+ fi
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dll"
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+ TCL_LIB_VERSIONS_OK=nodots
+ # Bogus to avoid getting this turned off
+ DL_OBJS="tclLoadNone.obj"
+ ;;
+ AIX-*)
+ if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
+ # AIX requires the _r compiler when gcc isn't being used
+ if test "${CC}" != "cc_r" ; then
+ CC=${CC}_r
+ fi
+ AC_MSG_RESULT([Using $CC for compiling with threads])
+ fi
+ LIBS="$LIBS -lc"
+ SHLIB_CFLAGS=""
+ SHLIB_SUFFIX=".so"
+ SHLIB_LD_LIBS='${LIBS}'
+
+ DL_OBJS="tclLoadDl.o"
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+ #LIBOBJS="$LIBOBJS tclLoadAix.o"
+ AC_LIBOBJ([tclLoadAix])
+ DL_LIBS="-lld"
+ fi
+
+ # Check to enable 64-bit flags for compiler/linker on AIX 4+
+ if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
+ if test "$GCC" = "yes" ; then
+ AC_MSG_WARN("64bit mode not supported with GCC on $system")
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -q64"
+ LDFLAGS="$LDFLAGS -q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+ fi
+ fi
+
+ if test "`uname -m`" = "ia64" ; then
+ # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ # AIX-5 has dl* in libc.so
+ DL_LIBS=""
+ if test "$GCC" = "yes" ; then
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+ fi
+ else
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ else
+ SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
+ fi
+ SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+ DL_LIBS="-ldl"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ TCL_NEEDS_EXP_FILE=1
+ TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
+ fi
+
+ # On AIX <=v4 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.
+ #
+ # 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.
+
+ AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
+ if test $libbsd = yes; then
+ MATH_LIBS="$MATH_LIBS -lbsd"
+ AC_DEFINE(USE_DELTA_FOR_TZ)
+ fi
+ ;;
+ BeOS*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="${CC} -nostart"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ ;;
+ 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"
+ 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="$LDFLAGS -export-dynamic"
+ LD_SEARCH_FLAGS=""
+ ;;
+ dgux*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LD_SEARCH_FLAGS=""
+ ;;
+ HP-UX-*.11.*)
+ # Use updated header definitions where possible
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
+
+ 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='${LIBS}'
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ fi
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ fi
+
+ # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+ #CFLAGS="$CFLAGS +DAportable"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ hpux_arch=`${CC} -dumpmachine`
+ case $hpux_arch in
+ hppa64*)
+ # 64-bit gcc in use. Fix flags for GNU ld.
+ do64bit_ok=yes
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ ;;
+ *)
+ AC_MSG_WARN("64bit mode not supported with GCC on $system")
+ ;;
+ esac
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS +DD64"
+ LDFLAGS="$LDFLAGS +DD64"
+ fi
+ fi
+ ;;
+ HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
+ 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="$LDFLAGS -Wl,-E"
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ fi
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ ;;
+ 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="$LDFLAGS -Wl,-D,08000000"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ ;;
+ IRIX-5.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ ;;
+ IRIX-6.*|IRIX64-6.5*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mabi=n32"
+ LDFLAGS="$LDFLAGS -mabi=n32"
+ else
+ case $system in
+ IRIX-6.3)
+ # Use to build 6.2 compatible binaries on 6.3.
+ CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -n32"
+ ;;
+ esac
+ LDFLAGS="$LDFLAGS -n32"
+ fi
+ ;;
+ IRIX64-6.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+
+ # Check to enable 64-bit flags for compiler/linker
+
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ AC_MSG_WARN([64bit mode not supported by gcc])
+ else
+ do64bit_ok=yes
+ SHLIB_LD="ld -64 -shared -rdata_shared"
+ CFLAGS="$CFLAGS -64"
+ LDFLAGS="$LDFLAGS -64"
+ fi
+ fi
+ ;;
+ Linux*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ # 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="$LDFLAGS -Wl,--export-dynamic"
+ 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"
+ LD_SEARCH_FLAGS=""])
+ fi
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$CFLAGS -mieee"
+ fi
+
+ # The combo of gcc + glibc has a bug related
+ # to inlining of functions like strtod(). The
+ # -fno-builtin flag should address this problem
+ # but it does not work. The -fno-inline flag
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+ if test x"${USE_COMPAT}" != x ; then
+ CFLAGS="$CFLAGS -fno-inline"
+ fi
+
+ ;;
+ GNU*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ if test "$have_dl" = yes; then
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ LD_SEARCH_FLAGS=""
+ else
+ AC_CHECK_HEADER(dld.h, [
+ SHLIB_LD="ld -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldld"
+ LD_SEARCH_FLAGS=""])
+ fi
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$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"
+ 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="$LDFLAGS -Wl,-Bexport"
+ LD_SEARCH_FLAGS=""
+ ;;
+ NetBSD-*|FreeBSD-[[1-2]].*)
+ # Not available on all versions: check for include file.
+ AC_CHECK_HEADER(dlfcn.h, [
+ # NetBSD/SPARC needs -fPIC, -fpic will not do.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ AC_MSG_CHECKING([for ELF])
+ AC_EGREP_CPP(yes, [
+#ifdef __ELF__
+ yes
+#endif
+ ],
+ AC_MSG_RESULT([yes])
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so',
+ AC_MSG_RESULT([no])
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.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=""
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ ])
+
+ # FreeBSD doesn't handle version numbers with dots.
+
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ OpenBSD-*)
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ AC_MSG_CHECKING(for ELF)
+ AC_EGREP_CPP(yes, [
+#ifdef __ELF__
+ yes
+#endif
+ ],
+ [AC_MSG_RESULT(yes)
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'],
+ [AC_MSG_RESULT(no)
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0']
+ )
+
+ # OpenBSD doesn't do version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ FreeBSD-*)
+ # FreeBSD 3.* and greater have ELF.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -export-dynamic"
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ case $system in
+ FreeBSD-3.*)
+ # FreeBSD-3 doesn't handle version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ esac
+ ;;
+ Darwin-*)
+ SHLIB_CFLAGS="-fno-common"
+ SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dylib"
+ DL_OBJS="tclLoadDyld.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first"
+ LD_SEARCH_FLAGS=""
+ LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+ CFLAGS_OPTIMIZE="-Os"
+ ;;
+ NEXTSTEP-*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="cc -nostdlib -r"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadNext.o"
+ DL_LIBS=""
+ 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=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-1.*)
+ # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
+ SHLIB_CFLAGS="-fPIC"
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD="ld -shared"
+ else
+ SHLIB_LD="ld -non_shared"
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-V*)
+ # Digital OSF/1
+ SHLIB_CFLAGS=""
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD='ld -shared -expect_unresolved "*"'
+ else
+ SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mieee"
+ else
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
+ fi
+ # see pthread_intro(3) for pthread support on osf1, k.furukawa
+ if test "${TCL_THREADS}" = "1" ; then
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+ CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+ LIBS=`echo $LIBS | sed s/-lpthreads//`
+ if test "$GCC" = "yes" ; then
+ LIBS="$LIBS -lpthread -lmach -lexc"
+ else
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ fi
+
+ ;;
+ QNX-6*)
+ # QNX RTP
+ # This may work for all QNX, but it was only reported for v6.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ # dlopen is in -lc on QNX
+ DL_LIBS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ 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="$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.
+ if test "$GCC" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+ fi
+ SHLIB_LD="ld -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ 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"
+ LD_SEARCH_FLAGS=""
+ ;;
+ SunOS-4*)
+ SHLIB_CFLAGS="-PIC"
+ SHLIB_LD="ld"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ 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}.so.1.0'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ SunOS-5.[[0-6]]*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT)
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # 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 "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ fi
+ ;;
+ SunOS-5*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT)
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ arch=`isainfo`
+ if test "$arch" = "sparcv9 sparc" ; then
+ if test "$GCC" = "yes" ; then
+ if test "`gcc -dumpversion` | awk -F. '{print $1}'" -lt "3" ; then
+ AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -m64 -mcpu=v9"
+ LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+ SHLIB_CFLAGS="-fPIC"
+ fi
+ else
+ do64bit_ok=yes
+ if test "$do64bitVIS" = "yes" ; then
+ CFLAGS="$CFLAGS -xarch=v9a"
+ LDFLAGS="$LDFLAGS -xarch=v9a"
+ else
+ CFLAGS="$CFLAGS -xarch=v9"
+ LDFLAGS="$LDFLAGS -xarch=v9"
+ fi
+ 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 "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ if test "$do64bit" = "yes" ; then
+ # We need to specify -static-libgcc or we need to
+ # add the path to the sparv9 libgcc.
+ # JH: static-libgcc is necessary for core Tcl, but may
+ # not be necessary for extensions.
+ SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
+ # for finding sparcv9 libgcc, get the regular libgcc
+ # path, remove so name and append 'sparcv9'
+ #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
+ #LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS},-R,$v9gcclibdir"
+ fi
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ 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="$LDFLAGS -Wl,-D,08000000"
+ LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ if test "$GCC" != "yes" ; then
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
+ fi
+ ;;
+ 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],
+ [LDFLAGS=$hold_ldflags found=no])
+ AC_MSG_RESULT([$found])
+ LD_SEARCH_FLAGS=""
+ ;;
+ esac
+
+ if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
+ AC_MSG_WARN("64bit support being disabled -- don\'t know magic for 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="$LDFLAGS_ORIG"
+ 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 "$GCC" = "yes" ; then
+ case $system in
+ AIX-*)
+ ;;
+ BSD/OS*)
+ ;;
+ IRIX*)
+ ;;
+ NetBSD-*|FreeBSD-*)
+ ;;
+ Darwin-*)
+ ;;
+ RISCos-*)
+ ;;
+ SCO_SV-3.2*)
+ ;;
+ ULTRIX-4.*)
+ ;;
+ windows)
+ ;;
+ *)
+ SHLIB_CFLAGS="-fPIC"
+ ;;
+ esac
+ fi
+ fi
+
+ if test "$SHARED_LIB_SUFFIX" = "" ; then
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
+ fi
+ if test "$UNSHARED_LIB_SUFFIX" = "" ; then
+ UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ fi
+
+ AC_SUBST(DL_LIBS)
+ AC_SUBST(CFLAGS_DEBUG)
+ AC_SUBST(CFLAGS_OPTIMIZE)
+ AC_SUBST(CFLAGS_WARNING)
+
+ AC_SUBST(STLIB_LD)
+ AC_SUBST(SHLIB_LD)
+ AC_SUBST(SHLIB_CFLAGS)
+ AC_SUBST(SHLIB_LD_LIBS)
+ AC_SUBST(LDFLAGS_DEBUG)
+ AC_SUBST(LDFLAGS_OPTIMIZE)
+ AC_SUBST(LD_LIBRARY_PATH_VAR)
+
+ # These must be called after we do the basic CFLAGS checks and
+ # verify any possible 64-bit or similar switches are necessary
+ TEA_TCL_EARLY_FLAGS
+ TEA_TCL_64BIT_FLAGS
+])
+
+#--------------------------------------------------------------------
+# TEA_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,
+# and some build environments have stdin not pointing at a
+# pseudo-terminal (usually /dev/null instead.)
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines only one of the following vars:
+# HAVE_SYS_MODEM_H
+# USE_TERMIOS
+# USE_TERMIO
+# USE_SGTTY
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_SERIAL_PORT, [
+ AC_CHECK_HEADERS(sys/modem.h)
+ AC_MSG_CHECKING([termios vs. termio vs. sgtty])
+ AC_CACHE_VAL(tcl_cv_api_serial, [
+ AC_TRY_RUN([
+#include <termios.h>
+
+int main() {
+ struct termios t;
+ if (tcgetattr(0, &t) == 0) {
+ cfsetospeed(&t, 0);
+ t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ if test $tcl_cv_api_serial = no ; then
+ AC_TRY_RUN([
+#include <termio.h>
+
+int main() {
+ struct termio t;
+ if (ioctl(0, TCGETA, &t) == 0) {
+ t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no ; then
+ AC_TRY_RUN([
+#include <sgtty.h>
+
+int main() {
+ struct sgttyb t;
+ if (ioctl(0, TIOCGETP, &t) == 0) {
+ t.sg_ospeed = 0;
+ t.sg_flags |= ODDP | EVENP | RAW;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
+ fi
+ if test $tcl_cv_api_serial = no ; then
+ AC_TRY_RUN([
+#include <termios.h>
+#include <errno.h>
+
+int main() {
+ struct termios t;
+ if (tcgetattr(0, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ cfsetospeed(&t, 0);
+ t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no; then
+ AC_TRY_RUN([
+#include <termio.h>
+#include <errno.h>
+
+int main() {
+ struct termio t;
+ if (ioctl(0, TCGETA, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+ }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no; then
+ AC_TRY_RUN([
+#include <sgtty.h>
+#include <errno.h>
+
+int main() {
+ struct sgttyb t;
+ if (ioctl(0, TIOCGETP, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ t.sg_ospeed = 0;
+ t.sg_flags |= ODDP | EVENP | RAW;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
+ fi])
+ case $tcl_cv_api_serial in
+ termios) AC_DEFINE(USE_TERMIOS);;
+ termio) AC_DEFINE(USE_TERMIO);;
+ sgtty) AC_DEFINE(USE_SGTTY);;
+ esac
+ AC_MSG_RESULT([$tcl_cv_api_serial])
+])
+
+#--------------------------------------------------------------------
+# TEA_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
+# HAVE_LIMITS_H or NO_LIMITS_H
+# NO_STDLIB_H
+# NO_STRING_H
+# NO_SYS_WAIT_H
+# NO_DLFCN_H
+# HAVE_SYS_PARAM_H
+#
+# HAVE_STRING_H ?
+#
+# tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and
+# CHECK on limits.h
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_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(HAVE_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(sys/param.h)
+
+])
+
+#--------------------------------------------------------------------
+# TEA_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.
+#
+# This should be called after TEA_CONFIG_CFLAGS as setting the
+# LIBS line can confuse some configure macro magic.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Sets the following vars:
+# XINCLUDES
+# XLIBSW
+# LIBS (appends to)
+# TEA_WINDOWINGSYSTEM
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_X, [
+ if test "${TEA_PLATFORM}" = "unix" ; then
+ case ${TK_DEFS} in
+ *MAC_OSX_TK*)
+ AC_DEFINE(MAC_OSX_TK)
+ TEA_WINDOWINGSYSTEM="aqua"
+ ;;
+ *)
+ TEA_PATH_UNIX_X
+ TEA_WINDOWINGSYSTEM="x11"
+ ;;
+ esac
+ elif test "${TEA_PLATFORM}" = "windows" ; then
+ TEA_WINDOWINGSYSTEM="windows"
+ fi
+])
+
+AC_DEFUN(TEA_PATH_UNIX_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([could not 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([could not find any! Using -lX11.])
+ XLIBSW=-lX11
+ fi
+ if test x"${XLIBSW}" != x ; then
+ PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_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(TEA_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
+])
+
+#--------------------------------------------------------------------
+# TEA_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(TEA_TIME_HANDLER, [
+ AC_CHECK_HEADERS(sys/time.h)
+ AC_HEADER_TIME
+ AC_STRUCT_TIMEZONE
+
+ AC_CHECK_FUNCS(gmtime_r localtime_r)
+
+ AC_MSG_CHECKING([tm_tzadj in struct tm])
+ AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
+ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
+ tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
+ AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
+ if test $tcl_cv_member_tm_tzadj = yes ; then
+ AC_DEFINE(HAVE_TM_TZADJ)
+ fi
+
+ AC_MSG_CHECKING([tm_gmtoff in struct tm])
+ AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
+ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
+ tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
+ AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
+ if test $tcl_cv_member_tm_gmtoff = yes ; then
+ AC_DEFINE(HAVE_TM_GMTOFF)
+ fi
+
+ #
+ # Its important to include time.h in this check, as some systems
+ # (like convex) have timezone functions, etc.
+ #
+ AC_MSG_CHECKING([long timezone variable])
+ AC_CACHE_VAL(tcl_cv_var_timezone,
+ AC_TRY_COMPILE([#include <time.h>],
+ [extern long timezone;
+ timezone += 1;
+ exit (0);],
+ tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
+ AC_MSG_RESULT([$tcl_cv_timezone_long])
+ if test $tcl_cv_timezone_long = yes ; then
+ AC_DEFINE(HAVE_TIMEZONE_VAR)
+ else
+ #
+ # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+ #
+ AC_MSG_CHECKING([time_t timezone variable])
+ AC_CACHE_VAL(tcl_cv_timezone_time,
+ AC_TRY_COMPILE([#include <time.h>],
+ [extern time_t timezone;
+ timezone += 1;
+ exit (0);],
+ tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
+ AC_MSG_RESULT([$tcl_cv_timezone_time])
+ if test $tcl_cv_timezone_time = yes ; then
+ AC_DEFINE(HAVE_TIMEZONE_VAR)
+ fi
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_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.
+# Also, on Compaq's Tru64 Unix 5.0,
+# strtod(" ") returns 0.0 instead of a failure to convert.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Might defines some of the following vars:
+# strtod (=fixstrtod)
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_BUGGY_STRTOD, [
+ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
+ if test "$tcl_strtod" = 1; then
+ AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
+ AC_TRY_RUN([
+ extern double strtod();
+ int main()
+ {
+ char *string = "NaN", *spaceString = " ";
+ char *term;
+ double value;
+ value = strtod(string, &term);
+ if ((term != string) && (term[-1] == 0)) {
+ exit(1);
+ }
+ value = strtod(spaceString, &term);
+ if (term == (spaceString+1)) {
+ exit(1);
+ }
+ exit(0);
+ }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
+ if test "$tcl_ok" = 1; then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([buggy])
+ #LIBOBJS="$LIBOBJS fixstrtod.o"
+ AC_LIBOBJ([fixstrtod])
+ USE_COMPAT=1
+ AC_DEFINE(strtod, fixstrtod)
+ fi
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_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(TEA_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"])
+
+ #--------------------------------------------------------------------
+ # 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_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
+ 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, gethostbyname,
+ [LIBS="$LIBS -lnsl"])])
+
+ # Don't perform the eval of the libraries here because DL_LIBS
+ # won't be set until we call TEA_CONFIG_CFLAGS
+
+ TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
+ AC_SUBST(TCL_LIBS)
+ AC_SUBST(MATH_LIBS)
+])
+
+#--------------------------------------------------------------------
+# TEA_TCL_EARLY_FLAGS
+#
+# Check for what flags are needed to be passed so the correct OS
+# features are available.
+#
+# Arguments:
+# None
+#
+# Results:
+#
+# Might define the following vars:
+# _ISOC99_SOURCE
+# _LARGEFILE64_SOURCE
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_TCL_EARLY_FLAG,[
+ AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
+ AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
+ AC_TRY_COMPILE([[#define ]$1[ 1
+]$2], $3,
+ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
+ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
+ if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
+ AC_DEFINE($1)
+ tcl_flags="$tcl_flags $1"
+ fi
+])
+
+AC_DEFUN(TEA_TCL_EARLY_FLAGS,[
+ AC_MSG_CHECKING([for required early compiler flags])
+ tcl_flags=""
+ TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
+ [char *p = (char *)strtoll; char *q = (char *)strtoull;])
+ TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
+ [struct stat64 buf; int i = stat64("/", &buf);])
+ if test "x${tcl_flags}" = "x" ; then
+ AC_MSG_RESULT([none])
+ else
+ AC_MSG_RESULT([${tcl_flags}])
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_TCL_64BIT_FLAGS
+#
+# Check for what is defined in the way of 64-bit features.
+#
+# Arguments:
+# None
+#
+# Results:
+#
+# Might define the following vars:
+# TCL_WIDE_INT_IS_LONG
+# TCL_WIDE_INT_TYPE
+# HAVE_STRUCT_DIRENT64
+# HAVE_STRUCT_STAT64
+# HAVE_TYPE_OFF64_T
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
+ AC_MSG_CHECKING([for 64-bit integer type])
+ AC_CACHE_VAL(tcl_cv_type_64bit,[
+ tcl_cv_type_64bit=none
+ # See if the compiler knows natively about __int64
+ AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
+ tcl_type_64bit=__int64, tcl_type_64bit="long long")
+ # See if we should use long anyway Note that we substitute in the
+ # type that is our current guess for a 64-bit type inside this check
+ # program, so it should be modified only carefully...
+ AC_TRY_COMPILE(,[switch (0) {
+ case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
+ }],tcl_cv_type_64bit=${tcl_type_64bit})])
+ if test "${tcl_cv_type_64bit}" = none ; then
+ AC_DEFINE(TCL_WIDE_INT_IS_LONG)
+ AC_MSG_RESULT([using long])
+ elif test "${tcl_cv_type_64bit}" = "__int64" \
+ -a "${TEA_PLATFORM}" = "windows" ; then
+ # We actually want to use the default tcl.h checks in this
+ # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
+ AC_MSG_RESULT([using Tcl header defaults])
+ else
+ AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
+ AC_MSG_RESULT([${tcl_cv_type_64bit}])
+
+ # Now check for auxiliary declarations
+ AC_MSG_CHECKING([for struct dirent64])
+ AC_CACHE_VAL(tcl_cv_struct_dirent64,[
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/dirent.h>],[struct dirent64 p;],
+ tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
+ if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_DIRENT64)
+ fi
+ AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
+
+ AC_MSG_CHECKING([for struct stat64])
+ AC_CACHE_VAL(tcl_cv_struct_stat64,[
+ AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
+],
+ tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
+ if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_STAT64)
+ fi
+ AC_MSG_RESULT([${tcl_cv_struct_stat64}])
+
+ AC_MSG_CHECKING([for off64_t])
+ AC_CACHE_VAL(tcl_cv_type_off64_t,[
+ AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
+],
+ tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
+ if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
+ AC_DEFINE(HAVE_TYPE_OFF64_T)
+ fi
+ AC_MSG_RESULT([${tcl_cv_type_off64_t}])
+ fi
+])
+
+##
+## Here ends the standard Tcl configuration bits and starts the
+## TEA specific functions
+##
+
+#------------------------------------------------------------------------
+# TEA_INIT --
+#
+# Init various Tcl Extension Architecture (TEA) variables.
+# This should be the first called TEA_* macro.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines and substs the following vars:
+# CYGPATH
+# EXEEXT
+# Defines only:
+# TEA_INITED
+# TEA_PLATFORM (windows or unix)
+#
+# "cygpath" is used on windows to generate native path names for include
+# files. These variables should only be used with the compiler and linker
+# since they generate native path names.
+#
+# EXEEXT
+# Select the executable extension based on the host type. This
+# is a lightweight replacement for AC_EXEEXT that doesn't require
+# a compiler.
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_INIT, [
+ # TEA extensions pass this us the version of TEA they think they
+ # are compatible with.
+ TEA_VERSION="3.2"
+
+ AC_MSG_CHECKING([for correct TEA configuration])
+ if test x"${PACKAGE_NAME}" = x ; then
+ AC_MSG_ERROR([
+The PACKAGE_NAME variable must be defined by your TEA configure.in])
+ fi
+ if test x"$1" = x ; then
+ AC_MSG_ERROR([
+TEA version not specified.])
+ elif test "$1" != "${TEA_VERSION}" ; then
+ AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"])
+ else
+ AC_MSG_RESULT([ok (TEA ${TEA_VERSION})])
+ fi
+ case "`uname -s`" in
+ *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
+ AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+ EXEEXT=".exe"
+ TEA_PLATFORM="windows"
+ ;;
+ *)
+ CYGPATH=echo
+ EXEEXT=""
+ TEA_PLATFORM="unix"
+ ;;
+ esac
+
+ # Check if exec_prefix is set. If not use fall back to prefix.
+ # Note when adjusted, so that TEA_PREFIX can correct for this.
+ # This is needed for recursive configures, since autoconf propagates
+ # $prefix, but not $exec_prefix (doh!).
+ if test x$exec_prefix = xNONE ; then
+ exec_prefix_default=yes
+ exec_prefix=$prefix
+ fi
+
+ AC_SUBST(EXEEXT)
+ AC_SUBST(CYGPATH)
+
+ # This package name must be replaced statically for AC_SUBST to work
+ AC_SUBST(PKG_LIB_FILE)
+ # Substitute STUB_LIB_FILE in case package creates a stub library too.
+ AC_SUBST(PKG_STUB_LIB_FILE)
+
+ # We AC_SUBST these here to ensure they are subst'ed,
+ # in case the user doesn't call TEA_ADD_...
+ AC_SUBST(PKG_STUB_SOURCES)
+ AC_SUBST(PKG_STUB_OBJECTS)
+ AC_SUBST(PKG_TCL_SOURCES)
+ AC_SUBST(PKG_HEADERS)
+ AC_SUBST(PKG_INCLUDES)
+ AC_SUBST(PKG_LIBS)
+ AC_SUBST(PKG_CFLAGS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_SOURCES --
+#
+# Specify one or more source files. Users should check for
+# the right platform before adding to their list.
+# It is not important to specify the directory, as long as it is
+# in the generic, win or unix subdirectory of $(srcdir).
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_SOURCES
+# PKG_OBJECTS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_SOURCES, [
+ vars="$@"
+ for i in $vars; do
+ case $i in
+ [\$]*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ AC_MSG_ERROR([could not find source file '$i'])
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+ AC_SUBST(PKG_SOURCES)
+ AC_SUBST(PKG_OBJECTS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_STUB_SOURCES --
+#
+# Specify one or more source files. Users should check for
+# the right platform before adding to their list.
+# It is not important to specify the directory, as long as it is
+# in the generic, win or unix subdirectory of $(srcdir).
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_STUB_SOURCES
+# PKG_STUB_OBJECTS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_STUB_SOURCES, [
+ vars="$@"
+ for i in $vars; do
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ AC_MSG_ERROR([could not find stub source file '$i'])
+ fi
+ PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
+ fi
+ PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
+ done
+ AC_SUBST(PKG_STUB_SOURCES)
+ AC_SUBST(PKG_STUB_OBJECTS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_TCL_SOURCES --
+#
+# Specify one or more Tcl source files. These should be platform
+# independent runtime files.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_TCL_SOURCES
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_TCL_SOURCES, [
+ vars="$@"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i'])
+ fi
+ PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
+ done
+ AC_SUBST(PKG_TCL_SOURCES)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_HEADERS --
+#
+# Specify one or more source headers. Users should check for
+# the right platform before adding to their list.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_HEADERS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_HEADERS, [
+ vars="$@"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ AC_MSG_ERROR([could not find header file '${srcdir}/$i'])
+ fi
+ PKG_HEADERS="$PKG_HEADERS $i"
+ done
+ AC_SUBST(PKG_HEADERS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_INCLUDES --
+#
+# Specify one or more include dirs. Users should check for
+# the right platform before adding to their list.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_INCLUDES
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_INCLUDES, [
+ vars="$@"
+ for i in $vars; do
+ PKG_INCLUDES="$PKG_INCLUDES $i"
+ done
+ AC_SUBST(PKG_INCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_LIBS --
+#
+# Specify one or more libraries. Users should check for
+# the right platform before adding to their list. For Windows,
+# libraries provided in "foo.lib" format will be converted to
+# "-lfoo" when using GCC (mingw).
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_LIBS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_LIBS, [
+ vars="$@"
+ for i in $vars; do
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
+ # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
+ i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'`
+ fi
+ PKG_LIBS="$PKG_LIBS $i"
+ done
+ AC_SUBST(PKG_LIBS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_CFLAGS --
+#
+# Specify one or more CFLAGS. Users should check for
+# the right platform before adding to their list.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_CFLAGS
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_ADD_CFLAGS, [
+ PKG_CFLAGS="$PKG_CFLAGS $@"
+ AC_SUBST(PKG_CFLAGS)
+])
+
+#------------------------------------------------------------------------
+# TEA_PREFIX --
+#
+# Handle the --prefix=... option by defaulting to what Tcl gave
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# If --prefix or --exec-prefix was not specified, $prefix and
+# $exec_prefix will be set to the values given to Tcl when it was
+# configured.
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_PREFIX, [
+ if test "${prefix}" = "NONE"; then
+ prefix_default=yes
+ if test x"${TCL_PREFIX}" != x; then
+ AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
+ prefix=${TCL_PREFIX}
+ else
+ AC_MSG_NOTICE([--prefix defaulting to /usr/local])
+ prefix=/usr/local
+ fi
+ fi
+ if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
+ -o x"${exec_prefix_default}" = x"yes" ; then
+ if test x"${TCL_EXEC_PREFIX}" != x; then
+ AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
+ exec_prefix=${TCL_EXEC_PREFIX}
+ else
+ AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}])
+ exec_prefix=$prefix
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_SETUP_COMPILER_CC --
+#
+# Do compiler checks the way we want. This is just a replacement
+# for AC_PROG_CC in TEA configure.in files to make them cleaner.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Sets up CC var and other standard bits we need to make executables.
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_SETUP_COMPILER_CC, [
+ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
+ # in this macro, they need to go into TEA_SETUP_COMPILER instead.
+
+ # If the user did not set CFLAGS, set it now to keep
+ # the AC_PROG_CC macro from adding "-g -O2".
+ if test "${CFLAGS+set}" != "set" ; then
+ CFLAGS=""
+ fi
+
+ AC_PROG_CC
+ AC_PROG_CPP
+
+ AC_PROG_INSTALL
+
+ #--------------------------------------------------------------------
+ # Checks to see if the make program sets the $MAKE variable.
+ #--------------------------------------------------------------------
+
+ AC_PROG_MAKE_SET
+
+ #--------------------------------------------------------------------
+ # Find ranlib
+ #--------------------------------------------------------------------
+
+ AC_PROG_RANLIB
+
+ #--------------------------------------------------------------------
+ # Determines the correct binary file extension (.o, .obj, .exe etc.)
+ #--------------------------------------------------------------------
+
+ AC_OBJEXT
+ AC_EXEEXT
+])
+
+#------------------------------------------------------------------------
+# TEA_SETUP_COMPILER --
+#
+# Do compiler checks that use the compiler. This must go after
+# TEA_SETUP_COMPILER_CC, which does the actual compiler check.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Sets up CC var and other standard bits we need to make executables.
+#------------------------------------------------------------------------
+AC_DEFUN(TEA_SETUP_COMPILER, [
+ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
+ AC_REQUIRE([TEA_SETUP_COMPILER_CC])
+
+ #------------------------------------------------------------------------
+ # If we're using GCC, see if the compiler understands -pipe. If so, use it.
+ # It makes compiling go faster. (This is only a performance feature.)
+ #------------------------------------------------------------------------
+
+ if test -z "$no_pipe" -a -n "$GCC"; then
+ AC_MSG_CHECKING([if the compiler understands -pipe])
+ OLDCC="$CC"
+ CC="$CC -pipe"
+ AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
+ AC_MSG_RESULT([no]))
+ fi
+
+ #--------------------------------------------------------------------
+ # Common compiler flag setup
+ #--------------------------------------------------------------------
+
+ AC_C_BIGENDIAN
+ if test "${TEA_PLATFORM}" = "unix" ; then
+ TEA_TCL_LINK_LIBS
+ TEA_MISSING_POSIX_HEADERS
+ # Let the user call this, because if it triggers, they will
+ # need a compat/strtod.c that is correct. Users can also
+ # use Tcl_GetDouble(FromObj) instead.
+ #TEA_BUGGY_STRTOD
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_MAKE_LIB --
+#
+# Generate a line that can be used to build a shared/unshared library
+# in a platform independent manner.
+#
+# Arguments:
+# none
+#
+# Requires:
+#
+# Results:
+#
+# Defines the following vars:
+# CFLAGS - Done late here to note disturb other AC macros
+# MAKE_LIB - Command to execute to build the Tcl library;
+# differs depending on whether or not Tcl is being
+# compiled as a shared library.
+# MAKE_SHARED_LIB Makefile rule for building a shared library
+# MAKE_STATIC_LIB Makefile rule for building a static library
+# MAKE_STUB_LIB Makefile rule for building a stub library
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_MAKE_LIB, [
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
+ MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)"
+ MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
+ else
+ MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
+ MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
+ fi
+
+ if test "${SHARED_BUILD}" = "1" ; then
+ MAKE_LIB="${MAKE_SHARED_LIB} "
+ else
+ MAKE_LIB="${MAKE_STATIC_LIB} "
+ fi
+
+ #--------------------------------------------------------------------
+ # Shared libraries and static libraries have different names.
+ # Use the double eval to make sure any variables in the suffix is
+ # substituted. (@@@ Might not be necessary anymore)
+ #--------------------------------------------------------------------
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ if test "${SHARED_BUILD}" = "1" ; then
+ # We force the unresolved linking of symbols that are really in
+ # the private libraries of Tcl and Tk.
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+ fi
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+ else
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+ fi
+ # Some packages build there own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ # These aren't needed on Windows (either MSVC or gcc)
+ RANLIB=:
+ RANLIB_STUB=:
+ else
+ RANLIB_STUB="${RANLIB}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
+ fi
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+ RANLIB=:
+ else
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+ fi
+ # Some packages build there own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ fi
+
+ # These are escaped so that only CFLAGS is picked up at configure time.
+ # The other values will be substituted at make time.
+ CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
+ fi
+
+ AC_SUBST(MAKE_LIB)
+ AC_SUBST(MAKE_SHARED_LIB)
+ AC_SUBST(MAKE_STATIC_LIB)
+ AC_SUBST(MAKE_STUB_LIB)
+ AC_SUBST(RANLIB_STUB)
+])
+
+#------------------------------------------------------------------------
+# TEA_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:
+# TEA_INIT and TEA_PREFIX must be called first.
+#
+# Results:
+#
+# Defines the following vars:
+# ${basename}_LIB_NAME The computed library name.
+# ${basename}_LIB_SPEC The computed linker flags.
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_LIB_SPEC, [
+ AC_MSG_CHECKING([for $1 library])
+
+ # Look in exec-prefix for the library (defined by TEA_PREFIX).
+
+ tea_lib_name_dir="${exec_prefix}/lib"
+
+ # Or in a user-specified location.
+
+ if test x"$2" != x ; then
+ tea_extra_lib_dir=$2
+ else
+ tea_extra_lib_dir=NONE
+ fi
+
+ for i in \
+ `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
+ `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
+ `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
+ `ls -dr ${tea_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
+ tea_lib_name_dir=`dirname $i`
+ $1_LIB_NAME=`basename $i`
+ $1_LIB_PATH_NAME=$i
+ break
+ fi
+ done
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
+ else
+ # Strip off the leading "lib" and trailing ".a" or ".so"
+
+ tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
+ $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
+ fi
+
+ if test "x${$1_LIB_NAME}" = x ; then
+ AC_MSG_ERROR([not found])
+ else
+ AC_MSG_RESULT([${$1_LIB_SPEC}])
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PRIVATE_TCL_HEADERS --
+#
+# Locate the private Tcl include files
+#
+# Arguments:
+#
+# Requires:
+# TCL_SRC_DIR Assumes that TEA_LOAD_TCLCONFIG has
+# already been called.
+#
+# Results:
+#
+# Substs the following vars:
+# TCL_TOP_DIR_NATIVE
+# TCL_GENERIC_DIR_NATIVE
+# TCL_UNIX_DIR_NATIVE
+# TCL_WIN_DIR_NATIVE
+# TCL_BMAP_DIR_NATIVE
+# TCL_TOOL_DIR_NATIVE
+# TCL_PLATFORM_DIR_NATIVE
+# TCL_BIN_DIR_NATIVE
+# TCL_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
+ AC_MSG_CHECKING([for Tcl private include files])
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ 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`\"
+ TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
+ TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
+ TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
+ TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
+ TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
+
+ TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+ else
+ TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
+ TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic'
+ TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix'
+ TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win'
+ TCL_BMAP_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/bitmaps'
+ TCL_TOOL_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/tools'
+ TCL_COMPAT_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/compat'
+ TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
+
+ # substitute these in "relaxed" so that TCL_INCLUDES still works
+ # without requiring the other vars to be defined in the Makefile
+ eval "TCL_INCLUDES=\"-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}\""
+ fi
+
+ AC_SUBST(TCL_TOP_DIR_NATIVE)
+ AC_SUBST(TCL_GENERIC_DIR_NATIVE)
+ AC_SUBST(TCL_UNIX_DIR_NATIVE)
+ AC_SUBST(TCL_WIN_DIR_NATIVE)
+ AC_SUBST(TCL_BMAP_DIR_NATIVE)
+ AC_SUBST(TCL_TOOL_DIR_NATIVE)
+ AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
+
+ AC_SUBST(TCL_INCLUDES)
+ AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
+])
+
+#------------------------------------------------------------------------
+# TEA_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(TEA_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})
+
+ AC_CACHE_VAL(ac_cv_c_tclh, [
+ # Use the value from --with-tclinclude, if it was given
+
+ 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.h])
+ fi
+ else
+ # Check order: pkg --prefix location, Tcl's --prefix location,
+ # directory of tclConfig.sh, and Tcl source directory.
+ # Looking in the source dir is not ideal, but OK.
+
+ eval "temp_includedir=${includedir}"
+ list="`ls -d ${temp_includedir} 2>/dev/null` \
+ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
+ `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
+ if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+ list="$list /usr/local/include /usr/include"
+ fi
+ for i in $list ; do
+ if test -f "$i/tcl.h" ; then
+ ac_cv_c_tclh=$i
+ break
+ fi
+ done
+ 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)
+])
+
+#------------------------------------------------------------------------
+# TEA_PRIVATE_TK_HEADERS --
+#
+# Locate the private Tk include files
+#
+# Arguments:
+#
+# Requires:
+# TK_SRC_DIR Assumes that TEA_LOAD_TKCONFIG has
+# already been called.
+#
+# Results:
+#
+# Substs the following vars:
+# TK_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [
+ AC_MSG_CHECKING([for Tk private include files])
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
+ 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`\"
+ TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
+ TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
+
+ TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
+ else
+ TK_TOP_DIR_NATIVE='${TK_SRC_DIR}'
+ TK_GENERIC_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/generic'
+ TK_UNIX_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/unix'
+ TK_WIN_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/win'
+ TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
+
+ # substitute these in "relaxed" so that TK_INCLUDES still works
+ # without requiring the other vars to be defined in the Makefile
+ eval "TK_INCLUDES=\"-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}\""
+ fi
+
+ AC_SUBST(TK_TOP_DIR_NATIVE)
+ AC_SUBST(TK_UNIX_DIR_NATIVE)
+ AC_SUBST(TK_WIN_DIR_NATIVE)
+ AC_SUBST(TK_GENERIC_DIR_NATIVE)
+ AC_SUBST(TK_XLIB_DIR_NATIVE)
+ AC_SUBST(TK_PLATFORM_DIR_NATIVE)
+
+ AC_SUBST(TK_INCLUDES)
+ AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
+])
+
+#------------------------------------------------------------------------
+# TEA_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(TEA_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})
+
+ AC_CACHE_VAL(ac_cv_c_tkh, [
+ # Use the value from --with-tkinclude, if it was given
+
+ 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.h])
+ fi
+ else
+ # Check order: pkg --prefix location, Tcl's --prefix location,
+ # directory of tclConfig.sh, and Tcl source directory.
+ # Looking in the source dir is not ideal, but OK.
+
+ eval "temp_includedir=${includedir}"
+ list="`ls -d ${temp_includedir} 2>/dev/null` \
+ `ls -d ${TK_PREFIX}/include 2>/dev/null` \
+ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
+ `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
+ if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+ list="$list /usr/local/include /usr/include"
+ fi
+ for i in $list ; do
+ if test -f "$i/tk.h" ; then
+ ac_cv_c_tkh=$i
+ break
+ fi
+ done
+ 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)
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # On Windows, we need the X compat headers
+ AC_MSG_CHECKING([for X11 header files])
+ if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
+ INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
+ TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
+ AC_SUBST(TK_XINCLUDES)
+ fi
+ AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}])
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_TCLSH
+# Locate a tclsh shell in the following directories:
+# ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin
+# ${exec_prefix}/bin ${prefix}/bin
+# ${PATH}
+#
+# Arguments
+# none
+#
+# Results
+# Subst's the following values:
+# TCLSH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PROG_TCLSH, [
+ # Allow the user to provide this setting in the env
+ if test "x${TCLSH_PROG}" = "x" ; then
+ AC_MSG_CHECKING([for tclsh])
+
+ AC_CACHE_VAL(ac_cv_path_tclsh, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ if test "${TEA_PLATFORM}" != "windows" -o \
+ \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
+ # Do not allow target tclsh in known cross-compile builds,
+ # as we need one we can run on this system
+ search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
+ fi
+ 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
+ fi
+ AC_SUBST(TCLSH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_WISH
+# Locate a wish shell in the following directories:
+# ${TK_BIN_DIR} ${TK_BIN_DIR}/../bin
+# ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin
+# ${exec_prefix}/bin ${prefix}/bin
+# ${PATH}
+#
+# Arguments
+# none
+#
+# Results
+# Subst's the following values:
+# WISH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PROG_WISH, [
+ # Allow the user to provide this setting in the env
+ if test "x${WISH_PROG}" = "x" ; then
+ AC_MSG_CHECKING([for wish])
+
+ AC_CACHE_VAL(ac_cv_path_wish, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ if test "${TEA_PLATFORM}" != "windows" -o \
+ \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
+ # Do not allow target wish in known cross-compile builds,
+ # as we need one we can run on this system
+ search_path="${TK_BIN_DIR} ${TK_BIN_DIR}/../bin ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
+ fi
+ 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
+ fi
+ AC_SUBST(WISH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_CONFIG --
+#
+# Locate the ${1}Config.sh file and perform a sanity check on
+# the ${1} compile flags. These are used by packages like
+# [incr Tk] that load *Config.sh files from more than Tcl and Tk.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-$1=...
+#
+# Defines the following vars:
+# $1_BIN_DIR Full path to the directory containing
+# the $1Config.sh file
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_CONFIG, [
+ #
+ # Ok, lets find the $1 configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-$1
+ #
+
+ if test x"${no_$1}" = x ; then
+ # we reset no_$1 in case something fails here
+ no_$1=true
+ AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
+ AC_MSG_CHECKING([for $1 configuration])
+ AC_CACHE_VAL(ac_cv_c_$1config,[
+
+ # First check to see if --with-$1 was specified.
+ if test x"${with_$1config}" != x ; then
+ case ${with_$1config} in
+ */$1Config.sh )
+ if test -f ${with_$1config}; then
+ AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself])
+ with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'`
+ fi;;
+ esac
+ if test -f "${with_$1config}/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
+ else
+ AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
+ fi
+ fi
+
+ # then check for a private $1 installation
+ if test x"${ac_cv_c_$1config}" = x ; then
+ for i in \
+ ../$1 \
+ `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ../../$1 \
+ `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ../../../$1 \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../$1 \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ; do
+ if test -f "$i/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd $i; pwd)`
+ break
+ fi
+ if test -f "$i/unix/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_$1config}" = x ; then
+ for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+
+ if test x"${ac_cv_c_$1config}" = x ; then
+ $1_BIN_DIR="# no $1 configs found"
+ AC_MSG_WARN("Cannot find $1 configuration definitions")
+ exit 0
+ else
+ no_$1=
+ $1_BIN_DIR=${ac_cv_c_$1config}
+ AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_CONFIG --
+#
+# Load the $1Config.sh file
+#
+# Arguments:
+#
+# Requires the following vars to be set:
+# $1_BIN_DIR
+#
+# Results:
+#
+# Subst the following vars:
+# $1_SRC_DIR
+# $1_LIB_FILE
+# $1_LIB_SPEC
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_LOAD_CONFIG, [
+ AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
+
+ if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
+ AC_MSG_RESULT([loading])
+ . ${$1_BIN_DIR}/$1Config.sh
+ else
+ AC_MSG_RESULT([file not found])
+ fi
+
+ #
+ # If the $1_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable $1_LIB_SPEC will be set to the value
+ # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
+ # instead of $1_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f ${$1_BIN_DIR}/Makefile ; then
+ AC_MSG_WARN([Found Makefile - using build library specs for $1])
+ $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
+ $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
+ $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
+ fi
+
+ AC_SUBST($1_VERSION)
+ AC_SUBST($1_BIN_DIR)
+ AC_SUBST($1_SRC_DIR)
+
+ AC_SUBST($1_LIB_FILE)
+ AC_SUBST($1_LIB_SPEC)
+
+ AC_SUBST($1_STUB_LIB_FILE)
+ AC_SUBST($1_STUB_LIB_SPEC)
+ AC_SUBST($1_STUB_LIB_PATH)
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_CELIB --
+#
+# Locate Keuchel's celib emulation layer for targeting Win/CE
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-celib=...
+#
+# Defines the following vars:
+# CELIB_DIR Full path to the directory containing
+# the include and platform lib files
+#------------------------------------------------------------------------
+
+AC_DEFUN(TEA_PATH_CELIB, [
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-celib
+
+ if test x"${no_celib}" = x ; then
+ # we reset no_celib in case something fails here
+ no_celib=true
+ AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR], with_celibconfig=${withval})
+ AC_MSG_CHECKING([for Windows/CE celib directory])
+ AC_CACHE_VAL(ac_cv_c_celibconfig,[
+ # First check to see if --with-celibconfig was specified.
+ if test x"${with_celibconfig}" != x ; then
+ if test -d "${with_celibconfig}/inc" ; then
+ ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory])
+ fi
+ fi
+
+ # then check for a celib library
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ for i in \
+ ../celib-palm-3.0 \
+ ../celib \
+ ../../celib-palm-3.0 \
+ ../../celib \
+ `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../celib-palm-3.0 \
+ ${srcdir}/../celib \
+ `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \
+ ; do
+ if test -d "$i/inc" ; then
+ ac_cv_c_celibconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ AC_MSG_ERROR([Cannot find celib support library directory])
+ else
+ no_celib=
+ CELIB_DIR=${ac_cv_c_celibconfig}
+ AC_MSG_RESULT([found $CELIB_DIR])
+ TEA_PATH_NOSPACE(CELIB_DIR, ${ac_cv_c_celibconfig})
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_NOSPACE
+# Ensure that the given path has no spaces. This is necessary for
+# CC (and consitutuent vars that build it up) to work in the
+# tortured autoconf environment. Currently only for Windows use.
+#
+# Arguments
+# VAR - name of the variable to set
+# PATH - path to ensure no spaces in
+#
+# Results
+# Sets $VAR to short path of $PATH if it can be found.
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_NOSPACE], [
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ # we need TCLSH_PROG defined to get Windows short pathnames
+ AC_REQUIRE([TEA_PROG_TCLSH])
+
+ AC_MSG_CHECKING([short pathname for $1 ($2)])
+
+ shortpath=
+ case "$2" in
+ *\ *)
+ # Only do this if we need to.
+ shortpath=`echo "puts [[file attributes {$2} -shortname]] ; exit" | ${TCLSH_PROG} 2>/dev/null`
+ ;;
+ esac
+ if test "x${shortpath}" = "x" ; then
+ AC_MSG_RESULT([not changed])
+ else
+ $1=$shortpath
+ AC_MSG_RESULT([${$1}])
+ fi
+ fi
+])
diff --git a/itcl/itk/tests/all.tcl b/itcl/itk/tests/all.tcl
index 3cf9670dfeb..3f36351e2f1 100644
--- a/itcl/itk/tests/all.tcl
+++ b/itcl/itk/tests/all.tcl
@@ -9,114 +9,9 @@
#
# RCS: @(#) $Id$
-package require tcltest
-namespace import -force ::tcltest::*
+package require tcltest 2.1
-# Look for the -exedir flag and find a suitable tclsh executable.
+tcltest::testsDirectory [file dir [info script]]
+tcltest::runAllTests
-if {(![info exists argv]) || ([llength $argv] < 1)} {
- set flagArray {}
-} else {
- set flagArray $argv
-}
-
-array set flag $flagArray
-if {[info exists flag(-exedir)]} {
- set shell [lindex \
- [glob -nocomplain \
- [file join $flag(-exedir) wish*.bin] \
- [file join $flag(-exedir) wish*]] 0]
-} else {
- set shell $::tcltest::tcltest
-}
-
-set ::tcltest::testSingleFile false
-
-# use [pwd] trick to expand relative file paths to absolute paths - MMc
-set cwd [pwd]
-cd [file dirname [info script]]
-set ::tcltest::testsDirectory [pwd]
-cd $cwd
-
-set logfile [file join $::tcltest::temporaryDirectory Log.txt]
-
-puts stdout "Using interp: $shell"
-puts stdout "Running tests in working dir: $::tcltest::testsDirectory"
-if {[llength $::tcltest::skip] > 0} {
- puts stdout "Skipping tests that match: $::tcltest::skip"
-}
-if {[llength $::tcltest::match] > 0} {
- puts stdout "Only running tests that match: $::tcltest::match"
-}
-
-if {[llength $::tcltest::skipFiles] > 0} {
- puts stdout "Skipping test files that match: $::tcltest::skipFiles"
-}
-if {[llength $::tcltest::matchFiles] > 0} {
- puts stdout "Only sourcing test files that match: $::tcltest::matchFiles"
-}
-
-set timeCmd {clock format [clock seconds]}
-puts stdout "Tests began at [eval $timeCmd]"
-
-# source each of the specified tests
-foreach file [lsort [::tcltest::getMatchingFiles]] {
- set tail [file tail $file]
- puts stdout $tail
-
- # Change to the tests directory so the value of the following
- # variable is set correctly when we spawn the child test processes
-
- cd $::tcltest::testsDirectory
- set cmd [concat [list | $shell $file] [split $argv] \
- [list -outfile $logfile]]
- if {[catch {
- set pipeFd [open $cmd "r"]
- while {[gets $pipeFd line] >= 0} {
- puts $::tcltest::outputChannel $line
- }
- close $pipeFd
- } msg]} {
- # Print results to ::tcltest::outputChannel.
- puts $::tcltest::outputChannel $msg
- }
-
- # Now concatenate the temporary log file to
- # ::tcltest::outputChannel
- if {[catch {
- set fd [open $logfile "r"]
- while {![eof $fd]} {
- gets $fd line
- if {![eof $fd]} {
- if {[regexp {^([^:]+):\tTotal\t([0-9]+)\tPassed\t([0-9]+)\tSkipped\t([0-9]+)\tFailed\t([0-9]+)} $line null testFile Total Passed Skipped Failed]} {
- foreach index [list "Total" "Passed" "Skipped" \
- "Failed"] {
- incr ::tcltest::numTests($index) [set $index]
- }
- incr ::tcltest::numTestFiles
- if {$Failed > 0} {
- lappend ::tcltest::failFiles $testFile
- }
- }
- puts $::tcltest::outputChannel $line
- }
- }
- close $fd
- } msg]} {
- puts $::tcltest::outputChannel $msg
- }
-}
-
-set numFailures [llength $::tcltest::failFiles]
-
-# cleanup
-puts stdout "\nTests ended at [eval $timeCmd]"
-::tcltest::cleanupTests 1
-
-if {$numFailures > 0} {
- return -code error -errorcode $numFailures \
- -errorinfo "Found $numFailures test file failures"
-} else {
- return
-}
-exit
+return
diff --git a/itcl/itk/tests/interp.test b/itcl/itk/tests/interp.test
index 86979830fc9..3f4ecb7ea0f 100644
--- a/itcl/itk/tests/interp.test
+++ b/itcl/itk/tests/interp.test
@@ -16,9 +16,8 @@
package require tcltest
namespace import -force ::tcltest::*
-if {[string compare test [info procs test]] == 1} then {source defs}
+::tcltest::loadTestedCommands
-package require Itk
# ----------------------------------------------------------------------
# Make sure that slave interpreters can be created and loaded
diff --git a/itcl/itk/tests/option.test b/itcl/itk/tests/option.test
index d99a4013e11..ae4529ed076 100644
--- a/itcl/itk/tests/option.test
+++ b/itcl/itk/tests/option.test
@@ -16,9 +16,8 @@
package require tcltest
namespace import -force ::tcltest::*
-if {[string compare test [info procs test]] == 1} then {source defs}
+::tcltest::loadTestedCommands
-package require Itk
# ----------------------------------------------------------------------
# Component option processing
diff --git a/itcl/itk/tests/privacy.test b/itcl/itk/tests/privacy.test
index a3cfe533aa9..30e32d5de1f 100644
--- a/itcl/itk/tests/privacy.test
+++ b/itcl/itk/tests/privacy.test
@@ -16,9 +16,8 @@
package require tcltest
namespace import -force ::tcltest::*
-if {[string compare test [info procs test]] == 1} then {source defs}
+::tcltest::loadTestedCommands
-package require Itk
# ----------------------------------------------------------------------
# Define a base class with public variables and a simple mega-widget
diff --git a/itcl/itk/tests/public.test b/itcl/itk/tests/public.test
index d83006d6953..aa11d977a63 100644
--- a/itcl/itk/tests/public.test
+++ b/itcl/itk/tests/public.test
@@ -16,9 +16,8 @@
package require tcltest
namespace import -force ::tcltest::*
-if {[string compare test [info procs test]] == 1} then {source defs}
+::tcltest::loadTestedCommands
-package require Itk
# ----------------------------------------------------------------------
# Define a base class with public variables and a simple mega-widget
diff --git a/itcl/itk/tests/toplevel.test b/itcl/itk/tests/toplevel.test
index d58a86dc457..5b29f66ca9d 100644
--- a/itcl/itk/tests/toplevel.test
+++ b/itcl/itk/tests/toplevel.test
@@ -16,9 +16,8 @@
package require tcltest
namespace import -force ::tcltest::*
-if {[string compare test [info procs test]] == 1} then {source defs}
+::tcltest::loadTestedCommands
-package require Itk
# ----------------------------------------------------------------------
# Toplevel mega-widget
@@ -79,6 +78,123 @@ test toplevel-1.6 {when a mega-widget is destroyed, its object is deleted} {
itcl::find objects .testToplevel*
} {}
+test toplevel-1.7 {when an mega-widget object is deleted, its window and any
+ components are destroyed } {
+ TestToplevel .delme
+ set label [.delme component test1]
+ itcl::delete object .delme
+ list [winfo exists .delme] [winfo exists $label]
+} {0 0}
+
+test toplevel-1.8 {when a mega-widget object is deleted, its window and any
+ components are destroyed (even if in another window) } {
+ catch {destroy .t1}
+ catch {destroy .t2}
+ catch {rename .t2 {}}
+ catch {itcl::delete class ButtonTop}
+
+ itcl::class ButtonTop {
+ inherit itk::Toplevel
+
+ constructor {args} {
+ eval itk_initialize $args
+
+ itk_component add button {
+ button $itk_option(-container).b -text Button
+ } {}
+ pack $itk_component(button)
+ }
+
+ itk_option define -container container Container {}
+ }
+
+ toplevel .t1
+ ButtonTop .t2 -container .t1
+ set button [.t2 component button]
+ itcl::delete object .t2
+ set result [list $button [winfo exists $button]]
+ itcl::delete class ButtonTop
+ destroy .t1
+ set result
+} {.t1.b 0}
+
+test toplevel-1.9 {when a window that contains a megawidget component
+ is destroyed, the component is removed from the megawidget} {
+ catch {destroy .t1}
+ catch {destroy .t2}
+ catch {rename .t2 {}}
+ catch {itcl::delete class ButtonTop}
+
+ itcl::class ButtonTop {
+ inherit itk::Toplevel
+
+ constructor {args} {
+ eval itk_initialize $args
+
+ itk_component add button {
+ button $itk_option(-container).b -text Button
+ } {}
+ pack $itk_component(button)
+ }
+
+ itk_option define -container container Container {}
+ }
+
+ toplevel .t1
+ ButtonTop .t2 -container .t1
+ set result [list [.t2 component]]
+ destroy .t1
+ lappend result [list [.t2 component]]
+ itcl::delete object .t2
+ itcl::delete class ButtonTop
+ set result
+} {{button hull} hull}
+
+test toplevel-1.10 {when destroying a component that is inside another
+ window protect against that case where one component destroy
+ actually destroys other contained components} {
+ catch {destroy .t1}
+ catch {destroy .t2}
+ catch {rename .t2 {}}
+ catch {itcl::delete class ButtonTop}
+
+ itcl::class ButtonTop {
+ inherit itk::Toplevel
+
+ constructor {args} {
+ eval itk_initialize $args
+
+ # Note, the component names matter here since
+ # [.t2 component] returns names in hash order.
+ # We need to delete cframe first since it
+ # is the parent of cbutton.
+
+ itk_component add cframe {
+ button $itk_option(-container).cframe
+ } {}
+ pack $itk_component(cframe)
+
+ itk_component add cbutton {
+ button $itk_component(cframe).b -text Button
+ } {}
+ pack $itk_component(cbutton)
+ }
+
+ itk_option define -container container Container {}
+ }
+
+ toplevel .t1
+ ButtonTop .t2 -container .t1
+ set result [list [.t2 component]]
+ # destructor should destroy cframe but not cbutton
+ itcl::delete object .t2
+ lappend result [winfo exists .t1.cframe]
+ destroy .t1
+ itcl::delete class ButtonTop
+ set result
+} {{hull cframe cbutton} 0}
+
+
# ----------------------------------------------------------------------
# Clean up
# ----------------------------------------------------------------------
diff --git a/itcl/itk/tests/widget.test b/itcl/itk/tests/widget.test
index bfc62330937..d1c0fd1c89b 100644
--- a/itcl/itk/tests/widget.test
+++ b/itcl/itk/tests/widget.test
@@ -16,9 +16,8 @@
package require tcltest
namespace import -force ::tcltest::*
-if {[string compare test [info procs test]] == 1} then {source defs}
+::tcltest::loadTestedCommands
-package require Itk
# ----------------------------------------------------------------------
# Simple mega-widget
@@ -265,6 +264,128 @@ test widget-1.26 {when an internal component is deleted (but not destroyed) it i
[.testWidget configure]
} {{itk-destroy-.testWidget.t2 .testWidget.t2 Button . all} {namespace inscope ::itk::Archetype {::.testWidget itk_component delete test2}} 0 {.testWidget.t2 Button . all} {} {{-background background Background linen linen} {-clientdata clientData ClientData {} {}} {-cursor cursor Cursor {} {}} {-status status Status {} {}}}}
+test widget-1.27 {when a mega-widget object is deleted, its window and any
+ components are destroyed (even if in another window) } {
+ catch {destroy .t1}
+ catch {rename .t1.bw {}}
+ catch {itcl::delete class ButtonWidget}
+
+ itcl::class ButtonWidget {
+ inherit itk::Widget
+
+ constructor {args} {
+ eval itk_initialize $args
+
+ itk_component add button {
+ button $itk_option(-container).b -text Button
+ } {}
+ pack $itk_component(button)
+ }
+
+ itk_option define -container container Container {}
+ }
+
+ toplevel .t1
+ frame .t1.f
+ ButtonWidget .t1.bw -container .t1.f
+
+ pack .t1.f
+ pack .t1.bw
+
+ set button [.t1.bw component button]
+ itcl::delete object .t1.bw
+ set result [list $button [winfo exists $button]]
+ destroy .t1
+ itcl::delete class ButtonWidget
+ set result
+} {.t1.f.b 0}
+
+test widget-1.28 {when a window that contains a megawidget component
+ is destroyed, the component is removed from the megawidget} {
+ catch {destroy .t1}
+ catch {rename .t1.bw {}}
+ catch {itcl::delete class ButtonWidget}
+
+ itcl::class ButtonWidget {
+ inherit itk::Widget
+
+ constructor {args} {
+ eval itk_initialize $args
+
+ itk_component add button {
+ button $itk_option(-container).b -text Button
+ } {}
+ pack $itk_component(button)
+ }
+
+ itk_option define -container container Container {}
+ }
+
+ toplevel .t1
+ frame .t1.f
+ ButtonWidget .t1.bw -container .t1.f
+
+ pack .t1.f
+ pack .t1.bw
+ set result [list [.t1.bw component]]
+ destroy .t1.f
+ lappend result [list [.t1.bw component]]
+
+ itcl::delete object .t1.bw
+ destroy .t1
+ itcl::delete class ButtonWidget
+ set result
+} {{button hull} hull}
+
+test widget-1.29 {when destroying a component that is inside another
+ window protect against that case where one component destroy
+ actually destroys other contained components} {
+ catch {destroy .t1}
+ catch {rename .t1.bw {}}
+ catch {itcl::delete class ButtonWidget}
+
+ itcl::class ButtonWidget {
+ inherit itk::Widget
+
+ constructor {args} {
+ eval itk_initialize $args
+
+ # Note, the component names matter here since
+ # [.t2 component] returns names in hash order.
+ # We need to delete cframe first since it
+ # is the parent of cbutton.
+
+ itk_component add cframe {
+ button $itk_option(-container).cframe
+ } {}
+ pack $itk_component(cframe)
+
+ itk_component add cbutton {
+ button $itk_component(cframe).b -text Button
+ } {}
+ pack $itk_component(cbutton)
+ }
+
+ itk_option define -container container Container {}
+ }
+
+ toplevel .t1
+ frame .t1.f
+ ButtonWidget .t1.bw -container .t1.f
+
+ pack .t1.f
+ pack .t1.bw
+ set result [list [.t1.bw component]]
+ # destructor should destroy cframe but not cbutton
+ itcl::delete object .t1.bw
+ lappend result [winfo exists .t1.f.cframe]
+
+ destroy .t1
+ itcl::delete class ButtonWidget
+ set result
+} {{hull cframe cbutton} 0}
+
+
# ----------------------------------------------------------------------
# Clean up
# ----------------------------------------------------------------------
diff --git a/itcl/itk/win/makefile.bc b/itcl/itk/win/makefile.bc
index f0217796b29..0d56d4d4ade 100644
--- a/itcl/itk/win/makefile.bc
+++ b/itcl/itk/win/makefile.bc
@@ -1,228 +1,227 @@
-# 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 680531bd79d..9e616f2a1e2 100644
--- a/itcl/itk/win/makefile.vc
+++ b/itcl/itk/win/makefile.vc
@@ -1,293 +1,456 @@
-######################################################################
-# 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)
-
+#------------------------------------------------------------------------------
+# Visual C++ 5.0+ makefile for [Incr Tk]
+#
+# 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$
+#------------------------------------------------------------------------------
+# Do not modify this file!
+#------------------------------------------------------------------------------
+
+!if !exist("makefile.vc")
+MSG = ^
+You must run this makefile only from the directory it is in.^
+Please `cd` to its location first.
+!error $(MSG)
+!endif
+
+PROJECT = itk
+!include "..\..\rules.vc"
+
+
+!if $(TCLINSTALL)
+!message *** Warning: [Incr Tk] requires the source distribution of Tcl to build from,
+!message *** at this time, sorry. Please set the TCLDIR and TKDIR macros to point
+!message *** to the sources.
+!endif
+
+ITCLDIR = ..\..\itcl
+
+
+!if [nmakehlp -g $(ITCLDIR)\generic\itcl.h ITCL_VERSION] == 33
+ITCL_DOTVERSION = 3.3
+!elseif [nmakehlp -g $(ITCLDIR)\generic\itcl.h ITCL_VERSION] == 34
+ITCL_DOTVERSION = 3.4
+!elseif [nmakehlp -g $(ITCLDIR)\generic\itcl.h ITCL_VERSION] == 35
+ITCL_DOTVERSION = 3.5
+!elseif [nmakehlp -g $(ITCLDIR)\generic\itcl.h ITCL_VERSION] == 0
+MSG =^
+Can't get version string from ..\generic\itcl.h
+!error $(MSG)
+!endif
+ITCL_VERSION = $(ITCL_DOTVERSION:.=)
+
+!if [nmakehlp -g ..\generic\itk.h ITK_VERSION] == 33
+ITK_DOTVERSION = 3.3
+!elseif [nmakehlp -g ..\generic\itk.h ITK_VERSION] == 34
+ITK_DOTVERSION = 3.4
+!elseif [nmakehlp -g ..\generic\itk.h ITK_VERSION] == 35
+ITK_DOTVERSION = 3.5
+!elseif [nmakehlp -g ..\generic\itk.h ITK_VERSION] == 0
+MSG =^
+Can't get version string from ..\generic\itk.h
+!error $(MSG)
+!endif
+ITK_VERSION = $(ITK_DOTVERSION:.=)
+
+
+BINROOT = .
+ROOT = ..
+STUBPREFIX = $(PROJECT)stub
+
+PKGINDEX = "$(TMP_DIR)\pkgIndex.tcl"
+
+ITCLLIBNAME = itcl$(ITCL_VERSION)$(SUFX).$(EXT)
+ITCLLIB = "$(ITCLDIR)\win\$(OUT_DIR)\$(ITCLLIBNAME)"
+ITKIMPLIB = "$(OUT_DIR)\$(PROJECT)$(ITK_VERSION)$(SUFX).lib"
+ITKSTUBLIBNAME = $(STUBPREFIX)$(ITK_VERSION).lib
+ITKSTUBLIB = "$(OUT_DIR)\$(ITKSTUBLIBNAME)"
+
+!if $(TCL_DOES_STUBS)
+ITKLIBNAME = $(PROJECT)$(ITK_VERSION)$(SUFX).$(EXT)
+ITCLIMPLIBNAME = itcl$(ITCL_VERSION)$(SUFX).$(EXT)
+!else
+ITKLIBNAME = $(PROJECT)$(ITK_VERSION)80$(SUFX).$(EXT)
+ITCLIMPLIBNAME = itcl$(ITCL_VERSION)80$(SUFX).lib
+!endif
+ITKLIB = "$(OUT_DIR)\$(ITKLIBNAME)"
+ITCLIMPLIB = "$(ITCLDIR)\win\Release\$(ITCLIMPLIBNAME)"
+
+
+!if $(TCLINSTALL)
+TKSTUBLIB = "$(TCLDIR)\lib\tkstub$(TCL_VERSION).lib"
+TKIMPLIB = "$(TCLDIR)\lib\tk$(TCL_VERSION)$(DBGX).lib"
+WISH = "$(TCLDIR)\bin\wish$(TCL_VERSION)$(DBGX).exe"
+TCL_LIBRARY =
+TK_LIBRARY =
+!else
+TKSTUBLIB = "$(TKDIR)\win\Release\tkstub$(TCL_VERSION).lib"
+TKIMPLIB = "$(TKDIR)\win\$(OUT_DIR)\tk$(TCL_VERSION)$(DBGX).lib"
+WISH = "$(TKDIR)\win\$(OUT_DIR)\wish$(TCL_VERSION)$(DBGX).exe"
+TCL_LIBRARY = "$(TCLDIR)\library"
+TK_LIBRARY = "$(TKDIR)\library"
+!endif
+ITCL_LIBRARY = "$(ITCLDIR:\=/)/library"
+ITK_LIBRARY = "$(ROOT)/library
+
+ITCLSTUBLIBNAME = itclstub$(ITCL_VERSION).lib
+ITCLSTUBLIB = "$(ITCLDIR)\win\Release\$(ITCLSTUBLIBNAME)"
+
+### For Tcl 8.0
+!if !$(TCL_DOES_STUBS)
+TCLSTUBLIB = $(TCLIMPLIB)
+TKSTUBLIB = $(TKIMPLIB)
+ITCLSTUBLIB = $(ITCLIMPLIB)
+!endif
+
+
+BIN_INSTALL_DIR = $(_INSTALLDIR)\bin
+DOC_INSTALL_DIR = $(_INSTALLDIR)\doc
+LIB_INSTALL_DIR = $(_INSTALLDIR)\lib
+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)
+ $(TMP_DIR)\dllEntryPoint.obj \
+ $(TMP_DIR)\itk.res \
+!endif
+!if $(TCL_DOES_STUBS)
+ $(TMP_DIR)\itkStubInit.obj
+!endif
+
+ITKSTUBOBJS = \
+!if $(TCL_DOES_STUBS)
+ $(TMP_DIR)\itkStubLib.obj
+!endif
+
+GENERICDIR = $(ROOT)\generic
+DOCDIR = $(ROOT)\doc
+WINDIR = $(ROOT)\win
+RCDIR = $(ROOT)\win\rc
+TOOLSDIR = ..\..\tools
+
+#---------------------------------------------------------------------
+# Link flags
+#---------------------------------------------------------------------
+
+!if $(DEBUG)
+ldebug = -debug:full -debugtype:cv
+!else
+ldebug = -release -opt:ref -opt:icf,3
+!endif
+
+# declarations common to all linker options
+lflags = -nologo -machine:$(MACHINE) $(ldebug)
+
+!if $(PROFILE)
+lflags = $(lflags) -profile
+!endif
+
+!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
+# align sections for PE size savings.
+lflags = $(lflags) -opt:nowin98
+!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
+# align sections for speed in loading by choosing the virtual page size.
+lflags = $(lflags) -align:4096
+!endif
+
+!if $(LOIMPACT)
+lflags = $(lflags) -ws:aggressive
+!endif
+
+ITK_LFLAGS = $(lflags) -subsystem:windows -dll
+ITK_LLIBS = $(TCLSTUBLIB) $(TKSTUBLIB) $(ITCLSTUBLIB)
+
+!if exist("$(TCLDIR)\win\coffbase.txt")
+ITK_DLLBASE = -base:@$(TCLDIR)\win\coffbase.txt,itk
+!else
+ITK_DLLBASE =
+!endif
+
+#---------------------------------------------------------------------
+# Compile flags
+#---------------------------------------------------------------------
+
+!if $(DEBUG)
+!if "$(MACHINE)" == "IA64"
+cdebug = -Od -Zi
+!else
+cdebug = -Z7 -Od -WX
+!endif
+!else
+# This cranks the optimization level up to max.
+cdebug = -O2
+!endif
+
+# declarations common to all compiler options
+cflags = -nologo -c -W3 -YX -Fp$(TMP_DIR)^\
+
+!if $(PENT_0F_ERRATA)
+cflags = $(cflags) -QI0f
+!endif
+
+!if $(ITAN_B_ERRATA)
+cflags = $(cflags) -QIA64_Bx
+!endif
+
+!if $(MSVCRT)
+crt = -MD$(DBGX)
+!else
+crt = -MT$(DBGX)
+!endif
+
+!if $(TCLINSTALL)
+TCL_INCLUDES = -I"$(TCLDIR)\include"
+TK_INCLUDES =
+!else
+TCL_INCLUDES = -I"$(TCLDIR)\generic" -I"$(TCLDIR)\win"
+TK_INCLUDES = -I"$(TKDIR)\generic" -I"$(TKDIR)\xlib"
+!endif
+
+ITK_INCLUDES = -I$(WINDIR) -I$(GENERICDIR)
+ITCL_INCLUDES = -I"$(ITCLDIR)\generic"
+ITK_DEFINES = -DBUILD_itk -DTCL_THREADS=1
+ITK_EXE_CFLAGS = $(cdebug) $(cflags) $(crt) $(ITCL_INCLUDES) $(ITK_INCLUDES) \
+ $(TCL_INCLUDES) $(TK_INCLUDES) $(ITK_DEFINES)
+
+### By convention, static builds do not use Stubs. This is just a practice,
+### not a technical limitation.
+!if $(STATIC_BUILD)
+ITK_CFLAGS = $(ITK_EXE_CFLAGS) -DSTATIC_BUILD
+!elseif $(TCL_DOES_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 $(ITKLIB) $(ITKSTUBLIB)
+release : setup $(ITKLIB) $(ITKSTUBLIB)
+install : install-binaries install-docs
+
+!if $(STATIC_BUILD)
+test :
+ @echo test target not supported for a static library.
+!else
+test : setup $(ITKLIB) $(ITKSTUBLIB)
+ set TCL_LIBRARY=$(TCL_LIBRARY)
+ set TK_LIBRARY=$(TK_LIBRARY)
+ set ITCL_LIBRARY=$(ITCL_LIBRARY)
+ set ITK_LIBRARY=$(ITK_LIBRARY)
+ $(TCLSH) ..\tests\all.tcl $(TESTFLAGS) -loadfile <<
+ load [file normalize $(ITCLLIB:\=/)] Itcl
+ load [file normalize $(ITKLIB:\=/)] Itk
+<<
+!endif
+
+setup :
+ @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
+ @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
+
+$(ITKLIB): $(ITKOBJS)
+!if $(STATIC_BUILD)
+ $(lib32) -nologo -machine:$(MACHINE) -out:$@ @<<
+!else
+ $(link32) $(ITK_LFLAGS) $(ITK_DLLBASE) -out:$@ $(ITK_LLIBS) @<<
+!endif
+ $(ITKOBJS)
+<<
+
+
+!if $(TCL_DOES_STUBS)
+$(ITKSTUBLIB) : $(ITKSTUBOBJS)
+ $(lib32) -nologo -out:$@ $(ITKSTUBOBJS)
+!endif
+
+install-binaries:
+ 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 $(ITKLIB) "$(SCRIPT_INSTALL_DIR)"
+!if $(ITKSTUBLIB) != ""
+ copy $(ITKSTUBLIB) "$(LIB_INSTALL_DIR)"
+!endif
+ copy $(ROOT)\generic\itk.h "$(INCLUDE_INSTALL_DIR)"
+ copy $(ROOT)\generic\itkDecls.h "$(INCLUDE_INSTALL_DIR)"
+ copy $(ROOT)\library\*.* "$(SCRIPT_INSTALL_DIR)"
+ echo if {[package vsatisfies 8.0 [package provide Tcl]]} {\
+ > "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ set add 80>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo } else {>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ set add {}>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo }>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo if {[info exists ::tcl_platform(debug)] ^&^&\
+ $$::tcl_platform(debug) ^&^& \>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ ^ ^ ^ ^ [file exists [file join $$dir\
+ $(PROJECT)$(ITK_VERSION)$${add}g.dll]]}\
+ {>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ package ifneeded Itk $(ITK_DOTVERSION) [list load\
+ [file join $$dir $(PROJECT)$(ITK_VERSION)$${add}g.dll]\
+ Itk]>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo } else {>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo ^ ^ ^ ^ package ifneeded Itk $(ITK_DOTVERSION) [list load\
+ [file join $$dir $(PROJECT)$(ITK_VERSION)$${add}.dll]\
+ Itk]>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo }>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+ echo unset add>> "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
+
+
+#---------------------------------------------------------------------
+# Regenerate the stubs files.
+#---------------------------------------------------------------------
+
+!if !$(TCLINSTALL)
+# Only from the sources of Tcl does genStubs.tcl exist.
+genstubs:
+ $(TCLSH) $(TOOLSDIR)\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$@ $?
+
+#---------------------------------------------------------------------
+# Inference rules.
+#---------------------------------------------------------------------
+
+{$(WINDIR)}.c{$(TMP_DIR)}.obj ::
+ $(cc32) $(ITK_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(GENERICDIR)}.c{$(TMP_DIR)}.obj ::
+ $(cc32) $(ITK_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(RCDIR)}.rc{$(TMP_DIR)}.res :
+ $(rc32) -fo $@ -DDEBUG=$(DEBUG) $(ITK_INCLUDES) $(TCL_INCLUDES) $(ITCL_INCLUDES) $(ITK_DEFINES) $<
+
+#---------------------------------------------------------------------
+# Generate the windows help files.
+#---------------------------------------------------------------------
+
+HLPBASE = $(PROJECT)$(ITK_VERSION)
+HELPFILE = $(OUT_DIR)\$(HLPBASE).hlp
+HELPCNT = $(OUT_DIR)\$(HLPBASE).cnt
+DOCTMP_DIR = $(OUT_DIR)\$(PROJECT)_docs
+HELPRTF = $(DOCTMP_DIR)\$(PROJECT).rtf
+MAN2HELP = $(DOCTMP_DIR)\man2help.tcl
+MAN2HELP2 = $(DOCTMP_DIR)\man2help2.tcl
+INDEX = $(DOCTMP_DIR)\index.tcl
+BMP = $(DOCTMP_DIR)\toaster.bmp
+BMP_NOPATH = toaster.bmp
+MAN2TCL = $(DOCTMP_DIR)\man2tcl.exe
+
+winhelp: docsetup $(HELPFILE)
+
+docsetup:
+ @if not exist $(DOCTMP_DIR)\nul mkdir $(DOCTMP_DIR)
+
+$(MAN2HELP) $(MAN2HELP2) $(INDEX): $(TCLTOOLSDIR)\$$(@F)
+ copy $(TCLTOOLSDIR)\$(@F) $(@D)
+
+$(BMP):
+ copy $(WINDIR)\$(@F) $(@D)
+
+$(HELPFILE): $(HELPRTF) $(BMP)
+ cd $(DOCTMP_DIR)
+ start /wait hcrtf.exe -x <<$(PROJECT).hpj
+[OPTIONS]
+COMPRESS=12 Hall Zeck
+LCID=0x409 0x0 0x0 ; English (United States)
+TITLE=[Incr Tk] Reference Manual
+BMROOT=.
+CNT=$(@B).cnt
+HLP=$(@B).hlp
+
+[FILES]
+$(PROJECT).rtf
+
+[WINDOWS]
+main="[Incr Tk] Reference Manual",,27648,(r15263976),(r65280)
+
+[CONFIG]
+BrowseButtons()
+CreateButton(1, "Web", ExecFile("http://www.tcl.tk"))
+CreateButton(2, "SF", ExecFile("http://sf.net/projects/incrtcl"))
+CreateButton(3, "Wiki", ExecFile("http://wiki.tcl.tk"))
+CreateButton(4, "FAQ", ExecFile("http://www.purl.org/NET/Tcl-FAQ/"))
+<<
+ cd $(MAKEDIR)
+ copy "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)"
+ copy "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)"
+
+$(MAN2TCL): $(TCLTOOLSDIR)\$$(@B).c
+ $(cc32) -nologo -G4 -ML -O2 -Fo$(@D)\ $(TCLTOOLSDIR)\$(@B).c -link -out:$@
+
+$(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX)
+ $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(ITK_VERSION) $(DOCDIR:\=/)
+
+install-docs:
+!if exist($(HELPFILE))
+ @xcopy /i /y "$(HELPFILE)" "$(DOC_INSTALL_DIR)\"
+ @xcopy /i /y "$(HELPCNT)" "$(DOC_INSTALL_DIR)\"
+ $(TCLSH) <<
+puts "Installing $(PROJECT)'s helpfile contents into Tcl's ..."
+set f [open {$(DOC_INSTALL_DIR:\=/)/tcl$(TCL_VERSION).cnt} r]
+while {![eof $$f]} {
+ if {[regexp {:Include $(PROJECT)([0-9]{2}).cnt} [gets $$f] dummy ver]} {
+ if {$$ver == $(ITK_VERSION)} {
+ puts "Already installed."
+ exit
+ } else {
+ # do something here logical to remove (or replace) it.
+ puts "$$ver != $(ITK_VERSION), unfinished code path, die, die!"
+ exit 1
+ }
+ }
+}
+close $$f
+set f [open {$(DOC_INSTALL_DIR:\=/)/tcl$(TCL_VERSION).cnt} a]
+puts $$f {:Include $(HLPBASE).cnt}
+close $$f
+<<
+ start /wait winhlp32 -g $(DOC_INSTALL_DIR)\tcl$(TCL_VERSION).hlp
+!endif
+
+#---------------------------------------------------------------------
+# 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/nmakehlp.c b/itcl/itk/win/nmakehlp.c
new file mode 100644
index 00000000000..547b1c17520
--- /dev/null
+++ b/itcl/itk/win/nmakehlp.c
@@ -0,0 +1,359 @@
+/* ----------------------------------------------------------------------------
+ * nmakehlp.c --
+ *
+ * This is used to fix limitations within nmake and the environment.
+ *
+ * Copyright (c) 2002 by David Gravereaux.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * ----------------------------------------------------------------------------
+ * RCS: @(#) $Id$
+ * ----------------------------------------------------------------------------
+ */
+#include <windows.h>
+#pragma comment (lib, "user32.lib")
+#pragma comment (lib, "kernel32.lib")
+#include <stdio.h>
+#include <math.h>
+
+/* protos */
+int CheckForCompilerFeature (const char *option);
+int CheckForLinkerFeature (const char *option);
+int IsIn (const char *string, const char *substring);
+int GrepForDefine (const char *file, const char *string);
+DWORD WINAPI ReadFromPipe (LPVOID args);
+
+/* globals */
+#define CHUNK 25
+#define STATICBUFFERSIZE 1000
+typedef struct {
+ HANDLE pipe;
+ char buffer[STATICBUFFERSIZE];
+} pipeinfo;
+
+pipeinfo Out = {INVALID_HANDLE_VALUE, '\0'};
+pipeinfo Err = {INVALID_HANDLE_VALUE, '\0'};
+
+
+
+/* exitcodes: 0 == no, 1 == yes, 2 == error */
+int
+main (int argc, char *argv[])
+{
+ char msg[300];
+ DWORD dwWritten;
+ int chars;
+
+ /* make sure children (cl.exe and link.exe) are kept quiet. */
+ SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
+
+ /* Make sure the compiler and linker aren't effected by the outside world. */
+ SetEnvironmentVariable("CL", "");
+ SetEnvironmentVariable("LINK", "");
+
+ if (argc > 1 && *argv[1] == '-') {
+ switch (*(argv[1]+1)) {
+ case 'c':
+ if (argc != 3) {
+ chars = wsprintf(msg, "usage: %s -c <compiler option>\n"
+ "Tests for whether cl.exe supports an option\n"
+ "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+ }
+ return CheckForCompilerFeature(argv[2]);
+ case 'l':
+ if (argc != 3) {
+ chars = wsprintf(msg, "usage: %s -l <linker option>\n"
+ "Tests for whether link.exe supports an option\n"
+ "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+ }
+ return CheckForLinkerFeature(argv[2]);
+ case 'f':
+ if (argc == 2) {
+ chars = wsprintf(msg, "usage: %s -f <string> <substring>\n"
+ "Find a substring within another\n"
+ "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+ } else if (argc == 3) {
+ /* if the string is blank, there is no match */
+ return 0;
+ } else {
+ return IsIn(argv[2], argv[3]);
+ }
+ case 'g':
+ if (argc == 2) {
+ chars = wsprintf(msg, "usage: %s -g <file> <string>\n"
+ "grep for a #define\n"
+ "exitcodes: integer of the found string (no decimals)\n", argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+ }
+ return GrepForDefine(argv[2], argv[3]);
+ }
+ }
+ chars = wsprintf(msg, "usage: %s -c|-l|-f ...\n"
+ "This is a little helper app to equalize shell differences between WinNT and\n"
+ "Win9x and get nmake.exe to accomplish its job.\n",
+ argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
+ return 2;
+}
+
+int
+CheckForCompilerFeature (const char *option)
+{
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ SECURITY_ATTRIBUTES sa;
+ DWORD threadID;
+ char msg[300];
+ BOOL ok;
+ HANDLE hProcess, h, pipeThreads[2];
+ char cmdline[100];
+
+ hProcess = GetCurrentProcess();
+
+ ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
+ ZeroMemory(&si, sizeof(STARTUPINFO));
+ si.cb = sizeof(STARTUPINFO);
+ si.dwFlags = STARTF_USESTDHANDLES;
+ si.hStdInput = INVALID_HANDLE_VALUE;
+
+ ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = FALSE;
+
+ /* create a non-inheritible pipe. */
+ CreatePipe(&Out.pipe, &h, &sa, 0);
+
+ /* dupe the write side, make it inheritible, and close the original. */
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* Same as above, but for the error side. */
+ CreatePipe(&Err.pipe, &h, &sa, 0);
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdError,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* base command line */
+ strcpy(cmdline, "cl.exe -nologo -c -TC -Zs -X ");
+ /* append our option for testing */
+ strcat(cmdline, option);
+ /* filename to compile, which exists, but is nothing and empty. */
+ strcat(cmdline, " .\\nul");
+
+ ok = CreateProcess(
+ NULL, /* Module name. */
+ cmdline, /* Command line. */
+ NULL, /* Process handle not inheritable. */
+ NULL, /* Thread handle not inheritable. */
+ TRUE, /* yes, inherit handles. */
+ DETACHED_PROCESS, /* No console for you. */
+ NULL, /* Use parent's environment block. */
+ NULL, /* Use parent's starting directory. */
+ &si, /* Pointer to STARTUPINFO structure. */
+ &pi); /* Pointer to PROCESS_INFORMATION structure. */
+
+ if (!ok) {
+ DWORD err = GetLastError();
+ int chars = wsprintf(msg, "Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
+
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS |
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID) &msg[chars],
+ (300-chars), 0);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, strlen(msg), &err, NULL);
+ return 2;
+ }
+
+ /* close our references to the write handles that have now been inherited. */
+ CloseHandle(si.hStdOutput);
+ CloseHandle(si.hStdError);
+
+ WaitForInputIdle(pi.hProcess, 5000);
+ CloseHandle(pi.hThread);
+
+ /* start the pipe reader threads. */
+ pipeThreads[0] = CreateThread(NULL, 0, ReadFromPipe, &Out, 0, &threadID);
+ pipeThreads[1] = CreateThread(NULL, 0, ReadFromPipe, &Err, 0, &threadID);
+
+ /* block waiting for the process to end. */
+ WaitForSingleObject(pi.hProcess, INFINITE);
+ CloseHandle(pi.hProcess);
+
+ /* wait for our pipe to get done reading, should it be a little slow. */
+ WaitForMultipleObjects(2, pipeThreads, TRUE, 500);
+ CloseHandle(pipeThreads[0]);
+ CloseHandle(pipeThreads[1]);
+
+ /* look for the commandline warning code in both streams. */
+ return !(strstr(Out.buffer, "D4002") != NULL || strstr(Err.buffer, "D4002") != NULL);
+}
+
+int
+CheckForLinkerFeature (const char *option)
+{
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ SECURITY_ATTRIBUTES sa;
+ DWORD threadID;
+ char msg[300];
+ BOOL ok;
+ HANDLE hProcess, h, pipeThreads[2];
+ char cmdline[100];
+
+ hProcess = GetCurrentProcess();
+
+ ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
+ ZeroMemory(&si, sizeof(STARTUPINFO));
+ si.cb = sizeof(STARTUPINFO);
+ si.dwFlags = STARTF_USESTDHANDLES;
+ si.hStdInput = INVALID_HANDLE_VALUE;
+
+ ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = TRUE;
+
+ /* create a non-inheritible pipe. */
+ CreatePipe(&Out.pipe, &h, &sa, 0);
+
+ /* dupe the write side, make it inheritible, and close the original. */
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* Same as above, but for the error side. */
+ CreatePipe(&Err.pipe, &h, &sa, 0);
+ DuplicateHandle(hProcess, h, hProcess, &si.hStdError,
+ 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+
+ /* base command line */
+ strcpy(cmdline, "link.exe -nologo ");
+ /* append our option for testing */
+ strcat(cmdline, option);
+
+ ok = CreateProcess(
+ NULL, /* Module name. */
+ cmdline, /* Command line. */
+ NULL, /* Process handle not inheritable. */
+ NULL, /* Thread handle not inheritable. */
+ TRUE, /* yes, inherit handles. */
+ DETACHED_PROCESS, /* No console for you. */
+ NULL, /* Use parent's environment block. */
+ NULL, /* Use parent's starting directory. */
+ &si, /* Pointer to STARTUPINFO structure. */
+ &pi); /* Pointer to PROCESS_INFORMATION structure. */
+
+ if (!ok) {
+ DWORD err = GetLastError();
+ int chars = wsprintf(msg, "Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
+
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS |
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID) &msg[chars],
+ (300-chars), 0);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, strlen(msg), &err, NULL);
+ return 2;
+ }
+
+ /* close our references to the write handles that have now been inherited. */
+ CloseHandle(si.hStdOutput);
+ CloseHandle(si.hStdError);
+
+ WaitForInputIdle(pi.hProcess, 5000);
+ CloseHandle(pi.hThread);
+
+ /* start the pipe reader threads. */
+ pipeThreads[0] = CreateThread(NULL, 0, ReadFromPipe, &Out, 0, &threadID);
+ pipeThreads[1] = CreateThread(NULL, 0, ReadFromPipe, &Err, 0, &threadID);
+
+ /* block waiting for the process to end. */
+ WaitForSingleObject(pi.hProcess, INFINITE);
+ CloseHandle(pi.hProcess);
+
+ /* wait for our pipe to get done reading, should it be a little slow. */
+ WaitForMultipleObjects(2, pipeThreads, TRUE, 500);
+ CloseHandle(pipeThreads[0]);
+ CloseHandle(pipeThreads[1]);
+
+ /* look for the commandline warning code in the stderr stream. */
+ return !(strstr(Out.buffer, "LNK1117") != NULL || strstr(Err.buffer, "LNK1117") != NULL);
+}
+
+DWORD WINAPI
+ReadFromPipe (LPVOID args)
+{
+ pipeinfo *pi = (pipeinfo *) args;
+ char *lastBuf = pi->buffer;
+ DWORD dwRead;
+ BOOL ok;
+
+again:
+ if (lastBuf - pi->buffer + CHUNK > STATICBUFFERSIZE) {
+ CloseHandle(pi->pipe);
+ return -1;
+ }
+ ok = ReadFile(pi->pipe, lastBuf, CHUNK, &dwRead, 0L);
+ if (!ok || dwRead == 0) {
+ CloseHandle(pi->pipe);
+ return 0;
+ }
+ lastBuf += dwRead;
+ goto again;
+
+ return 0; /* makes the compiler happy */
+}
+
+int
+IsIn (const char *string, const char *substring)
+{
+ return (strstr(string, substring) != NULL);
+}
+
+/*
+ * Find a specified #define by name.
+ *
+ * If the line is '#define TCL_VERSION "8.5"', it returns
+ * 85 as the result.
+ */
+
+int
+GrepForDefine (const char *file, const char *string)
+{
+ FILE *f;
+ char s1[51], s2[51], s3[51];
+ int r = 0;
+ double d1;
+
+ f = fopen(file, "rt");
+ if (f == NULL) {
+ return 0;
+ }
+
+ do {
+ r = fscanf(f, "%50s", s1);
+ if (r == 1 && !strcmp(s1, "#define")) {
+ /* get next two words */
+ r = fscanf(f, "%50s %50s", s2, s3);
+ if (r != 2) continue;
+ /* is the first word what we're looking for? */
+ if (!strcmp(s2, string)) {
+ fclose(f);
+ /* add 1 past first double quote char. "8.5" */
+ d1 = atof(s3 + 1); /* 8.5 */
+ while (floor(d1) != d1) {
+ d1 *= 10.0;
+ }
+ return ((int) d1); /* 85 */
+ }
+ }
+ } while (!feof(f));
+
+ fclose(f);
+ return 0;
+}
diff --git a/itcl/itk/win/rc/itk.rc b/itcl/itk/win/rc/itk.rc
index 47511b1b7f7..fef870665d6 100644
--- a/itcl/itk/win/rc/itk.rc
+++ b/itcl/itk/win/rc/itk.rc
@@ -1,62 +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
-#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"
-
+// RCS: @(#) $Id$
+//
+// Version resource script.
+//
+
+#include <winver.h>
+#include <itcl.h>
+#include <itk.h>
+
+//
+// build-up the name suffix that defines the type of build this is.
+//
+#if DEBUG
+#define SUFFIX_DEBUG "g"
+#else
+#define SUFFIX_DEBUG ""
+#endif
+
+#define SUFFIX SUFFIX_DEBUG
+
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION ITK_MAJOR_VERSION,ITK_MINOR_VERSION,ITK_RELEASE_LEVEL,ITK_RELEASE_SERIAL
+ PRODUCTVERSION ITK_MAJOR_VERSION,ITK_MINOR_VERSION,ITK_RELEASE_LEVEL,ITK_RELEASE_SERIAL
+ 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(ITK_MAJOR_VERSION) STRINGIFY(ITK_MINOR_VERSION) SUFFIX ".dll\0"
+ VALUE "CompanyName", "Bell Labs Innovations for Lucent Technologies\0"
+ VALUE "FileVersion", ITK_PATCH_LEVEL
+ VALUE "LegalCopyright", "Copyright \251 1993-2003\0"
+ VALUE "ProductName", "[Incr Tk] " ITK_VERSION " for Windows\0"
+ VALUE "ProductVersion", ITK_PATCH_LEVEL
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+//
+// Icons
+//
+
+toaster ICON DISCARDABLE "itk.ico"
diff --git a/itcl/itk/win/toaster.bmp b/itcl/itk/win/toaster.bmp
new file mode 100644
index 00000000000..5ea80e6e353
--- /dev/null
+++ b/itcl/itk/win/toaster.bmp
Binary files differ
diff --git a/itcl/iwidgets/Makefile.in b/itcl/iwidgets/Makefile.in
index badce221550..8507f8df184 100644
--- a/itcl/iwidgets/Makefile.in
+++ b/itcl/iwidgets/Makefile.in
@@ -39,11 +39,7 @@ bindir = @bindir@
INSTALL_ROOT =
# Path name to use when installing library scripts:
-
-# REDHAT LOCAL
-#SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/lib/iwidgets$(IWIDGETS_VERSION)
-SCRIPT_INSTALL_DIR = @datadir@/iwidgets$(IWIDGETS_VERSION)
-# END REDHAT LOCAL
+SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/lib/iwidgets$(IWIDGETS_VERSION)
# Directory in which to install the archive libtcl.a:
LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
@@ -82,11 +78,7 @@ SHELL = /bin/sh
# modify any of this stuff by hand.
#----------------------------------------------------------------
-# REDHAT LOCAL
-#INSTALL = $(TCLSH_PROG) `$(CYGPATH) $(ITCL_SRC_DIR)/../config/installFile.tcl` -c
-INSTALL = @INSTALL@
-# END REDHAT LOCAL
-
+INSTALL = $(TCLSH_PROG) `$(CYGPATH) $(ITCL_SRC_DIR)/../config/installFile.tcl` -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_SCRIPT = $(INSTALL) -m 555
@@ -129,9 +121,7 @@ test:
install-libraries:
@$(MKINSTALLDIRS) $(SCRIPT_INSTALL_DIR) $(LIB_INSTALL_DIR)
@rm -f $(LIB_INSTALL_DIR)/iwidgets
-# REDHAT LOCAL
-# $(LN_S) $(SCRIPT_INSTALL_DIR) $(LIB_INSTALL_DIR)/iwidgets
-# END REDHAT LOCAL
+ $(LN_S) $(SCRIPT_INSTALL_DIR) $(LIB_INSTALL_DIR)/iwidgets
@$(MKINSTALLDIRS) $(SCRIPT_INSTALL_DIR)/scripts
@echo "Installing source files from $(GENERIC_DIR) into $(SCRIPT_INSTALL_DIR)"
@for i in $(GENERIC_DIR)/*.itk $(GENERIC_DIR)/*.itcl $(GENERIC_DIR)/tclIndex $(GENERIC_DIR)/*.gif ; \
diff --git a/itcl/iwidgets/configure b/itcl/iwidgets/configure
index ab9ff8543d9..2ddcbe0a994 100755
--- a/itcl/iwidgets/configure
+++ b/itcl/iwidgets/configure
@@ -17,8 +17,6 @@ ac_help="$ac_help
--with-tk directory containing tk configuration (tkConfig.sh)"
ac_help="$ac_help
--with-itcl=DIR use Itcl 3.0 binaries from DIR"
-ac_help="$ac_help
- --with-itk=DIR use Itk 3.0 binaries from DIR"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -531,11 +529,6 @@ fi
# RCS: $Id$
-#--------------------------------------------------------------------
-# We should really cache the ITCL_VERSION when we configure itcl,
-# and pick up the version from the cache here.
-#--------------------------------------------------------------------
-
ITCL_VERSION=3.2
@@ -545,94 +538,11 @@ MINOR_VERSION=0
PATCHLEVEL=.1
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
+IWIDGETS_SRC_DIR=`pwd`
-ac_aux_dir=
-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"
- 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 ../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.
-
-
-
-# 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:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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:586: 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
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
case "`uname -s`" in
@@ -671,7 +581,7 @@ if test "${with_tcl+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:675: checking for Tcl configuration" >&5
+echo "configure:585: 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
@@ -741,7 +651,7 @@ fi
echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
-echo "configure:745: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
+echo "configure:655: 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
@@ -797,7 +707,7 @@ if test "${with_tk+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:801: checking for Tk configuration" >&5
+echo "configure:711: 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
@@ -865,7 +775,7 @@ fi
echo $ac_n "checking for existence of $TK_BIN_DIR/tkConfig.sh""... $ac_c" 1>&6
-echo "configure:869: checking for existence of $TK_BIN_DIR/tkConfig.sh" >&5
+echo "configure:779: 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
@@ -881,8 +791,9 @@ echo "configure:869: checking for existence of $TK_BIN_DIR/tkConfig.sh" >&5
#--------------------------------------------------------------------
-# See if there was a command-line option for where Itcl is; if
-# not, search for Itcl.
+# See if --with-itcl was specified to give the [incr Tcl] and [incr Tk]
+# source code location. If not, then we'll assume that the Iwidgets
+# package is being installed directly beneath the toplevel Itcl directory.
#--------------------------------------------------------------------
# Check whether --with-itcl or --without-itcl was given.
@@ -890,61 +801,67 @@ if test "${with_itcl+set}" = set; then
withval="$with_itcl"
itcl_search=$withval
else
- itcl_search=`cd ${srcdir}/../itcl; pwd`
+ itcl_search=`cd ${IWIDGETS_SRC_DIR}/..; pwd`
fi
ITCL_LIB_DIR=""
-for dir in $exec_prefix/lib $TCL_LIB_DIR $itcl_search ; do
- if test -r $dir/library/itcl.tcl; then
- ITCL_LIB_DIR=$dir
- ITCL_SRC_DIR=$dir
- break
+if test -r $itcl_search/itcl/library/itcl.tcl; then
+ if test -r $itcl_search/itk/library/itk.tcl; then
+ if test -r $itcl_search/config/mkinstalldirs; then
+ ITCL_LIB_DIR=$itcl_search/itcl/library
+ ITCL_SRC_DIR=$itcl_search/itcl
+ ITK_LIB_DIR=$itcl_search/itk/library
+ ITK_SRC_DIR=$itcl_search/itk
+ fi
fi
-done
+fi
if test -z "$ITCL_LIB_DIR"; then
- { echo "configure: error: Can't find Itcl libraries. Use --with-itcl to specify the directory containing itcl.tcl on your system." 1>&2; exit 1; }
+ { echo "configure: error: Can't find Itcl source. Use --with-itcl to specify the the toplevel incr Tcl directory on your system. (This directory should contain itcl/library/itcl.tcl, itk/library/itk.tcl, and config/mkinstalldirs.)" 1>&2; exit 1; }
fi
+
#--------------------------------------------------------------------
-# See if there was a command-line option for where Itk is; if
-# not, search for Itk.
+# Needed for running the test suite
#--------------------------------------------------------------------
-# Check whether --with-itk or --without-itk was given.
-if test "${with_itk+set}" = set; then
- withval="$with_itk"
- itk_search=$withval
+
+ echo $ac_n "checking for tclsh""... $ac_c" 1>&6
+echo "configure:832: checking for tclsh" >&5
+
+ if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- itk_search=`cd ${srcdir}/../itk; pwd`
+
+ 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
-ITK_LIB_DIR=""
-for dir in $exec_prefix/lib $TCL_LIB_DIR $itk_search ; do
- if test -r $dir/library/itk.tcl; then
- ITK_LIB_DIR=$dir
- ITK_SRC_DIR=$dir
- break
+ 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
-done
-
-if test -z "$ITK_LIB_DIR"; then
- { echo "configure: error: Can't find Itk libraries. Use --with-itk to specify the directory containing itk.tcl on your system." 1>&2; exit 1; }
-fi
-
-#--------------------------------------------------------------------
-# Needed for running the test suite
-#--------------------------------------------------------------------
+
-# CYGNUS LOCAL
-# END CYGNUS LOCAL
#--------------------------------------------------------------------
# Fill in template files with the proper info.
#--------------------------------------------------------------------
-#AC_SUBST(BUILD_DIR)
@@ -953,12 +870,6 @@ fi
-
-#AC_SUBST(ITCL_VERSION)
-#AC_SUBST(IWIDGETS_VERSION)
-#AC_SUBST(IWIDGETS_LIBRARY)
-#AC_SUBST(IWIDGETS_SRC_DIR)
-
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -1025,34 +936,15 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
# Without the "./", some shells look in PATH for config.status.
@@ -1089,7 +981,6 @@ do
done
ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "Makefile \
iwidgets.tcl \
@@ -1128,9 +1019,6 @@ s%@mandir@%$mandir%g
s%@ITCL_VERSION@%$ITCL_VERSION%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@CYGPATH@%$CYGPATH%g
s%@RELPATH@%$RELPATH%g
s%@TCL_DBGX@%$TCL_DBGX%g
@@ -1151,12 +1039,12 @@ s%@TK_BIN_DIR@%$TK_BIN_DIR%g
s%@TK_SRC_DIR@%$TK_SRC_DIR%g
s%@TK_LIB_FILE@%$TK_LIB_FILE%g
s%@TK_XINCLUDES@%$TK_XINCLUDES%g
-s%@TCL_LIB_DIR@%$TCL_LIB_DIR%g
-s%@TK_LIB_DIR@%$TK_LIB_DIR%g
+s%@TCLSH_PROG@%$TCLSH_PROG%g
s%@ITCL_LIB_DIR@%$ITCL_LIB_DIR%g
s%@ITCL_SRC_DIR@%$ITCL_SRC_DIR%g
s%@ITK_LIB_DIR@%$ITK_LIB_DIR%g
s%@ITK_SRC_DIR@%$ITK_SRC_DIR%g
+s%@IWIDGETS_SRC_DIR@%$IWIDGETS_SRC_DIR%g
CEOF
EOF
@@ -1235,10 +1123,6 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
echo creating "$ac_file"
rm -f "$ac_file"
@@ -1254,7 +1138,6 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
diff --git a/itcl/iwidgets/configure.in b/itcl/iwidgets/configure.in
index 05afed90aed..184c9374f9f 100644
--- a/itcl/iwidgets/configure.in
+++ b/itcl/iwidgets/configure.in
@@ -5,11 +5,6 @@ dnl installation to configure the system for the local environment.
AC_INIT(generic/buttonbox.itk)
# RCS: $Id$
-#--------------------------------------------------------------------
-# We should really cache the ITCL_VERSION when we configure itcl,
-# and pick up the version from the cache here.
-#--------------------------------------------------------------------
-
ITCL_VERSION=3.2
AC_SUBST(ITCL_VERSION)
@@ -19,15 +14,13 @@ MINOR_VERSION=0
PATCHLEVEL=.1
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
+IWIDGETS_SRC_DIR=`pwd`
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
-AC_CONFIG_AUX_DIR(../config)
AC_PREREQ(2.0)
-AC_PROG_INSTALL
-
case "`uname -s`" in
*win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
CYGPATH="cygpath -w"
@@ -59,72 +52,47 @@ SC_PATH_TKCONFIG
SC_LOAD_TKCONFIG
#--------------------------------------------------------------------
-# See if there was a command-line option for where Itcl is; if
-# not, search for Itcl.
+# See if --with-itcl was specified to give the [incr Tcl] and [incr Tk]
+# source code location. If not, then we'll assume that the Iwidgets
+# package is being installed directly beneath the toplevel Itcl directory.
#--------------------------------------------------------------------
AC_ARG_WITH(itcl, [ --with-itcl=DIR use Itcl 3.0 binaries from DIR],
- itcl_search=$withval, itcl_search=`cd ${srcdir}/../itcl; pwd`)
+ itcl_search=$withval, itcl_search=`cd ${IWIDGETS_SRC_DIR}/..; pwd`)
ITCL_LIB_DIR=""
-for dir in $exec_prefix/lib $TCL_LIB_DIR $itcl_search ; do
- if test -r $dir/library/itcl.tcl; then
- ITCL_LIB_DIR=$dir
- ITCL_SRC_DIR=$dir
- break
+if test -r $itcl_search/itcl/library/itcl.tcl; then
+ if test -r $itcl_search/itk/library/itk.tcl; then
+ if test -r $itcl_search/config/mkinstalldirs; then
+ ITCL_LIB_DIR=$itcl_search/itcl/library
+ ITCL_SRC_DIR=$itcl_search/itcl
+ ITK_LIB_DIR=$itcl_search/itk/library
+ ITK_SRC_DIR=$itcl_search/itk
+ fi
fi
-done
+fi
if test -z "$ITCL_LIB_DIR"; then
- AC_MSG_ERROR(Can't find Itcl libraries. Use --with-itcl to specify the directory containing itcl.tcl on your system.)
+ AC_MSG_ERROR(Can't find Itcl source. Use --with-itcl to specify the the toplevel [incr Tcl] directory on your system. (This directory should contain itcl/library/itcl.tcl, itk/library/itk.tcl, and config/mkinstalldirs.))
fi
-#--------------------------------------------------------------------
-# See if there was a command-line option for where Itk is; if
-# not, search for Itk.
-#--------------------------------------------------------------------
-
-AC_ARG_WITH(itk, [ --with-itk=DIR use Itk 3.0 binaries from DIR],
- itk_search=$withval, itk_search=`cd ${srcdir}/../itk; pwd`)
-
-ITK_LIB_DIR=""
-for dir in $exec_prefix/lib $TCL_LIB_DIR $itk_search ; do
- if test -r $dir/library/itk.tcl; then
- ITK_LIB_DIR=$dir
- ITK_SRC_DIR=$dir
- break
- fi
-done
-
-if test -z "$ITK_LIB_DIR"; then
- AC_MSG_ERROR(Can't find Itk libraries. Use --with-itk to specify the directory containing itk.tcl on your system.)
-fi
#--------------------------------------------------------------------
# Needed for running the test suite
#--------------------------------------------------------------------
-# CYGNUS LOCAL
-dnl SC_PROG_TCLSH
-# END CYGNUS LOCAL
+SC_PROG_TCLSH
#--------------------------------------------------------------------
# Fill in template files with the proper info.
#--------------------------------------------------------------------
-#AC_SUBST(BUILD_DIR)
-AC_SUBST(TCL_LIB_DIR)
AC_SUBST(TCL_SRC_DIR)
-AC_SUBST(TK_LIB_DIR)
AC_SUBST(TK_SRC_DIR)
AC_SUBST(ITCL_LIB_DIR)
AC_SUBST(ITCL_SRC_DIR)
AC_SUBST(ITK_LIB_DIR)
AC_SUBST(ITK_SRC_DIR)
-
-#AC_SUBST(ITCL_VERSION)
-#AC_SUBST(IWIDGETS_VERSION)
-#AC_SUBST(IWIDGETS_LIBRARY)
-#AC_SUBST(IWIDGETS_SRC_DIR)
+AC_SUBST(IWIDGETS_SRC_DIR)
AC_OUTPUT(Makefile \
iwidgets.tcl \