Imported Upstream version 8.6.4 upstream/8.6.4
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 18 Dec 2020 03:14:04 +0000 (12:14 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 18 Dec 2020 03:14:04 +0000 (12:14 +0900)
464 files changed:
README
changes
compat/license.terms
doc/CrtChannel.3
doc/Encoding.3
doc/exec.n
doc/file.n
doc/glob.n
doc/license.terms
doc/open.n
doc/socket.n
doc/tcltest.n
doc/tclvars.n
generic/regcomp.c
generic/regexec.c
generic/regguts.h
generic/tcl.h
generic/tclCompCmds.c
generic/tclCompCmdsGR.c
generic/tclCompExpr.c
generic/tclCompile.c
generic/tclCompile.h
generic/tclEncoding.c
generic/tclEvent.c
generic/tclExecute.c
generic/tclFileName.c
generic/tclIO.c
generic/tclIOSock.c
generic/tclInt.h
generic/tclParse.c
generic/tclThread.c
generic/tclVar.c
library/init.tcl
library/license.terms
library/tzdata/Africa/Addis_Ababa
library/tzdata/Africa/Asmara
library/tzdata/Africa/Asmera
library/tzdata/Africa/Bangui
library/tzdata/Africa/Bissau
library/tzdata/Africa/Blantyre
library/tzdata/Africa/Brazzaville
library/tzdata/Africa/Bujumbura
library/tzdata/Africa/Dar_es_Salaam
library/tzdata/Africa/Djibouti
library/tzdata/Africa/Douala
library/tzdata/Africa/Gaborone
library/tzdata/Africa/Harare
library/tzdata/Africa/Kampala
library/tzdata/Africa/Kigali
library/tzdata/Africa/Kinshasa
library/tzdata/Africa/Libreville
library/tzdata/Africa/Luanda
library/tzdata/Africa/Lubumbashi
library/tzdata/Africa/Lusaka
library/tzdata/Africa/Malabo
library/tzdata/Africa/Maseru
library/tzdata/Africa/Mbabane
library/tzdata/Africa/Mogadishu
library/tzdata/Africa/Niamey
library/tzdata/Africa/Porto-Novo
library/tzdata/America/Cancun
library/tzdata/America/Grand_Turk
library/tzdata/America/Jamaica
library/tzdata/America/Santiago
library/tzdata/Antarctica/Palmer
library/tzdata/Antarctica/Troll [new file with mode: 0644]
library/tzdata/Asia/Aden
library/tzdata/Asia/Bahrain
library/tzdata/Asia/Chita [new file with mode: 0644]
library/tzdata/Asia/Dhaka
library/tzdata/Asia/Ho_Chi_Minh
library/tzdata/Asia/Irkutsk
library/tzdata/Asia/Krasnoyarsk
library/tzdata/Asia/Kuwait
library/tzdata/Asia/Muscat
library/tzdata/Asia/Novokuznetsk
library/tzdata/Asia/Omsk
library/tzdata/Asia/Phnom_Penh
library/tzdata/Asia/Pyongyang
library/tzdata/Asia/Samarkand
library/tzdata/Asia/Seoul
library/tzdata/Asia/Srednekolymsk [new file with mode: 0644]
library/tzdata/Asia/Tbilisi
library/tzdata/Asia/Vientiane
library/tzdata/Asia/Vladivostok
library/tzdata/Asia/Yakutsk
library/tzdata/Asia/Yekaterinburg
library/tzdata/Atlantic/Azores
library/tzdata/Atlantic/Madeira
library/tzdata/Atlantic/Reykjavik
library/tzdata/Europe/Lisbon
library/tzdata/Europe/Minsk
library/tzdata/Europe/Riga
library/tzdata/Europe/Samara
library/tzdata/Indian/Antananarivo
library/tzdata/Indian/Comoro
library/tzdata/Indian/Mayotte
library/tzdata/Pacific/Bougainville [new file with mode: 0644]
library/tzdata/Pacific/Easter
library/tzdata/Pacific/Fiji
license.terms
macosx/GNUmakefile
macosx/configure
macosx/configure.ac
macosx/license.terms
macosx/tclMacOSXNotify.c
pkgs/README
pkgs/itcl4.0.2/configure [deleted file]
pkgs/itcl4.0.3/ChangeLog [moved from pkgs/itcl4.0.2/ChangeLog with 100% similarity]
pkgs/itcl4.0.3/Makefile.in [moved from pkgs/itcl4.0.2/Makefile.in with 100% similarity]
pkgs/itcl4.0.3/README [moved from pkgs/itcl4.0.2/README with 100% similarity]
pkgs/itcl4.0.3/TODO [moved from pkgs/itcl4.0.2/TODO with 100% similarity]
pkgs/itcl4.0.3/aclocal.m4 [moved from pkgs/itcl4.0.2/aclocal.m4 with 100% similarity]
pkgs/itcl4.0.3/configure [new file with mode: 0755]
pkgs/itcl4.0.3/configure.in [moved from pkgs/itcl4.0.2/configure.in with 99% similarity]
pkgs/itcl4.0.3/doc/Class.3 [moved from pkgs/itcl4.0.2/doc/Class.3 with 100% similarity]
pkgs/itcl4.0.3/doc/List.3 [moved from pkgs/itcl4.0.2/doc/List.3 with 100% similarity]
pkgs/itcl4.0.3/doc/Object.3 [moved from pkgs/itcl4.0.2/doc/Object.3 with 100% similarity]
pkgs/itcl4.0.3/doc/Preserve.3 [moved from pkgs/itcl4.0.2/doc/Preserve.3 with 100% similarity]
pkgs/itcl4.0.3/doc/RegisterC.3 [moved from pkgs/itcl4.0.2/doc/RegisterC.3 with 100% similarity]
pkgs/itcl4.0.3/doc/Stack.3 [moved from pkgs/itcl4.0.2/doc/Stack.3 with 100% similarity]
pkgs/itcl4.0.3/doc/body.n [moved from pkgs/itcl4.0.2/doc/body.n with 100% similarity]
pkgs/itcl4.0.3/doc/class.n [moved from pkgs/itcl4.0.2/doc/class.n with 100% similarity]
pkgs/itcl4.0.3/doc/code.n [moved from pkgs/itcl4.0.2/doc/code.n with 100% similarity]
pkgs/itcl4.0.3/doc/configbody.n [moved from pkgs/itcl4.0.2/doc/configbody.n with 100% similarity]
pkgs/itcl4.0.3/doc/delete.n [moved from pkgs/itcl4.0.2/doc/delete.n with 100% similarity]
pkgs/itcl4.0.3/doc/ensemble.n [moved from pkgs/itcl4.0.2/doc/ensemble.n with 100% similarity]
pkgs/itcl4.0.3/doc/find.n [moved from pkgs/itcl4.0.2/doc/find.n with 100% similarity]
pkgs/itcl4.0.3/doc/is.n [moved from pkgs/itcl4.0.2/doc/is.n with 100% similarity]
pkgs/itcl4.0.3/doc/itcl.n [moved from pkgs/itcl4.0.2/doc/itcl.n with 100% similarity]
pkgs/itcl4.0.3/doc/itclcomponent.n [moved from pkgs/itcl4.0.2/doc/itclcomponent.n with 100% similarity]
pkgs/itcl4.0.3/doc/itcldelegate.n [moved from pkgs/itcl4.0.2/doc/itcldelegate.n with 100% similarity]
pkgs/itcl4.0.3/doc/itclextendedclass.n [moved from pkgs/itcl4.0.2/doc/itclextendedclass.n with 100% similarity]
pkgs/itcl4.0.3/doc/itcloption.n [moved from pkgs/itcl4.0.2/doc/itcloption.n with 100% similarity]
pkgs/itcl4.0.3/doc/itclvars.n [moved from pkgs/itcl4.0.2/doc/itclvars.n with 100% similarity]
pkgs/itcl4.0.3/doc/itclwidget.n [moved from pkgs/itcl4.0.2/doc/itclwidget.n with 100% similarity]
pkgs/itcl4.0.3/doc/license.terms [moved from pkgs/itcl4.0.2/doc/license.terms with 100% similarity]
pkgs/itcl4.0.3/doc/local.n [moved from pkgs/itcl4.0.2/doc/local.n with 100% similarity]
pkgs/itcl4.0.3/doc/man.macros [moved from pkgs/itcl4.0.2/doc/man.macros with 100% similarity]
pkgs/itcl4.0.3/doc/scope.n [moved from pkgs/itcl4.0.2/doc/scope.n with 100% similarity]
pkgs/itcl4.0.3/generic/itcl.decls [moved from pkgs/itcl4.0.2/generic/itcl.decls with 100% similarity]
pkgs/itcl4.0.3/generic/itcl.h [moved from pkgs/itcl4.0.2/generic/itcl.h with 98% similarity]
pkgs/itcl4.0.3/generic/itcl2TclOO.c [moved from pkgs/itcl4.0.2/generic/itcl2TclOO.c with 100% similarity]
pkgs/itcl4.0.3/generic/itcl2TclOO.h [moved from pkgs/itcl4.0.2/generic/itcl2TclOO.h with 100% similarity]
pkgs/itcl4.0.3/generic/itclBase.c [moved from pkgs/itcl4.0.2/generic/itclBase.c with 99% similarity]
pkgs/itcl4.0.3/generic/itclBuiltin.c [moved from pkgs/itcl4.0.2/generic/itclBuiltin.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclClass.c [moved from pkgs/itcl4.0.2/generic/itclClass.c with 99% similarity]
pkgs/itcl4.0.3/generic/itclCmd.c [moved from pkgs/itcl4.0.2/generic/itclCmd.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclDecls.h [moved from pkgs/itcl4.0.2/generic/itclDecls.h with 100% similarity]
pkgs/itcl4.0.3/generic/itclEnsemble.c [moved from pkgs/itcl4.0.2/generic/itclEnsemble.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclHelpers.c [moved from pkgs/itcl4.0.2/generic/itclHelpers.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclInfo.c [moved from pkgs/itcl4.0.2/generic/itclInfo.c with 99% similarity]
pkgs/itcl4.0.3/generic/itclInt.h [moved from pkgs/itcl4.0.2/generic/itclInt.h with 99% similarity]
pkgs/itcl4.0.3/generic/itclIntDecls.h [moved from pkgs/itcl4.0.2/generic/itclIntDecls.h with 100% similarity]
pkgs/itcl4.0.3/generic/itclLinkage.c [moved from pkgs/itcl4.0.2/generic/itclLinkage.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclMethod.c [moved from pkgs/itcl4.0.2/generic/itclMethod.c with 95% similarity]
pkgs/itcl4.0.3/generic/itclMigrate2TclCore.c [moved from pkgs/itcl4.0.2/generic/itclMigrate2TclCore.c with 96% similarity]
pkgs/itcl4.0.3/generic/itclMigrate2TclCore.h [moved from pkgs/itcl4.0.2/generic/itclMigrate2TclCore.h with 97% similarity]
pkgs/itcl4.0.3/generic/itclObject.c [moved from pkgs/itcl4.0.2/generic/itclObject.c with 99% similarity]
pkgs/itcl4.0.3/generic/itclParse.c [moved from pkgs/itcl4.0.2/generic/itclParse.c with 98% similarity]
pkgs/itcl4.0.3/generic/itclResolve.c [moved from pkgs/itcl4.0.2/generic/itclResolve.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclResolve2.c [moved from pkgs/itcl4.0.2/generic/itclResolve2.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclStubInit.c [moved from pkgs/itcl4.0.2/generic/itclStubInit.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclStubLib.c [moved from pkgs/itcl4.0.2/generic/itclStubLib.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclStubs.c [moved from pkgs/itcl4.0.2/generic/itclStubs.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclTclIntStubsFcn.c [moved from pkgs/itcl4.0.2/generic/itclTclIntStubsFcn.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclTclIntStubsFcn.h [moved from pkgs/itcl4.0.2/generic/itclTclIntStubsFcn.h with 100% similarity]
pkgs/itcl4.0.3/generic/itclTestRegisterC.c [moved from pkgs/itcl4.0.2/generic/itclTestRegisterC.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclUtil.c [moved from pkgs/itcl4.0.2/generic/itclUtil.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclVCInt.h [moved from pkgs/itcl4.0.2/generic/itclVCInt.h with 100% similarity]
pkgs/itcl4.0.3/generic/itclVarsAndCmds.c [moved from pkgs/itcl4.0.2/generic/itclVarsAndCmds.c with 100% similarity]
pkgs/itcl4.0.3/generic/itclVarsAndCmds.h [moved from pkgs/itcl4.0.2/generic/itclVarsAndCmds.h with 100% similarity]
pkgs/itcl4.0.3/itclConfig.sh.in [moved from pkgs/itcl4.0.2/itclConfig.sh.in with 100% similarity]
pkgs/itcl4.0.3/library/itcl.tcl [moved from pkgs/itcl4.0.2/library/itcl.tcl with 100% similarity]
pkgs/itcl4.0.3/library/itclHullCmds.tcl [moved from pkgs/itcl4.0.2/library/itclHullCmds.tcl with 100% similarity]
pkgs/itcl4.0.3/library/itclWidget.tcl [moved from pkgs/itcl4.0.2/library/itclWidget.tcl with 100% similarity]
pkgs/itcl4.0.3/library/test_Itcl_CreateObject.tcl [moved from pkgs/itcl4.0.2/library/test_Itcl_CreateObject.tcl with 100% similarity]
pkgs/itcl4.0.3/license.terms [moved from pkgs/itcl4.0.2/license.terms with 100% similarity]
pkgs/itcl4.0.3/pkgIndex.tcl.in [moved from pkgs/itcl4.0.2/pkgIndex.tcl.in with 100% similarity]
pkgs/itcl4.0.3/releasenotes.txt [moved from pkgs/itcl4.0.2/releasenotes.txt with 100% similarity]
pkgs/itcl4.0.3/tclconfig/install-sh [moved from pkgs/thread2.7.1/tclconfig/install-sh with 100% similarity]
pkgs/itcl4.0.3/tclconfig/tcl.m4 [moved from pkgs/tdbc1.0.2/tclconfig/tcl.m4 with 99% similarity]
pkgs/itcl4.0.3/tests/all.tcl [moved from pkgs/itcl4.0.2/tests/all.tcl with 100% similarity]
pkgs/itcl4.0.3/tests/basic.test [moved from pkgs/itcl4.0.2/tests/basic.test with 100% similarity]
pkgs/itcl4.0.3/tests/body.test [moved from pkgs/itcl4.0.2/tests/body.test with 100% similarity]
pkgs/itcl4.0.3/tests/chain.test [moved from pkgs/itcl4.0.2/tests/chain.test with 100% similarity]
pkgs/itcl4.0.3/tests/delete.test [moved from pkgs/itcl4.0.2/tests/delete.test with 100% similarity]
pkgs/itcl4.0.3/tests/eclasscomponent.test [moved from pkgs/itcl4.0.2/tests/eclasscomponent.test with 100% similarity]
pkgs/itcl4.0.3/tests/ensemble.test [moved from pkgs/itcl4.0.2/tests/ensemble.test with 100% similarity]
pkgs/itcl4.0.3/tests/general1.test [moved from pkgs/itcl4.0.2/tests/general1.test with 100% similarity]
pkgs/itcl4.0.3/tests/import.test [moved from pkgs/itcl4.0.2/tests/import.test with 100% similarity]
pkgs/itcl4.0.3/tests/info.test [moved from pkgs/itcl4.0.2/tests/info.test with 98% similarity]
pkgs/itcl4.0.3/tests/inherit.test [moved from pkgs/itcl4.0.2/tests/inherit.test with 100% similarity]
pkgs/itcl4.0.3/tests/interp.test [moved from pkgs/itcl4.0.2/tests/interp.test with 100% similarity]
pkgs/itcl4.0.3/tests/local.test [moved from pkgs/itcl4.0.2/tests/local.test with 100% similarity]
pkgs/itcl4.0.3/tests/methods.test [moved from pkgs/itcl4.0.2/tests/methods.test with 100% similarity]
pkgs/itcl4.0.3/tests/mkindex.itcl [moved from pkgs/itcl4.0.2/tests/mkindex.itcl with 100% similarity]
pkgs/itcl4.0.3/tests/mkindex.test [moved from pkgs/itcl4.0.2/tests/mkindex.test with 100% similarity]
pkgs/itcl4.0.3/tests/namespace.test [moved from pkgs/itcl4.0.2/tests/namespace.test with 100% similarity]
pkgs/itcl4.0.3/tests/protection.test [moved from pkgs/itcl4.0.2/tests/protection.test with 100% similarity]
pkgs/itcl4.0.3/tests/scope.test [moved from pkgs/itcl4.0.2/tests/scope.test with 100% similarity]
pkgs/itcl4.0.3/tests/sfbugs.test [moved from pkgs/itcl4.0.2/tests/sfbugs.test with 97% similarity]
pkgs/itcl4.0.3/tests/tclIndex [moved from pkgs/itcl4.0.2/tests/tclIndex with 100% similarity]
pkgs/itcl4.0.3/tests/typeclass.test [moved from pkgs/itcl4.0.2/tests/typeclass.test with 100% similarity]
pkgs/itcl4.0.3/tests/typedelegation.test [moved from pkgs/itcl4.0.2/tests/typedelegation.test with 100% similarity]
pkgs/itcl4.0.3/tests/typefunction.test [moved from pkgs/itcl4.0.2/tests/typefunction.test with 100% similarity]
pkgs/itcl4.0.3/tests/typeinfo.test [moved from pkgs/itcl4.0.2/tests/typeinfo.test with 100% similarity]
pkgs/itcl4.0.3/tests/typeoption.test [moved from pkgs/itcl4.0.2/tests/typeoption.test with 100% similarity]
pkgs/itcl4.0.3/tests/typevariable.test [moved from pkgs/itcl4.0.2/tests/typevariable.test with 100% similarity]
pkgs/itcl4.0.3/tests/widgetadaptor.test [moved from pkgs/itcl4.0.2/tests/widgetadaptor.test with 100% similarity]
pkgs/itcl4.0.3/tests/widgetclass.test [moved from pkgs/itcl4.0.2/tests/widgetclass.test with 100% similarity]
pkgs/itcl4.0.3/tools/genStubs.tcl [moved from pkgs/itcl4.0.2/tools/genStubs.tcl with 100% similarity]
pkgs/itcl4.0.3/win/dllEntryPoint.c [moved from pkgs/itcl4.0.2/win/dllEntryPoint.c with 100% similarity]
pkgs/itcl4.0.3/win/itcl.rc [moved from pkgs/itcl4.0.2/win/itcl.rc with 100% similarity]
pkgs/itcl4.0.3/win/makefile.vc [moved from pkgs/itcl4.0.2/win/makefile.vc with 100% similarity]
pkgs/itcl4.0.3/win/nmakehlp.c [moved from pkgs/thread2.7.1/win/nmakehlp.c with 100% similarity]
pkgs/itcl4.0.3/win/rules.vc [moved from pkgs/itcl4.0.2/win/rules.vc with 100% similarity]
pkgs/itcl4.0.3/win/toaster.bmp [moved from pkgs/itcl4.0.2/win/toaster.bmp with 100% similarity]
pkgs/sqlite3.8.8.3/Makefile.in [moved from pkgs/sqlite3.8.7.1/Makefile.in with 99% similarity]
pkgs/sqlite3.8.8.3/README [moved from pkgs/sqlite3.8.7.1/README with 100% similarity]
pkgs/sqlite3.8.8.3/aclocal.m4 [moved from pkgs/sqlite3.8.7.1/aclocal.m4 with 100% similarity]
pkgs/sqlite3.8.8.3/configure [moved from pkgs/sqlite3.8.7.1/configure with 99% similarity]
pkgs/sqlite3.8.8.3/configure.ac [moved from pkgs/sqlite3.8.7.1/configure.in with 96% similarity]
pkgs/sqlite3.8.8.3/doc/sqlite3.n [moved from pkgs/sqlite3.8.7.1/doc/sqlite3.n with 100% similarity]
pkgs/sqlite3.8.8.3/generic/sqlite3.c [moved from pkgs/sqlite3.8.7.1/generic/sqlite3.c with 97% similarity]
pkgs/sqlite3.8.8.3/generic/tclsqlite3.c [moved from pkgs/sqlite3.8.7.1/generic/tclsqlite3.c with 97% similarity]
pkgs/sqlite3.8.8.3/license.terms [moved from pkgs/sqlite3.8.7.1/license.terms with 100% similarity]
pkgs/sqlite3.8.8.3/pkgIndex.tcl.in [moved from pkgs/sqlite3.8.7.1/pkgIndex.tcl.in with 100% similarity]
pkgs/sqlite3.8.8.3/tclconfig/install-sh [moved from pkgs/tdbcsqlite3-1.0.2/tclconfig/install-sh with 100% similarity]
pkgs/sqlite3.8.8.3/tclconfig/tcl.m4 [moved from pkgs/tdbcmysql1.0.2/tclconfig/tcl.m4 with 99% similarity]
pkgs/sqlite3.8.8.3/tests/all.tcl [moved from pkgs/sqlite3.8.7.1/tests/all.tcl with 92% similarity]
pkgs/sqlite3.8.8.3/tests/leapsecond.test [moved from pkgs/sqlite3.8.7.1/tests/leapsecond.test with 100% similarity]
pkgs/sqlite3.8.8.3/win/makefile.vc [moved from pkgs/sqlite3.8.7.1/win/makefile.vc with 99% similarity]
pkgs/sqlite3.8.8.3/win/nmakehlp.c [moved from pkgs/sqlite3.8.7.1/win/nmakehlp.c with 100% similarity]
pkgs/sqlite3.8.8.3/win/rules.vc [moved from pkgs/sqlite3.8.7.1/win/rules.vc with 100% similarity]
pkgs/tdbc1.0.2/configure [deleted file]
pkgs/tdbc1.0.3/ChangeLog [moved from pkgs/tdbc1.0.2/ChangeLog with 99% similarity]
pkgs/tdbc1.0.3/Makefile.in [moved from pkgs/tdbc1.0.2/Makefile.in with 100% similarity]
pkgs/tdbc1.0.3/README [moved from pkgs/tdbc1.0.2/README with 98% similarity]
pkgs/tdbc1.0.3/aclocal.m4 [moved from pkgs/tdbcsqlite3-1.0.2/aclocal.m4 with 100% similarity]
pkgs/tdbc1.0.3/configure [new file with mode: 0755]
pkgs/tdbc1.0.3/configure.in [moved from pkgs/tdbc1.0.2/configure.in with 99% similarity]
pkgs/tdbc1.0.3/doc/Tdbc_Init.3 [moved from pkgs/tdbc1.0.2/doc/Tdbc_Init.3 with 100% similarity]
pkgs/tdbc1.0.3/doc/tdbc.n [moved from pkgs/tdbc1.0.2/doc/tdbc.n with 100% similarity]
pkgs/tdbc1.0.3/doc/tdbc_connection.n [moved from pkgs/tdbc1.0.2/doc/tdbc_connection.n with 100% similarity]
pkgs/tdbc1.0.3/doc/tdbc_mapSqlState.n [moved from pkgs/tdbc1.0.2/doc/tdbc_mapSqlState.n with 100% similarity]
pkgs/tdbc1.0.3/doc/tdbc_resultset.n [moved from pkgs/tdbc1.0.2/doc/tdbc_resultset.n with 100% similarity]
pkgs/tdbc1.0.3/doc/tdbc_statement.n [moved from pkgs/tdbc1.0.2/doc/tdbc_statement.n with 100% similarity]
pkgs/tdbc1.0.3/doc/tdbc_tokenize.n [moved from pkgs/tdbc1.0.2/doc/tdbc_tokenize.n with 100% similarity]
pkgs/tdbc1.0.3/generic/tdbc.c [moved from pkgs/tdbc1.0.2/generic/tdbc.c with 100% similarity]
pkgs/tdbc1.0.3/generic/tdbc.decls [moved from pkgs/tdbc1.0.2/generic/tdbc.decls with 100% similarity]
pkgs/tdbc1.0.3/generic/tdbc.h [moved from pkgs/tdbc1.0.2/generic/tdbc.h with 96% similarity]
pkgs/tdbc1.0.3/generic/tdbcDecls.h [moved from pkgs/tdbc1.0.2/generic/tdbcDecls.h with 100% similarity]
pkgs/tdbc1.0.3/generic/tdbcInt.h [moved from pkgs/tdbc1.0.2/generic/tdbcInt.h with 100% similarity]
pkgs/tdbc1.0.3/generic/tdbcStubInit.c [moved from pkgs/tdbc1.0.2/generic/tdbcStubInit.c with 100% similarity]
pkgs/tdbc1.0.3/generic/tdbcStubLib.c [moved from pkgs/tdbc1.0.2/generic/tdbcStubLib.c with 100% similarity]
pkgs/tdbc1.0.3/generic/tdbcTokenize.c [moved from pkgs/tdbc1.0.2/generic/tdbcTokenize.c with 100% similarity]
pkgs/tdbc1.0.3/library/tdbc.tcl [moved from pkgs/tdbc1.0.2/library/tdbc.tcl with 100% similarity]
pkgs/tdbc1.0.3/license.terms [moved from pkgs/tdbcodbc1.0.2/license.terms with 100% similarity]
pkgs/tdbc1.0.3/pkgIndex.tcl.in [moved from pkgs/tdbc1.0.2/pkgIndex.tcl.in with 100% similarity]
pkgs/tdbc1.0.3/tclconfig/ChangeLog [moved from pkgs/tdbc1.0.2/tclconfig/ChangeLog with 100% similarity]
pkgs/tdbc1.0.3/tclconfig/README.txt [moved from pkgs/tdbc1.0.2/tclconfig/README.txt with 100% similarity]
pkgs/tdbc1.0.3/tclconfig/install-sh [moved from pkgs/tdbcpostgres1.0.2/tclconfig/install-sh with 100% similarity]
pkgs/tdbc1.0.3/tclconfig/tcl.m4 [moved from pkgs/itcl4.0.2/tclconfig/tcl.m4 with 99% similarity]
pkgs/tdbc1.0.3/tdbcConfig.sh.in [moved from pkgs/tdbc1.0.2/tdbcConfig.sh.in with 100% similarity]
pkgs/tdbc1.0.3/tests/all.tcl [moved from pkgs/tdbc1.0.2/tests/all.tcl with 100% similarity]
pkgs/tdbc1.0.3/tests/tdbc.test [moved from pkgs/tdbc1.0.2/tests/tdbc.test with 100% similarity]
pkgs/tdbc1.0.3/tests/tokenize.test [moved from pkgs/tdbc1.0.2/tests/tokenize.test with 100% similarity]
pkgs/tdbc1.0.3/tools/genExtStubs.tcl [moved from pkgs/tdbc1.0.2/tools/genExtStubs.tcl with 100% similarity]
pkgs/tdbc1.0.3/tools/genStubs.tcl [moved from pkgs/tdbc1.0.2/tools/genStubs.tcl with 100% similarity]
pkgs/tdbc1.0.3/tools/tdbc-man2html.tcl [moved from pkgs/tdbc1.0.2/tools/tdbc-man2html.tcl with 100% similarity]
pkgs/tdbc1.0.3/win/makefile.vc [moved from pkgs/tdbc1.0.2/win/makefile.vc with 100% similarity]
pkgs/tdbc1.0.3/win/nmakehlp.c [moved from pkgs/tdbc1.0.2/win/nmakehlp.c with 100% similarity]
pkgs/tdbc1.0.3/win/rules.vc [moved from pkgs/tdbcsqlite3-1.0.2/win/rules.vc with 100% similarity]
pkgs/tdbc1.0.3/win/tdbc.rc [moved from pkgs/tdbc1.0.2/win/tdbc.rc with 100% similarity]
pkgs/tdbcmysql1.0.3/ChangeLog [moved from pkgs/tdbcmysql1.0.2/ChangeLog with 98% similarity]
pkgs/tdbcmysql1.0.3/Makefile.in [moved from pkgs/tdbcmysql1.0.2/Makefile.in with 100% similarity]
pkgs/tdbcmysql1.0.3/README [moved from pkgs/tdbcmysql1.0.2/README with 97% similarity]
pkgs/tdbcmysql1.0.3/aclocal.m4 [moved from pkgs/tdbcpostgres1.0.2/aclocal.m4 with 100% similarity]
pkgs/tdbcmysql1.0.3/configure [moved from pkgs/tdbcmysql1.0.2/configure with 98% similarity]
pkgs/tdbcmysql1.0.3/configure.in [moved from pkgs/tdbcmysql1.0.2/configure.in with 99% similarity]
pkgs/tdbcmysql1.0.3/doc/tdbc_mysql.n [moved from pkgs/tdbcmysql1.0.2/doc/tdbc_mysql.n with 100% similarity]
pkgs/tdbcmysql1.0.3/generic/fakemysql.h [moved from pkgs/tdbcmysql1.0.2/generic/fakemysql.h with 100% similarity]
pkgs/tdbcmysql1.0.3/generic/mysqlStubDefs.txt [moved from pkgs/tdbcmysql1.0.2/generic/mysqlStubDefs.txt with 100% similarity]
pkgs/tdbcmysql1.0.3/generic/mysqlStubInit.c [moved from pkgs/tdbcmysql1.0.2/generic/mysqlStubInit.c with 100% similarity]
pkgs/tdbcmysql1.0.3/generic/mysqlStubs.h [moved from pkgs/tdbcmysql1.0.2/generic/mysqlStubs.h with 100% similarity]
pkgs/tdbcmysql1.0.3/generic/tdbcmysql.c [moved from pkgs/tdbcmysql1.0.2/generic/tdbcmysql.c with 100% similarity]
pkgs/tdbcmysql1.0.3/library/tdbcmysql.tcl [moved from pkgs/tdbcmysql1.0.2/library/tdbcmysql.tcl with 100% similarity]
pkgs/tdbcmysql1.0.3/license.terms [moved from pkgs/tdbcmysql1.0.2/license.terms with 100% similarity]
pkgs/tdbcmysql1.0.3/pkgIndex.tcl.in [moved from pkgs/tdbcmysql1.0.2/pkgIndex.tcl.in with 100% similarity]
pkgs/tdbcmysql1.0.3/tclconfig/install-sh [moved from pkgs/tdbcodbc1.0.2/tclconfig/install-sh with 100% similarity]
pkgs/tdbcmysql1.0.3/tclconfig/tcl.m4 [moved from pkgs/sqlite3.8.7.1/tclconfig/tcl.m4 with 99% similarity]
pkgs/tdbcmysql1.0.3/tests/all.tcl [moved from pkgs/tdbcodbc1.0.2/tests/all.tcl with 100% similarity]
pkgs/tdbcmysql1.0.3/tests/tdbcmysql.test [moved from pkgs/tdbcmysql1.0.2/tests/tdbcmysql.test with 100% similarity]
pkgs/tdbcmysql1.0.3/win/makefile.vc [moved from pkgs/tdbcmysql1.0.2/win/makefile.vc with 100% similarity]
pkgs/tdbcmysql1.0.3/win/nmakehlp.c [moved from pkgs/tdbcsqlite3-1.0.2/win/nmakehlp.c with 100% similarity]
pkgs/tdbcmysql1.0.3/win/rules.vc [moved from pkgs/tdbcpostgres1.0.2/win/rules.vc with 100% similarity]
pkgs/tdbcodbc1.0.2/tclconfig/tcl.m4 [deleted file]
pkgs/tdbcodbc1.0.3/ChangeLog [moved from pkgs/tdbcodbc1.0.2/ChangeLog with 98% similarity]
pkgs/tdbcodbc1.0.3/Makefile.in [moved from pkgs/tdbcodbc1.0.2/Makefile.in with 100% similarity]
pkgs/tdbcodbc1.0.3/README [moved from pkgs/tdbcodbc1.0.2/README with 95% similarity]
pkgs/tdbcodbc1.0.3/aclocal.m4 [moved from pkgs/tdbcodbc1.0.2/aclocal.m4 with 100% similarity]
pkgs/tdbcodbc1.0.3/configure [moved from pkgs/tdbcodbc1.0.2/configure with 98% similarity]
pkgs/tdbcodbc1.0.3/configure.in [moved from pkgs/tdbcodbc1.0.2/configure.in with 99% similarity]
pkgs/tdbcodbc1.0.3/doc/tdbc_odbc.n [moved from pkgs/tdbcodbc1.0.2/doc/tdbc_odbc.n with 100% similarity]
pkgs/tdbcodbc1.0.3/generic/fakesql.h [moved from pkgs/tdbcodbc1.0.2/generic/fakesql.h with 100% similarity]
pkgs/tdbcodbc1.0.3/generic/odbcStubDefs.txt [moved from pkgs/tdbcodbc1.0.2/generic/odbcStubDefs.txt with 100% similarity]
pkgs/tdbcodbc1.0.3/generic/odbcStubInit.c [moved from pkgs/tdbcodbc1.0.2/generic/odbcStubInit.c with 100% similarity]
pkgs/tdbcodbc1.0.3/generic/odbcStubs.h [moved from pkgs/tdbcodbc1.0.2/generic/odbcStubs.h with 100% similarity]
pkgs/tdbcodbc1.0.3/generic/tdbcodbc.c [moved from pkgs/tdbcodbc1.0.2/generic/tdbcodbc.c with 100% similarity]
pkgs/tdbcodbc1.0.3/library/tdbcodbc.tcl [moved from pkgs/tdbcodbc1.0.2/library/tdbcodbc.tcl with 100% similarity]
pkgs/tdbcodbc1.0.3/license.terms [moved from pkgs/tdbc1.0.2/license.terms with 100% similarity]
pkgs/tdbcodbc1.0.3/pkgIndex.tcl.in [moved from pkgs/tdbcodbc1.0.2/pkgIndex.tcl.in with 100% similarity]
pkgs/tdbcodbc1.0.3/tclconfig/install-sh [moved from pkgs/tdbcmysql1.0.2/tclconfig/install-sh with 100% similarity]
pkgs/tdbcodbc1.0.3/tclconfig/tcl.m4 [new file with mode: 0644]
pkgs/tdbcodbc1.0.3/tests/all.tcl [moved from pkgs/tdbcmysql1.0.2/tests/all.tcl with 100% similarity]
pkgs/tdbcodbc1.0.3/tests/tdbcodbc.test [moved from pkgs/tdbcodbc1.0.2/tests/tdbcodbc.test with 100% similarity]
pkgs/tdbcodbc1.0.3/tests/test.mdb [moved from pkgs/tdbcodbc1.0.2/tests/test.mdb with 100% similarity]
pkgs/tdbcodbc1.0.3/win/makefile.vc [moved from pkgs/tdbcodbc1.0.2/win/makefile.vc with 100% similarity]
pkgs/tdbcodbc1.0.3/win/nmakehlp.c [moved from pkgs/tdbcpostgres1.0.2/win/nmakehlp.c with 100% similarity]
pkgs/tdbcodbc1.0.3/win/rules.vc [moved from pkgs/tdbcodbc1.0.2/win/rules.vc with 100% similarity]
pkgs/tdbcpostgres1.0.2/tclconfig/tcl.m4 [deleted file]
pkgs/tdbcpostgres1.0.3/ChangeLog [moved from pkgs/tdbcpostgres1.0.2/ChangeLog with 97% similarity]
pkgs/tdbcpostgres1.0.3/Makefile.in [moved from pkgs/tdbcpostgres1.0.2/Makefile.in with 100% similarity]
pkgs/tdbcpostgres1.0.3/README [moved from pkgs/tdbcpostgres1.0.2/README with 96% similarity]
pkgs/tdbcpostgres1.0.3/aclocal.m4 [moved from pkgs/tdbcmysql1.0.2/aclocal.m4 with 100% similarity]
pkgs/tdbcpostgres1.0.3/configure [moved from pkgs/tdbcpostgres1.0.2/configure with 97% similarity]
pkgs/tdbcpostgres1.0.3/configure.in [moved from pkgs/tdbcpostgres1.0.2/configure.in with 85% similarity]
pkgs/tdbcpostgres1.0.3/doc/tdbc_postgres.n [moved from pkgs/tdbcpostgres1.0.2/doc/tdbc_postgres.n with 100% similarity]
pkgs/tdbcpostgres1.0.3/generic/fakepq.h [moved from pkgs/tdbcpostgres1.0.2/generic/fakepq.h with 100% similarity]
pkgs/tdbcpostgres1.0.3/generic/pqStubDefs.txt [moved from pkgs/tdbcpostgres1.0.2/generic/pqStubDefs.txt with 100% similarity]
pkgs/tdbcpostgres1.0.3/generic/pqStubInit.c [moved from pkgs/tdbcpostgres1.0.2/generic/pqStubInit.c with 100% similarity]
pkgs/tdbcpostgres1.0.3/generic/pqStubs.h [moved from pkgs/tdbcpostgres1.0.2/generic/pqStubs.h with 100% similarity]
pkgs/tdbcpostgres1.0.3/generic/tdbcpostgres.c [moved from pkgs/tdbcpostgres1.0.2/generic/tdbcpostgres.c with 98% similarity]
pkgs/tdbcpostgres1.0.3/library/tdbcpostgres.tcl [moved from pkgs/tdbcpostgres1.0.2/library/tdbcpostgres.tcl with 100% similarity]
pkgs/tdbcpostgres1.0.3/license.terms [moved from pkgs/tdbcpostgres1.0.2/license.terms with 100% similarity]
pkgs/tdbcpostgres1.0.3/pkgIndex.tcl.in [moved from pkgs/tdbcpostgres1.0.2/pkgIndex.tcl.in with 100% similarity]
pkgs/tdbcpostgres1.0.3/tclconfig/install-sh [moved from pkgs/tdbc1.0.2/tclconfig/install-sh with 100% similarity]
pkgs/tdbcpostgres1.0.3/tclconfig/tcl.m4 [new file with mode: 0644]
pkgs/tdbcpostgres1.0.3/tests/all.tcl [moved from pkgs/tdbcpostgres1.0.2/tests/all.tcl with 100% similarity]
pkgs/tdbcpostgres1.0.3/tests/tdbcpostgres.test [moved from pkgs/tdbcpostgres1.0.2/tests/tdbcpostgres.test with 100% similarity]
pkgs/tdbcpostgres1.0.3/win/makefile.vc [moved from pkgs/tdbcpostgres1.0.2/win/makefile.vc with 100% similarity]
pkgs/tdbcpostgres1.0.3/win/nmakehlp.c [moved from pkgs/tdbcodbc1.0.2/win/nmakehlp.c with 100% similarity]
pkgs/tdbcpostgres1.0.3/win/rules.vc [moved from pkgs/tdbcmysql1.0.2/win/rules.vc with 100% similarity]
pkgs/tdbcsqlite3-1.0.2/tclconfig/tcl.m4 [deleted file]
pkgs/tdbcsqlite3-1.0.3/ChangeLog [moved from pkgs/tdbcsqlite3-1.0.2/ChangeLog with 97% similarity]
pkgs/tdbcsqlite3-1.0.3/Makefile.in [moved from pkgs/tdbcsqlite3-1.0.2/Makefile.in with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/README [moved from pkgs/tdbcsqlite3-1.0.2/README with 96% similarity]
pkgs/tdbcsqlite3-1.0.3/aclocal.m4 [moved from pkgs/tdbc1.0.2/aclocal.m4 with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/configure [moved from pkgs/tdbcsqlite3-1.0.2/configure with 97% similarity]
pkgs/tdbcsqlite3-1.0.3/configure.in [moved from pkgs/tdbcsqlite3-1.0.2/configure.in with 99% similarity]
pkgs/tdbcsqlite3-1.0.3/doc/tdbc_sqlite3.n [moved from pkgs/tdbcsqlite3-1.0.2/doc/tdbc_sqlite3.n with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/library/tdbcsqlite3.tcl [moved from pkgs/tdbcsqlite3-1.0.2/library/tdbcsqlite3.tcl with 99% similarity]
pkgs/tdbcsqlite3-1.0.3/license.terms [moved from pkgs/tdbcsqlite3-1.0.2/license.terms with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/pkgIndex.tcl.in [moved from pkgs/tdbcsqlite3-1.0.2/pkgIndex.tcl.in with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/tclconfig/install-sh [moved from pkgs/sqlite3.8.7.1/tclconfig/install-sh with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/tclconfig/tcl.m4 [new file with mode: 0644]
pkgs/tdbcsqlite3-1.0.3/tests/all.tcl [moved from pkgs/tdbcsqlite3-1.0.2/tests/all.tcl with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/tests/tdbcsqlite3.test [moved from pkgs/tdbcsqlite3-1.0.2/tests/tdbcsqlite3.test with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/win/makefile.vc [moved from pkgs/tdbcsqlite3-1.0.2/win/makefile.vc with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/win/nmakehlp.c [moved from pkgs/tdbcmysql1.0.2/win/nmakehlp.c with 100% similarity]
pkgs/tdbcsqlite3-1.0.3/win/rules.vc [moved from pkgs/tdbc1.0.2/win/rules.vc with 100% similarity]
pkgs/thread2.7.1/tclconfig/tcl.m4 [deleted file]
pkgs/thread2.7.2/ChangeLog [moved from pkgs/thread2.7.1/ChangeLog with 100% similarity]
pkgs/thread2.7.2/Makefile.in [moved from pkgs/thread2.7.1/Makefile.in with 97% similarity]
pkgs/thread2.7.2/README [moved from pkgs/thread2.7.1/README with 100% similarity]
pkgs/thread2.7.2/aclocal.m4 [moved from pkgs/thread2.7.1/aclocal.m4 with 100% similarity]
pkgs/thread2.7.2/configure [moved from pkgs/thread2.7.1/configure with 99% similarity]
pkgs/thread2.7.2/configure.ac [moved from pkgs/thread2.7.1/configure.in with 99% similarity]
pkgs/thread2.7.2/doc/format.tcl [moved from pkgs/thread2.7.1/doc/format.tcl with 100% similarity]
pkgs/thread2.7.2/doc/html/thread.html [moved from pkgs/thread2.7.1/doc/html/thread.html with 100% similarity]
pkgs/thread2.7.2/doc/html/tpool.html [moved from pkgs/thread2.7.1/doc/html/tpool.html with 100% similarity]
pkgs/thread2.7.2/doc/html/tsv.html [moved from pkgs/thread2.7.1/doc/html/tsv.html with 100% similarity]
pkgs/thread2.7.2/doc/html/ttrace.html [moved from pkgs/thread2.7.1/doc/html/ttrace.html with 100% similarity]
pkgs/thread2.7.2/doc/man.macros [moved from pkgs/thread2.7.1/doc/man.macros with 100% similarity]
pkgs/thread2.7.2/doc/man/thread.n [moved from pkgs/thread2.7.1/doc/man/thread.n with 100% similarity]
pkgs/thread2.7.2/doc/man/tpool.n [moved from pkgs/thread2.7.1/doc/man/tpool.n with 100% similarity]
pkgs/thread2.7.2/doc/man/tsv.n [moved from pkgs/thread2.7.1/doc/man/tsv.n with 100% similarity]
pkgs/thread2.7.2/doc/man/ttrace.n [moved from pkgs/thread2.7.1/doc/man/ttrace.n with 100% similarity]
pkgs/thread2.7.2/doc/thread.man [moved from pkgs/thread2.7.1/doc/thread.man with 100% similarity]
pkgs/thread2.7.2/doc/tpool.man [moved from pkgs/thread2.7.1/doc/tpool.man with 100% similarity]
pkgs/thread2.7.2/doc/tsv.man [moved from pkgs/thread2.7.1/doc/tsv.man with 100% similarity]
pkgs/thread2.7.2/doc/ttrace.man [moved from pkgs/thread2.7.1/doc/ttrace.man with 100% similarity]
pkgs/thread2.7.2/generic/psGdbm.c [moved from pkgs/thread2.7.1/generic/psGdbm.c with 100% similarity]
pkgs/thread2.7.2/generic/psGdbm.h [moved from pkgs/thread2.7.1/generic/psGdbm.h with 100% similarity]
pkgs/thread2.7.2/generic/tclThread.h [moved from pkgs/thread2.7.1/generic/tclThread.h with 100% similarity]
pkgs/thread2.7.2/generic/tclThreadInt.h [moved from pkgs/thread2.7.1/generic/tclThreadInt.h with 81% similarity]
pkgs/thread2.7.2/generic/tclXkeylist.c [moved from pkgs/thread2.7.1/generic/tclXkeylist.c with 100% similarity]
pkgs/thread2.7.2/generic/tclXkeylist.h [moved from pkgs/thread2.7.1/generic/tclXkeylist.h with 98% similarity]
pkgs/thread2.7.2/generic/threadCmd.c [moved from pkgs/thread2.7.1/generic/threadCmd.c with 99% similarity]
pkgs/thread2.7.2/generic/threadNs.c [moved from pkgs/thread2.7.1/generic/threadNs.c with 100% similarity]
pkgs/thread2.7.2/generic/threadPoolCmd.c [moved from pkgs/thread2.7.1/generic/threadPoolCmd.c with 100% similarity]
pkgs/thread2.7.2/generic/threadSpCmd.c [moved from pkgs/thread2.7.1/generic/threadSpCmd.c with 100% similarity]
pkgs/thread2.7.2/generic/threadSpCmd.h [moved from pkgs/thread2.7.1/generic/threadSpCmd.h with 99% similarity]
pkgs/thread2.7.2/generic/threadSvCmd.c [moved from pkgs/thread2.7.1/generic/threadSvCmd.c with 99% similarity]
pkgs/thread2.7.2/generic/threadSvCmd.h [moved from pkgs/thread2.7.1/generic/threadSvCmd.h with 100% similarity]
pkgs/thread2.7.2/generic/threadSvKeylistCmd.c [moved from pkgs/thread2.7.1/generic/threadSvKeylistCmd.c with 100% similarity]
pkgs/thread2.7.2/generic/threadSvKeylistCmd.h [moved from pkgs/thread2.7.1/generic/threadSvKeylistCmd.h with 96% similarity]
pkgs/thread2.7.2/generic/threadSvListCmd.c [moved from pkgs/thread2.7.1/generic/threadSvListCmd.c with 100% similarity]
pkgs/thread2.7.2/generic/threadSvListCmd.h [moved from pkgs/thread2.7.1/generic/threadSvListCmd.h with 100% similarity]
pkgs/thread2.7.2/lib/ttrace.tcl [moved from pkgs/thread2.7.1/lib/ttrace.tcl with 99% similarity]
pkgs/thread2.7.2/license.terms [moved from pkgs/thread2.7.1/license.terms with 100% similarity]
pkgs/thread2.7.2/naviserver.m4 [moved from pkgs/thread2.7.1/naviserver.m4 with 100% similarity]
pkgs/thread2.7.2/pkgIndex.tcl.in [moved from pkgs/thread2.7.1/pkgIndex.tcl.in with 100% similarity]
pkgs/thread2.7.2/tcl/README [moved from pkgs/thread2.7.1/tcl/README with 100% similarity]
pkgs/thread2.7.2/tcl/cmdsrv/cmdsrv.tcl [moved from pkgs/thread2.7.1/tcl/cmdsrv/cmdsrv.tcl with 100% similarity]
pkgs/thread2.7.2/tcl/phttpd/index.htm [moved from pkgs/thread2.7.1/tcl/phttpd/index.htm with 100% similarity]
pkgs/thread2.7.2/tcl/phttpd/phttpd.tcl [moved from pkgs/thread2.7.1/tcl/phttpd/phttpd.tcl with 100% similarity]
pkgs/thread2.7.2/tcl/phttpd/uhttpd.tcl [moved from pkgs/thread2.7.1/tcl/phttpd/uhttpd.tcl with 100% similarity]
pkgs/thread2.7.2/tcl/tpool/tpool.tcl [moved from pkgs/thread2.7.1/tcl/tpool/tpool.tcl with 100% similarity]
pkgs/thread2.7.2/tclconfig/install-sh [moved from pkgs/itcl4.0.2/tclconfig/install-sh with 100% similarity]
pkgs/thread2.7.2/tclconfig/tcl.m4 [new file with mode: 0644]
pkgs/thread2.7.2/tests/all.tcl [moved from pkgs/thread2.7.1/tests/all.tcl with 100% similarity]
pkgs/thread2.7.2/tests/thread.test [moved from pkgs/thread2.7.1/tests/thread.test with 100% similarity]
pkgs/thread2.7.2/tests/tpool.test [moved from pkgs/thread2.7.1/tests/tpool.test with 100% similarity]
pkgs/thread2.7.2/tests/tsv.test [moved from pkgs/thread2.7.1/tests/tsv.test with 100% similarity]
pkgs/thread2.7.2/tests/ttrace.test [moved from pkgs/thread2.7.1/tests/ttrace.test with 100% similarity]
pkgs/thread2.7.2/unix/CONFIG [moved from pkgs/thread2.7.1/unix/CONFIG with 100% similarity]
pkgs/thread2.7.2/unix/README [moved from pkgs/thread2.7.1/unix/README with 100% similarity]
pkgs/thread2.7.2/unix/threadUnix.c [moved from pkgs/thread2.7.1/unix/threadUnix.c with 100% similarity]
pkgs/thread2.7.2/win/CONFIG [moved from pkgs/thread2.7.1/win/CONFIG with 100% similarity]
pkgs/thread2.7.2/win/README.txt [moved from pkgs/thread2.7.1/win/README.txt with 100% similarity]
pkgs/thread2.7.2/win/makefile.vc [moved from pkgs/thread2.7.1/win/makefile.vc with 100% similarity]
pkgs/thread2.7.2/win/nmakehlp.c [moved from pkgs/itcl4.0.2/win/nmakehlp.c with 100% similarity]
pkgs/thread2.7.2/win/pkg.vc [moved from pkgs/thread2.7.1/win/pkg.vc with 81% similarity]
pkgs/thread2.7.2/win/rules.vc [moved from pkgs/thread2.7.1/win/rules.vc with 100% similarity]
pkgs/thread2.7.2/win/thread.rc [moved from pkgs/thread2.7.1/win/thread.rc with 100% similarity]
pkgs/thread2.7.2/win/threadWin.c [moved from pkgs/thread2.7.1/win/threadWin.c with 100% similarity]
pkgs/thread2.7.2/win/thread_win.dsp [moved from pkgs/thread2.7.1/win/thread_win.dsp with 100% similarity]
pkgs/thread2.7.2/win/thread_win.dsw [moved from pkgs/thread2.7.1/win/thread_win.dsw with 100% similarity]
tests/append.test
tests/appendComp.test
tests/compile.test
tests/io.test
tests/ioCmd.test
tests/license.terms
tests/lreplace.test
tests/parse.test
tests/parseExpr.test
tests/socket.test
tests/stringComp.test
tests/winFCmd.test
tools/tcltk-man2html.tcl
unix/configure
unix/configure.in
unix/ldAix
unix/tcl.spec
unix/tclConfig.h.in
unix/tclUnixChan.c
unix/tclUnixInit.c
unix/tclUnixPipe.c
unix/tclUnixSock.c
unix/tclUnixThrd.h
unix/tclUnixTime.c
win/README
win/configure
win/configure.in
win/license.terms
win/tclConfig.sh.in
win/tclWinChan.c
win/tclWinConsole.c
win/tclWinFile.c
win/tclWinSerial.c
win/tclWinSock.c

diff --git a/README b/README
index 0fb128d..f63e0e7 100644 (file)
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
 README:  Tcl
-    This is the Tcl 8.6.3 source distribution.
+    This is the Tcl 8.6.4 source distribution.
        http://sourceforge.net/projects/tcl/files/Tcl/
     You can get any source release of Tcl from the URL above.
 
diff --git a/changes b/changes
index 945b167..8dffa37 100644 (file)
--- a/changes
+++ b/changes
@@ -8303,11 +8303,11 @@ reported usage of large expressions (porter)
 
 Many optmizations, improvements, and tightened stack management in bytecode.
 
---- Released 8.6.1, September 20, 2013 --- http://core.tcl.tk/tcl/ for details 
+--- Released 8.6.1, September 20, 2013 --- http://core.tcl.tk/tcl/ for details
 
 2013-09-27 (enhancement) improved ::env synchronization (fellows)
 
-2013-10-20 (bug fix)[2835313] segfault from 
+2013-10-20 (bug fix)[2835313] segfault from
 [apply {{} {while 1 {a {*}[return -level 0 -code continue]}}}] (fellows)
 
 2013-10-22 (bug fix)[3556215] [scan %E%G%X] support (fellows)
@@ -8451,7 +8451,7 @@ include ::oo::class (fellows)
 
 2014-08-25 (TIP 429) New command [string cat] (leitgeb,ferrieux)
 
---- Released 8.6.2, August 27, 2014 --- http://core.tcl.tk/tcl/ for details 
+--- Released 8.6.2, August 27, 2014 --- http://core.tcl.tk/tcl/ for details
 
 2014-08-28 (bug)[b9e1a3] Correct Method Search Order (nadkarni,fellows)
 => TclOO 1.0.3
@@ -8491,3 +8491,39 @@ include ::oo::class (fellows)
 2014-11-06 (bug)[5adc35] Stop forcing EOF to be permanent (porter)
 
 --- Released 8.6.3, November 12, 2014 --- http://core.tcl.tk/tcl/ for details
+
+2014-11-21 (bug)[743338] Win: socket error encoding (ladayaroslav,nijtmans)
+
+2014-12-01 (bug) restore tbcload/tclcompiler support (kupries)
+
+2014-12-03 (bug)[0c043a] Fix compiled [set var($) val] (porter)
+
+2014-12-04 (bug)[d2ffcc] Limit $... and bareword parsing to ASCII (ladayaroslav,porter)
+        *** POTENTIAL INCOMPATIBILITY ***
+
+2014-12-06 (bug)[c6cd4a] Win: hang in async socket connection (shults,nadkarni)
+
+2014-12-10 tzdata updated to Olson's tzdata2014j (venkat)
+
+2014-12-13 fix header files installation on OS X (houben)
+
+2014-12-17 (TIP 427) [fconfigure $h -connecting, -peername, -sockname] (oehlmann,rmax)
+
+2014-12-18 (bug)[af08c8] Crash in full finalize encoding teardown (porter)
+
+2014-12-18 (bug)[7c187a] [chan copy] crash (io-53.17) (benno,porter)
+
+2015-01-26 (bug)[df0848] Trouble with INFINITY macro (dower,nijtmans)
+
+2015-01-29 (bug) Stop crashes when extension var resolvers misbehave (porter)
+
+2015-01-29 (bug)[088727] [read] past EOF (io-73.4) (fenugrec,porter)
+
+2015-02-11 tzdata updated to Olson's tzdata2015a (venkat)
+
+2015-02-20 (bug)[32b615] Fix compiled [lreplace] (lreplace-4.[345]) (aspect)
+
+2015-03-10 (enhancement) Revise OS X notifier for better Cocoa (walzer)
+        *** POTENTIAL INCOMPATIBILITY ***
+
+--- Released 8.6.4, March 12, 2015 --- http://core.tcl.tk/tcl/ for details
index 164d65e..d8049cd 100644 (file)
@@ -29,7 +29,7 @@ MODIFICATIONS.
 
 GOVERNMENT USE: If you are acquiring this software on behalf of the
 U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal 
+in the software and related documentation as defined in the Federal
 Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
 are acquiring the software on behalf of the Department of Defense, the
 software shall be classified as "Commercial Computer Software" and the
@@ -37,4 +37,4 @@ Government shall have only "Restricted Rights" as defined in Clause
 252.227-7014 (b) (3) of DFARs.  Notwithstanding the foregoing, the
 authors grant the U.S. Government and others acting in its behalf
 permission to use and distribute the software in accordance with the
-terms specified in this license. 
+terms specified in this license.
index 1c5c665..2335de1 100644 (file)
@@ -336,7 +336,7 @@ typedef struct Tcl_ChannelType {
 It is not necessary to provide implementations for all channel
 operations.  Those which are not necessary may be set to NULL in the
 struct: \fIblockModeProc\fR, \fIseekProc\fR, \fIsetOptionProc\fR,
-\fIgetOptionProc\fR, and \fIclose2Proc\fR, in addition to
+\fIgetOptionProc\fR, \fIgetHandleProc\fR, and \fIclose2Proc\fR, in addition to
 \fIflushProc\fR, \fIhandlerProc\fR, \fIthreadActionProc\fR, and
 \fItruncateProc\fR.  Other functions that cannot be implemented in a
 meaningful way should return \fBEINVAL\fR when called, to indicate
index 1478c35..6664b3b 100644 (file)
@@ -257,47 +257,13 @@ is filled with the corresponding number of bytes that were stored in
 .PP
 \fBTcl_WinUtfToTChar\fR and \fBTcl_WinTCharToUtf\fR are
 Windows-only convenience
-functions for converting between UTF-8 and Windows strings.  On Windows 95
-(as with the Unix operating system),
-all strings exchanged between Tcl and the operating system are
-.QW "char"
-based.  On Windows NT, some strings exchanged between Tcl and the
-operating system are
-.QW "char"
-oriented while others are in Unicode.  By
-convention, in Windows a TCHAR is a character in the ANSI code page
-on Windows 95 and a Unicode character on Windows NT.
-.PP
-If you planned to use the same
-.QW "char"
-based interfaces on both Windows
-95 and Windows NT, you could use \fBTcl_UtfToExternal\fR and
-\fBTcl_ExternalToUtf\fR (or their \fBTcl_DString\fR equivalents) with an
-encoding of NULL (the current system encoding).  On the other hand,
-if you planned to use the Unicode interface when running on Windows NT
-and the
-.QW "char"
-interfaces when running on Windows 95, you would have
-to perform the following type of test over and over in your program
-(as represented in pseudo-code):
-.PP
-.CS
-if (running NT) {
-    encoding <- Tcl_GetEncoding("unicode");
-    nativeBuffer <- Tcl_UtfToExternal(encoding, utfBuffer);
-    Tcl_FreeEncoding(encoding);
-} else {
-    nativeBuffer <- Tcl_UtfToExternal(NULL, utfBuffer);
-}
-.CE
-.PP
-\fBTcl_WinUtfToTChar\fR and \fBTcl_WinTCharToUtf\fR automatically
-handle this test and use the proper encoding based on the current
-operating system.  \fBTcl_WinUtfToTChar\fR returns a pointer to
-a TCHAR string, and \fBTcl_WinTCharToUtf\fR expects a TCHAR string
-pointer as the \fIsrc\fR string.  Otherwise, these functions
-behave identically to \fBTcl_UtfToExternalDString\fR and
-\fBTcl_ExternalToUtfDString\fR.
+functions for converting between UTF-8 and Windows strings
+based on the TCHAR type which is by convention
+a Unicode character on Windows NT.
+These functions are essentially wrappers around
+\fBTcl_UtfToExternalDString\fR and
+\fBTcl_ExternalToUtfDString\fR that convert to and from the
+Unicode encoding.
 .PP
 \fBTcl_GetEncodingName\fR is roughly the inverse of \fBTcl_GetEncoding\fR.
 Given an \fIencoding\fR, the return value is the \fIname\fR argument that
index c3f316b..5b27e40 100644 (file)
@@ -269,17 +269,13 @@ present, as is done when launching applications under wish.  It is desirable
 to have console applications hidden and detached.  This is a designed-in
 limitation as \fBexec\fR wants to communicate over pipes.  The Expect
 extension addresses this issue when communicating with a TUI application.
-.RE
-.TP
-\fBWindows NT\fR
-.
+.PP
 When attempting to execute an application, \fBexec\fR first searches for
 the name as it was specified.  Then, in order, \fB.com\fR, \fB.exe\fR, and
 \fB.bat\fR are appended to the end of the specified name and it searches
 for the longer name.  If a directory name was not specified as part of the
 application name, the following directories are automatically searched in
 order when attempting to locate the application:
-.RS
 .IP \(bu 3
 The directory from which the Tcl executable was loaded.
 .IP \(bu 3
@@ -299,67 +295,6 @@ the caller must prepend the desired command with
 because built-in commands are not implemented using executables.
 .RE
 .TP
-\fBWindows 9x\fR
-.
-When attempting to execute an application, \fBexec\fR first searches for
-the name as it was specified.  Then, in order, \fB.com\fR, \fB.exe\fR, and
-\fB.bat\fR are appended to the end of the specified name and it searches
-for the longer name.  If a directory name was not specified as part of the
-application name, the following directories are automatically searched in
-order when attempting to locate the application:
-.RS
-.IP \(bu 3
-The directory from which the Tcl executable was loaded.
-.IP \(bu 3
-The current directory.
-.IP \(bu 3
-The Windows 9x system directory.
-.IP \(bu 3
-The Windows 9x home directory.
-.IP \(bu 3
-The directories listed in the path.
-.RE
-.RS
-.PP
-In order to execute shell built-in commands like \fBdir\fR and \fBcopy\fR,
-the caller must prepend the desired command with
-.QW "\fBcommand.com /c\0\fR"
-because built-in commands are not implemented using executables.
-.PP
-Once a 16-bit DOS application has read standard input from a console and 
-then quit, all subsequently run 16-bit DOS applications will see the 
-standard input as already closed.  32-bit applications do not have this
-problem and will run correctly, even after a 16-bit DOS application thinks 
-that standard input is closed.  There is no known workaround for this bug
-at this time.
-.PP
-Redirection between the \fBNUL:\fR device and a 16-bit application does not
-always work.  When redirecting from \fBNUL:\fR, some applications may hang,
-others will get an infinite stream of
-.QW 0x01
-bytes, and some will actually
-correctly get an immediate end-of-file; the behavior seems to depend upon 
-something compiled into the application itself.  When redirecting greater than
-4K or so to \fBNUL:\fR, some applications will hang.  The above problems do not
-happen with 32-bit applications.  
-.PP
-All DOS 16-bit applications are run synchronously.  All standard input from
-a pipe to a 16-bit DOS application is collected into a temporary file; the
-other end of the pipe must be closed before the 16-bit DOS application
-begins executing.  All standard output or error from a 16-bit DOS
-application to a pipe is collected into temporary files; the application
-must terminate before the temporary files are redirected to the next stage
-of the pipeline.  This is due to a workaround for a Windows 95 bug in the
-implementation of pipes, and is how the standard Windows 95 DOS shell
-handles pipes itself.
-.PP
-Certain applications, such as \fBcommand.com\fR, should not be executed
-interactively.  Applications which directly access the console window,
-rather than reading from their standard input and writing to their standard
-output may fail, hang Tcl, or even hang the system if their own private
-console window is not available to them.
-.RE
-.TP
 \fBUnix\fR (including Mac OS X)
 .
 The \fBexec\fR command is fully functional and works as described.
index 5ff45fd..4c6465a 100644 (file)
@@ -241,11 +241,9 @@ as relative to the cwd).  Furthermore,
 paths are always expanded
 to absolute form.  When creating links on filesystems that either do not
 support any links, or do not support the specific type requested, an
-error message will be returned.  In particular Windows 95, 98 and ME do
-not support any links at present, but most Unix platforms support both
-symbolic and hard links (the latter for files only) and Windows
-NT/2000/XP (on NTFS drives) support symbolic
-directory links and hard file links.
+error message will be returned.  Most Unix platforms support both
+symbolic and hard links (the latter for files only). Windows
+supports symbolic directory links and hard file links on NTFS drives.
 .RE
 .TP
 \fBfile lstat \fIname varName\fR
index 86e450b..a2cbce2 100644 (file)
@@ -204,13 +204,7 @@ of the form
 it refers to the home
 directory of the user whose account information resides on the specified NT
 domain server. Otherwise, user account information is obtained from
-the local computer. On Windows 95 and 98, \fBglob\fR accepted patterns
-like
-.QW .../
-and
-.QW ..../
-for successively higher up parent directories, but later versions of
-Windows do not accept these forms.
+the local computer.
 .PP
 Since the backslash character has a special meaning to the glob
 command, glob patterns containing Windows style path separators need
index 164d65e..d8049cd 100644 (file)
@@ -29,7 +29,7 @@ MODIFICATIONS.
 
 GOVERNMENT USE: If you are acquiring this software on behalf of the
 U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal 
+in the software and related documentation as defined in the Federal
 Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
 are acquiring the software on behalf of the Department of Defense, the
 software shall be classified as "Commercial Computer Software" and the
@@ -37,4 +37,4 @@ Government shall have only "Restricted Rights" as defined in Clause
 252.227-7014 (b) (3) of DFARs.  Notwithstanding the foregoing, the
 authors grant the U.S. Government and others acting in its behalf
 permission to use and distribute the software in accordance with the
-terms specified in this license. 
+terms specified in this license.
index 0b1b83f..3012460 100644 (file)
@@ -361,63 +361,28 @@ may cause this error.
 A BREAK condition has been detected by your UART (see above).
 .SH "PORTABILITY ISSUES"
 .TP
-\fBWindows \fR(all versions)
+\fBWindows \fR
 .
 Valid values for \fIfileName\fR to open a serial port are of the form
-\fBcom\fIX\fB:\fR, where \fIX\fR is a number, generally from 1 to 4.
-This notation only works for serial ports from 1 to 9, if the system
-happens to have more than four.  An attempt to open a serial port that
+\fBcom\fIX\fB\fR, where \fIX\fR is a number, generally from 1 to 9.
+A legacy form accepted as well is \fBcom\fIX\fB:\fR. This notation only
+works for serial ports from 1 to 9.  An attempt to open a serial port that
 does not exist or has a number greater than 9 will fail.  An alternate
-form of opening serial ports is to use the filename \fB\e\e.\ecomX\fR,
-where X is any number that corresponds to a serial port; please note
-that this method is considerably slower on Windows 95 and Windows 98.
-.TP
-\fBWindows NT\fR
-.
+form of opening serial ports is to use the filename \fB//./comX\fR,
+where X is any number that corresponds to a serial port.
+.PP
+.RS
 When running Tcl interactively, there may be some strange interactions
 between the real console, if one is present, and a command pipeline that uses
 standard input or output.  If a command pipeline is opened for reading, some
 of the lines entered at the console will be sent to the command pipeline and
 some will be sent to the Tcl evaluator.  If a command pipeline is opened for
 writing, keystrokes entered into the console are not visible until the
-pipe is closed.  This behavior occurs whether the command pipeline is
-executing 16-bit or 32-bit applications.  These problems only occur because
-both Tcl and the child application are competing for the console at
-the same time.  If the command pipeline is started from a script, so that Tcl
-is not accessing the console, or if the command pipeline does not use
-standard input or output, but is redirected from or to a file, then the
-above problems do not occur.  
-.TP
-\fBWindows 95\fR 
-.
-A command pipeline that executes a 16-bit DOS application cannot be opened
-for both reading and writing, since 16-bit DOS applications that receive
-standard input from a pipe and send standard output to a pipe run
-synchronously.  Command pipelines that do not execute 16-bit DOS
-applications run asynchronously and can be opened for both reading and
-writing.  
-.RS
-.PP
-When running Tcl interactively, there may be some strange interactions
-between the real console, if one is present, and a command pipeline that uses
-standard input or output.  If a command pipeline is opened for reading from
-a 32-bit application, some of the keystrokes entered at the console will be
-sent to the command pipeline and some will be sent to the Tcl evaluator.  If
-a command pipeline is opened for writing to a 32-bit application, no output
-is visible on the console until the pipe is closed.  These problems only
-occur because both Tcl and the child application are competing for the
-console at the same time.  If the command pipeline is started from a script,
-so that Tcl is not accessing the console, or if the command pipeline does
-not use standard input or output, but is redirected from or to a file, then
-the above problems do not occur.  
-.PP
-Whether or not Tcl is running interactively, if a command pipeline is opened
-for reading from a 16-bit DOS application, the call to \fBopen\fR will not
-return until end-of-file has been received from the command pipeline's
-standard output.  If a command pipeline is opened for writing to a 16-bit DOS
-application, no data will be sent to the command pipeline's standard output
-until the pipe is actually closed.  This problem occurs because 16-bit DOS
-applications are run synchronously, as described above.  
+pipe is closed.  These problems only occur because both Tcl and the child
+application are competing for the console at the same time.  If the command
+pipeline is started from a script, so that Tcl is not accessing the console,
+or if the command pipeline does not use standard input or output, but is
+redirected from or to a file, then the above problems do not occur.  
 .RE
 .TP
 \fBUnix\fR\0\0\0\0\0\0\0
index b7a4a45..275771d 100644 (file)
@@ -97,6 +97,10 @@ writable channel event on the socket to get notified when the
 asynchronous connection has succeeded or failed. See the \fBvwait\fR
 and the \fBchan\fR commands for more details on the event loop and
 channel events.
+.PP
+The \fBchan configure\fR option \fB-connecting\fR may be used to check if the connect is still running. To verify a successful connect, the option \fB-error\fR may be checked when \fB-connecting\fR returned 0. 
+.PP
+Operation without the event queue requires at the moment calls to \fBchan configure\fR to advance the internal state machine. 
 .RE
 .SH "SERVER SOCKETS"
 .PP
@@ -186,6 +190,10 @@ sockets, this option returns a list of three elements; these are the
 address, the host name and the port to which the peer socket is connected
 or bound. If the host name cannot be computed, the second element of the
 list is identical to the address, its first element.
+.TP
+\fB\-connecting\fR
+.
+This option is not supported by server sockets. For client sockets, this option returns 1 if an asyncroneous connect is still in progress, 0 otherwise.
 .PP
 .SH "EXAMPLES"
 .PP
index 8d2398b..29265be 100644 (file)
@@ -642,14 +642,6 @@ This test can only be run on any Windows platform.
 .
 This test can only be run on any Windows NT platform.
 .TP
-\fI95\fR
-.
-This test can only be run on any Windows 95 platform.
-.TP
-\fI98\fR
-.
-This test can only be run on any Windows 98 platform.
-.TP
 \fImac\fR
 .
 This test can only be run on any Mac platform.
index 48ab83a..a8fba47 100644 (file)
@@ -308,18 +308,13 @@ is the value returned by \fBuname -m\fR.
 \fBos\fR
 .
 The name of the operating system running on this machine,
-such as \fBWindows 95\fR, \fBWindows NT\fR, or \fBSunOS\fR.
+such as \fBWindows NT\fR or \fBSunOS\fR.
 On UNIX machines, this is the value returned by \fBuname -s\fR.
-On Windows 95 and Windows 98, the value returned will be \fBWindows
-95\fR to provide better backwards compatibility to Windows 95; to
-distinguish between the two, check the \fBosVersion\fR.
 .TP
 \fBosVersion\fR
 .
 The version number for the operating system running on this machine.
-On UNIX machines, this is the value returned by \fBuname -r\fR.  On
-Windows 95, the version will be 4.0; on Windows 98, the version will
-be 4.10.
+On UNIX machines, this is the value returned by \fBuname -r\fR.
 .TP
 \fBpathSeparator\fR
 .VS 8.6
index c93eb24..7ca4346 100644 (file)
@@ -996,13 +996,13 @@ parseqatom(
     switch (v->nexttype) {
     case '*':
        m = 0;
-       n = INFINITY;
+       n = DUPINF;
        qprefer = (v->nextvalue) ? LONGER : SHORTER;
        NEXT();
        break;
     case '+':
        m = 1;
-       n = INFINITY;
+       n = DUPINF;
        qprefer = (v->nextvalue) ? LONGER : SHORTER;
        NEXT();
        break;
@@ -1019,7 +1019,7 @@ parseqatom(
            if (SEE(DIGIT)) {
                n = scannum(v);
            } else {
-               n = INFINITY;
+               n = DUPINF;
            }
            if (m > n) {
                ERR(REG_BADBR);
@@ -1217,8 +1217,8 @@ parseqatom(
         */
 
        dupnfa(v->nfa, atom->begin, atom->end, s, atom->begin);
-       assert(m >= 1 && m != INFINITY && n >= 1);
-       repeat(v, s, atom->begin, m-1, (n == INFINITY) ? n : n-1);
+       assert(m >= 1 && m != DUPINF && n >= 1);
+       repeat(v, s, atom->begin, m-1, (n == DUPINF) ? n : n-1);
        f = COMBINE(qprefer, atom->flags);
        t = subre(v, '.', f, s, atom->end);     /* prefix and atom */
        NOERR();
@@ -1323,7 +1323,7 @@ repeat(
 #define        SOME            2
 #define        INF             3
 #define        PAIR(x, y)      ((x)*4 + (y))
-#define        REDUCE(x)       ( ((x) == INFINITY) ? INF : (((x) > 1) ? SOME : (x)) )
+#define        REDUCE(x)       ( ((x) == DUPINF) ? INF : (((x) > 1) ? SOME : (x)) )
     const int rm = REDUCE(m);
     const int rn = REDUCE(n);
     struct state *s, *s2;
@@ -2108,7 +2108,7 @@ stdump(
     }
     if (t->min != 1 || t->max != 1) {
        fprintf(f, " {%d,", t->min);
-       if (t->max != INFINITY) {
+       if (t->max != DUPINF) {
            fprintf(f, "%d", t->max);
        }
        fprintf(f, "}");
index ad4b6e6..3b9af3e 100644 (file)
@@ -1122,7 +1122,7 @@ complicatedBackrefDissect(
      */
 
     i = 0;
-    for (p = begin; p <= stop && (i < max || max == INFINITY); p += len) {
+    for (p = begin; p <= stop && (i < max || max == DUPINF); p += len) {
        if (v->g->compare(paren, p, len) != 0) {
            break;
        }
@@ -1137,7 +1137,7 @@ complicatedBackrefDissect(
     if (p != end) {            /* didn't consume all of it */
        return REG_NOMATCH;
     }
-    if (min <= i && (i <= max || max == INFINITY)) {
+    if (min <= i && (i <= max || max == DUPINF)) {
        return REG_OKAY;
     }
     return REG_NOMATCH;                /* out of range */
index b478e4c..1b6abe6 100644 (file)
@@ -99,7 +99,7 @@
 #define        xxx             1
 
 #define        DUPMAX  _POSIX2_RE_DUP_MAX
-#define        INFINITY        (DUPMAX+1)
+#define        DUPINF  (DUPMAX+1)
 
 #define        REMAGIC 0xfed7          /* magic number for main struct */
 
index fc477f2..ae425bb 100644 (file)
@@ -56,10 +56,10 @@ extern "C" {
 #define TCL_MAJOR_VERSION   8
 #define TCL_MINOR_VERSION   6
 #define TCL_RELEASE_LEVEL   TCL_FINAL_RELEASE
-#define TCL_RELEASE_SERIAL  3
+#define TCL_RELEASE_SERIAL  4
 
 #define TCL_VERSION        "8.6"
-#define TCL_PATCH_LEVEL            "8.6.3"
+#define TCL_PATCH_LEVEL            "8.6.4"
 \f
 /*
  *----------------------------------------------------------------------------
@@ -2144,11 +2144,28 @@ typedef struct Tcl_EncodingType {
  *                             substituting one or more "close" characters in
  *                             the destination buffer and then continue to
  *                             convert the source.
+ * TCL_ENCODING_NO_TERMINATE -         If set, Tcl_ExternalToUtf will not append a
+ *                             terminating NUL byte.  Knowing that it will
+ *                             not need space to do so, it will fill all
+ *                             dstLen bytes with encoded UTF-8 content, as
+ *                             other circumstances permit.  If clear, the
+ *                             default behavior is to reserve a byte in
+ *                             the dst space for NUL termination, and to
+ *                             append the NUL byte.
+ * TCL_ENCODING_CHAR_LIMIT -   If set and dstCharsPtr is not NULL, then
+ *                             Tcl_ExternalToUtf takes the initial value
+ *                             of *dstCharsPtr is taken as a limit of the
+ *                             maximum number of chars to produce in the
+ *                             encoded UTF-8 content.  Otherwise, the 
+ *                             number of chars produced is controlled only
+ *                             by other limiting factors.
  */
 
 #define TCL_ENCODING_START             0x01
 #define TCL_ENCODING_END               0x02
 #define TCL_ENCODING_STOPONERROR       0x04
+#define TCL_ENCODING_NO_TERMINATE      0x08
+#define TCL_ENCODING_CHAR_LIMIT                0x10
 
 /*
  * The following definitions are the error codes returned by the conversion
index 18f4564..6a22a30 100644 (file)
@@ -177,9 +177,9 @@ TclCompileAppendCmd(
      */
 
     varTokenPtr = TokenAfter(parsePtr->tokenPtr);
-    PushVarNameWord(interp, varTokenPtr, envPtr, TCL_NO_ELEMENT,
-           &localIndex, &isScalar, 1);
-    if (!isScalar || localIndex < 0) {
+
+    localIndex = LocalScalarFromToken(varTokenPtr, envPtr);
+    if (localIndex < 0) {
        return TCL_ERROR;
     }
 
@@ -2527,25 +2527,17 @@ CompileEachloopCmd(
                                 * (TCL_EACH_*) */
 {
     Proc *procPtr = envPtr->procPtr;
-    ForeachInfo *infoPtr;      /* Points to the structure describing this
+    ForeachInfo *infoPtr=NULL; /* Points to the structure describing this
                                 * foreach command. Stored in a AuxData
                                 * record in the ByteCode. */
     
     Tcl_Token *tokenPtr, *bodyTokenPtr;
     int jumpBackOffset, infoIndex, range;
-    int numWords, numLists, numVars, loopIndex, i, j, code;
+    int numWords, numLists, i, j, code = TCL_OK;
+    Tcl_Obj *varListObj = NULL;
     DefineLineInformation;     /* TIP #280 */
 
     /*
-     * We parse the variable list argument words and create two arrays:
-     *    varcList[i] is number of variables in i-th var list.
-     *    varvList[i] points to array of var names in i-th var list.
-     */
-
-    int *varcList;
-    const char ***varvList;
-
-    /*
      * If the foreach command isn't in a procedure, don't compile it inline:
      * the payoff is too small.
      */
@@ -2573,105 +2565,73 @@ CompileEachloopCmd(
     }
 
     /*
-     * Allocate storage for the varcList and varvList arrays if necessary.
+     * Create and initialize the ForeachInfo and ForeachVarList data
+     * structures describing this command. Then create a AuxData record
+     * pointing to the ForeachInfo structure.
      */
 
     numLists = (numWords - 2)/2;
-    varcList = TclStackAlloc(interp, numLists * sizeof(int));
-    memset(varcList, 0, numLists * sizeof(int));
-    varvList = (const char ***) TclStackAlloc(interp,
-           numLists * sizeof(const char **));
-    memset((char*) varvList, 0, numLists * sizeof(const char **));
+    infoPtr = ckalloc(sizeof(ForeachInfo)
+           + (numLists - 1) * sizeof(ForeachVarList *));
+    infoPtr->numLists = 0;     /* Count this up as we go */
 
     /*
-     * Break up each var list and set the varcList and varvList arrays. Don't
+     * Parse each var list into sequence of var names.  Don't
      * compile the foreach inline if any var name needs substitutions or isn't
      * a scalar, or if any var list needs substitutions.
      */
 
-    loopIndex = 0;
+    varListObj = Tcl_NewObj();
     for (i = 0, tokenPtr = parsePtr->tokenPtr;
            i < numWords-1;
            i++, tokenPtr = TokenAfter(tokenPtr)) {
-       Tcl_DString varList;
+       ForeachVarList *varListPtr;
+       int numVars;
 
        if (i%2 != 1) {
            continue;
        }
-       if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) {
-           code = TCL_ERROR;
-           goto done;
-       }
-
-       /*
-        * Lots of copying going on here. Need a ListObj wizard to show a
-        * better way.
-        */
-
-       Tcl_DStringInit(&varList);
-       TclDStringAppendToken(&varList, &tokenPtr[1]);
-       code = Tcl_SplitList(NULL, Tcl_DStringValue(&varList),
-               &varcList[loopIndex], &varvList[loopIndex]);
-       Tcl_DStringFree(&varList);
-       if (code != TCL_OK) {
-           code = TCL_ERROR;
-           goto done;
-       }
-       numVars = varcList[loopIndex];
 
        /*
         * If the variable list is empty, we can enter an infinite loop when
-        * the interpreted version would not. Take care to ensure this does
-        * not happen. [Bug 1671138]
+        * the interpreted version would not.  Take care to ensure this does
+        * not happen.  [Bug 1671138]
         */
 
-       if (numVars == 0) {
+       if (!TclWordKnownAtCompileTime(tokenPtr, varListObj) ||
+               TCL_OK != Tcl_ListObjLength(NULL, varListObj, &numVars) ||
+               numVars == 0) {
            code = TCL_ERROR;
            goto done;
        }
 
-       for (j = 0;  j < numVars;  j++) {
-           const char *varName = varvList[loopIndex][j];
+       varListPtr = ckalloc(sizeof(ForeachVarList)
+               + (numVars - 1) * sizeof(int));
+       varListPtr->numVars = numVars;
+       infoPtr->varLists[i/2] = varListPtr;
+       infoPtr->numLists++;
 
-           if (!TclIsLocalScalar(varName, (int) strlen(varName))) {
+       for (j = 0;  j < numVars;  j++) {
+           Tcl_Obj *varNameObj;
+           const char *bytes;
+           int numBytes, varIndex;
+
+           Tcl_ListObjIndex(NULL, varListObj, j, &varNameObj);
+           bytes = Tcl_GetStringFromObj(varNameObj, &numBytes);
+           varIndex = LocalScalar(bytes, numBytes, envPtr);
+           if (varIndex < 0) {
                code = TCL_ERROR;
                goto done;
            }
+           varListPtr->varIndexes[j] = varIndex;
        }
-       loopIndex++;
+       Tcl_SetObjLength(varListObj, 0);
     }
 
     /*
      * We will compile the foreach command.
      */
 
-    code = TCL_OK;
-
-    /*
-     * Create and initialize the ForeachInfo and ForeachVarList data
-     * structures describing this command. Then create a AuxData record
-     * pointing to the ForeachInfo structure.
-     */
-
-    infoPtr = ckalloc(sizeof(ForeachInfo)
-           + (numLists - 1) * sizeof(ForeachVarList *));
-    infoPtr->numLists = numLists;
-    for (loopIndex = 0;  loopIndex < numLists;  loopIndex++) {
-       ForeachVarList *varListPtr;
-
-       numVars = varcList[loopIndex];
-       varListPtr = ckalloc(sizeof(ForeachVarList)
-               + (numVars - 1) * sizeof(int));
-       varListPtr->numVars = numVars;
-       for (j = 0;  j < numVars;  j++) {
-           const char *varName = varvList[loopIndex][j];
-           int nameChars = strlen(varName);
-
-           varListPtr->varIndexes[j] = TclFindCompiledLocal(varName,
-                   nameChars, /*create*/ 1, envPtr);
-       }
-       infoPtr->varLists[loopIndex] = varListPtr;
-    }
     infoIndex = TclCreateAuxData(infoPtr, &tclNewForeachInfoType, envPtr);
 
     /*
@@ -2743,13 +2703,14 @@ CompileEachloopCmd(
     }
     
     done:
-    for (loopIndex = 0;  loopIndex < numLists;  loopIndex++) {
-       if (varvList[loopIndex] != NULL) {
-           ckfree(varvList[loopIndex]);
+    if (code == TCL_ERROR) {
+       if (infoPtr) {
+           FreeForeachInfo(infoPtr);
        }
     }
-    TclStackFree(interp, (void *)varvList);
-    TclStackFree(interp, varcList);
+    if (varListObj) {
+       Tcl_DecrRefCount(varListObj);
+    }
     return code;
 }
 \f
@@ -3234,6 +3195,54 @@ TclCompileFormatCmd(
 /*
  *----------------------------------------------------------------------
  *
+ * TclLocalScalarFromToken --
+ *
+ *     Get the index into the table of compiled locals that corresponds
+ *     to a local scalar variable name.
+ *
+ * Results:
+ *     Returns the non-negative integer index value into the table of
+ *     compiled locals corresponding to a local scalar variable name.
+ *     If the arguments passed in do not identify a local scalar variable
+ *     then return -1.
+ *
+ * Side effects:
+ *     May add an entery into the table of compiled locals.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclLocalScalarFromToken(
+    Tcl_Token *tokenPtr,
+    CompileEnv *envPtr)
+{
+    int isScalar, index;
+
+    TclPushVarName(NULL, tokenPtr, envPtr, TCL_NO_ELEMENT, &index, &isScalar);
+    if (!isScalar) {
+       index = -1;
+    }
+    return index;
+}
+
+int
+TclLocalScalar(
+    const char *bytes,
+    int numBytes,
+    CompileEnv *envPtr)
+{
+    Tcl_Token token[2] =        {{TCL_TOKEN_SIMPLE_WORD, NULL, 0, 1},
+                                 {TCL_TOKEN_TEXT, NULL, 0, 0}};
+
+    token[1].start = bytes;
+    token[1].size = numBytes;
+    return TclLocalScalarFromToken(token, envPtr);
+}
+\f
+/*
+ *----------------------------------------------------------------------
+ *
  * TclPushVarName --
  *
  *     Procedure used in the compiling where pushing a variable name is
@@ -3289,16 +3298,7 @@ TclPushVarName(
     nameChars = elNameChars = 0;
     localIndex = -1;
 
-    /*
-     * Check not only that the type is TCL_TOKEN_SIMPLE_WORD, but whether
-     * curly braces surround the variable name. This really matters for array
-     * elements to handle things like
-     *    set {x($foo)} 5
-     * which raises an undefined var error if we are not careful here.
-     */
-
-    if ((varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) &&
-           (varTokenPtr->start[0] != '{')) {
+    if (varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) {
        /*
         * A simple variable name. Divide it up into "name" and "elName"
         * strings. If it is not a local variable, look it up at runtime.
@@ -3322,7 +3322,7 @@ TclPushVarName(
                }
            }
 
-           if ((elName != NULL) && elNameChars) {
+           if (!(flags & TCL_NO_ELEMENT) && (elName != NULL) && elNameChars) {
                /*
                 * An array element, the element name is a simple string:
                 * assemble the corresponding token.
@@ -3337,7 +3337,7 @@ TclPushVarName(
                elemTokenCount = 1;
            }
        }
-    } else if (((n = varTokenPtr->numComponents) > 1)
+    } else if (interp && ((n = varTokenPtr->numComponents) > 1)
            && (varTokenPtr[1].type == TCL_TOKEN_TEXT)
            && (varTokenPtr[n].type == TCL_TOKEN_TEXT)
            && (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) {
@@ -3373,9 +3373,10 @@ TclPushVarName(
            nameChars = p - varTokenPtr[1].start;
            elName = p + 1;
            remainingChars = (varTokenPtr[2].start - p) - 1;
-           elNameChars = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 2;
+           elNameChars = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 1;
 
-           if (remainingChars) {
+           if (!(flags & TCL_NO_ELEMENT)) {
+             if (remainingChars) {
                /*
                 * Make a first token with the extra characters in the first
                 * token.
@@ -3395,13 +3396,14 @@ TclPushVarName(
 
                memcpy(elemTokenPtr+1, varTokenPtr+2,
                        (n-1) * sizeof(Tcl_Token));
-           } else {
+             } else {
                /*
                 * Use the already available tokens.
                 */
 
                elemTokenPtr = &varTokenPtr[2];
                elemTokenCount = n - 1;
+             }
            }
        }
     }
@@ -3436,7 +3438,7 @@ TclPushVarName(
                localIndex = -1;
            }
        }
-       if (localIndex < 0) {
+       if (interp && localIndex < 0) {
            PushLiteral(envPtr, name, nameChars);
        }
 
@@ -3453,7 +3455,7 @@ TclPushVarName(
                PushStringLiteral(envPtr, "");
            }
        }
-    } else {
+    } else if (interp) {
        /*
         * The var name isn't simple: compile and push it.
         */
index 98407f7..b77c43c 100644 (file)
@@ -1501,6 +1501,10 @@ TclCompileLreplaceCmd(
        return TCL_ERROR;
     }
 
+    if(idx2 != INDEX_END && idx2 < idx1) {
+       idx2 = idx1-1;
+    }
+
     /*
      * Work out what this [lreplace] is actually doing.
      */
@@ -2044,7 +2048,7 @@ TclCompileNamespaceUpvarCmd(
     CompileEnv *envPtr)                /* Holds resulting instructions. */
 {
     Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr;
-    int isScalar, localIndex, numWords, i;
+    int localIndex, numWords, i;
     DefineLineInformation;     /* TIP #280 */
 
     if (envPtr->procPtr == NULL) {
@@ -2079,10 +2083,8 @@ TclCompileNamespaceUpvarCmd(
        localTokenPtr = TokenAfter(otherTokenPtr);
 
        CompileWord(envPtr, otherTokenPtr, interp, i);
-       PushVarNameWord(interp, localTokenPtr, envPtr, 0,
-               &localIndex, &isScalar, i+1);
-
-       if ((localIndex < 0) || !isScalar) {
+       localIndex = LocalScalarFromToken(localTokenPtr, envPtr);
+       if (localIndex < 0) {
            return TCL_ERROR;
        }
        TclEmitInstInt4(        INST_NSUPVAR, localIndex,       envPtr);
@@ -2763,7 +2765,7 @@ TclCompileUpvarCmd(
     CompileEnv *envPtr)                /* Holds resulting instructions. */
 {
     Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr;
-    int isScalar, localIndex, numWords, i;
+    int localIndex, numWords, i;
     DefineLineInformation;     /* TIP #280 */
     Tcl_Obj *objPtr;
 
@@ -2826,10 +2828,8 @@ TclCompileUpvarCmd(
        localTokenPtr = TokenAfter(otherTokenPtr);
 
        CompileWord(envPtr, otherTokenPtr, interp, i);
-       PushVarNameWord(interp, localTokenPtr, envPtr, 0,
-               &localIndex, &isScalar, i+1);
-
-       if ((localIndex < 0) || !isScalar) {
+       localIndex = LocalScalarFromToken(localTokenPtr, envPtr);
+       if (localIndex < 0) {
            return TCL_ERROR;
        }
        TclEmitInstInt4(        INST_UPVAR, localIndex,         envPtr);
index 94c1bd6..38c1ceb 100644 (file)
@@ -365,7 +365,7 @@ static const unsigned char prec[] = {
     0,  0,  0,
     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  
+    0,
     /* Unary operator lexemes */
     PREC_UNARY,                /* UNARY_PLUS */
     PREC_UNARY,                /* UNARY_MINUS */
@@ -420,7 +420,7 @@ static const unsigned char instruction[] = {
     0,  0,  0,
     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  
+    0,
     /* Unary operator lexemes */
     INST_UPLUS,                /* UNARY_PLUS */
     INST_UMINUS,       /* UNARY_MINUS */
@@ -488,7 +488,7 @@ static const unsigned char Lexeme[] = {
 
 typedef struct JumpList {
     JumpFixup jump;            /* Pass this argument to matching calls of
-                                * TclEmitForwardJump() and 
+                                * TclEmitForwardJump() and
                                 * TclFixupForwardJump(). */
     struct JumpList *next;     /* Point to next item on the stack */
 } JumpList;
@@ -838,7 +838,7 @@ ParseExpr(
 
            switch (lexeme) {
            case NUMBER:
-           case BOOLEAN: 
+           case BOOLEAN:
                /*
                 * TODO: Consider using a dict or hash to collapse all
                 * duplicate literals into a single representative value.
@@ -861,7 +861,7 @@ ParseExpr(
                start += scanned;
                numBytes -= scanned;
                continue;
-           
+
            default:
                break;
            }
@@ -1324,7 +1324,7 @@ ParseExpr(
            nodePtr->mark = MARK_LEFT;
            nodePtr->left = complete;
 
-           /* 
+           /*
             * The COMMA operator cannot be optimized, since the function
             * needs all of its arguments, and optimization would reduce the
             * number. Other binary operators root constant expressions when
@@ -1546,7 +1546,7 @@ ConvertTreeToTokens(
             * Tcl_ParseExpr() we do not change them now. Internally, we can
             * do better.
             */
-       
+
            int toCopy = tokenPtr->numComponents + 1;
 
            if (tokenPtr->numComponents == tokenPtr[1].numComponents + 1) {
@@ -1562,7 +1562,7 @@ ConvertTreeToTokens(
                subExprTokenPtr->type = TCL_TOKEN_SUB_EXPR;
                parsePtr->numTokens += toCopy;
            } else {
-               /* 
+               /*
                 * Multiple element word. Create a TCL_TOKEN_SUB_EXPR token to
                 * lead, with fields initialized from the leading token, then
                 * copy entire set of word tokens.
@@ -1611,7 +1611,7 @@ ConvertTreeToTokens(
            case COMMA:
            case COLON:
 
-               /* 
+               /*
                 * Historical practice has been to have no Tcl_Tokens for
                 * these operators.
                 */
@@ -1747,7 +1747,7 @@ ConvertTreeToTokens(
                /*
                 * Before we leave this node/operator/subexpression for the
                 * last time, finish up its tokens....
-                * 
+                *
                 * Our current position scanning the string is where the
                 * substring for the subexpression ends.
                 */
@@ -1967,7 +1967,7 @@ ParseLexeme(
 
     case 'i':
        if ((numBytes > 1) && (start[1] == 'n')
-               && ((numBytes == 2) || !isalpha(UCHAR(start[2])))) {
+               && ((numBytes == 2) || start[2] & 0x80 || !isalpha(UCHAR(start[2])))) {
            /*
             * Must make this check so we can tell the difference between the
             * "in" operator and the "int" function name and the "infinity"
@@ -1981,14 +1981,15 @@ ParseLexeme(
 
     case 'e':
        if ((numBytes > 1) && (start[1] == 'q')
-               && ((numBytes == 2) || !isalpha(UCHAR(start[2])))) {
+               && ((numBytes == 2) || start[2] & 0x80 || !isalpha(UCHAR(start[2])))) {
            *lexemePtr = STREQ;
            return 2;
        }
        break;
 
     case 'n':
-       if ((numBytes > 1) && ((numBytes == 2) || !isalpha(UCHAR(start[2])))) {
+       if ((numBytes > 1)
+               && ((numBytes == 2) || start[2] & 0x80 || !isalpha(UCHAR(start[2])))) {
            switch (start[1]) {
            case 'e':
                *lexemePtr = STRNEQ;
@@ -2003,9 +2004,8 @@ ParseLexeme(
     literal = Tcl_NewObj();
     if (TclParseNumber(NULL, literal, NULL, start, numBytes, &end,
            TCL_PARSE_NO_WHITESPACE) == TCL_OK) {
-       if (end < start + numBytes && !isalnum(UCHAR(*end))
-               && UCHAR(*end) != '_') {
-       
+       if (end < start + numBytes && !TclIsBareword(*end)) {
+
        number:
            TclInitStringRep(literal, start, end-start);
            *lexemePtr = NUMBER;
@@ -2029,9 +2029,9 @@ ParseLexeme(
                const char *p = start;
 
                while (p < end) {
-                   if (!isalnum(UCHAR(*p++))) {
+                   if (!TclIsBareword(*p++)) {
                        /*
-                        * The number has non-bareword characters, so we 
+                        * The number has non-bareword characters, so we
                         * must treat it as a number.
                         */
                        goto number;
@@ -2054,33 +2054,30 @@ ParseLexeme(
        }
     }
 
-    if (Tcl_UtfCharComplete(start, numBytes)) {
-       scanned = Tcl_UtfToUniChar(start, &ch);
-    } else {
-       char utfBytes[TCL_UTF_MAX];
+    /*
+     * We reject leading underscores in bareword.  No sensible reason why.
+     * Might be inspired by reserved identifier rules in C, which of course
+     * have no direct relevance here.
+     */
 
-       memcpy(utfBytes, start, (size_t) numBytes);
-       utfBytes[numBytes] = '\0';
-       scanned = Tcl_UtfToUniChar(utfBytes, &ch);
-    }
-    if (!isalnum(UCHAR(ch))) {
-       *lexemePtr = INVALID;
-       Tcl_DecrRefCount(literal);
-       return scanned;
-    }
-    end = start;
-    while (isalnum(UCHAR(ch)) || (UCHAR(ch) == '_')) {
-       end += scanned;
-       numBytes -= scanned;
-       if (Tcl_UtfCharComplete(end, numBytes)) {
-           scanned = Tcl_UtfToUniChar(end, &ch);
+    if (!TclIsBareword(*start) || *start == '_') {
+       if (Tcl_UtfCharComplete(start, numBytes)) {
+           scanned = Tcl_UtfToUniChar(start, &ch);
        } else {
            char utfBytes[TCL_UTF_MAX];
 
-           memcpy(utfBytes, end, (size_t) numBytes);
+           memcpy(utfBytes, start, (size_t) numBytes);
            utfBytes[numBytes] = '\0';
            scanned = Tcl_UtfToUniChar(utfBytes, &ch);
        }
+       *lexemePtr = INVALID;
+       Tcl_DecrRefCount(literal);
+       return scanned;
+    }
+    end = start;
+    while (numBytes && TclIsBareword(*end)) {
+       end += 1;
+       numBytes -= 1;
     }
     *lexemePtr = BAREWORD;
     if (literalPtr) {
@@ -2098,7 +2095,7 @@ ParseLexeme(
  * TclCompileExpr --
  *
  *     This procedure compiles a string containing a Tcl expression into Tcl
- *     bytecodes. 
+ *     bytecodes.
  *
  * Results:
  *     None.
@@ -2333,7 +2330,7 @@ CompileExprTree(
                 * Use the numWords count we've kept to invoke the function
                 * command with the correct number of arguments.
                 */
-               
+
                if (numWords < 255) {
                    TclEmitInvoke(envPtr, INST_INVOKE_STK1, numWords);
                } else {
@@ -2427,7 +2424,7 @@ CompileExprTree(
                const char *bytes = TclGetStringFromObj(literal, &length);
                int index = TclRegisterNewLiteral(envPtr, bytes, length);
                Tcl_Obj *objPtr = TclFetchLiteral(envPtr, index);
-               
+
                if ((objPtr->typePtr == NULL) && (literal->typePtr != NULL)) {
                    /*
                     * Would like to do this:
@@ -2570,7 +2567,7 @@ TclSingleOpCmd(
  *
  * TclSortingOpCmd --
  *     Implements the commands:
- *             <, <=, >, >=, ==, eq 
+ *             <, <=, >, >=, ==, eq
  *     in the ::tcl::mathop namespace. These commands are defined for
  *     arbitrary number of arguments by computing the AND of the base
  *     operator applied to all neighbor argument pairs.
index 3736498..0f4dfaf 100644 (file)
@@ -4342,10 +4342,11 @@ TclInitAuxDataTypeTable(void)
     Tcl_InitHashTable(&auxDataTypeTable, TCL_STRING_KEYS);
 
     /*
-     * There are only three AuxData types at this time, so register them here.
+     * There are only four AuxData types at this time, so register them here.
      */
 
     RegisterAuxDataType(&tclForeachInfoType);
+    RegisterAuxDataType(&tclNewForeachInfoType);
     RegisterAuxDataType(&tclJumptableInfoType);
     RegisterAuxDataType(&tclDictUpdateInfoType);
 }
index 51f0b34..c6c7a7c 100644 (file)
@@ -1151,6 +1151,10 @@ MODULE_SCOPE void        TclFinalizeLoopExceptionRange(CompileEnv *envPtr,
 MODULE_SCOPE char *    TclLiteralStats(LiteralTable *tablePtr);
 MODULE_SCOPE int       TclLog2(int value);
 #endif
+MODULE_SCOPE int       TclLocalScalar(const char *bytes, int numBytes,
+                           CompileEnv *envPtr);
+MODULE_SCOPE int       TclLocalScalarFromToken(Tcl_Token *tokenPtr,
+                           CompileEnv *envPtr);
 MODULE_SCOPE void      TclOptimizeBytecode(void *envPtr);
 #ifdef TCL_COMPILE_DEBUG
 MODULE_SCOPE void      TclPrintByteCodeObj(Tcl_Interp *interp,
@@ -1678,11 +1682,9 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
 #define AnonymousLocal(envPtr) \
     (TclFindCompiledLocal(NULL, /*nameChars*/ 0, /*create*/ 1, (envPtr)))
 #define LocalScalar(chars,len,envPtr) \
-    (!TclIsLocalScalar((chars), (len)) ? -1 : \
-       TclFindCompiledLocal((chars), (len), /*create*/ 1, (envPtr)))
+    TclLocalScalar(chars, len, envPtr)
 #define LocalScalarFromToken(tokenPtr,envPtr) \
-    ((tokenPtr)->type != TCL_TOKEN_SIMPLE_WORD ? -1 : \
-       LocalScalar((tokenPtr)[1].start, (tokenPtr)[1].size, (envPtr)))
+    TclLocalScalarFromToken(tokenPtr, envPtr)
 
 /*
  * Flags bits used by TclPushVarName.
index d246cb2..179ca17 100644 (file)
@@ -180,9 +180,9 @@ TCL_DECLARE_MUTEX(encodingMutex)
  * the system encoding will be used to perform the conversion.
  */
 
-static Tcl_Encoding defaultEncoding;
-static Tcl_Encoding systemEncoding;
-Tcl_Encoding tclIdentityEncoding;
+static Tcl_Encoding defaultEncoding = NULL;
+static Tcl_Encoding systemEncoding = NULL;
+Tcl_Encoding tclIdentityEncoding = NULL;
 
 /*
  * The following variable is used in the sparse matrix code for a
@@ -652,7 +652,10 @@ TclFinalizeEncodingSubsystem(void)
     Tcl_MutexLock(&encodingMutex);
     encodingsInitialized = 0;
     FreeEncoding(systemEncoding);
+    systemEncoding = NULL;
+    defaultEncoding = NULL;
     FreeEncoding(tclIdentityEncoding);
+    tclIdentityEncoding = NULL;
 
     hPtr = Tcl_FirstHashEntry(&encodingTable, &search);
     while (hPtr != NULL) {
@@ -1203,7 +1206,10 @@ Tcl_ExternalToUtf(
                                 * output buffer. */
 {
     const Encoding *encodingPtr;
-    int result, srcRead, dstWrote, dstChars;
+    int result, srcRead, dstWrote, dstChars = 0;
+    int noTerminate = flags & TCL_ENCODING_NO_TERMINATE;
+    int charLimited = (flags & TCL_ENCODING_CHAR_LIMIT) && dstCharsPtr;
+    int maxChars = INT_MAX;
     Tcl_EncodingState state;
 
     if (encoding == NULL) {
@@ -1228,19 +1234,40 @@ Tcl_ExternalToUtf(
     }
     if (dstCharsPtr == NULL) {
        dstCharsPtr = &dstChars;
+       flags &= ~TCL_ENCODING_CHAR_LIMIT;
+    } else if (charLimited) {
+       maxChars = *dstCharsPtr;
     }
 
-    /*
-     * If there are any null characters in the middle of the buffer, they will
-     * converted to the UTF-8 null character (\xC080). To get the actual \0 at
-     * the end of the destination buffer, we need to append it manually.
-     */
+    if (!noTerminate) {
+       /*
+        * If there are any null characters in the middle of the buffer,
+        * they will converted to the UTF-8 null character (\xC080). To get
+        * the actual \0 at the end of the destination buffer, we need to
+        * append it manually.  First make room for it...
+        */
 
-    dstLen--;
-    result = encodingPtr->toUtfProc(encodingPtr->clientData, src, srcLen,
-           flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
-           dstCharsPtr);
-    dst[*dstWrotePtr] = '\0';
+       dstLen--;
+    }
+    do {
+       int savedFlags = flags;
+       Tcl_EncodingState savedState = *statePtr;
+
+       result = encodingPtr->toUtfProc(encodingPtr->clientData, src, srcLen,
+               flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
+               dstCharsPtr);
+       if (*dstCharsPtr <= maxChars) {
+           break;
+       }
+       dstLen = Tcl_UtfAtIndex(dst, maxChars) - 1 - dst + TCL_UTF_MAX;
+       flags = savedFlags;
+       *statePtr = savedState;
+    } while (1);
+    if (!noTerminate) {
+       /* ...and then append it */
+
+       dst[*dstWrotePtr] = '\0';
+    }
 
     return result;
 }
@@ -2104,6 +2131,9 @@ BinaryProc(
     if (dstLen < 0) {
        dstLen = 0;
     }
+    if ((flags & TCL_ENCODING_CHAR_LIMIT) && srcLen > *dstCharsPtr) {
+       srcLen = *dstCharsPtr;
+    }
     if (srcLen > dstLen) {
        srcLen = dstLen;
        result = TCL_CONVERT_NOSPACE;
@@ -2264,7 +2294,7 @@ UtfToUtfProc(
 {
     const char *srcStart, *srcEnd, *srcClose;
     const char *dstStart, *dstEnd;
-    int result, numChars;
+    int result, numChars, charLimit = INT_MAX;
     Tcl_UniChar ch;
 
     result = TCL_OK;
@@ -2275,11 +2305,14 @@ UtfToUtfProc(
     if ((flags & TCL_ENCODING_END) == 0) {
        srcClose -= TCL_UTF_MAX;
     }
+    if (flags & TCL_ENCODING_CHAR_LIMIT) {
+       charLimit = *dstCharsPtr;
+    }
 
     dstStart = dst;
     dstEnd = dst + dstLen - TCL_UTF_MAX;
 
-    for (numChars = 0; src < srcEnd; numChars++) {
+    for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
        if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) {
            /*
             * If there is more string to follow, this will ensure that the
@@ -2375,9 +2408,12 @@ UnicodeToUtfProc(
 {
     const char *srcStart, *srcEnd;
     const char *dstEnd, *dstStart;
-    int result, numChars;
+    int result, numChars, charLimit = INT_MAX;
     Tcl_UniChar ch;
 
+    if (flags & TCL_ENCODING_CHAR_LIMIT) {
+       charLimit = *dstCharsPtr;
+    }
     result = TCL_OK;
     if ((srcLen % sizeof(Tcl_UniChar)) != 0) {
        result = TCL_CONVERT_MULTIBYTE;
@@ -2391,7 +2427,7 @@ UnicodeToUtfProc(
     dstStart = dst;
     dstEnd = dst + dstLen - TCL_UTF_MAX;
 
-    for (numChars = 0; src < srcEnd; numChars++) {
+    for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
        if (dst > dstEnd) {
            result = TCL_CONVERT_NOSPACE;
            break;
@@ -2559,12 +2595,15 @@ TableToUtfProc(
 {
     const char *srcStart, *srcEnd;
     const char *dstEnd, *dstStart, *prefixBytes;
-    int result, byte, numChars;
+    int result, byte, numChars, charLimit = INT_MAX;
     Tcl_UniChar ch;
     const unsigned short *const *toUnicode;
     const unsigned short *pageZero;
     TableEncodingData *dataPtr = clientData;
 
+    if (flags & TCL_ENCODING_CHAR_LIMIT) {
+       charLimit = *dstCharsPtr;
+    }
     srcStart = src;
     srcEnd = src + srcLen;
 
@@ -2576,7 +2615,7 @@ TableToUtfProc(
     pageZero = toUnicode[0];
 
     result = TCL_OK;
-    for (numChars = 0; src < srcEnd; numChars++) {
+    for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
        if (dst > dstEnd) {
            result = TCL_CONVERT_NOSPACE;
            break;
@@ -2790,8 +2829,11 @@ Iso88591ToUtfProc(
 {
     const char *srcStart, *srcEnd;
     const char *dstEnd, *dstStart;
-    int result, numChars;
+    int result, numChars, charLimit = INT_MAX;
 
+    if (flags & TCL_ENCODING_CHAR_LIMIT) {
+       charLimit = *dstCharsPtr;
+    }
     srcStart = src;
     srcEnd = src + srcLen;
 
@@ -2799,7 +2841,7 @@ Iso88591ToUtfProc(
     dstEnd = dst + dstLen - TCL_UTF_MAX;
 
     result = TCL_OK;
-    for (numChars = 0; src < srcEnd; numChars++) {
+    for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
        Tcl_UniChar ch;
 
        if (dst > dstEnd) {
@@ -2960,7 +3002,9 @@ TableFreeProc(
      */
 
     ckfree(dataPtr->toUnicode);
+    dataPtr->toUnicode = NULL;
     ckfree(dataPtr->fromUnicode);
+    dataPtr->fromUnicode = NULL;
     ckfree(dataPtr);
 }
 \f
@@ -3013,9 +3057,12 @@ EscapeToUtfProc(
     const char *prefixBytes, *tablePrefixBytes, *srcStart, *srcEnd;
     const unsigned short *const *tableToUnicode;
     const Encoding *encodingPtr;
-    int state, result, numChars;
+    int state, result, numChars, charLimit = INT_MAX;
     const char *dstStart, *dstEnd;
 
+    if (flags & TCL_ENCODING_CHAR_LIMIT) {
+       charLimit = *dstCharsPtr;
+    }
     result = TCL_OK;
     tablePrefixBytes = NULL;   /* lint. */
     tableToUnicode = NULL;     /* lint. */
@@ -3033,7 +3080,7 @@ EscapeToUtfProc(
        state = 0;
     }
 
-    for (numChars = 0; src < srcEnd; ) {
+    for (numChars = 0; src < srcEnd && numChars <= charLimit; ) {
        int byte, hi, lo, ch;
 
        if (dst > dstEnd) {
@@ -3433,6 +3480,7 @@ EscapeFreeProc(
        subTablePtr = dataPtr->subTables;
        for (i = 0; i < dataPtr->numSubTables; i++) {
            FreeEncoding((Tcl_Encoding) subTablePtr->encodingPtr);
+           subTablePtr->encodingPtr = NULL;
            subTablePtr++;
        }
     }
index 3985767..6ca22a6 100644 (file)
@@ -119,6 +119,7 @@ static char *               VwaitVarProc(ClientData clientData,
                            Tcl_Interp *interp, const char *name1,
                            const char *name2, int flags);
 static void            InvokeExitHandlers(void);
+static void            FinalizeThread(int quick);
 \f
 /*
  *----------------------------------------------------------------------
@@ -983,7 +984,7 @@ Tcl_Exit(
             * Tcl_Channels that may have data enqueued.
             */
            
-           Tcl_FinalizeThread();
+           FinalizeThread(/* quick */ 1);
        }
        TclpExit(status);
        Tcl_Panic("OS exit failed!");
@@ -1183,7 +1184,7 @@ Tcl_Finalize(void)
      * This fixes the Tcl Bug #990552.
      */
 
-    TclFinalizeThreadData();
+    TclFinalizeThreadData(/* quick */ 0);
 
     /*
      * Now we can free constants for conversions to/from double.
@@ -1269,6 +1270,13 @@ Tcl_Finalize(void)
 void
 Tcl_FinalizeThread(void)
 {
+    FinalizeThread(/* quick */ 0);
+}
+
+void
+FinalizeThread(
+    int quick)
+{
     ExitHandler *exitPtr;
     ThreadSpecificData *tsdPtr;
 
@@ -1309,7 +1317,7 @@ Tcl_FinalizeThread(void)
      *
      * Fix [Bug #571002]
      */
-    TclFinalizeThreadData();
+    TclFinalizeThreadData(quick);
 }
 \f
 /*
index 2e03ab4..b9da8fc 100644 (file)
@@ -81,9 +81,7 @@ int tclTraceExec = 0;
 
 static const char *const operatorStrings[] = {
     "||", "&&", "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>",
-    "+", "-", "*", "/", "%", "+", "-", "~", "!",
-    "BUILTIN FUNCTION", "FUNCTION",
-    "", "", "", "", "", "", "", "", "eq", "ne"
+    "+", "-", "*", "/", "%", "+", "-", "~", "!"
 };
 
 /*
@@ -5412,8 +5410,8 @@ TEBCresume(
                s1 = (char *) Tcl_GetByteArrayFromObj(valuePtr, &s1len);
                s2 = (char *) Tcl_GetByteArrayFromObj(value2Ptr, &s2len);
                memCmpFn = memcmp;
-           } else if (((valuePtr->typePtr == &tclStringType)
-                   && (value2Ptr->typePtr == &tclStringType))) {
+           } else if ((valuePtr->typePtr == &tclStringType)
+                   && (value2Ptr->typePtr == &tclStringType)) {
                /*
                 * Do a unicode-specific comparison if both of the args are of
                 * String type. If the char length == byte length, we can do a
@@ -5424,7 +5422,9 @@ TEBCresume(
                s1len = Tcl_GetCharLength(valuePtr);
                s2len = Tcl_GetCharLength(value2Ptr);
                if ((s1len == valuePtr->length)
-                       && (s2len == value2Ptr->length)) {
+                       && (valuePtr->bytes != NULL)
+                       && (s2len == value2Ptr->length)
+                       && (value2Ptr->bytes != NULL)) {
                    s1 = valuePtr->bytes;
                    s2 = value2Ptr->bytes;
                    memCmpFn = memcmp;
@@ -9830,7 +9830,7 @@ IllegalExprOperandType(
 
     if (opcode == INST_EXPON) {
        operator = "**";
-    } else if (opcode <= INST_STR_NEQ) {
+    } else if (opcode <= INST_LNOT) {
        operator = operatorStrings[opcode - INST_LOR];
     }
 
index 5d4702b..a7251bb 100644 (file)
@@ -235,9 +235,9 @@ ExtractWinRoot(
        if ((path[0] == 'c' || path[0] == 'C')
                && (path[1] == 'o' || path[1] == 'O')) {
            if ((path[2] == 'm' || path[2] == 'M')
-                   && path[3] >= '1' && path[3] <= '4') {
+                   && path[3] >= '1' && path[3] <= '9') {
                /*
-                * May have match for 'com[1-4]:?', which is a serial port.
+                * May have match for 'com[1-9]:?', which is a serial port.
                 */
 
                if (path[4] == '\0') {
@@ -257,9 +257,9 @@ ExtractWinRoot(
        } else if ((path[0] == 'l' || path[0] == 'L')
                && (path[1] == 'p' || path[1] == 'P')
                && (path[2] == 't' || path[2] == 'T')) {
-           if (path[3] >= '1' && path[3] <= '3') {
+           if (path[3] >= '1' && path[3] <= '9') {
                /*
-                * May have match for 'lpt[1-3]:?'
+                * May have match for 'lpt[1-9]:?'
                 */
 
                if (path[4] == '\0') {
index 2025742..c4757ea 100644 (file)
@@ -1548,6 +1548,22 @@ Tcl_CreateChannel(
      */
 
     assert(sizeof(Tcl_ChannelTypeVersion) == sizeof(Tcl_DriverBlockModeProc *));
+    assert(typePtr->typeName != NULL);
+    if (NULL == typePtr->closeProc) {
+       Tcl_Panic("channel type %s must define closeProc", typePtr->typeName);
+    }
+    if ((TCL_READABLE & mask) && (NULL == typePtr->inputProc)) {
+       Tcl_Panic("channel type %s must define inputProc when used for reader channel", typePtr->typeName);
+    }
+    if ((TCL_WRITABLE & mask) &&  (NULL == typePtr->outputProc)) {
+       Tcl_Panic("channel type %s must define outputProc when used for writer channel", typePtr->typeName);
+    }
+    if (NULL == typePtr->watchProc) {
+       Tcl_Panic("channel type %s must define watchProc", typePtr->typeName);
+    }
+    if ((NULL!=typePtr->wideSeekProc) && (NULL == typePtr->seekProc)) {
+       Tcl_Panic("channel type %s must define seekProc if defining wideSeekProc", typePtr->typeName);
+    }
 
     /*
      * JH: We could subsequently memset these to 0 to avoid the numerous
@@ -4578,14 +4594,14 @@ Tcl_GetsObj(
                     * Skip the raw bytes that make up the '\n'.
                     */
 
-                   char tmp[1 + TCL_UTF_MAX];
+                   char tmp[TCL_UTF_MAX];
                    int rawRead;
 
                    bufPtr = gs.bufPtr;
                    Tcl_ExternalToUtf(NULL, gs.encoding, RemovePoint(bufPtr),
-                           gs.rawRead, statePtr->inputEncodingFlags,
-                           &gs.state, tmp, 1 + TCL_UTF_MAX, &rawRead, NULL,
-                           NULL);
+                           gs.rawRead, statePtr->inputEncodingFlags
+                               | TCL_ENCODING_NO_TERMINATE, &gs.state, tmp,
+                           TCL_UTF_MAX, &rawRead, NULL, NULL);
                    bufPtr->nextRemoved += rawRead;
                    gs.rawRead -= rawRead;
                    gs.bytesWrote--;
@@ -4686,8 +4702,9 @@ Tcl_GetsObj(
     }
     statePtr->inputEncodingState = gs.state;
     Tcl_ExternalToUtf(NULL, gs.encoding, RemovePoint(bufPtr), gs.rawRead,
-           statePtr->inputEncodingFlags, &statePtr->inputEncodingState, dst,
-           eol - dst + skip + TCL_UTF_MAX, &gs.rawRead, NULL,
+           statePtr->inputEncodingFlags | TCL_ENCODING_NO_TERMINATE,
+           &statePtr->inputEncodingState, dst,
+           eol - dst + skip + TCL_UTF_MAX - 1, &gs.rawRead, NULL,
            &gs.charsWrote);
     bufPtr->nextRemoved += gs.rawRead;
 
@@ -5219,9 +5236,9 @@ FilterInputBytes(
     }
     gsPtr->state = statePtr->inputEncodingState;
     result = Tcl_ExternalToUtf(NULL, gsPtr->encoding, raw, rawLen,
-           statePtr->inputEncodingFlags, &statePtr->inputEncodingState,
-           dst, spaceLeft+1, &gsPtr->rawRead, &gsPtr->bytesWrote,
-           &gsPtr->charsWrote);
+           statePtr->inputEncodingFlags | TCL_ENCODING_NO_TERMINATE,
+           &statePtr->inputEncodingState, dst, spaceLeft, &gsPtr->rawRead,
+           &gsPtr->bytesWrote, &gsPtr->charsWrote);
 
     /*
      * Make sure that if we go through 'gets', that we reset the
@@ -5734,8 +5751,8 @@ DoReadChars(
     chanPtr = statePtr->topChanPtr;
     TclChannelPreserve((Tcl_Channel)chanPtr);
 
-    /* Must clear the BLOCKED flag here since we check before reading */
-    ResetFlag(statePtr, CHANNEL_BLOCKED);
+    /* Must clear the BLOCKED|EOF flags here since we check before reading */
+    ResetFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_EOF);
     for (copied = 0; (unsigned) toRead > 0; ) {
        copiedNow = -1;
        if (statePtr->inQueueHead != NULL) {
@@ -5928,7 +5945,7 @@ ReadChars(
     int savedIEFlags = statePtr->inputEncodingFlags;
     int savedFlags = statePtr->flags;
     char *dst, *src = RemovePoint(bufPtr);
-    int dstLimit, numBytes, srcLen = BytesLeft(bufPtr);
+    int numBytes, srcLen = BytesLeft(bufPtr);
 
     /*
      * One src byte can yield at most one character.  So when the
@@ -5947,14 +5964,14 @@ ReadChars(
      */
     
     int factor = *factorPtr;
-    int dstNeeded = TCL_UTF_MAX - 1 + toRead * factor / UTF_EXPANSION_FACTOR;
+    int dstLimit = TCL_UTF_MAX - 1 + toRead * factor / UTF_EXPANSION_FACTOR;
 
     (void) TclGetStringFromObj(objPtr, &numBytes);
-    Tcl_AppendToObj(objPtr, NULL, dstNeeded);
+    Tcl_AppendToObj(objPtr, NULL, dstLimit);
     if (toRead == srcLen) {
        unsigned int size;
        dst = TclGetStringStorage(objPtr, &size) + numBytes;
-       dstNeeded = size - numBytes;
+       dstLimit = size - numBytes;
     } else {
        dst = TclGetString(objPtr) + numBytes;
     }
@@ -5975,19 +5992,24 @@ ReadChars(
      * a consistent set of results.  This takes the shape of a loop.
      */
 
-    dstLimit = dstNeeded + 1;
     while (1) {
-       int dstDecoded, dstRead, dstWrote, srcRead, numChars;
+       int dstDecoded, dstRead, dstWrote, srcRead, numChars, code;
+       int flags = statePtr->inputEncodingFlags | TCL_ENCODING_NO_TERMINATE;
+       
+       if (charsToRead > 0) {
+           flags |= TCL_ENCODING_CHAR_LIMIT;
+           numChars = charsToRead;
+       }
 
        /*
         * Perform the encoding transformation.  Read no more than
         * srcLen bytes, write no more than dstLimit bytes.
         */
 
-       int code = Tcl_ExternalToUtf(NULL, encoding, src, srcLen,
-               statePtr->inputEncodingFlags & (bufPtr->nextPtr
-               ? ~0 : ~TCL_ENCODING_END), &statePtr->inputEncodingState,
-               dst, dstLimit, &srcRead, &dstDecoded, &numChars);
+       code = Tcl_ExternalToUtf(NULL, encoding, src, srcLen,
+               flags & (bufPtr->nextPtr ? ~0 : ~TCL_ENCODING_END),
+               &statePtr->inputEncodingState, dst, dstLimit, &srcRead,
+               &dstDecoded, &numChars);
 
        /*
         * Perform the translation transformation in place.  Read no more
@@ -6050,7 +6072,7 @@ ReadChars(
                     * time.
                     */
 
-                   dstLimit = dstRead + TCL_UTF_MAX;
+                   dstLimit = dstRead - 1 + TCL_UTF_MAX;
                    statePtr->flags = savedFlags;
                    statePtr->inputEncodingFlags = savedIEFlags;
                    statePtr->inputEncodingState = savedState;
@@ -6076,7 +6098,7 @@ ReadChars(
                 * up back here in this call.
                 */
 
-               dstLimit = dstRead + TCL_UTF_MAX;
+               dstLimit = dstRead - 1 + TCL_UTF_MAX;
                statePtr->flags = savedFlags;
                statePtr->inputEncodingFlags = savedIEFlags;
                statePtr->inputEncodingState = savedState;
@@ -6093,7 +6115,7 @@ ReadChars(
             */
 
            if (code != TCL_OK) {
-               char buffer[TCL_UTF_MAX + 2];
+               char buffer[TCL_UTF_MAX + 1];
                int read, decoded, count;
 
                /* 
@@ -6105,9 +6127,10 @@ ReadChars(
                statePtr->inputEncodingState = savedState;
 
                Tcl_ExternalToUtf(NULL, encoding, src, srcLen,
-               statePtr->inputEncodingFlags & (bufPtr->nextPtr
-               ? ~0 : ~TCL_ENCODING_END), &statePtr->inputEncodingState,
-               buffer, TCL_UTF_MAX + 2, &read, &decoded, &count);
+               (statePtr->inputEncodingFlags | TCL_ENCODING_NO_TERMINATE)
+               & (bufPtr->nextPtr ? ~0 : ~TCL_ENCODING_END),
+               &statePtr->inputEncodingState, buffer, TCL_UTF_MAX + 1,
+               &read, &decoded, &count);
 
                if (count == 2) {
                    if (buffer[1] == '\n') {
@@ -6119,7 +6142,6 @@ ReadChars(
                        bufPtr->nextRemoved += srcRead;
                    }
 
-                   dst[1] = '\0';
                    statePtr->inputEncodingFlags &= ~TCL_ENCODING_START;
 
                    Tcl_SetObjLength(objPtr, numBytes + 1);
@@ -6160,13 +6182,15 @@ ReadChars(
        if (charsToRead > 0 && numChars > charsToRead) {
 
            /* 
+            * TODO: This cannot happen anymore.
+            *
             * We read more chars than allowed.  Reset limits to
             * prevent that and try again.  Don't forget the extra
             * padding of TCL_UTF_MAX bytes demanded by the
             * Tcl_ExternalToUtf() call!
             */
 
-           dstLimit = Tcl_UtfAtIndex(dst, charsToRead) + TCL_UTF_MAX - dst;
+           dstLimit = Tcl_UtfAtIndex(dst, charsToRead) - 1 + TCL_UTF_MAX - dst;
            statePtr->flags = savedFlags;
            statePtr->inputEncodingFlags = savedIEFlags;
            statePtr->inputEncodingState = savedState;
@@ -6190,9 +6214,8 @@ ReadChars(
             * empty string.
             */
 
-           if (dst[0] == '\n') {
+           if (dstRead == 1 && dst[0] == '\n') {
                assert(statePtr->inputTranslation == TCL_TRANSLATE_AUTO);
-               assert(dstRead == 1);
 
                goto consume;
            }
@@ -9215,6 +9238,9 @@ MBWrite(
     }
     outStatePtr->outQueueTail = tail;
     inStatePtr->inQueueHead = bufPtr;
+    if (inStatePtr->inQueueTail == tail) {
+       inStatePtr->inQueueTail = bufPtr;
+    }
     if (bufPtr == NULL) {
        inStatePtr->inQueueTail = NULL;
     }
index 694501f..f69d30f 100644 (file)
 #include "tclInt.h"
 
 #if defined(_WIN32) && defined(UNICODE)
-/* On Windows, we always need the ASCII version. */
-#   undef gai_strerror
-#   define gai_strerror gai_strerrorA
+/* On Windows, we need to do proper Unicode->UTF-8 conversion. */
+
+typedef struct ThreadSpecificData {
+    int initialized;
+    Tcl_DString errorMsg; /* UTF-8 encoded error-message */
+} ThreadSpecificData;
+static Tcl_ThreadDataKey dataKey;
+
+#undef gai_strerror
+static const char *gai_strerror(int code) {
+    ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
+    if (tsdPtr->initialized) {
+       Tcl_DStringFree(&tsdPtr->errorMsg);
+    } else {
+       tsdPtr->initialized = 1;
+    }
+    Tcl_WinTCharToUtf(gai_strerrorW(code), -1, &tsdPtr->errorMsg);
+    return Tcl_DStringValue(&tsdPtr->errorMsg);
+}
 #endif
 \f
 /*
index 860c2a3..3f84717 100644 (file)
@@ -2927,7 +2927,7 @@ MODULE_SCOPE void TclFinalizePreserve(void);
 MODULE_SCOPE void      TclFinalizeSynchronization(void);
 MODULE_SCOPE void      TclFinalizeThreadAlloc(void);
 MODULE_SCOPE void      TclFinalizeThreadAllocThread(void);
-MODULE_SCOPE void      TclFinalizeThreadData(void);
+MODULE_SCOPE void      TclFinalizeThreadData(int quick);
 MODULE_SCOPE void      TclFinalizeThreadObjects(void);
 MODULE_SCOPE double    TclFloor(const mp_int *a);
 MODULE_SCOPE void      TclFormatNaN(double value, char *buffer);
@@ -2985,8 +2985,8 @@ MODULE_SCOPE void TclInitNotifier(void);
 MODULE_SCOPE void      TclInitObjSubsystem(void);
 MODULE_SCOPE void      TclInitSubsystems(void);
 MODULE_SCOPE int       TclInterpReady(Tcl_Interp *interp);
-MODULE_SCOPE int       TclIsLocalScalar(const char *src, int len);
 MODULE_SCOPE int       TclIsSpaceProc(char byte);
+MODULE_SCOPE int       TclIsBareword(char byte);
 MODULE_SCOPE Tcl_Obj * TclJoinPath(int elements, Tcl_Obj * const objv[]);
 MODULE_SCOPE int       TclJoinThread(Tcl_ThreadId id, int *result);
 MODULE_SCOPE void      TclLimitRemoveAllHandlers(Tcl_Interp *interp);
index ee0d4c4..5524979 100644 (file)
@@ -621,6 +621,47 @@ TclIsSpaceProc(
 /*
  *----------------------------------------------------------------------
  *
+ * TclIsBareword--
+ *
+ *     Report whether byte is one that can be part of a "bareword".
+ *     This concept is named in expression parsing, where it determines
+ *     what can be a legal function name, but is the same definition used
+ *     in determining what variable names can be parsed as variable
+ *     substitutions without the benefit of enclosing braces.  The set of
+ *     ASCII chars that are accepted are the numeric chars ('0'-'9'),
+ *     the alphabetic chars ('a'-'z', 'A'-'Z') and underscore ('_').
+ *
+ * Results:
+ *     Returns 1, if byte is in the accepted set of chars, 0 otherwise.
+ *
+ * Side effects:
+ *     None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclIsBareword(
+    char byte)
+{
+    if (byte < '0' || byte > 'z') {
+       return 0;
+    }
+    if (byte <= '9' || byte >= 'a') {
+       return 1;
+    }
+    if (byte == '_') {
+       return 1;
+    }
+    if (byte < 'A' || byte > 'Z') {
+       return 0;
+    }
+    return 1;
+}
+\f
+/*
+ *----------------------------------------------------------------------
+ *
  * ParseWhiteSpace --
  *
  *     Scans up to numBytes bytes starting at src, consuming white space
@@ -1346,9 +1387,7 @@ Tcl_ParseVarName(
 {
     Tcl_Token *tokenPtr;
     register const char *src;
-    unsigned char c;
-    int varIndex, offset;
-    Tcl_UniChar ch;
+    int varIndex;
     unsigned array;
 
     if ((numBytes == 0) || (start == NULL)) {
@@ -1431,22 +1470,12 @@ Tcl_ParseVarName(
        tokenPtr->numComponents = 0;
 
        while (numBytes) {
-           if (Tcl_UtfCharComplete(src, numBytes)) {
-               offset = Tcl_UtfToUniChar(src, &ch);
-           } else {
-               char utfBytes[TCL_UTF_MAX];
-
-               memcpy(utfBytes, src, (size_t) numBytes);
-               utfBytes[numBytes] = '\0';
-               offset = Tcl_UtfToUniChar(utfBytes, &ch);
-           }
-           c = UCHAR(ch);
-           if (isalnum(c) || (c == '_')) {     /* INTL: ISO only, UCHAR. */
-               src += offset;
-               numBytes -= offset;
+           if (TclIsBareword(*src)) {
+               src += 1;
+               numBytes -= 1;
                continue;
            }
-           if ((c == ':') && (numBytes != 1) && (src[1] == ':')) {
+           if ((src[0] == ':') && (numBytes != 1) && (src[1] == ':')) {
                src += 2;
                numBytes -= 2;
                while (numBytes && (*src == ':')) {
@@ -2497,56 +2526,6 @@ TclObjCommandComplete(
 }
 \f
 /*
- *----------------------------------------------------------------------
- *
- * TclIsLocalScalar --
- *
- *     Check to see if a given string is a legal scalar variable name with no
- *     namespace qualifiers or substitutions.
- *
- * Results:
- *     Returns 1 if the variable is a local scalar.
- *
- * Side effects:
- *     None.
- *
- *----------------------------------------------------------------------
- */
-
-int
-TclIsLocalScalar(
-    const char *src,
-    int len)
-{
-    const char *p;
-    const char *lastChar = src + (len - 1);
-
-    for (p=src ; p<=lastChar ; p++) {
-       if ((CHAR_TYPE(*p) != TYPE_NORMAL)
-               && (CHAR_TYPE(*p) != TYPE_COMMAND_END)) {
-           /*
-            * TCL_COMMAND_END is returned for the last character of the
-            * string. By this point we know it isn't an array or namespace
-            * reference.
-            */
-
-           return 0;
-       }
-       if (*p == '(') {
-           if (*lastChar == ')') {     /* We have an array element */
-               return 0;
-           }
-       } else if (*p == ':') {
-           if ((p != lastChar) && *(p+1) == ':') {     /* qualified name */
-               return 0;
-           }
-       }
-    }
-
-    return 1;
-}
-\f
-/*
  * Local Variables:
  * mode: c
  * c-basic-offset: 4
index 5ac6a8d..198fa6a 100644 (file)
@@ -353,11 +353,11 @@ Tcl_ConditionFinalize(
  */
 
 void
-TclFinalizeThreadData(void)
+TclFinalizeThreadData(int quick)
 {
     TclFinalizeThreadDataThread();
 #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
-    if ((!TclInExit())||TclFullFinalizationRequested()) {
+    if (!quick) {
        /*
         * Quick exit principle makes it useless to terminate allocators
         */
index ec4c13c..0228a2c 100644 (file)
@@ -4746,7 +4746,7 @@ Tcl_GetVariableFullName(
     } else if (iPtr->varFramePtr->procPtr) {
        int index = varPtr - iPtr->varFramePtr->compiledLocals;
 
-       if (index < iPtr->varFramePtr->numCompiledLocals) {
+       if (index >= 0 && index < iPtr->varFramePtr->numCompiledLocals) {
            namePtr = localName(iPtr->varFramePtr, index);
            Tcl_AppendObjToObj(objPtr, namePtr);
        }
index f1f7704..05ac4a3 100644 (file)
@@ -16,7 +16,7 @@
 if {[info commands package] == ""} {
     error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
 }
-package require -exact Tcl 8.6.3
+package require -exact Tcl 8.6.4
 
 # Compute the auto path to use in this interpreter.
 # The values on the path come from several locations:
index 164d65e..d8049cd 100644 (file)
@@ -29,7 +29,7 @@ MODIFICATIONS.
 
 GOVERNMENT USE: If you are acquiring this software on behalf of the
 U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal 
+in the software and related documentation as defined in the Federal
 Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
 are acquiring the software on behalf of the Department of Defense, the
 software shall be classified as "Commercial Computer Software" and the
@@ -37,4 +37,4 @@ Government shall have only "Restricted Rights" as defined in Clause
 252.227-7014 (b) (3) of DFARs.  Notwithstanding the foregoing, the
 authors grant the U.S. Government and others acting in its behalf
 permission to use and distribute the software in accordance with the
-terms specified in this license. 
+terms specified in this license.
index 4b92483..7aa5653 100644 (file)
@@ -1,7 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Addis_Ababa) {
-    {-9223372036854775808 9288 0 LMT}
-    {-3155682888 9320 0 ADMT}
-    {-1062210920 10800 0 EAT}
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
+set TZData(:Africa/Addis_Ababa) $TZData(:Africa/Nairobi)
index 1f0f13e..3d33c94 100644 (file)
@@ -1,8 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Asmara) {
-    {-9223372036854775808 9332 0 LMT}
-    {-3155682932 9332 0 AMT}
-    {-2524530932 9320 0 ADMT}
-    {-1062210920 10800 0 EAT}
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
+set TZData(:Africa/Asmara) $TZData(:Africa/Nairobi)
index 931c36d..ca8d123 100644 (file)
@@ -1,5 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-if {![info exists TZData(Africa/Asmara)]} {
-    LoadTimeZoneFile Africa/Asmara
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
-set TZData(:Africa/Asmera) $TZData(:Africa/Asmara)
+set TZData(:Africa/Asmera) $TZData(:Africa/Nairobi)
index 94f5058..0326a6c 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Bangui) {
-    {-9223372036854775808 4460 0 LMT}
-    {-1830388460 3600 0 WAT}
+if {![info exists TZData(Africa/Lagos)]} {
+    LoadTimeZoneFile Africa/Lagos
 }
+set TZData(:Africa/Bangui) $TZData(:Africa/Lagos)
index d51cb9f..5693228 100644 (file)
@@ -2,6 +2,6 @@
 
 set TZData(:Africa/Bissau) {
     {-9223372036854775808 -3740 0 LMT}
-    {-1849388260 -3600 0 WAT}
+    {-1830380260 -3600 0 WAT}
     {157770000 0 0 GMT}
 }
index 17b58f4..9a404c5 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Blantyre) {
-    {-9223372036854775808 8400 0 LMT}
-    {-2109291600 7200 0 CAT}
+if {![info exists TZData(Africa/Maputo)]} {
+    LoadTimeZoneFile Africa/Maputo
 }
+set TZData(:Africa/Blantyre) $TZData(:Africa/Maputo)
index b4e0923..111eff4 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Brazzaville) {
-    {-9223372036854775808 3668 0 LMT}
-    {-1830387668 3600 0 WAT}
+if {![info exists TZData(Africa/Lagos)]} {
+    LoadTimeZoneFile Africa/Lagos
 }
+set TZData(:Africa/Brazzaville) $TZData(:Africa/Lagos)
index c26d053..1e463d8 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Bujumbura) {
-    {-9223372036854775808 7048 0 LMT}
-    {-2524528648 7200 0 CAT}
+if {![info exists TZData(Africa/Maputo)]} {
+    LoadTimeZoneFile Africa/Maputo
 }
+set TZData(:Africa/Bujumbura) $TZData(:Africa/Maputo)
index 98151ec..00e8d4e 100644 (file)
@@ -1,8 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Dar_es_Salaam) {
-    {-9223372036854775808 9428 0 LMT}
-    {-1230777428 10800 0 EAT}
-    {-694321200 9900 0 BEAUT}
-    {-284006700 10800 0 EAT}
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
+set TZData(:Africa/Dar_es_Salaam) $TZData(:Africa/Nairobi)
index 0ec510c..859ea32 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Djibouti) {
-    {-9223372036854775808 10356 0 LMT}
-    {-1846291956 10800 0 EAT}
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
+set TZData(:Africa/Djibouti) $TZData(:Africa/Nairobi)
index 301a530..892b16a 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Douala) {
-    {-9223372036854775808 2328 0 LMT}
-    {-1830386328 3600 0 WAT}
+if {![info exists TZData(Africa/Lagos)]} {
+    LoadTimeZoneFile Africa/Lagos
 }
+set TZData(:Africa/Douala) $TZData(:Africa/Lagos)
index bd38673..56c0772 100644 (file)
@@ -1,9 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Gaborone) {
-    {-9223372036854775808 6220 0 LMT}
-    {-2682294220 5400 0 SAST}
-    {-2109288600 7200 0 CAT}
-    {-829526400 10800 1 CAST}
-    {-813805200 7200 0 CAT}
+if {![info exists TZData(Africa/Maputo)]} {
+    LoadTimeZoneFile Africa/Maputo
 }
+set TZData(:Africa/Gaborone) $TZData(:Africa/Maputo)
index 7482b15..644be26 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Harare) {
-    {-9223372036854775808 7452 0 LMT}
-    {-2109290652 7200 0 CAT}
+if {![info exists TZData(Africa/Maputo)]} {
+    LoadTimeZoneFile Africa/Maputo
 }
+set TZData(:Africa/Harare) $TZData(:Africa/Maputo)
index 4cc9be1..1fbaffc 100644 (file)
@@ -1,9 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Kampala) {
-    {-9223372036854775808 7780 0 LMT}
-    {-1309745380 10800 0 EAT}
-    {-1262314800 9000 0 BEAT}
-    {-694319400 9900 0 BEAUT}
-    {-410237100 10800 0 EAT}
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
+set TZData(:Africa/Kampala) $TZData(:Africa/Nairobi)
index f723bcd..192e0e8 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Kigali) {
-    {-9223372036854775808 7216 0 LMT}
-    {-1091498416 7200 0 CAT}
+if {![info exists TZData(Africa/Maputo)]} {
+    LoadTimeZoneFile Africa/Maputo
 }
+set TZData(:Africa/Kigali) $TZData(:Africa/Maputo)
index 050c1fa..04dc62e 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Kinshasa) {
-    {-9223372036854775808 3672 0 LMT}
-    {-2276643672 3600 0 WAT}
+if {![info exists TZData(Africa/Lagos)]} {
+    LoadTimeZoneFile Africa/Lagos
 }
+set TZData(:Africa/Kinshasa) $TZData(:Africa/Lagos)
index 8427551..ba1f686 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Libreville) {
-    {-9223372036854775808 2268 0 LMT}
-    {-1830386268 3600 0 WAT}
+if {![info exists TZData(Africa/Lagos)]} {
+    LoadTimeZoneFile Africa/Lagos
 }
+set TZData(:Africa/Libreville) $TZData(:Africa/Lagos)
index cd1b29e..8dcd107 100644 (file)
@@ -1,7 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Luanda) {
-    {-9223372036854775808 3176 0 LMT}
-    {-2461452776 3124 0 AOT}
-    {-1849395124 3600 0 WAT}
+if {![info exists TZData(Africa/Lagos)]} {
+    LoadTimeZoneFile Africa/Lagos
 }
+set TZData(:Africa/Luanda) $TZData(:Africa/Lagos)
index bd67221..7da101a 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Lubumbashi) {
-    {-9223372036854775808 6592 0 LMT}
-    {-2276646592 7200 0 CAT}
+if {![info exists TZData(Africa/Maputo)]} {
+    LoadTimeZoneFile Africa/Maputo
 }
+set TZData(:Africa/Lubumbashi) $TZData(:Africa/Maputo)
index ed9c30d..bcf519d 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Lusaka) {
-    {-9223372036854775808 6788 0 LMT}
-    {-2109289988 7200 0 CAT}
+if {![info exists TZData(Africa/Maputo)]} {
+    LoadTimeZoneFile Africa/Maputo
 }
+set TZData(:Africa/Lusaka) $TZData(:Africa/Maputo)
index bec0524..7dcee39 100644 (file)
@@ -1,7 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Malabo) {
-    {-9223372036854775808 2108 0 LMT}
-    {-1830386108 0 0 GMT}
-    {-190857600 3600 0 WAT}
+if {![info exists TZData(Africa/Lagos)]} {
+    LoadTimeZoneFile Africa/Lagos
 }
+set TZData(:Africa/Malabo) $TZData(:Africa/Lagos)
index 21ca968..665f15d 100644 (file)
@@ -1,8 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Maseru) {
-    {-9223372036854775808 6600 0 LMT}
-    {-2109289800 7200 0 SAST}
-    {-829526400 10800 1 SAST}
-    {-813805200 7200 0 SAST}
+if {![info exists TZData(Africa/Johannesburg)]} {
+    LoadTimeZoneFile Africa/Johannesburg
 }
+set TZData(:Africa/Maseru) $TZData(:Africa/Johannesburg)
index 4d174d5..0edb590 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Mbabane) {
-    {-9223372036854775808 7464 0 LMT}
-    {-2109290664 7200 0 SAST}
+if {![info exists TZData(Africa/Johannesburg)]} {
+    LoadTimeZoneFile Africa/Johannesburg
 }
+set TZData(:Africa/Mbabane) $TZData(:Africa/Johannesburg)
index 570d3ea..4220655 100644 (file)
@@ -1,8 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Mogadishu) {
-    {-9223372036854775808 10888 0 LMT}
-    {-2403572488 10800 0 EAT}
-    {-1230778800 9000 0 BEAT}
-    {-410236200 10800 0 EAT}
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
+set TZData(:Africa/Mogadishu) $TZData(:Africa/Nairobi)
index 40ded06..278571d 100644 (file)
@@ -1,8 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Niamey) {
-    {-9223372036854775808 508 0 LMT}
-    {-1830384508 -3600 0 WAT}
-    {-1131231600 0 0 GMT}
-    {-315619200 3600 0 WAT}
+if {![info exists TZData(Africa/Lagos)]} {
+    LoadTimeZoneFile Africa/Lagos
 }
+set TZData(:Africa/Niamey) $TZData(:Africa/Lagos)
index b89cf1b..3fa2b51 100644 (file)
@@ -1,7 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Africa/Porto-Novo) {
-    {-9223372036854775808 628 0 LMT}
-    {-1830384628 0 0 GMT}
-    {-1131235200 3600 0 WAT}
+if {![info exists TZData(Africa/Lagos)]} {
+    LoadTimeZoneFile Africa/Lagos
 }
+set TZData(:Africa/Porto-Novo) $TZData(:Africa/Lagos)
index 1620b15..fe5a060 100644 (file)
@@ -43,174 +43,5 @@ set TZData(:America/Cancun) {
     {1382857200 -21600 0 CST}
     {1396771200 -18000 1 CDT}
     {1414306800 -21600 0 CST}
-    {1428220800 -18000 1 CDT}
-    {1445756400 -21600 0 CST}
-    {1459670400 -18000 1 CDT}
-    {1477810800 -21600 0 CST}
-    {1491120000 -18000 1 CDT}
-    {1509260400 -21600 0 CST}
-    {1522569600 -18000 1 CDT}
-    {1540710000 -21600 0 CST}
-    {1554624000 -18000 1 CDT}
-    {1572159600 -21600 0 CST}
-    {1586073600 -18000 1 CDT}
-    {1603609200 -21600 0 CST}
-    {1617523200 -18000 1 CDT}
-    {1635663600 -21600 0 CST}
-    {1648972800 -18000 1 CDT}
-    {1667113200 -21600 0 CST}
-    {1680422400 -18000 1 CDT}
-    {1698562800 -21600 0 CST}
-    {1712476800 -18000 1 CDT}
-    {1730012400 -21600 0 CST}
-    {1743926400 -18000 1 CDT}
-    {1761462000 -21600 0 CST}
-    {1775376000 -18000 1 CDT}
-    {1792911600 -21600 0 CST}
-    {1806825600 -18000 1 CDT}
-    {1824966000 -21600 0 CST}
-    {1838275200 -18000 1 CDT}
-    {1856415600 -21600 0 CST}
-    {1869724800 -18000 1 CDT}
-    {1887865200 -21600 0 CST}
-    {1901779200 -18000 1 CDT}
-    {1919314800 -21600 0 CST}
-    {1933228800 -18000 1 CDT}
-    {1950764400 -21600 0 CST}
-    {1964678400 -18000 1 CDT}
-    {1982818800 -21600 0 CST}
-    {1996128000 -18000 1 CDT}
-    {2014268400 -21600 0 CST}
-    {2027577600 -18000 1 CDT}
-    {2045718000 -21600 0 CST}
-    {2059027200 -18000 1 CDT}
-    {2077167600 -21600 0 CST}
-    {2091081600 -18000 1 CDT}
-    {2108617200 -21600 0 CST}
-    {2122531200 -18000 1 CDT}
-    {2140066800 -21600 0 CST}
-    {2153980800 -18000 1 CDT}
-    {2172121200 -21600 0 CST}
-    {2185430400 -18000 1 CDT}
-    {2203570800 -21600 0 CST}
-    {2216880000 -18000 1 CDT}
-    {2235020400 -21600 0 CST}
-    {2248934400 -18000 1 CDT}
-    {2266470000 -21600 0 CST}
-    {2280384000 -18000 1 CDT}
-    {2297919600 -21600 0 CST}
-    {2311833600 -18000 1 CDT}
-    {2329369200 -21600 0 CST}
-    {2343283200 -18000 1 CDT}
-    {2361423600 -21600 0 CST}
-    {2374732800 -18000 1 CDT}
-    {2392873200 -21600 0 CST}
-    {2406182400 -18000 1 CDT}
-    {2424322800 -21600 0 CST}
-    {2438236800 -18000 1 CDT}
-    {2455772400 -21600 0 CST}
-    {2469686400 -18000 1 CDT}
-    {2487222000 -21600 0 CST}
-    {2501136000 -18000 1 CDT}
-    {2519276400 -21600 0 CST}
-    {2532585600 -18000 1 CDT}
-    {2550726000 -21600 0 CST}
-    {2564035200 -18000 1 CDT}
-    {2582175600 -21600 0 CST}
-    {2596089600 -18000 1 CDT}
-    {2613625200 -21600 0 CST}
-    {2627539200 -18000 1 CDT}
-    {2645074800 -21600 0 CST}
-    {2658988800 -18000 1 CDT}
-    {2676524400 -21600 0 CST}
-    {2690438400 -18000 1 CDT}
-    {2708578800 -21600 0 CST}
-    {2721888000 -18000 1 CDT}
-    {2740028400 -21600 0 CST}
-    {2753337600 -18000 1 CDT}
-    {2771478000 -21600 0 CST}
-    {2785392000 -18000 1 CDT}
-    {2802927600 -21600 0 CST}
-    {2816841600 -18000 1 CDT}
-    {2834377200 -21600 0 CST}
-    {2848291200 -18000 1 CDT}
-    {2866431600 -21600 0 CST}
-    {2879740800 -18000 1 CDT}
-    {2897881200 -21600 0 CST}
-    {2911190400 -18000 1 CDT}
-    {2929330800 -21600 0 CST}
-    {2942640000 -18000 1 CDT}
-    {2960780400 -21600 0 CST}
-    {2974694400 -18000 1 CDT}
-    {2992230000 -21600 0 CST}
-    {3006144000 -18000 1 CDT}
-    {3023679600 -21600 0 CST}
-    {3037593600 -18000 1 CDT}
-    {3055734000 -21600 0 CST}
-    {3069043200 -18000 1 CDT}
-    {3087183600 -21600 0 CST}
-    {3100492800 -18000 1 CDT}
-    {3118633200 -21600 0 CST}
-    {3132547200 -18000 1 CDT}
-    {3150082800 -21600 0 CST}
-    {3163996800 -18000 1 CDT}
-    {3181532400 -21600 0 CST}
-    {3195446400 -18000 1 CDT}
-    {3212982000 -21600 0 CST}
-    {3226896000 -18000 1 CDT}
-    {3245036400 -21600 0 CST}
-    {3258345600 -18000 1 CDT}
-    {3276486000 -21600 0 CST}
-    {3289795200 -18000 1 CDT}
-    {3307935600 -21600 0 CST}
-    {3321849600 -18000 1 CDT}
-    {3339385200 -21600 0 CST}
-    {3353299200 -18000 1 CDT}
-    {3370834800 -21600 0 CST}
-    {3384748800 -18000 1 CDT}
-    {3402889200 -21600 0 CST}
-    {3416198400 -18000 1 CDT}
-    {3434338800 -21600 0 CST}
-    {3447648000 -18000 1 CDT}
-    {3465788400 -21600 0 CST}
-    {3479702400 -18000 1 CDT}
-    {3497238000 -21600 0 CST}
-    {3511152000 -18000 1 CDT}
-    {3528687600 -21600 0 CST}
-    {3542601600 -18000 1 CDT}
-    {3560137200 -21600 0 CST}
-    {3574051200 -18000 1 CDT}
-    {3592191600 -21600 0 CST}
-    {3605500800 -18000 1 CDT}
-    {3623641200 -21600 0 CST}
-    {3636950400 -18000 1 CDT}
-    {3655090800 -21600 0 CST}
-    {3669004800 -18000 1 CDT}
-    {3686540400 -21600 0 CST}
-    {3700454400 -18000 1 CDT}
-    {3717990000 -21600 0 CST}
-    {3731904000 -18000 1 CDT}
-    {3750044400 -21600 0 CST}
-    {3763353600 -18000 1 CDT}
-    {3781494000 -21600 0 CST}
-    {3794803200 -18000 1 CDT}
-    {3812943600 -21600 0 CST}
-    {3826252800 -18000 1 CDT}
-    {3844393200 -21600 0 CST}
-    {3858307200 -18000 1 CDT}
-    {3875842800 -21600 0 CST}
-    {3889756800 -18000 1 CDT}
-    {3907292400 -21600 0 CST}
-    {3921206400 -18000 1 CDT}
-    {3939346800 -21600 0 CST}
-    {3952656000 -18000 1 CDT}
-    {3970796400 -21600 0 CST}
-    {3984105600 -18000 1 CDT}
-    {4002246000 -21600 0 CST}
-    {4016160000 -18000 1 CDT}
-    {4033695600 -21600 0 CST}
-    {4047609600 -18000 1 CDT}
-    {4065145200 -21600 0 CST}
-    {4079059200 -18000 1 CDT}
-    {4096594800 -21600 0 CST}
+    {1422777600 -18000 0 EST}
 }
index 6c8ea4a..0edcf0b 100644 (file)
@@ -4,6 +4,7 @@ set TZData(:America/Grand_Turk) {
     {-9223372036854775808 -17072 0 LMT}
     {-2524504528 -18431 0 KMT}
     {-1827687169 -18000 0 EST}
+    {284014800 -18000 0 EST}
     {294217200 -14400 1 EDT}
     {309938400 -18000 0 EST}
     {325666800 -14400 1 EDT}
@@ -77,173 +78,5 @@ set TZData(:America/Grand_Turk) {
     {1394348400 -14400 1 EDT}
     {1414908000 -18000 0 EST}
     {1425798000 -14400 1 EDT}
-    {1446357600 -18000 0 EST}
-    {1457852400 -14400 1 EDT}
-    {1478412000 -18000 0 EST}
-    {1489302000 -14400 1 EDT}
-    {1509861600 -18000 0 EST}
-    {1520751600 -14400 1 EDT}
-    {1541311200 -18000 0 EST}
-    {1552201200 -14400 1 EDT}
-    {1572760800 -18000 0 EST}
-    {1583650800 -14400 1 EDT}
-    {1604210400 -18000 0 EST}
-    {1615705200 -14400 1 EDT}
-    {1636264800 -18000 0 EST}
-    {1647154800 -14400 1 EDT}
-    {1667714400 -18000 0 EST}
-    {1678604400 -14400 1 EDT}
-    {1699164000 -18000 0 EST}
-    {1710054000 -14400 1 EDT}
-    {1730613600 -18000 0 EST}
-    {1741503600 -14400 1 EDT}
-    {1762063200 -18000 0 EST}
-    {1772953200 -14400 1 EDT}
-    {1793512800 -18000 0 EST}
-    {1805007600 -14400 1 EDT}
-    {1825567200 -18000 0 EST}
-    {1836457200 -14400 1 EDT}
-    {1857016800 -18000 0 EST}
-    {1867906800 -14400 1 EDT}
-    {1888466400 -18000 0 EST}
-    {1899356400 -14400 1 EDT}
-    {1919916000 -18000 0 EST}
-    {1930806000 -14400 1 EDT}
-    {1951365600 -18000 0 EST}
-    {1962860400 -14400 1 EDT}
-    {1983420000 -18000 0 EST}
-    {1994310000 -14400 1 EDT}
-    {2014869600 -18000 0 EST}
-    {2025759600 -14400 1 EDT}
-    {2046319200 -18000 0 EST}
-    {2057209200 -14400 1 EDT}
-    {2077768800 -18000 0 EST}
-    {2088658800 -14400 1 EDT}
-    {2109218400 -18000 0 EST}
-    {2120108400 -14400 1 EDT}
-    {2140668000 -18000 0 EST}
-    {2152162800 -14400 1 EDT}
-    {2172722400 -18000 0 EST}
-    {2183612400 -14400 1 EDT}
-    {2204172000 -18000 0 EST}
-    {2215062000 -14400 1 EDT}
-    {2235621600 -18000 0 EST}
-    {2246511600 -14400 1 EDT}
-    {2267071200 -18000 0 EST}
-    {2277961200 -14400 1 EDT}
-    {2298520800 -18000 0 EST}
-    {2309410800 -14400 1 EDT}
-    {2329970400 -18000 0 EST}
-    {2341465200 -14400 1 EDT}
-    {2362024800 -18000 0 EST}
-    {2372914800 -14400 1 EDT}
-    {2393474400 -18000 0 EST}
-    {2404364400 -14400 1 EDT}
-    {2424924000 -18000 0 EST}
-    {2435814000 -14400 1 EDT}
-    {2456373600 -18000 0 EST}
-    {2467263600 -14400 1 EDT}
-    {2487823200 -18000 0 EST}
-    {2499318000 -14400 1 EDT}
-    {2519877600 -18000 0 EST}
-    {2530767600 -14400 1 EDT}
-    {2551327200 -18000 0 EST}
-    {2562217200 -14400 1 EDT}
-    {2582776800 -18000 0 EST}
-    {2593666800 -14400 1 EDT}
-    {2614226400 -18000 0 EST}
-    {2625116400 -14400 1 EDT}
-    {2645676000 -18000 0 EST}
-    {2656566000 -14400 1 EDT}
-    {2677125600 -18000 0 EST}
-    {2688620400 -14400 1 EDT}
-    {2709180000 -18000 0 EST}
-    {2720070000 -14400 1 EDT}
-    {2740629600 -18000 0 EST}
-    {2751519600 -14400 1 EDT}
-    {2772079200 -18000 0 EST}
-    {2782969200 -14400 1 EDT}
-    {2803528800 -18000 0 EST}
-    {2814418800 -14400 1 EDT}
-    {2834978400 -18000 0 EST}
-    {2846473200 -14400 1 EDT}
-    {2867032800 -18000 0 EST}
-    {2877922800 -14400 1 EDT}
-    {2898482400 -18000 0 EST}
-    {2909372400 -14400 1 EDT}
-    {2929932000 -18000 0 EST}
-    {2940822000 -14400 1 EDT}
-    {2961381600 -18000 0 EST}
-    {2972271600 -14400 1 EDT}
-    {2992831200 -18000 0 EST}
-    {3003721200 -14400 1 EDT}
-    {3024280800 -18000 0 EST}
-    {3035775600 -14400 1 EDT}
-    {3056335200 -18000 0 EST}
-    {3067225200 -14400 1 EDT}
-    {3087784800 -18000 0 EST}
-    {3098674800 -14400 1 EDT}
-    {3119234400 -18000 0 EST}
-    {3130124400 -14400 1 EDT}
-    {3150684000 -18000 0 EST}
-    {3161574000 -14400 1 EDT}
-    {3182133600 -18000 0 EST}
-    {3193023600 -14400 1 EDT}
-    {3213583200 -18000 0 EST}
-    {3225078000 -14400 1 EDT}
-    {3245637600 -18000 0 EST}
-    {3256527600 -14400 1 EDT}
-    {3277087200 -18000 0 EST}
-    {3287977200 -14400 1 EDT}
-    {3308536800 -18000 0 EST}
-    {3319426800 -14400 1 EDT}
-    {3339986400 -18000 0 EST}
-    {3350876400 -14400 1 EDT}
-    {3371436000 -18000 0 EST}
-    {3382930800 -14400 1 EDT}
-    {3403490400 -18000 0 EST}
-    {3414380400 -14400 1 EDT}
-    {3434940000 -18000 0 EST}
-    {3445830000 -14400 1 EDT}
-    {3466389600 -18000 0 EST}
-    {3477279600 -14400 1 EDT}
-    {3497839200 -18000 0 EST}
-    {3508729200 -14400 1 EDT}
-    {3529288800 -18000 0 EST}
-    {3540178800 -14400 1 EDT}
-    {3560738400 -18000 0 EST}
-    {3572233200 -14400 1 EDT}
-    {3592792800 -18000 0 EST}
-    {3603682800 -14400 1 EDT}
-    {3624242400 -18000 0 EST}
-    {3635132400 -14400 1 EDT}
-    {3655692000 -18000 0 EST}
-    {3666582000 -14400 1 EDT}
-    {3687141600 -18000 0 EST}
-    {3698031600 -14400 1 EDT}
-    {3718591200 -18000 0 EST}
-    {3730086000 -14400 1 EDT}
-    {3750645600 -18000 0 EST}
-    {3761535600 -14400 1 EDT}
-    {3782095200 -18000 0 EST}
-    {3792985200 -14400 1 EDT}
-    {3813544800 -18000 0 EST}
-    {3824434800 -14400 1 EDT}
-    {3844994400 -18000 0 EST}
-    {3855884400 -14400 1 EDT}
-    {3876444000 -18000 0 EST}
-    {3887334000 -14400 1 EDT}
-    {3907893600 -18000 0 EST}
-    {3919388400 -14400 1 EDT}
-    {3939948000 -18000 0 EST}
-    {3950838000 -14400 1 EDT}
-    {3971397600 -18000 0 EST}
-    {3982287600 -14400 1 EDT}
-    {4002847200 -18000 0 EST}
-    {4013737200 -14400 1 EDT}
-    {4034296800 -18000 0 EST}
-    {4045186800 -14400 1 EDT}
-    {4065746400 -18000 0 EST}
-    {4076636400 -14400 1 EDT}
-    {4097196000 -18000 0 EST}
+    {1446361200 -14400 0 AST}
 }
index 682e47c..f752842 100644 (file)
@@ -4,7 +4,8 @@ set TZData(:America/Jamaica) {
     {-9223372036854775808 -18431 0 LMT}
     {-2524503169 -18431 0 KMT}
     {-1827687169 -18000 0 EST}
-    {136364400 -14400 0 EDT}
+    {126248400 -18000 0 EST}
+    {126687600 -14400 1 EDT}
     {152085600 -18000 0 EST}
     {162370800 -14400 1 EDT}
     {183535200 -18000 0 EST}
index 44be9f8..29c2a93 100644 (file)
@@ -118,174 +118,5 @@ set TZData(:America/Santiago) {
     {1378612800 -10800 1 CLST}
     {1398567600 -14400 0 CLT}
     {1410062400 -10800 1 CLST}
-    {1430017200 -14400 0 CLT}
-    {1441512000 -10800 1 CLST}
-    {1461466800 -14400 0 CLT}
-    {1472961600 -10800 1 CLST}
-    {1492916400 -14400 0 CLT}
-    {1504411200 -10800 1 CLST}
-    {1524970800 -14400 0 CLT}
-    {1535860800 -10800 1 CLST}
-    {1556420400 -14400 0 CLT}
-    {1567915200 -10800 1 CLST}
-    {1587870000 -14400 0 CLT}
-    {1599364800 -10800 1 CLST}
-    {1619319600 -14400 0 CLT}
-    {1630814400 -10800 1 CLST}
-    {1650769200 -14400 0 CLT}
-    {1662264000 -10800 1 CLST}
-    {1682218800 -14400 0 CLT}
-    {1693713600 -10800 1 CLST}
-    {1714273200 -14400 0 CLT}
-    {1725768000 -10800 1 CLST}
-    {1745722800 -14400 0 CLT}
-    {1757217600 -10800 1 CLST}
-    {1777172400 -14400 0 CLT}
-    {1788667200 -10800 1 CLST}
-    {1808622000 -14400 0 CLT}
-    {1820116800 -10800 1 CLST}
-    {1840071600 -14400 0 CLT}
-    {1851566400 -10800 1 CLST}
-    {1872126000 -14400 0 CLT}
-    {1883016000 -10800 1 CLST}
-    {1903575600 -14400 0 CLT}
-    {1915070400 -10800 1 CLST}
-    {1935025200 -14400 0 CLT}
-    {1946520000 -10800 1 CLST}
-    {1966474800 -14400 0 CLT}
-    {1977969600 -10800 1 CLST}
-    {1997924400 -14400 0 CLT}
-    {2009419200 -10800 1 CLST}
-    {2029374000 -14400 0 CLT}
-    {2040868800 -10800 1 CLST}
-    {2061428400 -14400 0 CLT}
-    {2072318400 -10800 1 CLST}
-    {2092878000 -14400 0 CLT}
-    {2104372800 -10800 1 CLST}
-    {2124327600 -14400 0 CLT}
-    {2135822400 -10800 1 CLST}
-    {2155777200 -14400 0 CLT}
-    {2167272000 -10800 1 CLST}
-    {2187226800 -14400 0 CLT}
-    {2198721600 -10800 1 CLST}
-    {2219281200 -14400 0 CLT}
-    {2230171200 -10800 1 CLST}
-    {2250730800 -14400 0 CLT}
-    {2262225600 -10800 1 CLST}
-    {2282180400 -14400 0 CLT}
-    {2293675200 -10800 1 CLST}
-    {2313630000 -14400 0 CLT}
-    {2325124800 -10800 1 CLST}
-    {2345079600 -14400 0 CLT}
-    {2356574400 -10800 1 CLST}
-    {2376529200 -14400 0 CLT}
-    {2388024000 -10800 1 CLST}
-    {2408583600 -14400 0 CLT}
-    {2419473600 -10800 1 CLST}
-    {2440033200 -14400 0 CLT}
-    {2451528000 -10800 1 CLST}
-    {2471482800 -14400 0 CLT}
-    {2482977600 -10800 1 CLST}
-    {2502932400 -14400 0 CLT}
-    {2514427200 -10800 1 CLST}
-    {2534382000 -14400 0 CLT}
-    {2545876800 -10800 1 CLST}
-    {2565831600 -14400 0 CLT}
-    {2577326400 -10800 1 CLST}
-    {2597886000 -14400 0 CLT}
-    {2609380800 -10800 1 CLST}
-    {2629335600 -14400 0 CLT}
-    {2640830400 -10800 1 CLST}
-    {2660785200 -14400 0 CLT}
-    {2672280000 -10800 1 CLST}
-    {2692234800 -14400 0 CLT}
-    {2703729600 -10800 1 CLST}
-    {2723684400 -14400 0 CLT}
-    {2735179200 -10800 1 CLST}
-    {2755738800 -14400 0 CLT}
-    {2766628800 -10800 1 CLST}
-    {2787188400 -14400 0 CLT}
-    {2798683200 -10800 1 CLST}
-    {2818638000 -14400 0 CLT}
-    {2830132800 -10800 1 CLST}
-    {2850087600 -14400 0 CLT}
-    {2861582400 -10800 1 CLST}
-    {2881537200 -14400 0 CLT}
-    {2893032000 -10800 1 CLST}
-    {2912986800 -14400 0 CLT}
-    {2924481600 -10800 1 CLST}
-    {2945041200 -14400 0 CLT}
-    {2955931200 -10800 1 CLST}
-    {2976490800 -14400 0 CLT}
-    {2987985600 -10800 1 CLST}
-    {3007940400 -14400 0 CLT}
-    {3019435200 -10800 1 CLST}
-    {3039390000 -14400 0 CLT}
-    {3050884800 -10800 1 CLST}
-    {3070839600 -14400 0 CLT}
-    {3082334400 -10800 1 CLST}
-    {3102894000 -14400 0 CLT}
-    {3113784000 -10800 1 CLST}
-    {3134343600 -14400 0 CLT}
-    {3145838400 -10800 1 CLST}
-    {3165793200 -14400 0 CLT}
-    {3177288000 -10800 1 CLST}
-    {3197242800 -14400 0 CLT}
-    {3208737600 -10800 1 CLST}
-    {3228692400 -14400 0 CLT}
-    {3240187200 -10800 1 CLST}
-    {3260142000 -14400 0 CLT}
-    {3271636800 -10800 1 CLST}
-    {3292196400 -14400 0 CLT}
-    {3303086400 -10800 1 CLST}
-    {3323646000 -14400 0 CLT}
-    {3335140800 -10800 1 CLST}
-    {3355095600 -14400 0 CLT}
-    {3366590400 -10800 1 CLST}
-    {3386545200 -14400 0 CLT}
-    {3398040000 -10800 1 CLST}
-    {3417994800 -14400 0 CLT}
-    {3429489600 -10800 1 CLST}
-    {3449444400 -14400 0 CLT}
-    {3460939200 -10800 1 CLST}
-    {3481498800 -14400 0 CLT}
-    {3492993600 -10800 1 CLST}
-    {3512948400 -14400 0 CLT}
-    {3524443200 -10800 1 CLST}
-    {3544398000 -14400 0 CLT}
-    {3555892800 -10800 1 CLST}
-    {3575847600 -14400 0 CLT}
-    {3587342400 -10800 1 CLST}
-    {3607297200 -14400 0 CLT}
-    {3618792000 -10800 1 CLST}
-    {3639351600 -14400 0 CLT}
-    {3650241600 -10800 1 CLST}
-    {3670801200 -14400 0 CLT}
-    {3682296000 -10800 1 CLST}
-    {3702250800 -14400 0 CLT}
-    {3713745600 -10800 1 CLST}
-    {3733700400 -14400 0 CLT}
-    {3745195200 -10800 1 CLST}
-    {3765150000 -14400 0 CLT}
-    {3776644800 -10800 1 CLST}
-    {3796599600 -14400 0 CLT}
-    {3808094400 -10800 1 CLST}
-    {3828654000 -14400 0 CLT}
-    {3839544000 -10800 1 CLST}
-    {3860103600 -14400 0 CLT}
-    {3871598400 -10800 1 CLST}
-    {3891553200 -14400 0 CLT}
-    {3903048000 -10800 1 CLST}
-    {3923002800 -14400 0 CLT}
-    {3934497600 -10800 1 CLST}
-    {3954452400 -14400 0 CLT}
-    {3965947200 -10800 1 CLST}
-    {3986506800 -14400 0 CLT}
-    {3997396800 -10800 1 CLST}
-    {4017956400 -14400 0 CLT}
-    {4029451200 -10800 1 CLST}
-    {4049406000 -14400 0 CLT}
-    {4060900800 -10800 1 CLST}
-    {4080855600 -14400 0 CLT}
-    {4092350400 -10800 1 CLST}
+    {1430017200 -10800 0 CLT}
 }
index e87b171..f12528b 100644 (file)
@@ -81,174 +81,5 @@ set TZData(:Antarctica/Palmer) {
     {1378612800 -10800 1 CLST}
     {1398567600 -14400 0 CLT}
     {1410062400 -10800 1 CLST}
-    {1430017200 -14400 0 CLT}
-    {1441512000 -10800 1 CLST}
-    {1461466800 -14400 0 CLT}
-    {1472961600 -10800 1 CLST}
-    {1492916400 -14400 0 CLT}
-    {1504411200 -10800 1 CLST}
-    {1524970800 -14400 0 CLT}
-    {1535860800 -10800 1 CLST}
-    {1556420400 -14400 0 CLT}
-    {1567915200 -10800 1 CLST}
-    {1587870000 -14400 0 CLT}
-    {1599364800 -10800 1 CLST}
-    {1619319600 -14400 0 CLT}
-    {1630814400 -10800 1 CLST}
-    {1650769200 -14400 0 CLT}
-    {1662264000 -10800 1 CLST}
-    {1682218800 -14400 0 CLT}
-    {1693713600 -10800 1 CLST}
-    {1714273200 -14400 0 CLT}
-    {1725768000 -10800 1 CLST}
-    {1745722800 -14400 0 CLT}
-    {1757217600 -10800 1 CLST}
-    {1777172400 -14400 0 CLT}
-    {1788667200 -10800 1 CLST}
-    {1808622000 -14400 0 CLT}
-    {1820116800 -10800 1 CLST}
-    {1840071600 -14400 0 CLT}
-    {1851566400 -10800 1 CLST}
-    {1872126000 -14400 0 CLT}
-    {1883016000 -10800 1 CLST}
-    {1903575600 -14400 0 CLT}
-    {1915070400 -10800 1 CLST}
-    {1935025200 -14400 0 CLT}
-    {1946520000 -10800 1 CLST}
-    {1966474800 -14400 0 CLT}
-    {1977969600 -10800 1 CLST}
-    {1997924400 -14400 0 CLT}
-    {2009419200 -10800 1 CLST}
-    {2029374000 -14400 0 CLT}
-    {2040868800 -10800 1 CLST}
-    {2061428400 -14400 0 CLT}
-    {2072318400 -10800 1 CLST}
-    {2092878000 -14400 0 CLT}
-    {2104372800 -10800 1 CLST}
-    {2124327600 -14400 0 CLT}
-    {2135822400 -10800 1 CLST}
-    {2155777200 -14400 0 CLT}
-    {2167272000 -10800 1 CLST}
-    {2187226800 -14400 0 CLT}
-    {2198721600 -10800 1 CLST}
-    {2219281200 -14400 0 CLT}
-    {2230171200 -10800 1 CLST}
-    {2250730800 -14400 0 CLT}
-    {2262225600 -10800 1 CLST}
-    {2282180400 -14400 0 CLT}
-    {2293675200 -10800 1 CLST}
-    {2313630000 -14400 0 CLT}
-    {2325124800 -10800 1 CLST}
-    {2345079600 -14400 0 CLT}
-    {2356574400 -10800 1 CLST}
-    {2376529200 -14400 0 CLT}
-    {2388024000 -10800 1 CLST}
-    {2408583600 -14400 0 CLT}
-    {2419473600 -10800 1 CLST}
-    {2440033200 -14400 0 CLT}
-    {2451528000 -10800 1 CLST}
-    {2471482800 -14400 0 CLT}
-    {2482977600 -10800 1 CLST}
-    {2502932400 -14400 0 CLT}
-    {2514427200 -10800 1 CLST}
-    {2534382000 -14400 0 CLT}
-    {2545876800 -10800 1 CLST}
-    {2565831600 -14400 0 CLT}
-    {2577326400 -10800 1 CLST}
-    {2597886000 -14400 0 CLT}
-    {2609380800 -10800 1 CLST}
-    {2629335600 -14400 0 CLT}
-    {2640830400 -10800 1 CLST}
-    {2660785200 -14400 0 CLT}
-    {2672280000 -10800 1 CLST}
-    {2692234800 -14400 0 CLT}
-    {2703729600 -10800 1 CLST}
-    {2723684400 -14400 0 CLT}
-    {2735179200 -10800 1 CLST}
-    {2755738800 -14400 0 CLT}
-    {2766628800 -10800 1 CLST}
-    {2787188400 -14400 0 CLT}
-    {2798683200 -10800 1 CLST}
-    {2818638000 -14400 0 CLT}
-    {2830132800 -10800 1 CLST}
-    {2850087600 -14400 0 CLT}
-    {2861582400 -10800 1 CLST}
-    {2881537200 -14400 0 CLT}
-    {2893032000 -10800 1 CLST}
-    {2912986800 -14400 0 CLT}
-    {2924481600 -10800 1 CLST}
-    {2945041200 -14400 0 CLT}
-    {2955931200 -10800 1 CLST}
-    {2976490800 -14400 0 CLT}
-    {2987985600 -10800 1 CLST}
-    {3007940400 -14400 0 CLT}
-    {3019435200 -10800 1 CLST}
-    {3039390000 -14400 0 CLT}
-    {3050884800 -10800 1 CLST}
-    {3070839600 -14400 0 CLT}
-    {3082334400 -10800 1 CLST}
-    {3102894000 -14400 0 CLT}
-    {3113784000 -10800 1 CLST}
-    {3134343600 -14400 0 CLT}
-    {3145838400 -10800 1 CLST}
-    {3165793200 -14400 0 CLT}
-    {3177288000 -10800 1 CLST}
-    {3197242800 -14400 0 CLT}
-    {3208737600 -10800 1 CLST}
-    {3228692400 -14400 0 CLT}
-    {3240187200 -10800 1 CLST}
-    {3260142000 -14400 0 CLT}
-    {3271636800 -10800 1 CLST}
-    {3292196400 -14400 0 CLT}
-    {3303086400 -10800 1 CLST}
-    {3323646000 -14400 0 CLT}
-    {3335140800 -10800 1 CLST}
-    {3355095600 -14400 0 CLT}
-    {3366590400 -10800 1 CLST}
-    {3386545200 -14400 0 CLT}
-    {3398040000 -10800 1 CLST}
-    {3417994800 -14400 0 CLT}
-    {3429489600 -10800 1 CLST}
-    {3449444400 -14400 0 CLT}
-    {3460939200 -10800 1 CLST}
-    {3481498800 -14400 0 CLT}
-    {3492993600 -10800 1 CLST}
-    {3512948400 -14400 0 CLT}
-    {3524443200 -10800 1 CLST}
-    {3544398000 -14400 0 CLT}
-    {3555892800 -10800 1 CLST}
-    {3575847600 -14400 0 CLT}
-    {3587342400 -10800 1 CLST}
-    {3607297200 -14400 0 CLT}
-    {3618792000 -10800 1 CLST}
-    {3639351600 -14400 0 CLT}
-    {3650241600 -10800 1 CLST}
-    {3670801200 -14400 0 CLT}
-    {3682296000 -10800 1 CLST}
-    {3702250800 -14400 0 CLT}
-    {3713745600 -10800 1 CLST}
-    {3733700400 -14400 0 CLT}
-    {3745195200 -10800 1 CLST}
-    {3765150000 -14400 0 CLT}
-    {3776644800 -10800 1 CLST}
-    {3796599600 -14400 0 CLT}
-    {3808094400 -10800 1 CLST}
-    {3828654000 -14400 0 CLT}
-    {3839544000 -10800 1 CLST}
-    {3860103600 -14400 0 CLT}
-    {3871598400 -10800 1 CLST}
-    {3891553200 -14400 0 CLT}
-    {3903048000 -10800 1 CLST}
-    {3923002800 -14400 0 CLT}
-    {3934497600 -10800 1 CLST}
-    {3954452400 -14400 0 CLT}
-    {3965947200 -10800 1 CLST}
-    {3986506800 -14400 0 CLT}
-    {3997396800 -10800 1 CLST}
-    {4017956400 -14400 0 CLT}
-    {4029451200 -10800 1 CLST}
-    {4049406000 -14400 0 CLT}
-    {4060900800 -10800 1 CLST}
-    {4080855600 -14400 0 CLT}
-    {4092350400 -10800 1 CLST}
+    {1430017200 -10800 0 CLT}
 }
diff --git a/library/tzdata/Antarctica/Troll b/library/tzdata/Antarctica/Troll
new file mode 100644 (file)
index 0000000..7d2b042
--- /dev/null
@@ -0,0 +1,196 @@
+# created by tools/tclZIC.tcl - do not edit
+
+set TZData(:Antarctica/Troll) {
+    {-9223372036854775808 0 0 zzz}
+    {1108166400 0 0 UTC}
+    {1111885200 7200 1 CEST}
+    {1130634000 0 0 UTC}
+    {1143334800 7200 1 CEST}
+    {1162083600 0 0 UTC}
+    {1174784400 7200 1 CEST}
+    {1193533200 0 0 UTC}
+    {1206838800 7200 1 CEST}
+    {1224982800 0 0 UTC}
+    {1238288400 7200 1 CEST}
+    {1256432400 0 0 UTC}
+    {1269738000 7200 1 CEST}
+    {1288486800 0 0 UTC}
+    {1301187600 7200 1 CEST}
+    {1319936400 0 0 UTC}
+    {1332637200 7200 1 CEST}
+    {1351386000 0 0 UTC}
+    {1364691600 7200 1 CEST}
+    {1382835600 0 0 UTC}
+    {1396141200 7200 1 CEST}
+    {1414285200 0 0 UTC}
+    {1427590800 7200 1 CEST}
+    {1445734800 0 0 UTC}
+    {1459040400 7200 1 CEST}
+    {1477789200 0 0 UTC}
+    {1490490000 7200 1 CEST}
+    {1509238800 0 0 UTC}
+    {1521939600 7200 1 CEST}
+    {1540688400 0 0 UTC}
+    {1553994000 7200 1 CEST}
+    {1572138000 0 0 UTC}
+    {1585443600 7200 1 CEST}
+    {1603587600 0 0 UTC}
+    {1616893200 7200 1 CEST}
+    {1635642000 0 0 UTC}
+    {1648342800 7200 1 CEST}
+    {1667091600 0 0 UTC}
+    {1679792400 7200 1 CEST}
+    {1698541200 0 0 UTC}
+    {1711846800 7200 1 CEST}
+    {1729990800 0 0 UTC}
+    {1743296400 7200 1 CEST}
+    {1761440400 0 0 UTC}
+    {1774746000 7200 1 CEST}
+    {1792890000 0 0 UTC}
+    {1806195600 7200 1 CEST}
+    {1824944400 0 0 UTC}
+    {1837645200 7200 1 CEST}
+    {1856394000 0 0 UTC}
+    {1869094800 7200 1 CEST}
+    {1887843600 0 0 UTC}
+    {1901149200 7200 1 CEST}
+    {1919293200 0 0 UTC}
+    {1932598800 7200 1 CEST}
+    {1950742800 0 0 UTC}
+    {1964048400 7200 1 CEST}
+    {1982797200 0 0 UTC}
+    {1995498000 7200 1 CEST}
+    {2014246800 0 0 UTC}
+    {2026947600 7200 1 CEST}
+    {2045696400 0 0 UTC}
+    {2058397200 7200 1 CEST}
+    {2077146000 0 0 UTC}
+    {2090451600 7200 1 CEST}
+    {2108595600 0 0 UTC}
+    {2121901200 7200 1 CEST}
+    {2140045200 0 0 UTC}
+    {2153350800 7200 1 CEST}
+    {2172099600 0 0 UTC}
+    {2184800400 7200 1 CEST}
+    {2203549200 0 0 UTC}
+    {2216250000 7200 1 CEST}
+    {2234998800 0 0 UTC}
+    {2248304400 7200 1 CEST}
+    {2266448400 0 0 UTC}
+    {2279754000 7200 1 CEST}
+    {2297898000 0 0 UTC}
+    {2311203600 7200 1 CEST}
+    {2329347600 0 0 UTC}
+    {2342653200 7200 1 CEST}
+    {2361402000 0 0 UTC}
+    {2374102800 7200 1 CEST}
+    {2392851600 0 0 UTC}
+    {2405552400 7200 1 CEST}
+    {2424301200 0 0 UTC}
+    {2437606800 7200 1 CEST}
+    {2455750800 0 0 UTC}
+    {2469056400 7200 1 CEST}
+    {2487200400 0 0 UTC}
+    {2500506000 7200 1 CEST}
+    {2519254800 0 0 UTC}
+    {2531955600 7200 1 CEST}
+    {2550704400 0 0 UTC}
+    {2563405200 7200 1 CEST}
+    {2582154000 0 0 UTC}
+    {2595459600 7200 1 CEST}
+    {2613603600 0 0 UTC}
+    {2626909200 7200 1 CEST}
+    {2645053200 0 0 UTC}
+    {2658358800 7200 1 CEST}
+    {2676502800 0 0 UTC}
+    {2689808400 7200 1 CEST}
+    {2708557200 0 0 UTC}
+    {2721258000 7200 1 CEST}
+    {2740006800 0 0 UTC}
+    {2752707600 7200 1 CEST}
+    {2771456400 0 0 UTC}
+    {2784762000 7200 1 CEST}
+    {2802906000 0 0 UTC}
+    {2816211600 7200 1 CEST}
+    {2834355600 0 0 UTC}
+    {2847661200 7200 1 CEST}
+    {2866410000 0 0 UTC}
+    {2879110800 7200 1 CEST}
+    {2897859600 0 0 UTC}
+    {2910560400 7200 1 CEST}
+    {2929309200 0 0 UTC}
+    {2942010000 7200 1 CEST}
+    {2960758800 0 0 UTC}
+    {2974064400 7200 1 CEST}
+    {2992208400 0 0 UTC}
+    {3005514000 7200 1 CEST}
+    {3023658000 0 0 UTC}
+    {3036963600 7200 1 CEST}
+    {3055712400 0 0 UTC}
+    {3068413200 7200 1 CEST}
+    {3087162000 0 0 UTC}
+    {3099862800 7200 1 CEST}
+    {3118611600 0 0 UTC}
+    {3131917200 7200 1 CEST}
+    {3150061200 0 0 UTC}
+    {3163366800 7200 1 CEST}
+    {3181510800 0 0 UTC}
+    {3194816400 7200 1 CEST}
+    {3212960400 0 0 UTC}
+    {3226266000 7200 1 CEST}
+    {3245014800 0 0 UTC}
+    {3257715600 7200 1 CEST}
+    {3276464400 0 0 UTC}
+    {3289165200 7200 1 CEST}
+    {3307914000 0 0 UTC}
+    {3321219600 7200 1 CEST}
+    {3339363600 0 0 UTC}
+    {3352669200 7200 1 CEST}
+    {3370813200 0 0 UTC}
+    {3384118800 7200 1 CEST}
+    {3402867600 0 0 UTC}
+    {3415568400 7200 1 CEST}
+    {3434317200 0 0 UTC}
+    {3447018000 7200 1 CEST}
+    {3465766800 0 0 UTC}
+    {3479072400 7200 1 CEST}
+    {3497216400 0 0 UTC}
+    {3510522000 7200 1 CEST}
+    {3528666000 0 0 UTC}
+    {3541971600 7200 1 CEST}
+    {3560115600 0 0 UTC}
+    {3573421200 7200 1 CEST}
+    {3592170000 0 0 UTC}
+    {3604870800 7200 1 CEST}
+    {3623619600 0 0 UTC}
+    {3636320400 7200 1 CEST}
+    {3655069200 0 0 UTC}
+    {3668374800 7200 1 CEST}
+    {3686518800 0 0 UTC}
+    {3699824400 7200 1 CEST}
+    {3717968400 0 0 UTC}
+    {3731274000 7200 1 CEST}
+    {3750022800 0 0 UTC}
+    {3762723600 7200 1 CEST}
+    {3781472400 0 0 UTC}
+    {3794173200 7200 1 CEST}
+    {3812922000 0 0 UTC}
+    {3825622800 7200 1 CEST}
+    {3844371600 0 0 UTC}
+    {3857677200 7200 1 CEST}
+    {3875821200 0 0 UTC}
+    {3889126800 7200 1 CEST}
+    {3907270800 0 0 UTC}
+    {3920576400 7200 1 CEST}
+    {3939325200 0 0 UTC}
+    {3952026000 7200 1 CEST}
+    {3970774800 0 0 UTC}
+    {3983475600 7200 1 CEST}
+    {4002224400 0 0 UTC}
+    {4015530000 7200 1 CEST}
+    {4033674000 0 0 UTC}
+    {4046979600 7200 1 CEST}
+    {4065123600 0 0 UTC}
+    {4078429200 7200 1 CEST}
+    {4096573200 0 0 UTC}
+}
index 399d9f0..5c5515e 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Asia/Aden) {
-    {-9223372036854775808 10794 0 LMT}
-    {-631162794 10800 0 AST}
+if {![info exists TZData(Asia/Riyadh)]} {
+    LoadTimeZoneFile Asia/Riyadh
 }
+set TZData(:Asia/Aden) $TZData(:Asia/Riyadh)
index d4b7d2c..aab5b7d 100644 (file)
@@ -1,7 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Asia/Bahrain) {
-    {-9223372036854775808 12140 0 LMT}
-    {-1577935340 14400 0 GST}
-    {76190400 10800 0 AST}
+if {![info exists TZData(Asia/Qatar)]} {
+    LoadTimeZoneFile Asia/Qatar
 }
+set TZData(:Asia/Bahrain) $TZData(:Asia/Qatar)
diff --git a/library/tzdata/Asia/Chita b/library/tzdata/Asia/Chita
new file mode 100644 (file)
index 0000000..eabce7f
--- /dev/null
@@ -0,0 +1,71 @@
+# created by tools/tclZIC.tcl - do not edit
+
+set TZData(:Asia/Chita) {
+    {-9223372036854775808 27232 0 LMT}
+    {-1579419232 28800 0 YAKT}
+    {-1247558400 32400 0 YAKMMTT}
+    {354898800 36000 1 YAKST}
+    {370706400 32400 0 YAKT}
+    {386434800 36000 1 YAKST}
+    {402242400 32400 0 YAKT}
+    {417970800 36000 1 YAKST}
+    {433778400 32400 0 YAKT}
+    {449593200 36000 1 YAKST}
+    {465325200 32400 0 YAKT}
+    {481050000 36000 1 YAKST}
+    {496774800 32400 0 YAKT}
+    {512499600 36000 1 YAKST}
+    {528224400 32400 0 YAKT}
+    {543949200 36000 1 YAKST}
+    {559674000 32400 0 YAKT}
+    {575398800 36000 1 YAKST}
+    {591123600 32400 0 YAKT}
+    {606848400 36000 1 YAKST}
+    {622573200 32400 0 YAKT}
+    {638298000 36000 1 YAKST}
+    {654627600 32400 0 YAKT}
+    {670352400 28800 0 YAKMMTT}
+    {670356000 32400 1 YAKST}
+    {686080800 28800 0 YAKT}
+    {695757600 32400 0 YAKMMTT}
+    {701791200 36000 1 YAKST}
+    {717512400 32400 0 YAKT}
+    {733251600 36000 1 YAKST}
+    {748976400 32400 0 YAKT}
+    {764701200 36000 1 YAKST}
+    {780426000 32400 0 YAKT}
+    {796150800 36000 1 YAKST}
+    {811875600 32400 0 YAKT}
+    {828205200 36000 1 YAKST}
+    {846349200 32400 0 YAKT}
+    {859654800 36000 1 YAKST}
+    {877798800 32400 0 YAKT}
+    {891104400 36000 1 YAKST}
+    {909248400 32400 0 YAKT}
+    {922554000 36000 1 YAKST}
+    {941302800 32400 0 YAKT}
+    {954003600 36000 1 YAKST}
+    {972752400 32400 0 YAKT}
+    {985453200 36000 1 YAKST}
+    {1004202000 32400 0 YAKT}
+    {1017507600 36000 1 YAKST}
+    {1035651600 32400 0 YAKT}
+    {1048957200 36000 1 YAKST}
+    {1067101200 32400 0 YAKT}
+    {1080406800 36000 1 YAKST}
+    {1099155600 32400 0 YAKT}
+    {1111856400 36000 1 YAKST}
+    {1130605200 32400 0 YAKT}
+    {1143306000 36000 1 YAKST}
+    {1162054800 32400 0 YAKT}
+    {1174755600 36000 1 YAKST}
+    {1193504400 32400 0 YAKT}
+    {1206810000 36000 1 YAKST}
+    {1224954000 32400 0 YAKT}
+    {1238259600 36000 1 YAKST}
+    {1256403600 32400 0 YAKT}
+    {1269709200 36000 1 YAKST}
+    {1288458000 32400 0 YAKT}
+    {1301158800 36000 0 YAKT}
+    {1414252800 28800 0 IRKT}
+}
index e0c270d..6e8a334 100644 (file)
@@ -10,5 +10,5 @@ set TZData(:Asia/Dhaka) {
     {38772000 21600 0 BDT}
     {1230746400 21600 0 BDT}
     {1245430800 25200 1 BDST}
-    {1262278740 21600 0 BDT}
+    {1262278800 21600 0 BDT}
 }
index 777c8db..9da89f4 100644 (file)
@@ -2,8 +2,13 @@
 
 set TZData(:Asia/Ho_Chi_Minh) {
     {-9223372036854775808 25600 0 LMT}
-    {-2005974400 25580 0 SMT}
-    {-1855983920 25200 0 ICT}
-    {-1819954800 28800 0 ICT}
-    {-1220428800 25200 0 ICT}
+    {-2004073600 25590 0 PLMT}
+    {-1851577590 25200 0 ICT}
+    {-852105600 28800 0 IDT}
+    {-782643600 32400 0 JST}
+    {-767869200 25200 0 ICT}
+    {-718095600 28800 0 IDT}
+    {-457776000 25200 0 ICT}
+    {-315648000 28800 0 IDT}
+    {171820800 25200 0 ICT}
 }
index e344181..08e5798 100644 (file)
@@ -1,9 +1,9 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Asia/Irkutsk) {
-    {-9223372036854775808 25035 0 LMT}
-    {-2840165835 25035 0 IMT}
-    {-1575874635 25200 0 IRKT}
+    {-9223372036854775808 25025 0 LMT}
+    {-2840165825 25025 0 IMT}
+    {-1575874625 25200 0 IRKT}
     {-1247554800 28800 0 IRKMMTT}
     {354902400 32400 1 IRKST}
     {370710000 28800 0 IRKT}
index 2770a51..17ea6c0 100644 (file)
@@ -1,8 +1,8 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Asia/Krasnoyarsk) {
-    {-9223372036854775808 22280 0 LMT}
-    {-1577513480 21600 0 KRAT}
+    {-9223372036854775808 22286 0 LMT}
+    {-1577513486 21600 0 KRAT}
     {-1247551200 25200 0 KRAMMTT}
     {354906000 28800 1 KRAST}
     {370713600 25200 0 KRAT}
index 15d26db..e618c56 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Asia/Kuwait) {
-    {-9223372036854775808 11516 0 LMT}
-    {-631163516 10800 0 AST}
+if {![info exists TZData(Asia/Riyadh)]} {
+    LoadTimeZoneFile Asia/Riyadh
 }
+set TZData(:Asia/Kuwait) $TZData(:Asia/Riyadh)
index a69b880..fdd34c1 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Asia/Muscat) {
-    {-9223372036854775808 14064 0 LMT}
-    {-1577937264 14400 0 GST}
+if {![info exists TZData(Asia/Dubai)]} {
+    LoadTimeZoneFile Asia/Dubai
 }
+set TZData(:Asia/Muscat) $TZData(:Asia/Dubai)
index d7e308e..ab3c2d5 100644 (file)
@@ -1,8 +1,8 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Asia/Novokuznetsk) {
-    {-9223372036854775808 20928 0 NMT}
-    {-1577512128 21600 0 KRAT}
+    {-9223372036854775808 20928 0 LMT}
+    {-1441259328 21600 0 KRAT}
     {-1247551200 25200 0 KRAMMTT}
     {354906000 28800 1 KRAST}
     {370713600 25200 0 KRAT}
index a6b0db3..f25b8d4 100644 (file)
@@ -1,8 +1,8 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Asia/Omsk) {
-    {-9223372036854775808 17616 0 LMT}
-    {-1582088016 18000 0 OMST}
+    {-9223372036854775808 17610 0 LMT}
+    {-1582088010 18000 0 OMST}
     {-1247547600 21600 0 OMSMMTT}
     {354909600 25200 1 OMSST}
     {370717200 21600 0 OMST}
index 4f28420..114c786 100644 (file)
@@ -1,9 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Asia/Phnom_Penh) {
-    {-9223372036854775808 25180 0 LMT}
-    {-2005973980 25580 0 SMT}
-    {-1855983920 25200 0 ICT}
-    {-1819954800 28800 0 ICT}
-    {-1220428800 25200 0 ICT}
+if {![info exists TZData(Asia/Bangkok)]} {
+    LoadTimeZoneFile Asia/Bangkok
 }
+set TZData(:Asia/Phnom_Penh) $TZData(:Asia/Bangkok)
index dd40311..fafed54 100644 (file)
@@ -2,12 +2,8 @@
 
 set TZData(:Asia/Pyongyang) {
     {-9223372036854775808 30180 0 LMT}
-    {-2524551780 30600 0 KST}
-    {-2053931400 32400 0 JCST}
-    {-1325494800 30600 0 KST}
-    {-1199262600 32400 0 JCST}
+    {-1948782180 30600 0 KST}
+    {-1830414600 32400 0 JCST}
     {-1017824400 32400 0 JST}
     {-768646800 32400 0 KST}
-    {-498128400 28800 0 KST}
-    {-264931200 32400 0 KST}
 }
index 6a1be11..4b3b49f 100644 (file)
@@ -1,8 +1,8 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Asia/Samarkand) {
-    {-9223372036854775808 16032 0 LMT}
-    {-1441168032 14400 0 SAMT}
+    {-9223372036854775808 16073 0 LMT}
+    {-1441168073 14400 0 SAMT}
     {-1247544000 18000 0 SAMT}
     {354913200 21600 1 SAMST}
     {370720800 21600 0 TAST}
index 9625291..c24a1d8 100644 (file)
@@ -2,19 +2,26 @@
 
 set TZData(:Asia/Seoul) {
     {-9223372036854775808 30472 0 LMT}
-    {-2524552072 30600 0 KST}
-    {-2053931400 32400 0 JCST}
-    {-1325494800 30600 0 KST}
-    {-1199262600 32400 0 JCST}
+    {-1948782472 30600 0 KST}
+    {-1830414600 32400 0 JCST}
     {-1017824400 32400 0 JST}
     {-767350800 32400 0 KST}
-    {-498128400 28800 0 KST}
-    {-303984000 32400 1 KDT}
-    {-293533200 28800 0 KST}
-    {-264931200 30600 0 KST}
-    {-39515400 32400 0 KST}
-    {547570800 36000 1 KDT}
-    {560872800 32400 0 KST}
-    {579020400 36000 1 KDT}
-    {592322400 32400 0 KST}
+    {-498128400 30600 0 KST}
+    {-462702600 34200 1 KDT}
+    {-451733400 30600 0 KST}
+    {-429784200 34200 1 KDT}
+    {-418296600 30600 0 KST}
+    {-399544200 34200 1 KDT}
+    {-387451800 30600 0 KST}
+    {-368094600 34200 1 KDT}
+    {-356002200 30600 0 KST}
+    {-336645000 34200 1 KDT}
+    {-324552600 30600 0 KST}
+    {-305195400 34200 1 KDT}
+    {-293103000 30600 0 KST}
+    {-264933000 32400 0 KST}
+    {547578000 36000 1 KDT}
+    {560883600 32400 0 KST}
+    {579027600 36000 1 KDT}
+    {592333200 32400 0 KST}
 }
diff --git a/library/tzdata/Asia/Srednekolymsk b/library/tzdata/Asia/Srednekolymsk
new file mode 100644 (file)
index 0000000..d1dd879
--- /dev/null
@@ -0,0 +1,71 @@
+# created by tools/tclZIC.tcl - do not edit
+
+set TZData(:Asia/Srednekolymsk) {
+    {-9223372036854775808 36892 0 LMT}
+    {-1441188892 36000 0 MAGT}
+    {-1247565600 39600 0 MAGMMTT}
+    {354891600 43200 1 MAGST}
+    {370699200 39600 0 MAGT}
+    {386427600 43200 1 MAGST}
+    {402235200 39600 0 MAGT}
+    {417963600 43200 1 MAGST}
+    {433771200 39600 0 MAGT}
+    {449586000 43200 1 MAGST}
+    {465318000 39600 0 MAGT}
+    {481042800 43200 1 MAGST}
+    {496767600 39600 0 MAGT}
+    {512492400 43200 1 MAGST}
+    {528217200 39600 0 MAGT}
+    {543942000 43200 1 MAGST}
+    {559666800 39600 0 MAGT}
+    {575391600 43200 1 MAGST}
+    {591116400 39600 0 MAGT}
+    {606841200 43200 1 MAGST}
+    {622566000 39600 0 MAGT}
+    {638290800 43200 1 MAGST}
+    {654620400 39600 0 MAGT}
+    {670345200 36000 0 MAGMMTT}
+    {670348800 39600 1 MAGST}
+    {686073600 36000 0 MAGT}
+    {695750400 39600 0 MAGMMTT}
+    {701784000 43200 1 MAGST}
+    {717505200 39600 0 MAGT}
+    {733244400 43200 1 MAGST}
+    {748969200 39600 0 MAGT}
+    {764694000 43200 1 MAGST}
+    {780418800 39600 0 MAGT}
+    {796143600 43200 1 MAGST}
+    {811868400 39600 0 MAGT}
+    {828198000 43200 1 MAGST}
+    {846342000 39600 0 MAGT}
+    {859647600 43200 1 MAGST}
+    {877791600 39600 0 MAGT}
+    {891097200 43200 1 MAGST}
+    {909241200 39600 0 MAGT}
+    {922546800 43200 1 MAGST}
+    {941295600 39600 0 MAGT}
+    {953996400 43200 1 MAGST}
+    {972745200 39600 0 MAGT}
+    {985446000 43200 1 MAGST}
+    {1004194800 39600 0 MAGT}
+    {1017500400 43200 1 MAGST}
+    {1035644400 39600 0 MAGT}
+    {1048950000 43200 1 MAGST}
+    {1067094000 39600 0 MAGT}
+    {1080399600 43200 1 MAGST}
+    {1099148400 39600 0 MAGT}
+    {1111849200 43200 1 MAGST}
+    {1130598000 39600 0 MAGT}
+    {1143298800 43200 1 MAGST}
+    {1162047600 39600 0 MAGT}
+    {1174748400 43200 1 MAGST}
+    {1193497200 39600 0 MAGT}
+    {1206802800 43200 1 MAGST}
+    {1224946800 39600 0 MAGT}
+    {1238252400 43200 1 MAGST}
+    {1256396400 39600 0 MAGT}
+    {1269702000 43200 1 MAGST}
+    {1288450800 39600 0 MAGT}
+    {1301151600 43200 0 MAGT}
+    {1414245600 39600 0 SRET}
+}
index 9f4a4bf..54b278a 100644 (file)
@@ -1,9 +1,9 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Asia/Tbilisi) {
-    {-9223372036854775808 10746 0 LMT}
-    {-2840151546 10746 0 TBMT}
-    {-1441162746 10800 0 TBIT}
+    {-9223372036854775808 10751 0 LMT}
+    {-2840151551 10751 0 TBMT}
+    {-1441162751 10800 0 TBIT}
     {-405140400 14400 0 TBIT}
     {354916800 18000 1 TBIST}
     {370724400 14400 0 TBIT}
index 18ade4d..27b20ce 100644 (file)
@@ -1,9 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Asia/Vientiane) {
-    {-9223372036854775808 24624 0 LMT}
-    {-2005973424 25580 0 SMT}
-    {-1855983920 25200 0 ICT}
-    {-1819954800 28800 0 ICT}
-    {-1220428800 25200 0 ICT}
+if {![info exists TZData(Asia/Bangkok)]} {
+    LoadTimeZoneFile Asia/Bangkok
 }
+set TZData(:Asia/Vientiane) $TZData(:Asia/Bangkok)
index 396840d..119ff57 100644 (file)
@@ -1,8 +1,8 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Asia/Vladivostok) {
-    {-9223372036854775808 31654 0 LMT}
-    {-1487321254 32400 0 VLAT}
+    {-9223372036854775808 31651 0 LMT}
+    {-1487321251 32400 0 VLAT}
     {-1247562000 36000 0 VLAMMTT}
     {354895200 39600 1 VLAST}
     {370702800 36000 0 VLAT}
index 98953c9..17493a6 100644 (file)
@@ -1,8 +1,8 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Asia/Yakutsk) {
-    {-9223372036854775808 31120 0 LMT}
-    {-1579423120 28800 0 YAKT}
+    {-9223372036854775808 31138 0 LMT}
+    {-1579423138 28800 0 YAKT}
     {-1247558400 32400 0 YAKMMTT}
     {354898800 36000 1 YAKST}
     {370706400 32400 0 YAKT}
index 688ceca..2678958 100644 (file)
@@ -2,7 +2,8 @@
 
 set TZData(:Asia/Yekaterinburg) {
     {-9223372036854775808 14553 0 LMT}
-    {-1592611353 14400 0 SVET}
+    {-1688270553 13505 0 PMT}
+    {-1592610305 14400 0 SVET}
     {-1247544000 18000 0 SVEMMTT}
     {354913200 21600 1 SVEST}
     {370720800 18000 0 SVET}
index c476191..fd47ba5 100644 (file)
@@ -3,7 +3,7 @@
 set TZData(:Atlantic/Azores) {
     {-9223372036854775808 -6160 0 LMT}
     {-2713904240 -6872 0 HMT}
-    {-1849557928 -7200 0 AZOT}
+    {-1830377128 -7200 0 AZOT}
     {-1689548400 -3600 1 AZOST}
     {-1677794400 -7200 0 AZOT}
     {-1667430000 -3600 1 AZOST}
index 4960eeb..fac7f92 100644 (file)
@@ -3,7 +3,7 @@
 set TZData(:Atlantic/Madeira) {
     {-9223372036854775808 -4056 0 LMT}
     {-2713906344 -4056 0 FMT}
-    {-1849560744 -3600 0 MADT}
+    {-1830379944 -3600 0 MADT}
     {-1689552000 0 1 MADST}
     {-1677798000 -3600 0 MADT}
     {-1667433600 0 1 MADST}
index f0248ad..ad7f0db 100644 (file)
@@ -1,15 +1,18 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Atlantic/Reykjavik) {
-    {-9223372036854775808 -5244 0 LMT}
-    {-4197047556 -5268 0 RMT}
-    {-1956609132 -3600 0 IST}
+    {-9223372036854775808 -5280 0 LMT}
+    {-1956609120 -3600 0 IST}
     {-1668211200 0 1 ISST}
     {-1647212400 -3600 0 IST}
     {-1636675200 0 1 ISST}
     {-1613430000 -3600 0 IST}
+    {-1605139200 0 1 ISST}
+    {-1581894000 -3600 0 IST}
+    {-1539561600 0 1 ISST}
+    {-1531350000 -3600 0 IST}
     {-968025600 0 1 ISST}
-    {-949615200 -3600 0 IST}
+    {-952293600 -3600 0 IST}
     {-942008400 0 1 ISST}
     {-920239200 -3600 0 IST}
     {-909957600 0 1 ISST}
index 79c688a..7168f96 100644 (file)
@@ -1,9 +1,9 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Europe/Lisbon) {
-    {-9223372036854775808 -2192 0 LMT}
-    {-2713908208 -2192 0 LMT}
-    {-1830381808 0 0 WET}
+    {-9223372036854775808 -2205 0 LMT}
+    {-2713908195 -2205 0 LMT}
+    {-1830381795 0 0 WET}
     {-1689555600 3600 1 WEST}
     {-1677801600 0 0 WET}
     {-1667437200 3600 1 WEST}
index 1adcff8..0acb4aa 100644 (file)
@@ -71,4 +71,5 @@ set TZData(:Europe/Minsk) {
     {1269734400 10800 1 EEST}
     {1288483200 7200 0 EET}
     {1301184000 10800 0 FET}
+    {1414274400 10800 0 MSK}
 }
index 98cccc2..c829ffb 100644 (file)
@@ -1,13 +1,13 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Europe/Riga) {
-    {-9223372036854775808 5788 0 LMT}
-    {-2840146588 5788 0 RMT}
-    {-1632008188 9388 1 LST}
-    {-1618702588 5788 0 RMT}
-    {-1601681788 9388 1 LST}
-    {-1597275388 5788 0 RMT}
-    {-1377308188 7200 0 EET}
+    {-9223372036854775808 5794 0 LMT}
+    {-2840146594 5794 0 RMT}
+    {-1632008194 9394 1 LST}
+    {-1618702594 5794 0 RMT}
+    {-1601681794 9394 1 LST}
+    {-1597275394 5794 0 RMT}
+    {-1377308194 7200 0 EET}
     {-928029600 10800 0 MSK}
     {-899521200 3600 0 CET}
     {-857257200 3600 0 CET}
index 243a42f..ee9d989 100644 (file)
@@ -1,8 +1,8 @@
 # created by tools/tclZIC.tcl - do not edit
 
 set TZData(:Europe/Samara) {
-    {-9223372036854775808 12036 0 LMT}
-    {-1593825636 10800 0 SAMT}
+    {-9223372036854775808 12020 0 LMT}
+    {-1593825620 10800 0 SAMT}
     {-1247540400 14400 0 SAMT}
     {-1102305600 14400 0 KUYMMTT}
     {354916800 18000 1 KUYST}
index 217715e..c56a893 100644 (file)
@@ -1,8 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Indian/Antananarivo) {
-    {-9223372036854775808 11404 0 LMT}
-    {-1846293004 10800 0 EAT}
-    {-499924800 14400 1 EAST}
-    {-492062400 10800 0 EAT}
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
+set TZData(:Indian/Antananarivo) $TZData(:Africa/Nairobi)
index 0b3c33a..06071de 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Indian/Comoro) {
-    {-9223372036854775808 10384 0 LMT}
-    {-1846291984 10800 0 EAT}
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
+set TZData(:Indian/Comoro) $TZData(:Africa/Nairobi)
index 0fe5f56..da55521 100644 (file)
@@ -1,6 +1,5 @@
 # created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Indian/Mayotte) {
-    {-9223372036854775808 10856 0 LMT}
-    {-1846292456 10800 0 EAT}
+if {![info exists TZData(Africa/Nairobi)]} {
+    LoadTimeZoneFile Africa/Nairobi
 }
+set TZData(:Indian/Mayotte) $TZData(:Africa/Nairobi)
diff --git a/library/tzdata/Pacific/Bougainville b/library/tzdata/Pacific/Bougainville
new file mode 100644 (file)
index 0000000..06996f9
--- /dev/null
@@ -0,0 +1,10 @@
+# created by tools/tclZIC.tcl - do not edit
+
+set TZData(:Pacific/Bougainville) {
+    {-9223372036854775808 37336 0 LMT}
+    {-2840178136 35312 0 PMMT}
+    {-2366790512 36000 0 PGT}
+    {-868010400 32400 0 JST}
+    {-768906000 36000 0 PGT}
+    {1419696000 39600 0 BST}
+}
index 000c6d1..f76594a 100644 (file)
@@ -36,6 +36,7 @@ set TZData(:Pacific/Easter) {
     {340171200 -21600 1 EASST}
     {353473200 -25200 0 EAST}
     {371620800 -21600 1 EASST}
+    {384836400 -18000 0 EAST}
     {384922800 -21600 0 EAST}
     {403070400 -18000 1 EASST}
     {416372400 -21600 0 EAST}
@@ -102,174 +103,5 @@ set TZData(:Pacific/Easter) {
     {1378612800 -18000 1 EASST}
     {1398567600 -21600 0 EAST}
     {1410062400 -18000 1 EASST}
-    {1430017200 -21600 0 EAST}
-    {1441512000 -18000 1 EASST}
-    {1461466800 -21600 0 EAST}
-    {1472961600 -18000 1 EASST}
-    {1492916400 -21600 0 EAST}
-    {1504411200 -18000 1 EASST}
-    {1524970800 -21600 0 EAST}
-    {1535860800 -18000 1 EASST}
-    {1556420400 -21600 0 EAST}
-    {1567915200 -18000 1 EASST}
-    {1587870000 -21600 0 EAST}
-    {1599364800 -18000 1 EASST}
-    {1619319600 -21600 0 EAST}
-    {1630814400 -18000 1 EASST}
-    {1650769200 -21600 0 EAST}
-    {1662264000 -18000 1 EASST}
-    {1682218800 -21600 0 EAST}
-    {1693713600 -18000 1 EASST}
-    {1714273200 -21600 0 EAST}
-    {1725768000 -18000 1 EASST}
-    {1745722800 -21600 0 EAST}
-    {1757217600 -18000 1 EASST}
-    {1777172400 -21600 0 EAST}
-    {1788667200 -18000 1 EASST}
-    {1808622000 -21600 0 EAST}
-    {1820116800 -18000 1 EASST}
-    {1840071600 -21600 0 EAST}
-    {1851566400 -18000 1 EASST}
-    {1872126000 -21600 0 EAST}
-    {1883016000 -18000 1 EASST}
-    {1903575600 -21600 0 EAST}
-    {1915070400 -18000 1 EASST}
-    {1935025200 -21600 0 EAST}
-    {1946520000 -18000 1 EASST}
-    {1966474800 -21600 0 EAST}
-    {1977969600 -18000 1 EASST}
-    {1997924400 -21600 0 EAST}
-    {2009419200 -18000 1 EASST}
-    {2029374000 -21600 0 EAST}
-    {2040868800 -18000 1 EASST}
-    {2061428400 -21600 0 EAST}
-    {2072318400 -18000 1 EASST}
-    {2092878000 -21600 0 EAST}
-    {2104372800 -18000 1 EASST}
-    {2124327600 -21600 0 EAST}
-    {2135822400 -18000 1 EASST}
-    {2155777200 -21600 0 EAST}
-    {2167272000 -18000 1 EASST}
-    {2187226800 -21600 0 EAST}
-    {2198721600 -18000 1 EASST}
-    {2219281200 -21600 0 EAST}
-    {2230171200 -18000 1 EASST}
-    {2250730800 -21600 0 EAST}
-    {2262225600 -18000 1 EASST}
-    {2282180400 -21600 0 EAST}
-    {2293675200 -18000 1 EASST}
-    {2313630000 -21600 0 EAST}
-    {2325124800 -18000 1 EASST}
-    {2345079600 -21600 0 EAST}
-    {2356574400 -18000 1 EASST}
-    {2376529200 -21600 0 EAST}
-    {2388024000 -18000 1 EASST}
-    {2408583600 -21600 0 EAST}
-    {2419473600 -18000 1 EASST}
-    {2440033200 -21600 0 EAST}
-    {2451528000 -18000 1 EASST}
-    {2471482800 -21600 0 EAST}
-    {2482977600 -18000 1 EASST}
-    {2502932400 -21600 0 EAST}
-    {2514427200 -18000 1 EASST}
-    {2534382000 -21600 0 EAST}
-    {2545876800 -18000 1 EASST}
-    {2565831600 -21600 0 EAST}
-    {2577326400 -18000 1 EASST}
-    {2597886000 -21600 0 EAST}
-    {2609380800 -18000 1 EASST}
-    {2629335600 -21600 0 EAST}
-    {2640830400 -18000 1 EASST}
-    {2660785200 -21600 0 EAST}
-    {2672280000 -18000 1 EASST}
-    {2692234800 -21600 0 EAST}
-    {2703729600 -18000 1 EASST}
-    {2723684400 -21600 0 EAST}
-    {2735179200 -18000 1 EASST}
-    {2755738800 -21600 0 EAST}
-    {2766628800 -18000 1 EASST}
-    {2787188400 -21600 0 EAST}
-    {2798683200 -18000 1 EASST}
-    {2818638000 -21600 0 EAST}
-    {2830132800 -18000 1 EASST}
-    {2850087600 -21600 0 EAST}
-    {2861582400 -18000 1 EASST}
-    {2881537200 -21600 0 EAST}
-    {2893032000 -18000 1 EASST}
-    {2912986800 -21600 0 EAST}
-    {2924481600 -18000 1 EASST}
-    {2945041200 -21600 0 EAST}
-    {2955931200 -18000 1 EASST}
-    {2976490800 -21600 0 EAST}
-    {2987985600 -18000 1 EASST}
-    {3007940400 -21600 0 EAST}
-    {3019435200 -18000 1 EASST}
-    {3039390000 -21600 0 EAST}
-    {3050884800 -18000 1 EASST}
-    {3070839600 -21600 0 EAST}
-    {3082334400 -18000 1 EASST}
-    {3102894000 -21600 0 EAST}
-    {3113784000 -18000 1 EASST}
-    {3134343600 -21600 0 EAST}
-    {3145838400 -18000 1 EASST}
-    {3165793200 -21600 0 EAST}
-    {3177288000 -18000 1 EASST}
-    {3197242800 -21600 0 EAST}
-    {3208737600 -18000 1 EASST}
-    {3228692400 -21600 0 EAST}
-    {3240187200 -18000 1 EASST}
-    {3260142000 -21600 0 EAST}
-    {3271636800 -18000 1 EASST}
-    {3292196400 -21600 0 EAST}
-    {3303086400 -18000 1 EASST}
-    {3323646000 -21600 0 EAST}
-    {3335140800 -18000 1 EASST}
-    {3355095600 -21600 0 EAST}
-    {3366590400 -18000 1 EASST}
-    {3386545200 -21600 0 EAST}
-    {3398040000 -18000 1 EASST}
-    {3417994800 -21600 0 EAST}
-    {3429489600 -18000 1 EASST}
-    {3449444400 -21600 0 EAST}
-    {3460939200 -18000 1 EASST}
-    {3481498800 -21600 0 EAST}
-    {3492993600 -18000 1 EASST}
-    {3512948400 -21600 0 EAST}
-    {3524443200 -18000 1 EASST}
-    {3544398000 -21600 0 EAST}
-    {3555892800 -18000 1 EASST}
-    {3575847600 -21600 0 EAST}
-    {3587342400 -18000 1 EASST}
-    {3607297200 -21600 0 EAST}
-    {3618792000 -18000 1 EASST}
-    {3639351600 -21600 0 EAST}
-    {3650241600 -18000 1 EASST}
-    {3670801200 -21600 0 EAST}
-    {3682296000 -18000 1 EASST}
-    {3702250800 -21600 0 EAST}
-    {3713745600 -18000 1 EASST}
-    {3733700400 -21600 0 EAST}
-    {3745195200 -18000 1 EASST}
-    {3765150000 -21600 0 EAST}
-    {3776644800 -18000 1 EASST}
-    {3796599600 -21600 0 EAST}
-    {3808094400 -18000 1 EASST}
-    {3828654000 -21600 0 EAST}
-    {3839544000 -18000 1 EASST}
-    {3860103600 -21600 0 EAST}
-    {3871598400 -18000 1 EASST}
-    {3891553200 -21600 0 EAST}
-    {3903048000 -18000 1 EASST}
-    {3923002800 -21600 0 EAST}
-    {3934497600 -18000 1 EASST}
-    {3954452400 -21600 0 EAST}
-    {3965947200 -18000 1 EASST}
-    {3986506800 -21600 0 EAST}
-    {3997396800 -18000 1 EASST}
-    {4017956400 -21600 0 EAST}
-    {4029451200 -18000 1 EASST}
-    {4049406000 -21600 0 EAST}
-    {4060900800 -18000 1 EASST}
-    {4080855600 -21600 0 EAST}
-    {4092350400 -18000 1 EASST}
+    {1430017200 -18000 0 EAST}
 }
index e1602ee..4aae330 100644 (file)
@@ -17,175 +17,175 @@ set TZData(:Pacific/Fiji) {
     {1358604000 43200 0 FJT}
     {1382796000 46800 1 FJST}
     {1390050000 43200 0 FJT}
-    {1414245600 46800 1 FJST}
-    {1421499600 43200 0 FJT}
-    {1445695200 46800 1 FJST}
-    {1453554000 43200 0 FJT}
-    {1477144800 46800 1 FJST}
-    {1485003600 43200 0 FJT}
-    {1508594400 46800 1 FJST}
-    {1516453200 43200 0 FJT}
-    {1540044000 46800 1 FJST}
-    {1547902800 43200 0 FJT}
-    {1572098400 46800 1 FJST}
-    {1579352400 43200 0 FJT}
-    {1603548000 46800 1 FJST}
-    {1611406800 43200 0 FJT}
-    {1634997600 46800 1 FJST}
-    {1642856400 43200 0 FJT}
-    {1666447200 46800 1 FJST}
-    {1674306000 43200 0 FJT}
-    {1697896800 46800 1 FJST}
-    {1705755600 43200 0 FJT}
-    {1729951200 46800 1 FJST}
-    {1737205200 43200 0 FJT}
-    {1761400800 46800 1 FJST}
-    {1768654800 43200 0 FJT}
-    {1792850400 46800 1 FJST}
-    {1800709200 43200 0 FJT}
-    {1824300000 46800 1 FJST}
-    {1832158800 43200 0 FJT}
-    {1855749600 46800 1 FJST}
-    {1863608400 43200 0 FJT}
-    {1887199200 46800 1 FJST}
-    {1895058000 43200 0 FJT}
-    {1919253600 46800 1 FJST}
-    {1926507600 43200 0 FJT}
-    {1950703200 46800 1 FJST}
-    {1957957200 43200 0 FJT}
-    {1982152800 46800 1 FJST}
-    {1990011600 43200 0 FJT}
-    {2013602400 46800 1 FJST}
-    {2021461200 43200 0 FJT}
-    {2045052000 46800 1 FJST}
-    {2052910800 43200 0 FJT}
-    {2076501600 46800 1 FJST}
-    {2084360400 43200 0 FJT}
-    {2108556000 46800 1 FJST}
-    {2115810000 43200 0 FJT}
-    {2140005600 46800 1 FJST}
-    {2147864400 43200 0 FJT}
-    {2171455200 46800 1 FJST}
-    {2179314000 43200 0 FJT}
-    {2202904800 46800 1 FJST}
-    {2210763600 43200 0 FJT}
-    {2234354400 46800 1 FJST}
-    {2242213200 43200 0 FJT}
-    {2266408800 46800 1 FJST}
-    {2273662800 43200 0 FJT}
-    {2297858400 46800 1 FJST}
-    {2305112400 43200 0 FJT}
-    {2329308000 46800 1 FJST}
-    {2337166800 43200 0 FJT}
-    {2360757600 46800 1 FJST}
-    {2368616400 43200 0 FJT}
-    {2392207200 46800 1 FJST}
-    {2400066000 43200 0 FJT}
-    {2423656800 46800 1 FJST}
-    {2431515600 43200 0 FJT}
-    {2455711200 46800 1 FJST}
-    {2462965200 43200 0 FJT}
-    {2487160800 46800 1 FJST}
-    {2495019600 43200 0 FJT}
-    {2518610400 46800 1 FJST}
-    {2526469200 43200 0 FJT}
-    {2550060000 46800 1 FJST}
-    {2557918800 43200 0 FJT}
-    {2581509600 46800 1 FJST}
-    {2589368400 43200 0 FJT}
-    {2613564000 46800 1 FJST}
-    {2620818000 43200 0 FJT}
-    {2645013600 46800 1 FJST}
-    {2652267600 43200 0 FJT}
-    {2676463200 46800 1 FJST}
-    {2684322000 43200 0 FJT}
-    {2707912800 46800 1 FJST}
-    {2715771600 43200 0 FJT}
-    {2739362400 46800 1 FJST}
-    {2747221200 43200 0 FJT}
-    {2770812000 46800 1 FJST}
-    {2778670800 43200 0 FJT}
-    {2802866400 46800 1 FJST}
-    {2810120400 43200 0 FJT}
-    {2834316000 46800 1 FJST}
-    {2841570000 43200 0 FJT}
-    {2865765600 46800 1 FJST}
-    {2873624400 43200 0 FJT}
-    {2897215200 46800 1 FJST}
-    {2905074000 43200 0 FJT}
-    {2928664800 46800 1 FJST}
-    {2936523600 43200 0 FJT}
-    {2960114400 46800 1 FJST}
-    {2967973200 43200 0 FJT}
-    {2992168800 46800 1 FJST}
-    {2999422800 43200 0 FJT}
-    {3023618400 46800 1 FJST}
-    {3031477200 43200 0 FJT}
-    {3055068000 46800 1 FJST}
-    {3062926800 43200 0 FJT}
-    {3086517600 46800 1 FJST}
-    {3094376400 43200 0 FJT}
-    {3117967200 46800 1 FJST}
-    {3125826000 43200 0 FJT}
-    {3150021600 46800 1 FJST}
-    {3157275600 43200 0 FJT}
-    {3181471200 46800 1 FJST}
-    {3188725200 43200 0 FJT}
-    {3212920800 46800 1 FJST}
-    {3220779600 43200 0 FJT}
-    {3244370400 46800 1 FJST}
-    {3252229200 43200 0 FJT}
-    {3275820000 46800 1 FJST}
-    {3283678800 43200 0 FJT}
-    {3307269600 46800 1 FJST}
-    {3315128400 43200 0 FJT}
-    {3339324000 46800 1 FJST}
-    {3346578000 43200 0 FJT}
-    {3370773600 46800 1 FJST}
-    {3378632400 43200 0 FJT}
-    {3402223200 46800 1 FJST}
-    {3410082000 43200 0 FJT}
-    {3433672800 46800 1 FJST}
-    {3441531600 43200 0 FJT}
-    {3465122400 46800 1 FJST}
-    {3472981200 43200 0 FJT}
-    {3497176800 46800 1 FJST}
-    {3504430800 43200 0 FJT}
-    {3528626400 46800 1 FJST}
-    {3535880400 43200 0 FJT}
-    {3560076000 46800 1 FJST}
-    {3567934800 43200 0 FJT}
-    {3591525600 46800 1 FJST}
-    {3599384400 43200 0 FJT}
-    {3622975200 46800 1 FJST}
-    {3630834000 43200 0 FJT}
-    {3654424800 46800 1 FJST}
-    {3662283600 43200 0 FJT}
-    {3686479200 46800 1 FJST}
-    {3693733200 43200 0 FJT}
-    {3717928800 46800 1 FJST}
-    {3725182800 43200 0 FJT}
-    {3749378400 46800 1 FJST}
-    {3757237200 43200 0 FJT}
-    {3780828000 46800 1 FJST}
-    {3788686800 43200 0 FJT}
-    {3812277600 46800 1 FJST}
-    {3820136400 43200 0 FJT}
-    {3843727200 46800 1 FJST}
-    {3851586000 43200 0 FJT}
-    {3875781600 46800 1 FJST}
-    {3883035600 43200 0 FJT}
-    {3907231200 46800 1 FJST}
-    {3915090000 43200 0 FJT}
-    {3938680800 46800 1 FJST}
-    {3946539600 43200 0 FJT}
-    {3970130400 46800 1 FJST}
-    {3977989200 43200 0 FJT}
-    {4001580000 46800 1 FJST}
-    {4009438800 43200 0 FJT}
-    {4033634400 46800 1 FJST}
-    {4040888400 43200 0 FJT}
-    {4065084000 46800 1 FJST}
-    {4072338000 43200 0 FJT}
-    {4096533600 46800 1 FJST}
+    {1414850400 46800 1 FJST}
+    {1421503200 43200 0 FJT}
+    {1446300000 46800 1 FJST}
+    {1453557600 43200 0 FJT}
+    {1478354400 46800 1 FJST}
+    {1485007200 43200 0 FJT}
+    {1509804000 46800 1 FJST}
+    {1516456800 43200 0 FJT}
+    {1541253600 46800 1 FJST}
+    {1547906400 43200 0 FJT}
+    {1572703200 46800 1 FJST}
+    {1579356000 43200 0 FJT}
+    {1604152800 46800 1 FJST}
+    {1611410400 43200 0 FJT}
+    {1636207200 46800 1 FJST}
+    {1642860000 43200 0 FJT}
+    {1667656800 46800 1 FJST}
+    {1674309600 43200 0 FJT}
+    {1699106400 46800 1 FJST}
+    {1705759200 43200 0 FJT}
+    {1730556000 46800 1 FJST}
+    {1737208800 43200 0 FJT}
+    {1762005600 46800 1 FJST}
+    {1768658400 43200 0 FJT}
+    {1793455200 46800 1 FJST}
+    {1800712800 43200 0 FJT}
+    {1825509600 46800 1 FJST}
+    {1832162400 43200 0 FJT}
+    {1856959200 46800 1 FJST}
+    {1863612000 43200 0 FJT}
+    {1888408800 46800 1 FJST}
+    {1895061600 43200 0 FJT}
+    {1919858400 46800 1 FJST}
+    {1926511200 43200 0 FJT}
+    {1951308000 46800 1 FJST}
+    {1957960800 43200 0 FJT}
+    {1983362400 46800 1 FJST}
+    {1990015200 43200 0 FJT}
+    {2014812000 46800 1 FJST}
+    {2021464800 43200 0 FJT}
+    {2046261600 46800 1 FJST}
+    {2052914400 43200 0 FJT}
+    {2077711200 46800 1 FJST}
+    {2084364000 43200 0 FJT}
+    {2109160800 46800 1 FJST}
+    {2115813600 43200 0 FJT}
+    {2140610400 46800 1 FJST}
+    {2147868000 43200 0 FJT}
+    {2172664800 46800 1 FJST}
+    {2179317600 43200 0 FJT}
+    {2204114400 46800 1 FJST}
+    {2210767200 43200 0 FJT}
+    {2235564000 46800 1 FJST}
+    {2242216800 43200 0 FJT}
+    {2267013600 46800 1 FJST}
+    {2273666400 43200 0 FJT}
+    {2298463200 46800 1 FJST}
+    {2305116000 43200 0 FJT}
+    {2329912800 46800 1 FJST}
+    {2337170400 43200 0 FJT}
+    {2361967200 46800 1 FJST}
+    {2368620000 43200 0 FJT}
+    {2393416800 46800 1 FJST}
+    {2400069600 43200 0 FJT}
+    {2424866400 46800 1 FJST}
+    {2431519200 43200 0 FJT}
+    {2456316000 46800 1 FJST}
+    {2462968800 43200 0 FJT}
+    {2487765600 46800 1 FJST}
+    {2495023200 43200 0 FJT}
+    {2519820000 46800 1 FJST}
+    {2526472800 43200 0 FJT}
+    {2551269600 46800 1 FJST}
+    {2557922400 43200 0 FJT}
+    {2582719200 46800 1 FJST}
+    {2589372000 43200 0 FJT}
+    {2614168800 46800 1 FJST}
+    {2620821600 43200 0 FJT}
+    {2645618400 46800 1 FJST}
+    {2652271200 43200 0 FJT}
+    {2677068000 46800 1 FJST}
+    {2684325600 43200 0 FJT}
+    {2709122400 46800 1 FJST}
+    {2715775200 43200 0 FJT}
+    {2740572000 46800 1 FJST}
+    {2747224800 43200 0 FJT}
+    {2772021600 46800 1 FJST}
+    {2778674400 43200 0 FJT}
+    {2803471200 46800 1 FJST}
+    {2810124000 43200 0 FJT}
+    {2834920800 46800 1 FJST}
+    {2841573600 43200 0 FJT}
+    {2866975200 46800 1 FJST}
+    {2873628000 43200 0 FJT}
+    {2898424800 46800 1 FJST}
+    {2905077600 43200 0 FJT}
+    {2929874400 46800 1 FJST}
+    {2936527200 43200 0 FJT}
+    {2961324000 46800 1 FJST}
+    {2967976800 43200 0 FJT}
+    {2992773600 46800 1 FJST}
+    {2999426400 43200 0 FJT}
+    {3024223200 46800 1 FJST}
+    {3031480800 43200 0 FJT}
+    {3056277600 46800 1 FJST}
+    {3062930400 43200 0 FJT}
+    {3087727200 46800 1 FJST}
+    {3094380000 43200 0 FJT}
+    {3119176800 46800 1 FJST}
+    {3125829600 43200 0 FJT}
+    {3150626400 46800 1 FJST}
+    {3157279200 43200 0 FJT}
+    {3182076000 46800 1 FJST}
+    {3188728800 43200 0 FJT}
+    {3213525600 46800 1 FJST}
+    {3220783200 43200 0 FJT}
+    {3245580000 46800 1 FJST}
+    {3252232800 43200 0 FJT}
+    {3277029600 46800 1 FJST}
+    {3283682400 43200 0 FJT}
+    {3308479200 46800 1 FJST}
+    {3315132000 43200 0 FJT}
+    {3339928800 46800 1 FJST}
+    {3346581600 43200 0 FJT}
+    {3371378400 46800 1 FJST}
+    {3378636000 43200 0 FJT}
+    {3403432800 46800 1 FJST}
+    {3410085600 43200 0 FJT}
+    {3434882400 46800 1 FJST}
+    {3441535200 43200 0 FJT}
+    {3466332000 46800 1 FJST}
+    {3472984800 43200 0 FJT}
+    {3497781600 46800 1 FJST}
+    {3504434400 43200 0 FJT}
+    {3529231200 46800 1 FJST}
+    {3535884000 43200 0 FJT}
+    {3560680800 46800 1 FJST}
+    {3567938400 43200 0 FJT}
+    {3592735200 46800 1 FJST}
+    {3599388000 43200 0 FJT}
+    {3624184800 46800 1 FJST}
+    {3630837600 43200 0 FJT}
+    {3655634400 46800 1 FJST}
+    {3662287200 43200 0 FJT}
+    {3687084000 46800 1 FJST}
+    {3693736800 43200 0 FJT}
+    {3718533600 46800 1 FJST}
+    {3725186400 43200 0 FJT}
+    {3750588000 46800 1 FJST}
+    {3757240800 43200 0 FJT}
+    {3782037600 46800 1 FJST}
+    {3788690400 43200 0 FJT}
+    {3813487200 46800 1 FJST}
+    {3820140000 43200 0 FJT}
+    {3844936800 46800 1 FJST}
+    {3851589600 43200 0 FJT}
+    {3876386400 46800 1 FJST}
+    {3883039200 43200 0 FJT}
+    {3907836000 46800 1 FJST}
+    {3915093600 43200 0 FJT}
+    {3939890400 46800 1 FJST}
+    {3946543200 43200 0 FJT}
+    {3971340000 46800 1 FJST}
+    {3977992800 43200 0 FJT}
+    {4002789600 46800 1 FJST}
+    {4009442400 43200 0 FJT}
+    {4034239200 46800 1 FJST}
+    {4040892000 43200 0 FJT}
+    {4065688800 46800 1 FJST}
+    {4072341600 43200 0 FJT}
+    {4097138400 46800 1 FJST}
 }
index 164d65e..d8049cd 100644 (file)
@@ -29,7 +29,7 @@ MODIFICATIONS.
 
 GOVERNMENT USE: If you are acquiring this software on behalf of the
 U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal 
+in the software and related documentation as defined in the Federal
 Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
 are acquiring the software on behalf of the Department of Defense, the
 software shall be classified as "Commercial Computer Software" and the
@@ -37,4 +37,4 @@ Government shall have only "Restricted Rights" as defined in Clause
 252.227-7014 (b) (3) of DFARs.  Notwithstanding the foregoing, the
 authors grant the U.S. Government and others acting in its behalf
 permission to use and distribute the software in accordance with the
-terms specified in this license. 
+terms specified in this license.
index d7b0d1d..54eea8e 100644 (file)
@@ -100,7 +100,7 @@ INSTALL_TARGET              := install
 
 export CPPROG          := cp -p
 
-INSTALL_TARGETS                = install-binaries install-libraries
+INSTALL_TARGETS                = install-binaries install-headers install-libraries
 ifeq (${EMBEDDED_BUILD},)
 INSTALL_TARGETS                += install-private-headers
 endif
index 9fe131d..cc11ad8 100755 (executable)
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for tcl 8.6.
+# Generated by GNU Autoconf 2.69 for tcl 8.6.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
 #
-# 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.  ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+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
+  # Pre-4.2 versions of Zsh do 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
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
 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
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 fi
 
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+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
+IFS=$as_save_IFS
 
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+     ;;
+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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
 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
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
-    $as_unset $as_var
+    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
   fi
-done
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
 
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 else
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
-as_me=`$as_basename "$0" ||
+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'`
-
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_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'
@@ -83,146 +461,91 @@ 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 |
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
     sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
       N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
       t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
+      s/-\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; }; }
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # 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
+  # original and so on.  Autoconf is especially sensitive 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= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 else
-  as_expr=false
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
 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 (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
     as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
   fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -231,38 +554,25 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 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
-
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/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
+ac_clean_files=
 ac_config_libobj_dir=.
+LIBOBJS=
 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='tcl'
@@ -270,50 +580,212 @@ PACKAGE_TARNAME='tcl'
 PACKAGE_VERSION='8.6'
 PACKAGE_STRING='tcl 8.6'
 PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
 
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
 #endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef 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 MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS TCLSH_PROG ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR ac_ct_AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX'
+ac_subst_vars='DLTEST_SUFFIX
+DLTEST_LD
+EXTRA_TCLSH_LIBS
+EXTRA_BUILD_HTML
+EXTRA_INSTALL_BINARIES
+EXTRA_INSTALL
+EXTRA_APP_CC_SWITCHES
+EXTRA_CC_SWITCHES
+PACKAGE_DIR
+HTML_DIR
+PRIVATE_INCLUDE_DIR
+TCL_LIBRARY
+TCL_MODULE_PATH
+TCL_PACKAGE_PATH
+BUILD_DLTEST
+MAKEFILE_SHELL
+DTRACE_OBJ
+DTRACE_HDR
+DTRACE_SRC
+INSTALL_TZDATA
+TCL_HAS_LONGLONG
+TCL_UNSHARED_LIB_SUFFIX
+TCL_SHARED_LIB_SUFFIX
+TCL_LIB_VERSIONS_OK
+TCL_BUILD_LIB_SPEC
+LD_LIBRARY_PATH_VAR
+TCL_SHARED_BUILD
+CFG_TCL_UNSHARED_LIB_SUFFIX
+CFG_TCL_SHARED_LIB_SUFFIX
+TCL_SRC_DIR
+TCL_BUILD_STUB_LIB_PATH
+TCL_BUILD_STUB_LIB_SPEC
+TCL_INCLUDE_SPEC
+TCL_STUB_LIB_PATH
+TCL_STUB_LIB_SPEC
+TCL_STUB_LIB_FLAG
+TCL_STUB_LIB_FILE
+TCL_LIB_SPEC
+TCL_LIB_FLAG
+TCL_LIB_FILE
+PKG_CFG_ARGS
+TCL_YEAR
+TCL_PATCH_LEVEL
+TCL_MINOR_VERSION
+TCL_MAJOR_VERSION
+TCL_VERSION
+DTRACE
+LDFLAGS_DEFAULT
+CFLAGS_DEFAULT
+INSTALL_STUB_LIB
+DLL_INSTALL_DIR
+INSTALL_LIB
+MAKE_STUB_LIB
+MAKE_LIB
+SHLIB_SUFFIX
+SHLIB_CFLAGS
+SHLIB_LD_LIBS
+TK_SHLIB_LD_EXTRAS
+TCL_SHLIB_LD_EXTRAS
+SHLIB_LD
+STLIB_LD
+LD_SEARCH_FLAGS
+CC_SEARCH_FLAGS
+LDFLAGS_OPTIMIZE
+LDFLAGS_DEBUG
+CFLAGS_WARNING
+CFLAGS_OPTIMIZE
+CFLAGS_DEBUG
+LDAIX_SRC
+PLAT_SRCS
+PLAT_OBJS
+DL_OBJS
+DL_LIBS
+TCL_LIBS
+LIBOBJS
+AR
+RANLIB
+ZLIB_INCLUDE
+ZLIB_SRCS
+ZLIB_OBJS
+TCLSH_PROG
+TCL_THREADS
+EGREP
+GREP
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAN_FLAGS
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
 ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_man_symlinks
+enable_man_compression
+enable_man_suffix
+enable_threads
+with_encoding
+enable_shared
+enable_64bit
+enable_64bit_vis
+enable_rpath
+enable_corefoundation
+enable_load
+enable_symbols
+enable_langinfo
+enable_dll_unloading
+with_tzdata
+enable_dtrace
+enable_framework
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
 
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
 # The variables have the same names as the options, with
 # dashes changed to underlines.
 cache_file=/dev/null
@@ -336,34 +808,49 @@ x_libraries=NONE
 # 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.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
+    eval $ac_prev=\$ac_option
     ac_prev=
     continue
   fi
 
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case $ac_option in
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
@@ -385,33 +872,59 @@ do
   --config-cache | -C)
     cache_file=config.cache ;;
 
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+  -datadir | --datadir | --datadi | --datad)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
     datadir=$ac_optarg ;;
 
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
   -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    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" ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    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 ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
     esac
-    eval "enable_$ac_feature='$ac_optarg'" ;;
+    eval enable_$ac_useropt=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -438,6 +951,12 @@ do
   -host=* | --host=* | --hos=* | --ho=*)
     host_alias=$ac_optarg ;;
 
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
@@ -462,13 +981,16 @@ do
   | --libexe=* | --libex=* | --libe=*)
     libexecdir=$ac_optarg ;;
 
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
+  | --localstate | --localstat | --localsta | --localst | --locals)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
     localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -533,6 +1055,16 @@ do
   | --progr-tra=* | --program-tr=* | --program-t=*)
     program_transform_name=$ac_optarg ;;
 
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
@@ -583,26 +1115,36 @@ do
     ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    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
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
     esac
-    eval "with_$ac_package='$ac_optarg'" ;;
+    eval with_$ac_useropt=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    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" ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -622,27 +1164,26 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
     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'"
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
     # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    $as_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}
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -650,31 +1191,36 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
-# 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; }; };;
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
-done
+fi
 
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-             localstatedir libdir includedir oldincludedir infodir mandir
+# Check all directory arguments for consistency.
+for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
+               datadir sysconfdir sharedstatedir localstatedir includedir \
+               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+               libdir localedir mandir
 do
-  eval ac_val=$`echo $ac_var`
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
   case $ac_val in
-    [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -688,8 +1234,6 @@ target=$target_alias
 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
@@ -701,74 +1245,72 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
 test "$silent" = yes && exec 6>/dev/null
 
 
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
 # 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_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'`
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_myself" : 'X\(//\)[^/]' \| \
+        X"$as_myself" : 'X\(//\)$' \| \
+        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    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
+  if test ! -r "$srcdir/$ac_unique_file"; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
-   { (exit 1); exit 1; }; }
-  else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-  fi
-fi
-(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
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
 
 #
 # Report the --help message.
@@ -791,20 +1333,17 @@ Configuration:
       --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
+  -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]
+                          [$ac_default_prefix]
   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                         [PREFIX]
+                          [PREFIX]
 
 By default, \`make install' will install all the files in
 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
@@ -814,18 +1353,25 @@ 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]
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --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]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/tcl]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -839,6 +1385,7 @@ if test -n "$ac_init_help"; then
   cat <<\_ACEOF
 
 Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-man-symlinks   use symlinks for the manpages (default: off)
@@ -876,162 +1423,595 @@ Some influential environment variables:
   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>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) 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.
 
+Report bugs to the package provider.
 _ACEOF
+ac_status=$?
 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
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && 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 "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # 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_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     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;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 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
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested 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
     else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi
-    cd $ac_popdir
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
   done
 fi
 
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 tcl configure 8.6
-generated by GNU Autoconf 2.59
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2012 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
+  exit
 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 tcl $as_me 8.6, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
 
-  $ $0 $@
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
 
-_ACEOF
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-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`
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+} # ac_fn_c_try_compile
 
-/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`
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-_ASUNAME
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-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
+} # ac_fn_c_try_cpp
 
-} >&5
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); 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 $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* 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_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+        return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+           return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval \${$4+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_member
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by tcl $as_me 8.6, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+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`
+/usr/bin/hostinfo      = `(/usr/bin/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=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
 
 cat >&5 <<_ACEOF
 
@@ -1051,7 +2031,6 @@ _ACEOF
 ac_configure_args=
 ac_configure_args0=
 ac_configure_args1=
-ac_sep=
 ac_must_keep_next=false
 for ac_pass in 1 2
 do
@@ -1062,13 +2041,13 @@ do
     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
-    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
     2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      as_fn_append ac_configure_args1 " '$ac_arg'"
       if test $ac_must_keep_next = true; then
        ac_must_keep_next=false # Got value, back to normal.
       else
          -* ) 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=" "
+      as_fn_append ac_configure_args " '$ac_arg'"
       ;;
     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; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset 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.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
 trap 'exit_status=$?
   # Save into config.log some information that might help in debugging.
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
-{
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
   (set) 2>&1 |
-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
       sed -n \
-       "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-      ;;
+       "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"
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
-    esac;
-}
+    esac |
+    sort
+)
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
-      eval ac_val=$`echo $ac_var`
-      echo "$ac_var='"'"'$ac_val'"'"'"
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
-       eval ac_val=$`echo $ac_var`
-       echo "$ac_var='"'"'$ac_val'"'"'"
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
-      sed "/^$/d" confdefs.h | sort
+      cat confdefs.h
       echo
     fi
     test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
   } >&5
-  rm -f core *.core &&
-  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
-     ' 0
+' 0
 for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+  trap 'ac_signal='$ac_signal'; as_fn_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
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
 
 # Predefined preprocessor variables.
 
@@ -1189,112 +2179,137 @@ 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
 
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_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
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
 fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
 if test -r "$cache_file"; then
-  # 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;}
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
-      [\\/]* | ?:[\\/]* ) . $cache_file;;
-      *)                      . ./$cache_file;;
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
     esac
   fi
 else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_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
+for ac_var in $ac_precious_vars; 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"
+  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;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_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;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_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=:
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
       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=`$as_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'" ;;
+      *) as_fn_append 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; }; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -1306,34 +2321,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-              ac_config_headers="$ac_config_headers tclConfig.h:../unix/tclConfig.h.in"
-
-
+    ac_config_headers="$ac_config_headers tclConfig.h:../unix/tclConfig.h.in"
 
 
 
@@ -1343,7 +2331,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 TCL_VERSION=8.6
 TCL_MAJOR_VERSION=8
 TCL_MINOR_VERSION=6
-TCL_PATCH_LEVEL=".3"
+TCL_PATCH_LEVEL=".4"
 VERSION=${TCL_VERSION}
 
 EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
@@ -1390,62 +2378,60 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`"
 #------------------------------------------------------------------------
 
 
-    echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5
-echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6
-    # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
-if test "${enable_man_symlinks+set}" = set; then
-  enableval="$enable_man_symlinks"
-  test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use symlinks for manpages" >&5
+$as_echo_n "checking whether to use symlinks for manpages... " >&6; }
+    # Check whether --enable-man-symlinks was given.
+if test "${enable_man_symlinks+set}" = set; then :
+  enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
 else
   enableval="no"
-fi;
-    echo "$as_me:$LINENO: result: $enableval" >&5
-echo "${ECHO_T}$enableval" >&6
-
-    echo "$as_me:$LINENO: checking whether to compress the manpages" >&5
-echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6
-    # Check whether --enable-man-compression or --disable-man-compression was given.
-if test "${enable_man_compression+set}" = set; then
-  enableval="$enable_man_compression"
-  case $enableval in
-           yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5
-echo "$as_me: error: missing argument to --enable-man-compression" >&2;}
-   { (exit 1); exit 1; }; };;
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5
+$as_echo "$enableval" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compress the manpages" >&5
+$as_echo_n "checking whether to compress the manpages... " >&6; }
+    # Check whether --enable-man-compression was given.
+if test "${enable_man_compression+set}" = set; then :
+  enableval=$enable_man_compression; case $enableval in
+           yes) as_fn_error $? "missing argument to --enable-man-compression" "$LINENO" 5;;
            no)  ;;
            *)   MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
        esac
 else
   enableval="no"
-fi;
-    echo "$as_me:$LINENO: result: $enableval" >&5
-echo "${ECHO_T}$enableval" >&6
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5
+$as_echo "$enableval" >&6; }
     if test "$enableval" != "no"; then
-       echo "$as_me:$LINENO: checking for compressed file suffix" >&5
-echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compressed file suffix" >&5
+$as_echo_n "checking for compressed file suffix... " >&6; }
        touch TeST
        $enableval TeST
        Z=`ls TeST* | sed 's/^....//'`
        rm -f TeST*
        MAN_FLAGS="$MAN_FLAGS --extension $Z"
-       echo "$as_me:$LINENO: result: $Z" >&5
-echo "${ECHO_T}$Z" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $Z" >&5
+$as_echo "$Z" >&6; }
     fi
 
-    echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5
-echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6
-    # Check whether --enable-man-suffix or --disable-man-suffix was given.
-if test "${enable_man_suffix+set}" = set; then
-  enableval="$enable_man_suffix"
-  case $enableval in
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to add a package name suffix for the manpages" >&5
+$as_echo_n "checking whether to add a package name suffix for the manpages... " >&6; }
+    # Check whether --enable-man-suffix was given.
+if test "${enable_man_suffix+set}" = set; then :
+  enableval=$enable_man_suffix; case $enableval in
            yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
            no)  ;;
            *)   MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
        esac
 else
   enableval="no"
-fi;
-    echo "$as_me:$LINENO: result: $enableval" >&5
-echo "${ECHO_T}$enableval" >&6
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5
+$as_echo "$enableval" >&6; }
 
 
 
@@ -1468,10 +2454,10 @@ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1481,35 +2467,37 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_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
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1519,39 +2507,50 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_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
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
 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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 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.
+          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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1561,77 +2560,37 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_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
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  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"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
+  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 "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1642,18 +2601,19 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_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
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
@@ -1671,24 +2631,25 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 fi
 if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
+  for ac_prog in cl.exe
   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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1698,39 +2659,41 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_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
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
     test -n "$CC" && break
   done
 fi
 if test -z "$CC"; then
   ac_ct_CC=$CC
-  for ac_prog in cl
+  for ac_prog in cl.exe
 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1740,66 +2703,78 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_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
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
 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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
   test -n "$ac_ct_CC" && break
 done
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 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; }; }
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
 # 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
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -1811,112 +2786,108 @@ main ()
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
 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.
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
        ;;
     [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
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
        break;;
     * )
        break;;
   esac
 done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
 else
-  echo "$as_me: failed program was:" >&5
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_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; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 fi
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
 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
-    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
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
 
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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
@@ -1924,38 +2895,90 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-         export ac_cv_exeext
          break;;
     * ) break;;
   esac
 done
 else
-  { { 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; }; }
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
 
 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
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -1967,45 +2990,46 @@ main ()
 }
 _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
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
 done
 else
-  echo "$as_me: failed program was:" >&5
+  $as_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; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-
 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2019,55 +3043,34 @@ 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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_compiler_gnu=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
+  ac_compiler_gnu=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core 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`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2078,39 +3081,49 @@ 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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
 
-ac_cv_prog_cc_g=no
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
@@ -2126,23 +3139,18 @@ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_prog_cc_stdc=no
+  ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -2165,12 +3173,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
 /* 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
+   as 'x'.  The following induces an error, until -std 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.  */
+   that's true only with -std.  */
 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
 int test (int i, double x);
 struct s1 {int (*f) (int a);};
 struct s2 {int (*f) (double a);};
@@ -2185,205 +3198,37 @@ 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__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -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
-
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
 fi
-rm -f conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
 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 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&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" ;;
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 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
+if test "x$ac_cv_prog_cc_c89" != xno; then :
 
 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'
@@ -2391,18 +3236,14 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifndef __cplusplus
 typedef int foo_t;
@@ -2411,41 +3252,16 @@ $ac_kw foo_t foo () {return 0; }
 #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
-  ac_cv_c_inline=$ac_kw; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
 done
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
 
 case $ac_cv_c_inline in
   inline | yes) ;;
@@ -2477,15 +3293,15 @@ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&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
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -2499,11 +3315,7 @@ do
   # <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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -2512,78 +3324,34 @@ cat >>conftest.$ac_ext <<_ACEOF
 #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
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
+  # OK, works on sane cases.  Now check whether nonexistent 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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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
+if ac_fn_c_try_cpp "$LINENO"; 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
+rm -f conftest.err conftest.i 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
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
   break
 fi
 
@@ -2595,8 +3363,8 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
@@ -2606,11 +3374,7 @@ do
   # <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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -2619,85 +3383,40 @@ cat >>conftest.$ac_ext <<_ACEOF
 #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
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
+  # OK, works on sane cases.  Now check whether nonexistent 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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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
+if ac_fn_c_try_cpp "$LINENO"; 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
+rm -f conftest.err conftest.i 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
-  :
+rm -f conftest.i 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; }; }
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -2707,31 +3426,142 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&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'
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
     fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
 
 
-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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2746,51 +3576,23 @@ 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
+if ac_fn_c_try_compile "$LINENO"; 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
+  ac_cv_header_stdc=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core 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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <string.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
 else
   ac_cv_header_stdc=no
 fi
@@ -2800,18 +3602,14 @@ 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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
+  $EGREP "free" >/dev/null 2>&1; then :
+
 else
   ac_cv_header_stdc=no
 fi
@@ -2821,16 +3619,13 @@ fi
 
 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
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ctype.h>
+#include <stdlib.h>
 #if ((' ' & 0x0FF) == 0x020)
 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -2850,109 +3645,39 @@ main ()
   for (i = 0; i < 256; i++)
     if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
+      return 2;
+  return 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
+if ac_fn_c_try_run "$LINENO"; then :
 
-( exit $ac_status )
-ac_cv_header_stdc=no
+else
+  ac_cv_header_stdc=no
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
+
 fi
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
 if test $ac_cv_header_stdc = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
 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 "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-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
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -2961,17 +3686,13 @@ done
 
 
 
-    echo "$as_me:$LINENO: checking dirent.h" >&5
-echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
-if test "${tcl_cv_dirent_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5
+$as_echo_n "checking dirent.h... " >&6; }
+if ${tcl_cv_dirent_h+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 #include <dirent.h>
@@ -3001,1817 +3722,489 @@ 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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_dirent_h=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_dirent_h=no
+  tcl_cv_dirent_h=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
-echo "${ECHO_T}$tcl_cv_dirent_h" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5
+$as_echo "$tcl_cv_dirent_h" >&6; }
 
     if test $tcl_cv_dirent_h = no; then
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_DIRENT_H 1
-_ACEOF
+$as_echo "#define NO_DIRENT_H 1" >>confdefs.h
 
     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
+    ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
+if test "x$ac_cv_header_float_h" = xyes; then :
+
 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
+$as_echo "#define NO_FLOAT_H 1" >>confdefs.h
 
-# 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 tcl 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
+    ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default"
+if test "x$ac_cv_header_values_h" = xyes; then :
 
-fi
-if test $ac_cv_header_float_h = yes; then
-  :
 else
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_FLOAT_H 1
-_ACEOF
+$as_echo "#define NO_VALUES_H 1" >>confdefs.h
 
 fi
 
 
-    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
+    ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
+if test "x$ac_cv_header_limits_h" = xyes; then :
 
-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
+$as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h
 
-# 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
 
-  ac_header_preproc=no
+$as_echo "#define NO_LIMITS_H 1" >>confdefs.h
+
 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 tcl 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
+
+    ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+  tcl_ok=1
 else
-  ac_cv_header_values_h=$ac_header_preproc
+  tcl_ok=0
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
-echo "${ECHO_T}$ac_cv_header_values_h" >&6
 
-fi
-if test $ac_cv_header_values_h = yes; then
-  :
-else
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_VALUES_H 1
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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*
 
-
-    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
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-#include <limits.h>
+#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
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "strtoul" >/dev/null 2>&1; then :
 
-ac_header_compiler=no
+else
+  tcl_ok=0
 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
+rm -f conftest*
 
-# 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
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <limits.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
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "strtod" >/dev/null 2>&1; then :
+
 else
-  ac_cpp_err=yes
+  tcl_ok=0
 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
+rm -f conftest*
 
-  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
+    if test $tcl_ok = 0; then
 
-# 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 tcl 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
+$as_echo "#define NO_STDLIB_H 1" >>confdefs.h
+
+    fi
+    ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
+if test "x$ac_cv_header_string_h" = xyes; then :
+  tcl_ok=1
 else
-  ac_cv_header_limits_h=$ac_header_preproc
+  tcl_ok=0
 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
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_LIMITS_H 1
 _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*
 
 
-    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
+    # See also memmove check below for a place where NO_STRING_H can be
+    # set and why.
 
-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
+    if test $tcl_ok = 0; then
 
-# 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
+$as_echo "#define NO_STRING_H 1" >>confdefs.h
 
-  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
+    fi
 
-# 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 tcl 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
+    ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_wait_h" = xyes; then :
 
-fi
-if test $ac_cv_header_stdlib_h = yes; then
-  tcl_ok=1
 else
-  tcl_ok=0
+
+$as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h
+
 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>
+    ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
 
-_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>
+$as_echo "#define NO_DLFCN_H 1" >>confdefs.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>
 
+
+    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
+    for ac_header in sys/param.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PARAM_H 1
 _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
+done
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_STDLIB_H 1
-_ACEOF
 
-    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
+
+#--------------------------------------------------------------------
+# Determines the correct executable file extension (.exe)
+#--------------------------------------------------------------------
+
+
+
+#------------------------------------------------------------------------
+# 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" && test -n "$GCC"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
+$as_echo_n "checking if the compiler understands -pipe... " >&6; }
+if ${tcl_cv_cc_pipe+:} false; then :
+  $as_echo_n "(cached) " >&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
+
+       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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
+int
+main ()
+{
 
-# 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>
+  ;
+  return 0;
+}
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_cc_pipe=yes
 else
-  ac_cpp_err=yes
+  tcl_cv_cc_pipe=no
 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
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       CFLAGS=$hold_cflags
 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 tcl 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
+$as_echo "$tcl_cv_cc_pipe" >&6; }
+    if test $tcl_cv_cc_pipe = yes; then
+       CFLAGS="$CFLAGS -pipe"
+    fi
 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
+#------------------------------------------------------------------------
+# Threads support
+#------------------------------------------------------------------------
+
+
+    # Check whether --enable-threads was given.
+if test "${enable_threads+set}" = set; then :
+  enableval=$enable_threads; tcl_ok=$enableval
 else
-  tcl_ok=0
+  tcl_ok=yes
 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>
+    if test "${TCL_THREADS}" = 1; then
+       tcl_threaded_core=1;
+    fi
 
-_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*
+    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
+       TCL_THREADS=1
+       # USE_THREAD_ALLOC tells us to try the special thread-based
+       # allocator that significantly reduces lock contention
 
-    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>
+$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.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*
 
+$as_echo "#define _REENTRANT 1" >>confdefs.h
 
-    # See also memmove check below for a place where NO_STRING_H can be
-    # set and why.
+       if test "`uname -s`" = "SunOS" ; then
 
-    if test $tcl_ok = 0; then
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_STRING_H 1
-_ACEOF
+       fi
 
-    fi
+$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
 
-    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
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
+$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&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
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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
 
-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>
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init ();
+int
+main ()
+{
+return pthread_mutex_init ();
+  ;
+  return 0;
+}
 _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
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_mutex_init=yes
 else
-  ac_cpp_err=yes
+  ac_cv_lib_pthread_pthread_mutex_init=no
 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
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 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 tcl 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
 else
-  ac_cv_header_sys_wait_h=$ac_header_preproc
+  tcl_ok=no
 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
-  :
+       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]
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
+$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_SYS_WAIT_H 1
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __pthread_mutex_init ();
+int
+main ()
+{
+return __pthread_mutex_init ();
+  ;
+  return 0;
+}
 _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 tcl 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 tcl 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
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread___pthread_mutex_init=yes
 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
-
+  ac_cv_lib_pthread___pthread_mutex_init=no
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-
-done
-
-
-
-#--------------------------------------------------------------------
-# Determines the correct executable file extension (.exe)
-#--------------------------------------------------------------------
-
-
-
-#------------------------------------------------------------------------
-# 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" && test -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
-if test "${tcl_cv_cc_pipe+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -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
-  tcl_cv_cc_pipe=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_pipe=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-       CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
-echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
-    if test $tcl_cv_cc_pipe = yes; then
-       CFLAGS="$CFLAGS -pipe"
-    fi
+  tcl_ok=no
 fi
 
-#------------------------------------------------------------------------
-# Threads support
-#------------------------------------------------------------------------
-
-
-    # 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=yes
-fi;
-
-    if test "${TCL_THREADS}" = 1; then
-       tcl_threaded_core=1;
-    fi
-
-    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
-       TCL_THREADS=1
-       # USE_THREAD_ALLOC tells us to try the special thread-based
-       # allocator that significantly reduces lock contention
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_THREAD_ALLOC 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
-
-       if test "`uname -s`" = "SunOS" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-_ACEOF
-
        fi
 
-cat >>confdefs.h <<\_ACEOF
-#define _THREAD_SAFE 1
-_ACEOF
-
-       echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       if test "$tcl_ok" = "yes"; then
+           # The space is needed
+           THREADS_LIBS=" -lpthread"
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
+$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
+if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-lpthreads  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #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 pthread_mutex_init ();
 int
 main ()
 {
-pthread_mutex_init ();
+return pthread_mutex_init ();
   ;
   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_pthread_pthread_mutex_init=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthreads_pthread_mutex_init=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthread_pthread_mutex_init=no
+  ac_cv_lib_pthreads_pthread_mutex_init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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_pthread_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
-if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
   tcl_ok=yes
 else
   tcl_ok=no
 fi
 
-       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]
-           echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
-echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+           if test "$tcl_ok" = "yes"; then
+               # The space is needed
+               THREADS_LIBS=" -lpthreads"
+           else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
+$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
+if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-lc  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #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 __pthread_mutex_init ();
+char pthread_mutex_init ();
 int
 main ()
 {
-__pthread_mutex_init ();
+return pthread_mutex_init ();
   ;
   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_pthread___pthread_mutex_init=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_pthread_mutex_init=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthread___pthread_mutex_init=no
+  ac_cv_lib_c_pthread_mutex_init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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_pthread___pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
-if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
   tcl_ok=yes
 else
   tcl_ok=no
 fi
 
-       fi
-
-       if test "$tcl_ok" = "yes"; then
-           # The space is needed
-           THREADS_LIBS=" -lpthread"
-       else
-           echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
-if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               if test "$tcl_ok" = "no"; then
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
+$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthreads  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #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 pthread_mutex_init ();
 int
 main ()
 {
-pthread_mutex_init ();
+return pthread_mutex_init ();
   ;
   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_pthreads_pthread_mutex_init=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_mutex_init=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthreads_pthread_mutex_init=no
+  ac_cv_lib_c_r_pthread_mutex_init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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_pthreads_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
-if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-           if test "$tcl_ok" = "yes"; then
-               # The space is needed
-               THREADS_LIBS=" -lpthreads"
-           else
-               echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
-if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_c_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_pthread_mutex_init=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_c_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
-if test $ac_cv_lib_c_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-               if test "$tcl_ok" = "no"; then
-                   echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
-if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_c_r_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_r_pthread_mutex_init=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_c_r_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
-if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
   tcl_ok=yes
 else
   tcl_ok=no
@@ -4822,8 +4215,8 @@ fi
                        THREADS_LIBS=" -pthread"
                    else
                        TCL_THREADS=0
-                       { echo "$as_me:$LINENO: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5
-echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;}
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5
+$as_echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;}
                    fi
                fi
            fi
@@ -4834,104 +4227,13 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m
 
        ac_saved_libs=$LIBS
        LIBS="$LIBS $THREADS_LIBS"
-
-
-for ac_func in pthread_attr_setstacksize pthread_atfork
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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 $ac_func
-
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+       for ac_func in pthread_attr_setstacksize pthread_atfork
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -4942,24 +4244,22 @@ done
        TCL_THREADS=0
     fi
     # Do checking message here to not mess up interleaved configure output
-    echo "$as_me:$LINENO: checking for building with threads" >&5
-echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
+$as_echo_n "checking for building with threads... " >&6; }
     if test "${TCL_THREADS}" = 1; then
 
-cat >>confdefs.h <<\_ACEOF
-#define TCL_THREADS 1
-_ACEOF
+$as_echo "#define TCL_THREADS 1" >>confdefs.h
 
        if test "${tcl_threaded_core}" = 1; then
-           echo "$as_me:$LINENO: result: yes (threaded core)" >&5
-echo "${ECHO_T}yes (threaded core)" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (threaded core)" >&5
+$as_echo "yes (threaded core)" >&6; }
        else
-           echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
        fi
     else
-       echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
     fi
 
 
@@ -4971,11 +4271,11 @@ echo "${ECHO_T}no" >&6
 
 
 
-# Check whether --with-encoding or --without-encoding was given.
-if test "${with_encoding+set}" = set; then
-  withval="$with_encoding"
-  with_tcencoding=${withval}
-fi;
+# Check whether --with-encoding was given.
+if test "${with_encoding+set}" = set; then :
+  withval=$with_encoding; with_tcencoding=${withval}
+fi
+
 
     if test x"${with_tcencoding}" != x ; then
 
@@ -4985,9 +4285,7 @@ _ACEOF
 
     else
 
-cat >>confdefs.h <<\_ACEOF
-#define TCL_CFGVAL_ENCODING "iso8859-1"
-_ACEOF
+$as_echo "#define TCL_CFGVAL_ENCODING \"iso8859-1\"" >>confdefs.h
 
     fi
 
@@ -5004,161 +4302,44 @@ _ACEOF
     # 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
+    ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin"
+if test "x$ac_cv_func_sin" = xyes; 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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5
+$as_echo_n "checking for main in -lieee... " >&6; }
+if ${ac_cv_lib_ieee_main+:} false; then :
+  $as_echo_n "(cached) " >&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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
 int
 main ()
 {
-main ();
+return 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
+if ac_fn_c_try_link "$LINENO"; 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
+  ac_cv_lib_ieee_main=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5
+$as_echo "$ac_cv_lib_ieee_main" >&6; }
+if test "x$ac_cv_lib_ieee_main" = xyes; then :
   MATH_LIBS="-lieee $MATH_LIBS"
 fi
 
     # 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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5
+$as_echo_n "checking for main in -linet... " >&6; }
+if ${ac_cv_lib_inet_main+:} false; then :
+  $as_echo_n "(cached) " >&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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
 int
 main ()
 {
-main ();
+return 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
+if ac_fn_c_try_link "$LINENO"; 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
+  ac_cv_lib_inet_main=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5
+$as_echo "$ac_cv_lib_inet_main" >&6; }
+if test "x$ac_cv_lib_inet_main" = xyes; 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
-    ;;
-  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 tcl 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
+    ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_net_errno_h" = xyes; then :
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NET_ERRNO_H 1
-_ACEOF
+$as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h
 
 fi
 
     #--------------------------------------------------------------------
 
     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
+    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+if test "x$ac_cv_func_connect" = xyes; then :
+  tcl_checkSocket=0
 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.  */
+  tcl_checkSocket=1
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    if test "$tcl_checkSocket" = 1; then
+       ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
+if test "x$ac_cv_func_setsockopt" = xyes; then :
 
-#undef connect
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
+$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_setsockopt+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
    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
-}
+extern "C"
 #endif
-
+char setsockopt ();
 int
 main ()
 {
-return f != connect;
+return 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_connect=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_setsockopt=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_connect=no
+  ac_cv_lib_socket_setsockopt=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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_func_connect" >&5
-echo "${ECHO_T}$ac_cv_func_connect" >&6
-if test $ac_cv_func_connect = yes; then
-  tcl_checkSocket=0
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
+$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
+if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
+  LIBS="$LIBS -lsocket"
 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
+  tcl_checkBoth=1
 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
+       ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept"
+if test "x$ac_cv_func_accept" = xyes; 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_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
 
-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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
+  $as_echo_n "(cached) " >&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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #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 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
+if ac_fn_c_try_link "$LINENO"; 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
+  ac_cv_lib_nsl_gethostbyname=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
   LIBS="$LIBS -lnsl"
 fi
 
@@ -5929,15 +4532,15 @@ fi
 LIBS="$LIBS$THREADS_LIBS"
 
 
-    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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
+$as_echo_n "checking how to build libraries... " >&6; }
+    # Check whether --enable-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"
@@ -5947,17 +4550,15 @@ fi;
     fi
 
     if test "$tcl_ok" = "yes" ; then
-       echo "$as_me:$LINENO: result: shared" >&5
-echo "${ECHO_T}shared" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
+$as_echo "shared" >&6; }
        SHARED_BUILD=1
     else
-       echo "$as_me:$LINENO: result: static" >&5
-echo "${ECHO_T}static" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+$as_echo "static" >&6; }
        SHARED_BUILD=0
 
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_BUILD 1
-_ACEOF
+$as_echo "#define STATIC_BUILD 1" >>confdefs.h
 
     fi
 
@@ -5969,10 +4570,10 @@ _ACEOF
 #--------------------------------------------------------------------
 
 
-    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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
+$as_echo_n "checking for tclsh... " >&6; }
+    if ${ac_cv_path_tclsh+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
        search_path=`echo ${PATH} | sed -e 's/:/ /g'`
@@ -5993,13 +4594,13 @@ 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
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_PROG" >&5
+$as_echo "$TCLSH_PROG" >&6; }
     else
        # It is not an error if an installed version of Tcl can't be located.
        TCLSH_PROG=""
-       echo "$as_me:$LINENO: result: No tclsh found on PATH" >&5
-echo "${ECHO_T}No tclsh found on PATH" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: No tclsh found on PATH" >&5
+$as_echo "No tclsh found on PATH" >&6; }
     fi
 
 
 #------------------------------------------------------------------------
 
 zlib_ok=yes
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for zlib.h" >&5
-echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking zlib.h usability" >&5
-echo $ECHO_N "checking zlib.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 <zlib.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_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
 
-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
+  ac_fn_c_check_type "$LINENO" "gz_header" "ac_cv_type_gz_header" "#include <zlib.h>
+"
+if test "x$ac_cv_type_gz_header" = xyes; then :
 
-# Is the header present?
-echo "$as_me:$LINENO: checking zlib.h presence" >&5
-echo $ECHO_N "checking zlib.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 <zlib.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
+  zlib_ok=no
 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
+  zlib_ok=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: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------ ##
-## Report this to the tcl lists.  ##
-## ------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for zlib.h" >&5
-echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_zlib_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
 
-fi
-if test $ac_cv_header_zlib_h = yes; then
+if test $zlib_ok = yes; then :
 
-  echo "$as_me:$LINENO: checking for gz_header" >&5
-echo $ECHO_N "checking for gz_header... $ECHO_C" >&6
-if test "${ac_cv_type_gz_header+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflateSetHeader" >&5
+$as_echo_n "checking for library containing deflateSetHeader... " >&6; }
+if ${ac_cv_search_deflateSetHeader+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <zlib.h>
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char deflateSetHeader ();
 int
 main ()
 {
-if ((gz_header *) 0)
-  return 0;
-if (sizeof (gz_header))
-  return 0;
+return deflateSetHeader ();
   ;
   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_type_gz_header=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_gz_header=no
+for ac_lib in '' z; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_deflateSetHeader=$ac_res
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_deflateSetHeader+:} false; then :
+  break
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5
-echo "${ECHO_T}$ac_cv_type_gz_header" >&6
-if test $ac_cv_type_gz_header = yes; then
-  :
+done
+if ${ac_cv_search_deflateSetHeader+:} false; then :
+
 else
-  zlib_ok=no
+  ac_cv_search_deflateSetHeader=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflateSetHeader" >&5
+$as_echo "$ac_cv_search_deflateSetHeader" >&6; }
+ac_res=$ac_cv_search_deflateSetHeader
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
 else
 
-  zlib_ok=no
+    zlib_ok=no
+
 fi
 
+fi
+if test $zlib_ok = no; then :
 
-if test $zlib_ok = yes; then
-
-  echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5
-echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6
-if test "${ac_cv_search_deflateSetHeader+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_deflateSetHeader=no
-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 deflateSetHeader ();
-int
-main ()
-{
-deflateSetHeader ();
-  ;
-  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_search_deflateSetHeader="none required"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_deflateSetHeader" = no; then
-  for ac_lib in z; do
-    LIBS="-l$ac_lib  $ac_func_search_save_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 deflateSetHeader ();
-int
-main ()
-{
-deflateSetHeader ();
-  ;
-  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_search_deflateSetHeader="-l$ac_lib"
-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_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5
-echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6
-if test "$ac_cv_search_deflateSetHeader" != no; then
-  test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS"
-
-else
-
-    zlib_ok=no
-
-fi
-
-fi
-
-if test $zlib_ok = no; then
-
-  ZLIB_OBJS=\${ZLIB_OBJS}
+  ZLIB_OBJS=\${ZLIB_OBJS}
 
   ZLIB_SRCS=\${ZLIB_SRCS}
 
@@ -6365,10 +4704,7 @@ if test $zlib_ok = no; then
 
 fi
 
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZLIB 1
-_ACEOF
+$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
 
 
 #--------------------------------------------------------------------
@@ -6380,10 +4716,10 @@ _ACEOF
 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -6393,35 +4729,37 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_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
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
 fi
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -6431,28 +4769,38 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_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
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
-  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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  RANLIB=$ac_ct_RANLIB
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
 else
   RANLIB="$ac_cv_prog_RANLIB"
 fi
@@ -6461,52 +4809,47 @@ fi
 
     # Step 0.a: Enable 64 bit support?
 
-    echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
-echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
-    # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
-  enableval="$enable_64bit"
-  do64bit=$enableval
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
+$as_echo_n "checking if 64bit support is requested... " >&6; }
+    # Check whether --enable-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
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
+$as_echo "$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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
+$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
+    # Check whether --enable-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
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
+$as_echo "$do64bitVIS" >&6; }
     # Force 64bit on with VIS
-    if test "$do64bitVIS" = "yes"; then
+    if test "$do64bitVIS" = "yes"; then :
   do64bit=yes
 fi
 
-
     # Step 0.c: Check if visibility support is available. Do this here so
     # that platform specific alternatives can be used below if this fails.
 
-    echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
-echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6
-if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
+$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
+if ${tcl_cv_cc_visibility_hidden+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
        hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
            extern __attribute__((__visibility__("hidden"))) void f(void);
@@ -6519,79 +4862,50 @@ f();
   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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_cc_visibility_hidden=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_visibility_hidden=no
+  tcl_cv_cc_visibility_hidden=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
        CFLAGS=$hold_cflags
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
-echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6
-    if test $tcl_cv_cc_visibility_hidden = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
+$as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
+    if test $tcl_cv_cc_visibility_hidden = yes; then :
 
 
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
-_ACEOF
+$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HIDDEN 1
-_ACEOF
+$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
 
 
 fi
 
-
     # Step 0.d: Disable -rpath support?
 
-    echo "$as_me:$LINENO: checking if rpath support is requested" >&5
-echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6
-    # Check whether --enable-rpath or --disable-rpath was given.
-if test "${enable_rpath+set}" = set; then
-  enableval="$enable_rpath"
-  doRpath=$enableval
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
+$as_echo_n "checking if rpath support is requested... " >&6; }
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; doRpath=$enableval
 else
   doRpath=yes
-fi;
-    echo "$as_me:$LINENO: result: $doRpath" >&5
-echo "${ECHO_T}$doRpath" >&6
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
+$as_echo "$doRpath" >&6; }
 
     # Step 1: set the variable "system" to hold the name and version number
     # for the system.
 
 
-    echo "$as_me:$LINENO: checking system version" >&5
-echo $ECHO_N "checking system version... $ECHO_C" >&6
-if test "${tcl_cv_sys_version+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
+$as_echo_n "checking system version... " >&6; }
+if ${tcl_cv_sys_version+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
        if test -f /usr/lib/NextStep/software_version; then
@@ -6599,8 +4913,8 @@ else
        else
            tcl_cv_sys_version=`uname -s`-`uname -r`
            if test "$?" -ne 0 ; then
-               { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
-echo "$as_me: WARNING: can't find uname command" >&2;}
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
+$as_echo "$as_me: WARNING: can't find uname command" >&2;}
                tcl_cv_sys_version=unknown
            else
                # Special check for weird MP-RAS system (uname returns weird
@@ -6616,79 +4930,51 @@ echo "$as_me: WARNING: can't find uname command" >&2;}
        fi
 
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
-echo "${ECHO_T}$tcl_cv_sys_version" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
+$as_echo "$tcl_cv_sys_version" >&6; }
     system=$tcl_cv_sys_version
 
 
     # 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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #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 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
+if ac_fn_c_try_link "$LINENO"; 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
+  ac_cv_lib_dl_dlopen=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   have_dl=yes
 else
   have_dl=no
@@ -6714,7 +5000,7 @@ fi
     ECHO_VERSION='`echo ${VERSION}`'
     TCL_LIB_VERSIONS_OK=ok
     CFLAGS_DEBUG=-g
-    if test "$GCC" = yes; then
+    if test "$GCC" = yes; then :
 
        CFLAGS_OPTIMIZE=-O2
        CFLAGS_WARNING="-Wall"
@@ -6725,14 +5011,13 @@ else
        CFLAGS_WARNING=""
 
 fi
-
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -6742,35 +5027,37 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="${ac_tool_prefix}ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
 fi
 fi
 AR=$ac_cv_prog_AR
 if test -n "$AR"; then
-  echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 fi
 if test -z "$ac_cv_prog_AR"; then
   ac_ct_AR=$AR
   # 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_ac_ct_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_AR"; then
   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
@@ -6780,27 +5067,38 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_AR=$ac_cv_prog_ac_ct_AR
 if test -n "$ac_ct_AR"; then
-  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  AR=$ac_ct_AR
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
 else
   AR="$ac_cv_prog_AR"
 fi
@@ -6810,13 +5108,12 @@ fi
     PLAT_OBJS=""
     PLAT_SRCS=""
     LDAIX_SRC=""
-    if test x"${SHLIB_VERSION}" = x; then
+    if test x"${SHLIB_VERSION}" = x; then :
   SHLIB_VERSION="1.0"
 fi
-
     case $system in
        AIX-*)
-           if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
+           if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then :
 
                # AIX requires the _r compiler when gcc isn't being used
                case "${CC}" in
@@ -6828,11 +5125,10 @@ fi
                        CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
                        ;;
                esac
-               echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
-echo "${ECHO_T}Using $CC for compiling with threads" >&6
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
+$as_echo "Using $CC for compiling with threads" >&6; }
 
 fi
-
            LIBS="$LIBS -lc"
            SHLIB_CFLAGS=""
            SHLIB_SUFFIX=".so"
@@ -6845,12 +5141,12 @@ fi
            LDAIX_SRC='$(UNIX_DIR)/ldAix'
 
            # Check to enable 64-bit flags for compiler/linker
-           if test "$do64bit" = yes; then
+           if test "$do64bit" = yes; then :
 
-               if test "$GCC" = yes; 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;}
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
 
 else
 
@@ -6863,17 +5159,15 @@ else
 
 fi
 
-
 fi
 
-
-           if test "`uname -m`" = ia64; then
+           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
+               if test "$GCC" = yes; then :
 
                    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
 
@@ -6882,12 +5176,11 @@ else
                    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
 
 fi
-
                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
 
 else
 
-               if test "$GCC" = yes; then
+               if test "$GCC" = yes; then :
 
                    SHLIB_LD='${CC} -shared -Wl,-bexpall'
 
@@ -6897,14 +5190,12 @@ else
                    LDFLAGS="$LDFLAGS -brtl"
 
 fi
-
                SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
                DL_LIBS="-ldl"
                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
 fi
-
            ;;
        BeOS*)
            SHLIB_CFLAGS="-fPIC"
@@ -6918,71 +5209,43 @@ fi
            # -lsocket, even if the network functions are in -lnet which
            # is always linked to, for compatibility.
            #-----------------------------------------------------------
-           echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
-echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
-if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
+$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
+if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lbind  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #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 inet_ntoa ();
 int
 main ()
 {
-inet_ntoa ();
+return inet_ntoa ();
   ;
   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
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_bind_inet_ntoa=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_bind_inet_ntoa=no
+  ac_cv_lib_bind_inet_ntoa=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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_bind_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
-if test $ac_cv_lib_bind_inet_ntoa = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
+$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
+if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
   LIBS="$LIBS -lbind -lsocket"
 fi
 
@@ -7019,16 +5282,12 @@ fi
            TCL_NEEDS_EXP_FILE=1
            TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a'
            SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
-           echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5
-echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6
-if test "${ac_cv_cygwin+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cygwin version of gcc" >&5
+$as_echo_n "checking for Cygwin version of gcc... " >&6; }
+if ${ac_cv_cygwin+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
                #ifdef __CYGWIN__
@@ -7043,49 +5302,21 @@ 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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_cygwin=no
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_cygwin=yes
+  ac_cv_cygwin=yes
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5
-echo "${ECHO_T}$ac_cv_cygwin" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cygwin" >&5
+$as_echo "$ac_cv_cygwin" >&6; }
            if test "$ac_cv_cygwin" = "no"; then
-               { { echo "$as_me:$LINENO: error: ${CC} is not a cygwin compiler." >&5
-echo "$as_me: error: ${CC} is not a cygwin compiler." >&2;}
-   { (exit 1); exit 1; }; }
+               as_fn_error $? "${CC} is not a cygwin compiler." "$LINENO" 5
            fi
            if test "x${TCL_THREADS}" = "x0"; then
-               { { echo "$as_me:$LINENO: error: CYGWIN compile is only supported with --enable-threads" >&5
-echo "$as_me: error: CYGWIN compile is only supported with --enable-threads" >&2;}
-   { (exit 1); exit 1; }; }
+               as_fn_error $? "CYGWIN compile is only supported with --enable-threads" "$LINENO" 5
            fi
            do64bit_ok=yes
            if test "x${SHARED_BUILD}" = "x1"; then
@@ -7115,71 +5346,43 @@ echo "$as_me: error: CYGWIN compile is only supported with --enable-threads" >&2
            SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
            DL_OBJS="tclLoadDl.o"
            DL_LIBS="-lroot"
-           echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
-echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6
-if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
+$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
+if ${ac_cv_lib_network_inet_ntoa+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lnetwork  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #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 inet_ntoa ();
 int
 main ()
 {
-inet_ntoa ();
+return inet_ntoa ();
   ;
   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
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_network_inet_ntoa=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_network_inet_ntoa=no
+  ac_cv_lib_network_inet_ntoa=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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_network_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6
-if test $ac_cv_lib_network_inet_ntoa = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
+$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
+if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
   LIBS="$LIBS -lnetwork"
 fi
 
@@ -7187,18 +5390,14 @@ fi
        HP-UX-*.11.*)
            # Use updated header definitions where possible
 
-cat >>confdefs.h <<\_ACEOF
-#define _XOPEN_SOURCE_EXTENDED 1
-_ACEOF
+$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
 
 
-cat >>confdefs.h <<\_ACEOF
-#define _XOPEN_SOURCE 1
-_ACEOF
+$as_echo "#define _XOPEN_SOURCE 1" >>confdefs.h
 
            LIBS="$LIBS -lxnet"               # Use the XOPEN network library
 
-           if test "`uname -m`" = ia64; then
+           if test "`uname -m`" = ia64; then :
 
                SHLIB_SUFFIX=".so"
 
@@ -7207,78 +5406,49 @@ else
                SHLIB_SUFFIX=".sl"
 
 fi
-
-           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
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+  $as_echo_n "(cached) " >&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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #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 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
+if ac_fn_c_try_link "$LINENO"; 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
+  ac_cv_lib_dld_shl_load=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
   tcl_ok=yes
 else
   tcl_ok=no
 fi
 
-           if test "$tcl_ok" = yes; then
+           if test "$tcl_ok" = yes; then :
 
                SHLIB_CFLAGS="+z"
                SHLIB_LD="ld -b"
@@ -7290,8 +5460,7 @@ fi
                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
 
 fi
-
-           if test "$GCC" = yes; then
+           if test "$GCC" = yes; then :
 
                SHLIB_LD='${CC} -shared'
                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
@@ -7302,30 +5471,28 @@ else
 
 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 "$do64bit" = "yes"; then :
 
-               if test "$GCC" = yes; then
+               if test "$GCC" = yes; then :
 
                    case `${CC} -dumpmachine` in
                        hppa64*)
                            # 64-bit gcc in use.  Fix flags for GNU ld.
                            do64bit_ok=yes
                            SHLIB_LD='${CC} -shared'
-                           if test $doRpath = yes; then
+                           if test $doRpath = yes; then :
 
                                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 fi
-
                            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
                            ;;
                        *)
-                           { 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;}
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
                            ;;
                    esac
 
@@ -7337,82 +5504,52 @@ else
 
 fi
 
-
-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
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+  $as_echo_n "(cached) " >&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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
 #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 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
+if ac_fn_c_try_link "$LINENO"; 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
+  ac_cv_lib_dld_shl_load=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
   tcl_ok=yes
 else
   tcl_ok=no
 fi
 
-           if test "$tcl_ok" = yes; then
+           if test "$tcl_ok" = yes; then :
 
                SHLIB_CFLAGS="+z"
                SHLIB_LD="ld -b"
@@ -7424,28 +5561,24 @@ fi
                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
 
-fi
- ;;
+fi ;;
        IRIX-5.*)
            SHLIB_CFLAGS=""
            SHLIB_LD="ld -shared -rdata_shared"
            SHLIB_SUFFIX=".so"
            DL_OBJS="tclLoadDl.o"
            DL_LIBS=""
-           case $LIBOBJS in
-    "mkstemp.$ac_objext"   | \
-  *" mkstemp.$ac_objext"   | \
-    "mkstemp.$ac_objext "* | \
+           case " $LIBOBJS " in
   *" mkstemp.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;;
+  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
+ ;;
 esac
 
-           if test $doRpath = yes; then
+           if test $doRpath = yes; then :
 
                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 fi
-
            ;;
        IRIX-6.*)
            SHLIB_CFLAGS=""
@@ -7453,21 +5586,18 @@ fi
            SHLIB_SUFFIX=".so"
            DL_OBJS="tclLoadDl.o"
            DL_LIBS=""
-           case $LIBOBJS in
-    "mkstemp.$ac_objext"   | \
-  *" mkstemp.$ac_objext"   | \
-    "mkstemp.$ac_objext "* | \
+           case " $LIBOBJS " in
   *" mkstemp.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;;
+  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
+ ;;
 esac
 
-           if test $doRpath = yes; then
+           if test $doRpath = yes; then :
 
                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 fi
-
-           if test "$GCC" = yes; then
+           if test "$GCC" = yes; then :
 
                CFLAGS="$CFLAGS -mabi=n32"
                LDFLAGS="$LDFLAGS -mabi=n32"
@@ -7486,7 +5616,6 @@ else
                LDFLAGS="$LDFLAGS -n32"
 
 fi
-
            ;;
        IRIX64-6.*)
            SHLIB_CFLAGS=""
@@ -7494,29 +5623,26 @@ fi
            SHLIB_SUFFIX=".so"
            DL_OBJS="tclLoadDl.o"
            DL_LIBS=""
-           case $LIBOBJS in
-    "mkstemp.$ac_objext"   | \
-  *" mkstemp.$ac_objext"   | \
-    "mkstemp.$ac_objext "* | \
+           case " $LIBOBJS " in
   *" mkstemp.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;;
+  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
+ ;;
 esac
 
-           if test $doRpath = yes; then
+           if test $doRpath = yes; then :
 
                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 fi
 
-
            # Check to enable 64-bit flags for compiler/linker
 
-           if test "$do64bit" = yes; then
+           if test "$do64bit" = yes; then :
 
-               if test "$GCC" = 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;}
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
 
 else
 
@@ -7527,9 +5653,7 @@ else
 
 fi
 
-
 fi
-
            ;;
        Linux*|GNU*|NetBSD-Debian)
            SHLIB_CFLAGS="-fPIC"
@@ -7545,31 +5669,25 @@ fi
            DL_OBJS="tclLoadDl.o"
            DL_LIBS="-ldl"
            LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           if test $doRpath = yes; then
+           if test $doRpath = yes; then :
 
                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 fi
-
            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           if test "`uname -m`" = "alpha"; then
+           if test "`uname -m`" = "alpha"; then :
   CFLAGS="$CFLAGS -mieee"
 fi
+           if test $do64bit = yes; then :
 
-           if test $do64bit = yes; then
-
-               echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_m64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
+$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
+if ${tcl_cv_cc_m64+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
                    hold_cflags=$CFLAGS
                    CFLAGS="$CFLAGS -m64"
-                   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -7580,62 +5698,35 @@ 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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_cc_m64=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_m64=no
+  tcl_cv_cc_m64=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
                    CFLAGS=$hold_cflags
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
-echo "${ECHO_T}$tcl_cv_cc_m64" >&6
-               if test $tcl_cv_cc_m64 = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
+$as_echo "$tcl_cv_cc_m64" >&6; }
+               if test $tcl_cv_cc_m64 = yes; then :
 
                    CFLAGS="$CFLAGS -m64"
                    do64bit_ok=yes
 
 fi
 
-
 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
+           if test x"${USE_COMPAT}" != x; then :
   CFLAGS="$CFLAGS -fno-inline"
 fi
-
            ;;
        Lynx*)
            SHLIB_CFLAGS="-fPIC"
@@ -7645,12 +5736,11 @@ fi
            DL_OBJS="tclLoadDl.o"
            DL_LIBS="-mshared -ldl"
            LD_FLAGS="-Wl,--export-dynamic"
-           if test $doRpath = yes; then
+           if test $doRpath = yes; then :
 
                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
                LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 fi
-
            ;;
        MP-RAS-02*)
            SHLIB_CFLAGS="-K PIC"
@@ -7696,11 +5786,10 @@ fi
                SHLIB_SUFFIX=".so"
                DL_OBJS="tclLoadDl.o"
                DL_LIBS=""
-               if test $doRpath = yes; then
+               if test $doRpath = yes; then :
 
                    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 fi
-
                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
                LDFLAGS="-Wl,-export-dynamic"
@@ -7717,7 +5806,7 @@ fi
                CFLAGS_OPTIMIZE="-O2"
                ;;
            esac
-           if test "${TCL_THREADS}" = "1"; then
+           if test "${TCL_THREADS}" = "1"; then :
 
                # On OpenBSD:   Compile with -pthread
                #               Don't link with -lpthread
@@ -7725,7 +5814,6 @@ fi
                CFLAGS="$CFLAGS -pthread"
 
 fi
-
            # OpenBSD doesn't do version numbers with dots.
            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
            TCL_LIB_VERSIONS_OK=nodots
@@ -7738,13 +5826,12 @@ fi
            DL_OBJS="tclLoadDl.o"
            DL_LIBS=""
            LDFLAGS="$LDFLAGS -export-dynamic"
-           if test $doRpath = yes; then
+           if test $doRpath = yes; then :
 
                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 fi
-
            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           if test "${TCL_THREADS}" = "1"; then
+           if test "${TCL_THREADS}" = "1"; then :
 
                # The -pthread needs to go in the CFLAGS, not LIBS
                LIBS=`echo $LIBS | sed s/-pthread//`
@@ -7752,7 +5839,6 @@ fi
                LDFLAGS="$LDFLAGS -pthread"
 
 fi
-
            ;;
        FreeBSD-*)
            # This configuration from FreeBSD Ports.
@@ -7763,20 +5849,18 @@ fi
            DL_OBJS="tclLoadDl.o"
            DL_LIBS=""
            LDFLAGS=""
-           if test $doRpath = yes; then
+           if test $doRpath = yes; then :
 
                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
                LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 fi
-
-           if test "${TCL_THREADS}" = "1"; then
+           if test "${TCL_THREADS}" = "1"; then :
 
                # The -pthread needs to go in the LDFLAGS, not LIBS
                LIBS=`echo $LIBS | sed s/-pthread//`
                CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
                LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
 fi
-
            case $system in
            FreeBSD-3.*)
                # Version numbers are dot-stripped by system policy.
@@ -7799,23 +5883,19 @@ fi
            CFLAGS="`echo " ${CFLAGS}" | \
                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
                if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
-           if test $do64bit = yes; then
+           if test $do64bit = yes; then :
 
                case `arch` in
                    ppc)
-                       echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
+$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
+if ${tcl_cv_cc_arch_ppc64+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
                            hold_cflags=$CFLAGS
                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -7826,62 +5906,33 @@ 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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_cc_arch_ppc64=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_arch_ppc64=no
+  tcl_cv_cc_arch_ppc64=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
                            CFLAGS=$hold_cflags
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
-echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
-                       if test $tcl_cv_cc_arch_ppc64 = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
+$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
+                       if test $tcl_cv_cc_arch_ppc64 = yes; then :
 
                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
                            do64bit_ok=yes
 
-fi
-;;
+fi;;
                    i386)
-                       echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
+$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
+if ${tcl_cv_cc_arch_x86_64+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
                            hold_cflags=$CFLAGS
                            CFLAGS="$CFLAGS -arch x86_64"
-                           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -7892,79 +5943,48 @@ 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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_cc_arch_x86_64=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_arch_x86_64=no
+  tcl_cv_cc_arch_x86_64=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
                            CFLAGS=$hold_cflags
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
-echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
-                       if test $tcl_cv_cc_arch_x86_64 = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
+$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
+                       if test $tcl_cv_cc_arch_x86_64 = yes; then :
 
                            CFLAGS="$CFLAGS -arch x86_64"
                            do64bit_ok=yes
 
-fi
-;;
+fi;;
                    *)
-                       { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
-echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
+$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
                esac
 
 else
 
                # Check for combined 32-bit and 64-bit fat build
                if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
-                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
+                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
 
                    fat_32_64=yes
 fi
 
-
 fi
-
            SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
-           echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
-echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_single_module+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
+$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
+if ${tcl_cv_ld_single_module+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
                hold_ldflags=$LDFLAGS
                LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -7975,71 +5995,41 @@ 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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_ld_single_module=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_single_module=no
+  tcl_cv_ld_single_module=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
                LDFLAGS=$hold_ldflags
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
-echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
-           if test $tcl_cv_ld_single_module = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
+$as_echo "$tcl_cv_ld_single_module" >&6; }
+           if test $tcl_cv_ld_single_module = yes; then :
 
                SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
 
 fi
-
            SHLIB_SUFFIX=".dylib"
            DL_OBJS="tclLoadDyld.o"
            DL_LIBS=""
            # Don't use -prebind when building for Mac OS X 10.4 or later only:
            if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
-               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
+               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then :
 
                LDFLAGS="$LDFLAGS -prebind"
 fi
-
            LDFLAGS="$LDFLAGS -headerpad_max_install_names"
-           echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
-echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_search_paths_first+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
+$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
+if ${tcl_cv_ld_search_paths_first+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
                hold_ldflags=$LDFLAGS
                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -8050,88 +6040,58 @@ 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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_ld_search_paths_first=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_search_paths_first=no
+  tcl_cv_ld_search_paths_first=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
                LDFLAGS=$hold_ldflags
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
-echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
-           if test $tcl_cv_ld_search_paths_first = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
+$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
+           if test $tcl_cv_ld_search_paths_first = yes; then :
 
                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
 
 fi
+           if test "$tcl_cv_cc_visibility_hidden" != yes; then :
 
-           if test "$tcl_cv_cc_visibility_hidden" != yes; then
 
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE __private_extern__
-_ACEOF
+$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
 
 
 fi
-
            CC_SEARCH_FLAGS=""
            LD_SEARCH_FLAGS=""
            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
 
-cat >>confdefs.h <<\_ACEOF
-#define MAC_OSX_TCL 1
-_ACEOF
+$as_echo "#define MAC_OSX_TCL 1" >>confdefs.h
 
            PLAT_OBJS='${MAC_OSX_OBJS}'
            PLAT_SRCS='${MAC_OSX_SRCS}'
-           echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5
-echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6
-           # Check whether --enable-corefoundation or --disable-corefoundation was given.
-if test "${enable_corefoundation+set}" = set; then
-  enableval="$enable_corefoundation"
-  tcl_corefoundation=$enableval
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use CoreFoundation" >&5
+$as_echo_n "checking whether to use CoreFoundation... " >&6; }
+           # Check whether --enable-corefoundation was given.
+if test "${enable_corefoundation+set}" = set; then :
+  enableval=$enable_corefoundation; tcl_corefoundation=$enableval
 else
   tcl_corefoundation=yes
-fi;
-           echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5
-echo "${ECHO_T}$tcl_corefoundation" >&6
-           if test $tcl_corefoundation = yes; then
+fi
+
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_corefoundation" >&5
+$as_echo "$tcl_corefoundation" >&6; }
+           if test $tcl_corefoundation = yes; then :
 
-               echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5
-echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6
-if test "${tcl_cv_lib_corefoundation+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CoreFoundation.framework" >&5
+$as_echo_n "checking for CoreFoundation.framework... " >&6; }
+if ${tcl_cv_lib_corefoundation+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
                    hold_libs=$LIBS
-                   if test "$fat_32_64" = yes; then
+                   if test "$fat_32_64" = yes; then :
 
                        for v in CFLAGS CPPFLAGS LDFLAGS; do
                            # On Tiger there is no 64-bit CF, so remove 64-bit
@@ -8141,13 +6101,8 @@ else
                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
                        done
 fi
-
                    LIBS="$LIBS -framework CoreFoundation"
-                   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <CoreFoundation/CoreFoundation.h>
 int
@@ -8158,77 +6113,45 @@ CFBundleRef b = CFBundleGetMainBundle();
   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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_lib_corefoundation=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_lib_corefoundation=no
+  tcl_cv_lib_corefoundation=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                   if test "$fat_32_64" = yes; then
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                   if test "$fat_32_64" = yes; then :
 
                        for v in CFLAGS CPPFLAGS LDFLAGS; do
                            eval $v'="$hold_'$v'"'
                        done
 fi
-
                    LIBS=$hold_libs
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5
-echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6
-               if test $tcl_cv_lib_corefoundation = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation" >&5
+$as_echo "$tcl_cv_lib_corefoundation" >&6; }
+               if test $tcl_cv_lib_corefoundation = yes; then :
 
                    LIBS="$LIBS -framework CoreFoundation"
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_COREFOUNDATION 1
-_ACEOF
+$as_echo "#define HAVE_COREFOUNDATION 1" >>confdefs.h
 
 
 else
   tcl_corefoundation=no
 fi
+               if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then :
 
-               if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
-
-                   echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5
-echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6
-if test "${tcl_cv_lib_corefoundation_64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit CoreFoundation" >&5
+$as_echo_n "checking for 64-bit CoreFoundation... " >&6; }
+if ${tcl_cv_lib_corefoundation_64+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
                        for v in CFLAGS CPPFLAGS LDFLAGS; do
                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
                        done
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <CoreFoundation/CoreFoundation.h>
 int
@@ -8239,60 +6162,31 @@ CFBundleRef b = CFBundleGetMainBundle();
   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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_lib_corefoundation_64=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_lib_corefoundation_64=no
+  tcl_cv_lib_corefoundation_64=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
                        for v in CFLAGS CPPFLAGS LDFLAGS; do
                            eval $v'="$hold_'$v'"'
                        done
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5
-echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6
-                   if test $tcl_cv_lib_corefoundation_64 = no; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation_64" >&5
+$as_echo "$tcl_cv_lib_corefoundation_64" >&6; }
+                   if test $tcl_cv_lib_corefoundation_64 = no; then :
 
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_COREFOUNDATION_64 1
-_ACEOF
+$as_echo "#define NO_COREFOUNDATION_64 1" >>confdefs.h
 
                         LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings"
 
 fi
 
-
 fi
 
-
 fi
-
            ;;
        NEXTSTEP-*)
            SHLIB_CFLAGS=""
@@ -8308,9 +6202,7 @@ fi
            SHLIB_LD_LIBS=""
            CFLAGS_OPTIMIZE=""          # Optimizer is buggy
 
-cat >>confdefs.h <<\_ACEOF
-#define _OE_SOCKETS 1
-_ACEOF
+$as_echo "#define _OE_SOCKETS 1" >>confdefs.h
 
            ;;
        OSF1-1.0|OSF1-1.1|OSF1-1.2)
@@ -8328,14 +6220,13 @@ _ACEOF
        OSF1-1.*)
            # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
            SHLIB_CFLAGS="-fPIC"
-           if test "$SHARED_BUILD" = 1; then
+           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"
@@ -8346,7 +6237,7 @@ fi
        OSF1-V*)
            # Digital OSF/1
            SHLIB_CFLAGS=""
-           if test "$SHARED_BUILD" = 1; then
+           if test "$SHARED_BUILD" = 1; then :
 
                SHLIB_LD='ld -shared -expect_unresolved "*"'
 
@@ -8355,30 +6246,27 @@ else
                SHLIB_LD='ld -non_shared -expect_unresolved "*"'
 
 fi
-
            SHLIB_SUFFIX=".so"
            DL_OBJS="tclLoadDl.o"
            DL_LIBS=""
-           if test $doRpath = yes; then
+           if test $doRpath = yes; then :
 
                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 fi
-
-           if test "$GCC" = yes; then
+           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
+           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
+               if test "$GCC" = yes; then :
 
                    LIBS="$LIBS -lpthread -lmach -lexc"
 
@@ -8389,9 +6277,7 @@ else
 
 fi
 
-
 fi
-
            ;;
        QNX-6*)
            # QNX RTP
@@ -8410,7 +6296,7 @@ fi
            # 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
+           if test "$GCC" = yes; then :
 
                SHLIB_CFLAGS="-fPIC -melf"
                LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
@@ -8421,7 +6307,6 @@ else
                LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
 
 fi
-
            SHLIB_LD="ld -G"
            SHLIB_LD_LIBS=""
            SHLIB_SUFFIX=".so"
            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
            TCL_LIB_VERSIONS_OK=nodots
            ;;
-       SunOS-5.[0-6])
-           # Careful to not let 5.10+ fall into this case
-
-           # 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"
-           SHLIB_SUFFIX=".so"
-           DL_OBJS="tclLoadDl.o"
-           DL_LIBS="-ldl"
-           if test "$GCC" = yes; then
-
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-else
-
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-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 "`${CC} -dumpversion | awk -F. '{print $1}'`" -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_ARCH="-xarch=v9a"
-
-else
-
-                           CFLAGS="$CFLAGS -xarch=v9"
-                           LDFLAGS_ARCH="-xarch=v9"
-
-fi
-
-                       # Solaris 64 uses this as well
-                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
-
-fi
-
-
-else
-  if test "$arch" = "amd64 i386"; then
-
-                   if test "$GCC" = yes; then
-
-                       case $system in
-                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
-                               do64bit_ok=yes
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               { 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
-                       case $system in
-                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               CFLAGS="$CFLAGS -xarch=amd64"
-                               LDFLAGS="$LDFLAGS -xarch=amd64";;
-                       esac
-
-fi
-
-
-else
-  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
-echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
-fi
-
-fi
-
-
-fi
-
-
-           #--------------------------------------------------------------------
-           # On Solaris 5.x i386 with the sunpro compiler we need to link
-           # with sunmath to get floating point rounding control
-           #--------------------------------------------------------------------
-           if test "$GCC" = yes; then
-  use_sunmath=no
-else
-
-               arch=`isainfo`
-               echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5
-echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6
-               if test "$arch" = "amd64 i386" -o "$arch" = "i386"; then
-
-                       echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-                       MATH_LIBS="-lsunmath $MATH_LIBS"
-                       if test "${ac_cv_header_sunmath_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for sunmath.h" >&5
-echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6
-if test "${ac_cv_header_sunmath_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5
-echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking sunmath.h usability" >&5
-echo $ECHO_N "checking sunmath.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 <sunmath.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 sunmath.h presence" >&5
-echo $ECHO_N "checking sunmath.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 <sunmath.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: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: sunmath.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: sunmath.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: sunmath.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sunmath.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: sunmath.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sunmath.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: sunmath.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sunmath.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: sunmath.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------ ##
-## Report this to the tcl lists.  ##
-## ------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for sunmath.h" >&5
-echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6
-if test "${ac_cv_header_sunmath_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_sunmath_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5
-echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6
-
-fi
-
-
-                       use_sunmath=yes
-
-else
-
-                       echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-                       use_sunmath=no
-
-fi
-
-
-fi
-
-           SHLIB_SUFFIX=".so"
-           DL_OBJS="tclLoadDl.o"
-           DL_LIBS="-ldl"
-           if test "$GCC" = yes; then
-
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               if test "$do64bit_ok" = yes; then
-
-                   if test "$arch" = "sparcv9 sparc"; then
-
-                       # We need to specify -static-libgcc or we need to
-                       # add the path to the sparv9 libgcc.
-                       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` | ..."
-                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
-
-else
-  if test "$arch" = "amd64 i386"; then
-
-                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
-
-fi
-
-fi
-
-
-fi
-
-
-else
-
-               if test "$use_sunmath" = yes; then
-  textmode=textoff
-else
-  textmode=text
-fi
-
-               case $system in
-                   SunOS-5.[1-9][0-9]*|SunOS-5.[7-9])
-                       SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";;
-                   *)
-                       SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";;
-               esac
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-
-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.
-           echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
-echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_Bexport+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-               hold_ldflags=$LDFLAGS
-               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
-  tcl_cv_ld_Bexport=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_Bexport=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-               LDFLAGS=$hold_ldflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
-echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
-           if test $tcl_cv_ld_Bexport = yes; then
-
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-
-fi
-
-           CC_SEARCH_FLAGS=""
-           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
-
-
-    if test "$do64bit" = yes -a "$do64bit_ok" = yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_CFG_DO64BIT 1
-_ACEOF
-
-
-fi
-
-
-
-
-    # Step 4: 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 "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
-echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
-       SHLIB_CFLAGS=""
-       SHLIB_LD=""
-       SHLIB_SUFFIX=""
-       DL_OBJS="tclLoadNone.o"
-       DL_LIBS=""
-       LDFLAGS="$LDFLAGS_ORIG"
-       CC_SEARCH_FLAGS=""
-       LD_SEARCH_FLAGS=""
-       BUILD_DLTEST=""
-
-fi
-
-    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
-
-    # 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" -a "$GCC" = yes; then
-
-       case $system in
-           AIX-*) ;;
-           BSD/OS*) ;;
-           CYGWIN_*|MINGW32_*) ;;
-           IRIX*) ;;
-           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
-           Darwin-*) ;;
-           SCO_SV-3.2*) ;;
-           *) SHLIB_CFLAGS="-fPIC" ;;
-       esac
-fi
-
-
-    if test "$tcl_cv_cc_visibility_hidden" != yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE extern
-_ACEOF
-
-
-fi
-
-
-    if test "$SHARED_LIB_SUFFIX" = ""; then
-
-       SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'
-fi
-
-    if test "$UNSHARED_LIB_SUFFIX" = ""; then
-
-       UNSHARED_LIB_SUFFIX='${VERSION}.a'
-fi
-
-    DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)"
-
-    if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then
-
-        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
-        MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
-        if test "${SHLIB_SUFFIX}" = ".dll"; then
-
-            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"'
-            DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)"
-
-else
-
-            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
-
-fi
-
-
-else
-
-        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
-
-        if test "$RANLIB" = ""; then
-
-            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
-            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
-
-else
-
-            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
-            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))'
-
-fi
-
-
-fi
-
-
-    # Stub lib does not depend on shared/static configuration
-    if test "$RANLIB" = ""; then
-
-        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
-        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
-
-else
-
-        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
-        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))'
-
-fi
-
-
-    # Define TCL_LIBS now that we know what DL_LIBS is.
-    # The trick here is that we don't want to change the value of TCL_LIBS if
-    # it is already set when tclConfig.sh had been loaded by Tk.
-    if test "x${TCL_LIBS}" = x; then
-
-        TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"
-fi
-
-
-
-       # See if the compiler supports casting to a union type.
-       # This is used to stop gcc from printing a compiler
-       # warning when initializing a union member.
-
-       echo "$as_me:$LINENO: checking for cast to union support" >&5
-echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6
-if test "${tcl_cv_cast_to_union+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 ()
-{
-
-                 union foo { int i; double d; };
-                 union foo f = (union foo) (int) 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_cv_cast_to_union=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cast_to_union=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5
-echo "${ECHO_T}$tcl_cv_cast_to_union" >&6
-       if test "$tcl_cv_cast_to_union" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CAST_TO_UNION 1
-_ACEOF
-
-       fi
-
-    # FIXME: This subst was left in only because the TCL_DL_LIBS
-    # entry in tclConfig.sh uses it. It is not clear why someone
-    # would use TCL_DL_LIBS instead of TCL_LIBS.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}"
-_ACEOF
-
-
-
-
-
-
-
-
-
-
-
-    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;
-# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
-    DBGX=""
-    if test "$tcl_ok" = "no"; then
-       CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
-       LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-
-cat >>confdefs.h <<\_ACEOF
-#define NDEBUG 1
-_ACEOF
-
-       echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_CFG_OPTIMIZED 1
-_ACEOF
-
-    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 "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_MEM_DEBUG 1
-_ACEOF
-
-    fi
-
-       if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_COMPILE_DEBUG 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_COMPILE_STATS 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 compile debugging" >&5
-echo "${ECHO_T}enabled symbols mem compile debugging" >&6
-       else
-           echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
-echo "${ECHO_T}enabled $tcl_ok debugging" >&6
-       fi
-    fi
-
-
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_TOMMATH 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define MP_PREC 4
-_ACEOF
-
-
-#--------------------------------------------------------------------
-#      Detect what compiler flags to set for 64-bit support.
-#--------------------------------------------------------------------
-
-
-    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 "${tcl_cv_flag__largefile_source64+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 ()
-{
-char *p = (char *)open64;
-  ;
-  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__largefile_source64=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 _LARGEFILE_SOURCE64 1
-#include <sys/stat.h>
-int
-main ()
-{
-char *p = (char *)open64;
-  ;
-  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__largefile_source64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_flag__largefile_source64=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__largefile_source64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define _LARGEFILE_SOURCE64 1
-_ACEOF
-
-       tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
-    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
-    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 <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
-echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
-echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
-       if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_DIRENT64 1
-_ACEOF
-
-       fi
-
-       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
-echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
-echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
-       if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_STAT64 1
-_ACEOF
-
-       fi
-
-
-
-for ac_func in open64 lseek64
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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 $ac_func
-
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-       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" && \
-               test "x${ac_cv_func_lseek64}" = "xyes" && \
-               test "x${ac_cv_func_open64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TYPE_OFF64_T 1
-_ACEOF
-
-           echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-       else
-           echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-       fi
-    fi
-
-
-#--------------------------------------------------------------------
-#      Check endianness because we can optimize comparisons of
-#      Tcl_UniChar strings to memcmp on big-endian systems.
-#--------------------------------------------------------------------
-
-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
-
-  ;
-  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
-  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
-  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
-    # finding both strings is unlikely to happen, but who knows?
-    ac_cv_c_bigendian=unknown
-  fi
-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
-
-( 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
-
-
-#--------------------------------------------------------------------
-#      Supply substitutes for missing POSIX library procedures, or
-#      set flags so Tcl uses alternate procedures.
-#--------------------------------------------------------------------
-
-# Check if Posix compliant getcwd exists, if not we'll use getwd.
-
-for ac_func in getcwd
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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 $ac_func
-
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define USEGETWD 1
-_ACEOF
-
-fi
-done
-
-# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
-# define USEGETWD even if the posix getcwd exists. Add a test ?
-
-
-
-
-
-for ac_func in mkstemp opendir strtol waitpid
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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 $ac_func
-
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  case $LIBOBJS in
-    "$ac_func.$ac_objext"   | \
-  *" $ac_func.$ac_objext"   | \
-    "$ac_func.$ac_objext "* | \
-  *" $ac_func.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-esac
-
-fi
-done
-
-
-echo "$as_me:$LINENO: checking for strerror" >&5
-echo $ECHO_N "checking for strerror... $ECHO_C" >&6
-if test "${ac_cv_func_strerror+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 strerror to an innocuous variant, in case <limits.h> declares strerror.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strerror innocuous_strerror
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strerror (); 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 strerror
-
-/* 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 strerror ();
-/* 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_strerror) || defined (__stub___strerror)
-choke me
-#else
-char (*f) () = strerror;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != strerror;
-  ;
-  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_strerror=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_strerror=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
-echo "${ECHO_T}$ac_cv_func_strerror" >&6
-if test $ac_cv_func_strerror = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_STRERROR 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for getwd" >&5
-echo $ECHO_N "checking for getwd... $ECHO_C" >&6
-if test "${ac_cv_func_getwd+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 getwd to an innocuous variant, in case <limits.h> declares getwd.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getwd innocuous_getwd
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getwd (); 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 getwd
-
-/* 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 getwd ();
-/* 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_getwd) || defined (__stub___getwd)
-choke me
-#else
-char (*f) () = getwd;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != getwd;
-  ;
-  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_getwd=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_getwd=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5
-echo "${ECHO_T}$ac_cv_func_getwd" >&6
-if test $ac_cv_func_getwd = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_GETWD 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for wait3" >&5
-echo $ECHO_N "checking for wait3... $ECHO_C" >&6
-if test "${ac_cv_func_wait3+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 wait3 to an innocuous variant, in case <limits.h> declares wait3.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define wait3 innocuous_wait3
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char wait3 (); 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 wait3
-
-/* 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 wait3 ();
-/* 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_wait3) || defined (__stub___wait3)
-choke me
-#else
-char (*f) () = wait3;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != wait3;
-  ;
-  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_wait3=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_wait3=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5
-echo "${ECHO_T}$ac_cv_func_wait3" >&6
-if test $ac_cv_func_wait3 = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_WAIT3 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for uname" >&5
-echo $ECHO_N "checking for uname... $ECHO_C" >&6
-if test "${ac_cv_func_uname+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 uname to an innocuous variant, in case <limits.h> declares uname.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define uname innocuous_uname
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char uname (); 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 uname
-
-/* 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 uname ();
-/* 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_uname) || defined (__stub___uname)
-choke me
-#else
-char (*f) () = uname;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != uname;
-  ;
-  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_uname=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_uname=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5
-echo "${ECHO_T}$ac_cv_func_uname" >&6
-if test $ac_cv_func_uname = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_UNAME 1
-_ACEOF
-
-fi
-
-
-if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
-       test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
-    # prior to Darwin 7, realpath is not threadsafe, so don't
-    # use it when threads are enabled, c.f. bug # 711232
-    ac_cv_func_realpath=no
-fi
-echo "$as_me:$LINENO: checking for realpath" >&5
-echo $ECHO_N "checking for realpath... $ECHO_C" >&6
-if test "${ac_cv_func_realpath+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 realpath to an innocuous variant, in case <limits.h> declares realpath.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define realpath innocuous_realpath
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char realpath (); 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 realpath
-
-/* 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 realpath ();
-/* 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_realpath) || defined (__stub___realpath)
-choke me
-#else
-char (*f) () = realpath;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != realpath;
-  ;
-  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_realpath=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_realpath=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5
-echo "${ECHO_T}$ac_cv_func_realpath" >&6
-if test $ac_cv_func_realpath = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_REALPATH 1
-_ACEOF
-
-fi
-
-
-
-       NEED_FAKE_RFC2553=0
-
-
-
-
-for ac_func in getnameinfo getaddrinfo freeaddrinfo gai_strerror
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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 $ac_func
-
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  NEED_FAKE_RFC2553=1
-fi
-done
-
-       echo "$as_me:$LINENO: checking for struct addrinfo" >&5
-echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
-if test "${ac_cv_type_struct_addrinfo+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/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-
-
-int
-main ()
-{
-if ((struct addrinfo *) 0)
-  return 0;
-if (sizeof (struct addrinfo))
-  return 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
-  ac_cv_type_struct_addrinfo=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_struct_addrinfo=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
-echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
-if test $ac_cv_type_struct_addrinfo = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_ADDRINFO 1
-_ACEOF
-
-
-else
-  NEED_FAKE_RFC2553=1
-fi
-echo "$as_me:$LINENO: checking for struct in6_addr" >&5
-echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6
-if test "${ac_cv_type_struct_in6_addr+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/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-
-
-int
-main ()
-{
-if ((struct in6_addr *) 0)
-  return 0;
-if (sizeof (struct in6_addr))
-  return 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
-  ac_cv_type_struct_in6_addr=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_struct_in6_addr=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_struct_in6_addr" >&5
-echo "${ECHO_T}$ac_cv_type_struct_in6_addr" >&6
-if test $ac_cv_type_struct_in6_addr = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IN6_ADDR 1
-_ACEOF
-
-
-else
-  NEED_FAKE_RFC2553=1
-fi
-echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
-echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
-if test "${ac_cv_type_struct_sockaddr_in6+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/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-
-
-int
-main ()
-{
-if ((struct sockaddr_in6 *) 0)
-  return 0;
-if (sizeof (struct sockaddr_in6))
-  return 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
-  ac_cv_type_struct_sockaddr_in6=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_struct_sockaddr_in6=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
-echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
-if test $ac_cv_type_struct_sockaddr_in6 = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_IN6 1
-_ACEOF
-
-
-else
-  NEED_FAKE_RFC2553=1
-fi
-echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
-echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
-if test "${ac_cv_type_struct_sockaddr_storage+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/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-
-
-int
-main ()
-{
-if ((struct sockaddr_storage *) 0)
-  return 0;
-if (sizeof (struct sockaddr_storage))
-  return 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
-  ac_cv_type_struct_sockaddr_storage=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_struct_sockaddr_storage=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
-echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
-if test $ac_cv_type_struct_sockaddr_storage = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_STORAGE 1
-_ACEOF
-
-
-else
-  NEED_FAKE_RFC2553=1
-fi
-
-if test "x$NEED_FAKE_RFC2553" = "x1"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_FAKE_RFC2553 1
-_ACEOF
-
-   case $LIBOBJS in
-    "fake-rfc2553.$ac_objext"   | \
-  *" fake-rfc2553.$ac_objext"   | \
-    "fake-rfc2553.$ac_objext "* | \
-  *" fake-rfc2553.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext" ;;
-esac
-
-   echo "$as_me:$LINENO: checking for strlcpy" >&5
-echo $ECHO_N "checking for strlcpy... $ECHO_C" >&6
-if test "${ac_cv_func_strlcpy+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 strlcpy to an innocuous variant, in case <limits.h> declares strlcpy.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strlcpy innocuous_strlcpy
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strlcpy (); 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 strlcpy
-
-/* 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 strlcpy ();
-/* 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_strlcpy) || defined (__stub___strlcpy)
-choke me
-#else
-char (*f) () = strlcpy;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != strlcpy;
-  ;
-  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_strlcpy=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_strlcpy=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strlcpy" >&5
-echo "${ECHO_T}$ac_cv_func_strlcpy" >&6
-
-fi
-
-
-#--------------------------------------------------------------------
-#      Look for thread-safe variants of some library functions.
-#--------------------------------------------------------------------
-
-if test "${TCL_THREADS}" = 1; then
-    echo "$as_me:$LINENO: checking for getpwuid_r" >&5
-echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6
-if test "${ac_cv_func_getpwuid_r+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 getpwuid_r to an innocuous variant, in case <limits.h> declares getpwuid_r.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getpwuid_r innocuous_getpwuid_r
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getpwuid_r (); 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 getpwuid_r
-
-/* 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 getpwuid_r ();
-/* 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_getpwuid_r) || defined (__stub___getpwuid_r)
-choke me
-#else
-char (*f) () = getpwuid_r;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != getpwuid_r;
-  ;
-  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_getpwuid_r=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_getpwuid_r=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5
-echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6
-if test $ac_cv_func_getpwuid_r = yes; then
-
-    echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5
-echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6
-if test "${tcl_cv_api_getpwuid_r_5+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 <pwd.h>
-
-int
-main ()
-{
-
-       uid_t uid;
-       struct passwd pw, *pwp;
-       char buf[512];
-       int buflen = 512;
-
-       (void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
-
-  ;
-  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_api_getpwuid_r_5=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_api_getpwuid_r_5=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5
-echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6
-    tcl_ok=$tcl_cv_api_getpwuid_r_5
-    if test "$tcl_ok" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETPWUID_R_5 1
-_ACEOF
-
-    else
-       echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5
-echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6
-if test "${tcl_cv_api_getpwuid_r_4+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 <pwd.h>
-
-int
-main ()
-{
-
-           uid_t uid;
-           struct passwd pw;
-           char buf[512];
-           int buflen = 512;
-
-           (void)getpwnam_r(uid, &pw, buf, buflen);
-
-  ;
-  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_api_getpwuid_r_4=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_api_getpwuid_r_4=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5
-echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6
-       tcl_ok=$tcl_cv_api_getpwuid_r_4
-       if test "$tcl_ok" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETPWUID_R_4 1
-_ACEOF
-
-       fi
-    fi
-    if test "$tcl_ok" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETPWUID_R 1
-_ACEOF
-
-    fi
-
-fi
-
-    echo "$as_me:$LINENO: checking for getpwnam_r" >&5
-echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6
-if test "${ac_cv_func_getpwnam_r+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 getpwnam_r to an innocuous variant, in case <limits.h> declares getpwnam_r.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getpwnam_r innocuous_getpwnam_r
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getpwnam_r (); 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 getpwnam_r
-
-/* 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 getpwnam_r ();
-/* 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_getpwnam_r) || defined (__stub___getpwnam_r)
-choke me
-#else
-char (*f) () = getpwnam_r;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != getpwnam_r;
-  ;
-  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_getpwnam_r=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_getpwnam_r=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5
-echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6
-if test $ac_cv_func_getpwnam_r = yes; then
-
-    echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5
-echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6
-if test "${tcl_cv_api_getpwnam_r_5+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 <pwd.h>
-
-int
-main ()
-{
-
-       char *name;
-       struct passwd pw, *pwp;
-       char buf[512];
-       int buflen = 512;
-
-       (void) getpwnam_r(name, &pw, buf, buflen, &pwp);
-
-  ;
-  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_api_getpwnam_r_5=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       SunOS-5.[0-6])
+           # Careful to not let 5.10+ fall into this case
 
-tcl_cv_api_getpwnam_r_5=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5
-echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6
-    tcl_ok=$tcl_cv_api_getpwnam_r_5
-    if test "$tcl_ok" = yes; then
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETPWNAM_R_5 1
-_ACEOF
 
-    else
-       echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5
-echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6
-if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+$as_echo "#define _REENTRANT 1" >>confdefs.h
 
-       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 <pwd.h>
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
 
-int
-main ()
-{
 
-           char *name;
-           struct passwd pw;
-           char buf[512];
-           int buflen = 512;
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_SUFFIX=".so"
+           DL_OBJS="tclLoadDl.o"
+           DL_LIBS="-ldl"
+           if test "$GCC" = yes; then :
 
-           (void)getpwnam_r(name, &pw, buf, buflen);
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
-  ;
-  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_api_getpwnam_r_4=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-tcl_cv_api_getpwnam_r_4=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5
-echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6
-       tcl_ok=$tcl_cv_api_getpwnam_r_4
-       if test "$tcl_ok" = yes; then
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETPWNAM_R_4 1
-_ACEOF
+fi
+           ;;
+       SunOS-5*)
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
 
-       fi
-    fi
-    if test "$tcl_ok" = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETPWNAM_R 1
-_ACEOF
+$as_echo "#define _REENTRANT 1" >>confdefs.h
 
-    fi
 
-fi
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
 
-    echo "$as_me:$LINENO: checking for getgrgid_r" >&5
-echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6
-if test "${ac_cv_func_getgrgid_r+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 getgrgid_r to an innocuous variant, in case <limits.h> declares getgrgid_r.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getgrgid_r innocuous_getgrgid_r
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getgrgid_r (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+           SHLIB_CFLAGS="-KPIC"
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+           # Check to enable 64-bit flags for compiler/linker
+           if test "$do64bit" = yes; then :
 
-#undef getgrgid_r
+               arch=`isainfo`
+               if test "$arch" = "sparcv9 sparc"; then :
 
-/* 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 getgrgid_r ();
-/* 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_getgrgid_r) || defined (__stub___getgrgid_r)
-choke me
-#else
-char (*f) () = getgrgid_r;
-#endif
-#ifdef __cplusplus
-}
-#endif
+                   if test "$GCC" = yes; then :
 
-int
-main ()
-{
-return f != getgrgid_r;
-  ;
-  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_getgrgid_r=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+                       if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
 
-ac_cv_func_getgrgid_r=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5
-echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6
-if test $ac_cv_func_getgrgid_r = yes; then
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
 
-    echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5
-echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6
-if test "${tcl_cv_api_getgrgid_r_5+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.  */
+                           do64bit_ok=yes
+                           CFLAGS="$CFLAGS -m64 -mcpu=v9"
+                           LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+                           SHLIB_CFLAGS="-fPIC"
 
-       #include <sys/types.h>
-       #include <grp.h>
+fi
 
-int
-main ()
-{
+else
 
-       gid_t gid;
-       struct group gr, *grp;
-       char buf[512];
-       int buflen = 512;
+                       do64bit_ok=yes
+                       if test "$do64bitVIS" = yes; then :
 
-       (void) getgrgid_r(gid, &gr, buf, buflen, &grp);
+                           CFLAGS="$CFLAGS -xarch=v9a"
+                           LDFLAGS_ARCH="-xarch=v9a"
 
-  ;
-  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_api_getgrgid_r_5=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-tcl_cv_api_getgrgid_r_5=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+                           CFLAGS="$CFLAGS -xarch=v9"
+                           LDFLAGS_ARCH="-xarch=v9"
+
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5
-echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6
-    tcl_ok=$tcl_cv_api_getgrgid_r_5
-    if test "$tcl_ok" = yes; then
+                       # Solaris 64 uses this as well
+                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETGRGID_R_5 1
-_ACEOF
+fi
 
-    else
-       echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5
-echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6
-if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  if test "$arch" = "amd64 i386"; then :
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+                   if test "$GCC" = yes; then :
 
-           #include <sys/types.h>
-           #include <grp.h>
+                       case $system in
+                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
+                               do64bit_ok=yes
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
+                       esac
 
-int
-main ()
-{
+else
 
-           gid_t gid;
-           struct group gr;
-           char buf[512];
-           int buflen = 512;
+                       do64bit_ok=yes
+                       case $system in
+                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               CFLAGS="$CFLAGS -xarch=amd64"
+                               LDFLAGS="$LDFLAGS -xarch=amd64";;
+                       esac
 
-           (void)getgrgid_r(gid, &gr, buf, buflen);
+fi
 
-  ;
-  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_api_getgrgid_r_4=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_api_getgrgid_r_4=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5
-echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6
-       tcl_ok=$tcl_cv_api_getgrgid_r_4
-       if test "$tcl_ok" = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETGRGID_R_4 1
-_ACEOF
+fi
 
-       fi
-    fi
-    if test "$tcl_ok" = yes; then
+           #--------------------------------------------------------------------
+           # On Solaris 5.x i386 with the sunpro compiler we need to link
+           # with sunmath to get floating point rounding control
+           #--------------------------------------------------------------------
+           if test "$GCC" = yes; then :
+  use_sunmath=no
+else
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETGRGID_R 1
-_ACEOF
+               arch=`isainfo`
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use -lsunmath for fp rounding control" >&5
+$as_echo_n "checking whether to use -lsunmath for fp rounding control... " >&6; }
+               if test "$arch" = "amd64 i386" -o "$arch" = "i386"; then :
 
-    fi
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                       MATH_LIBS="-lsunmath $MATH_LIBS"
+                       ac_fn_c_check_header_mongrel "$LINENO" "sunmath.h" "ac_cv_header_sunmath_h" "$ac_includes_default"
+if test "x$ac_cv_header_sunmath_h" = xyes; then :
 
 fi
 
-    echo "$as_me:$LINENO: checking for getgrnam_r" >&5
-echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6
-if test "${ac_cv_func_getgrnam_r+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+                       use_sunmath=yes
+
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define getgrnam_r to an innocuous variant, in case <limits.h> declares getgrnam_r.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getgrnam_r innocuous_getgrnam_r
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getgrnam_r (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       use_sunmath=no
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+fi
 
-#undef getgrnam_r
+fi
+           SHLIB_SUFFIX=".so"
+           DL_OBJS="tclLoadDl.o"
+           DL_LIBS="-ldl"
+           if test "$GCC" = yes; then :
 
-/* 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 getgrnam_r ();
-/* 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_getgrnam_r) || defined (__stub___getgrnam_r)
-choke me
-#else
-char (*f) () = getgrnam_r;
-#endif
-#ifdef __cplusplus
-}
-#endif
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               if test "$do64bit_ok" = yes; then :
 
-int
-main ()
-{
-return f != getgrnam_r;
-  ;
-  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_getgrnam_r=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+                   if test "$arch" = "sparcv9 sparc"; then :
 
-ac_cv_func_getgrnam_r=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5
-echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6
-if test $ac_cv_func_getgrnam_r = yes; then
+                       # We need to specify -static-libgcc or we need to
+                       # add the path to the sparv9 libgcc.
+                       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` | ..."
+                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
 
-    echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5
-echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6
-if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  if test "$arch" = "amd64 i386"; then :
 
-    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 <grp.h>
-
-int
-main ()
-{
+                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
 
-       char *name;
-       struct group gr, *grp;
-       char buf[512];
-       int buflen = 512;
+fi
+fi
 
-       (void) getgrnam_r(name, &gr, buf, buflen, &grp);
+fi
 
-  ;
-  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_api_getgrnam_r_5=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-tcl_cv_api_getgrnam_r_5=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+               if test "$use_sunmath" = yes; then :
+  textmode=textoff
+else
+  textmode=text
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5
-echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6
-    tcl_ok=$tcl_cv_api_getgrnam_r_5
-    if test "$tcl_ok" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETGRNAM_R_5 1
-_ACEOF
+               case $system in
+                   SunOS-5.[1-9][0-9]*|SunOS-5.[7-9])
+                       SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";;
+                   *)
+                       SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";;
+               esac
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
 
-    else
-       echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5
-echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6
-if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+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.
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
+$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
+if ${tcl_cv_ld_Bexport+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-           #include <sys/types.h>
-           #include <grp.h>
-
 int
 main ()
 {
-
-           char *name;
-           struct group gr;
-           char buf[512];
-           int buflen = 512;
-
-           (void)getgrnam_r(name, &gr, buf, buflen);
-
+int i;
   ;
   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_api_getgrnam_r_4=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_ld_Bexport=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_api_getgrnam_r_4=no
+  tcl_cv_ld_Bexport=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LDFLAGS=$hold_ldflags
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5
-echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6
-       tcl_ok=$tcl_cv_api_getgrnam_r_4
-       if test "$tcl_ok" = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
+$as_echo "$tcl_cv_ld_Bexport" >&6; }
+           if test $tcl_cv_ld_Bexport = yes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETGRNAM_R_4 1
-_ACEOF
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
 
-       fi
-    fi
-    if test "$tcl_ok" = yes; then
+fi
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+    esac
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETGRNAM_R 1
-_ACEOF
+    if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
 
-    fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
+$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
 
 fi
 
-    if test "`uname -s`" = "Darwin" && \
-           test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
-       # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
-       # are actually MT-safe as they always return pointers
-       # from TSD instead of static storage.
+    if test "$do64bit" = yes -a "$do64bit_ok" = yes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MTSAFE_GETHOSTBYNAME 1
-_ACEOF
 
+$as_echo "#define TCL_CFG_DO64BIT 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MTSAFE_GETHOSTBYADDR 1
-_ACEOF
 
+fi
 
-    elif test "`uname -s`" = "HP-UX" && \
-             test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
-        # Starting with HPUX 11.00 (we believe), gethostbyX
-        # are actually MT-safe as they always return pointers
-       # from TSD instead of static storage.
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MTSAFE_GETHOSTBYNAME 1
-_ACEOF
 
+    # Step 4: disable dynamic loading if requested via a command-line switch.
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MTSAFE_GETHOSTBYADDR 1
-_ACEOF
+    # Check whether --enable-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
 
-    else
-       echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
-echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
-if test "${ac_cv_func_gethostbyname_r+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    if test "x$DL_OBJS" != x; then :
+  BUILD_DLTEST="\$(DLTEST_TARGETS)"
 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_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define gethostbyname_r innocuous_gethostbyname_r
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char gethostbyname_r (); 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
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
+$as_echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
+       SHLIB_CFLAGS=""
+       SHLIB_LD=""
+       SHLIB_SUFFIX=""
+       DL_OBJS="tclLoadNone.o"
+       DL_LIBS=""
+       LDFLAGS="$LDFLAGS_ORIG"
+       CC_SEARCH_FLAGS=""
+       LD_SEARCH_FLAGS=""
+       BUILD_DLTEST=""
 
-#undef gethostbyname_r
+fi
+    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
 
-/* 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_r ();
-/* 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_r) || defined (__stub___gethostbyname_r)
-choke me
-#else
-char (*f) () = gethostbyname_r;
-#endif
-#ifdef __cplusplus
-}
-#endif
+    # 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.
 
-int
-main ()
-{
-return f != gethostbyname_r;
-  ;
-  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_r=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then :
 
-ac_cv_func_gethostbyname_r=no
+       case $system in
+           AIX-*) ;;
+           BSD/OS*) ;;
+           CYGWIN_*|MINGW32_*) ;;
+           IRIX*) ;;
+           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
+           Darwin-*) ;;
+           SCO_SV-3.2*) ;;
+           *) SHLIB_CFLAGS="-fPIC" ;;
+       esac
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+
+    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
+
+
+$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
+
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
-echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
-if test $ac_cv_func_gethostbyname_r = yes; then
 
-    echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5
-echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6
-if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+    if test "$SHARED_LIB_SUFFIX" = ""; then :
 
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'
+fi
+    if test "$UNSHARED_LIB_SUFFIX" = ""; then :
 
-       #include <netdb.h>
+       UNSHARED_LIB_SUFFIX='${VERSION}.a'
+fi
+    DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)"
 
-int
-main ()
-{
+    if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then :
 
-       char *name;
-       struct hostent *he, *res;
-       char buffer[2048];
-       int buflen = 2048;
-       int h_errnop;
+        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
+        MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
+        if test "${SHLIB_SUFFIX}" = ".dll"; then :
 
-       (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
+            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"'
+            DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)"
 
-  ;
-  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_api_gethostbyname_r_6=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-tcl_cv_api_gethostbyname_r_6=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
+
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5
-echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6
-    tcl_ok=$tcl_cv_api_gethostbyname_r_6
-    if test "$tcl_ok" = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETHOSTBYNAME_R_6 1
-_ACEOF
+else
+
+        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
+
+        if test "$RANLIB" = ""; then :
+
+            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
+            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
 
-    else
-       echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5
-echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6
-if test "${tcl_cv_api_gethostbyname_r_5+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.  */
+            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
+            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))'
 
-           #include <netdb.h>
+fi
 
-int
-main ()
-{
+fi
 
-           char *name;
-           struct hostent *he;
-           char buffer[2048];
-           int buflen = 2048;
-           int h_errnop;
+    # Stub lib does not depend on shared/static configuration
+    if test "$RANLIB" = ""; then :
 
-           (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
+        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
+        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
 
-  ;
-  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_api_gethostbyname_r_5=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-tcl_cv_api_gethostbyname_r_5=no
+        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
+        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))'
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    # Define TCL_LIBS now that we know what DL_LIBS is.
+    # The trick here is that we don't want to change the value of TCL_LIBS if
+    # it is already set when tclConfig.sh had been loaded by Tk.
+    if test "x${TCL_LIBS}" = x; then :
+
+        TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5
-echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6
-       tcl_ok=$tcl_cv_api_gethostbyname_r_5
-       if test "$tcl_ok" = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETHOSTBYNAME_R_5 1
-_ACEOF
 
-       else
-           echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5
-echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6
-if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+       # See if the compiler supports casting to a union type.
+       # This is used to stop gcc from printing a compiler
+       # warning when initializing a union member.
 
-           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
+$as_echo_n "checking for cast to union support... " >&6; }
+if ${tcl_cv_cast_to_union+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-               #include <netdb.h>
-
 int
 main ()
 {
 
-               char *name;
-               struct hostent *he;
-               struct hostent_data data;
-
-               (void) gethostbyname_r(name, he, &data);
+                 union foo { int i; double d; };
+                 union foo f = (union foo) (int) 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_cv_api_gethostbyname_r_3=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_cast_to_union=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_api_gethostbyname_r_3=no
+  tcl_cv_cast_to_union=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5
-echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6
-           tcl_ok=$tcl_cv_api_gethostbyname_r_3
-           if test "$tcl_ok" = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
+$as_echo "$tcl_cv_cast_to_union" >&6; }
+       if test "$tcl_cv_cast_to_union" = "yes"; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETHOSTBYNAME_R_3 1
-_ACEOF
+$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
 
-           fi
        fi
-    fi
-    if test "$tcl_ok" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETHOSTBYNAME_R 1
-_ACEOF
-
-    fi
 
-fi
+    # FIXME: This subst was left in only because the TCL_DL_LIBS
+    # entry in tclConfig.sh uses it. It is not clear why someone
+    # would use TCL_DL_LIBS instead of TCL_LIBS.
 
-       echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5
-echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6
-if test "${ac_cv_func_gethostbyaddr_r+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 gethostbyaddr_r to an innocuous variant, in case <limits.h> declares gethostbyaddr_r.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define gethostbyaddr_r innocuous_gethostbyaddr_r
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char gethostbyaddr_r (); 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 gethostbyaddr_r
 
-/* 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 gethostbyaddr_r ();
-/* 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_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r)
-choke me
-#else
-char (*f) () = gethostbyaddr_r;
-#endif
-#ifdef __cplusplus
-}
-#endif
 
-int
-main ()
-{
-return f != gethostbyaddr_r;
-  ;
-  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_gethostbyaddr_r=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_gethostbyaddr_r=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5
-echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6
-if test $ac_cv_func_gethostbyaddr_r = yes; then
 
-    echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5
-echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6
-if test "${tcl_cv_api_gethostbyaddr_r_7+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 <netdb.h>
 
-int
-main ()
-{
 
-       char *addr;
-       int length;
-       int type;
-       struct hostent *result;
-       char buffer[2048];
-       int buflen = 2048;
-       int h_errnop;
 
-       (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
-                              &h_errnop);
 
-  ;
-  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_api_gethostbyaddr_r_7=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-tcl_cv_api_gethostbyaddr_r_7=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5
-echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6
-    tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
-    if test "$tcl_ok" = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETHOSTBYADDR_R_7 1
-_ACEOF
 
-    else
-       echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5
-echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6
-if test "${tcl_cv_api_gethostbyaddr_r_8+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 <netdb.h>
 
-int
-main ()
-{
 
-           char *addr;
-           int length;
-           int type;
-           struct hostent *result, *resultp;
-           char buffer[2048];
-           int buflen = 2048;
-           int h_errnop;
 
-           (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
-                                  &resultp, &h_errnop);
 
-  ;
-  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_api_gethostbyaddr_r_8=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-tcl_cv_api_gethostbyaddr_r_8=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5
-echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6
-       tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
-       if test "$tcl_ok" = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETHOSTBYADDR_R_8 1
+cat >>confdefs.h <<_ACEOF
+#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}"
 _ACEOF
 
-       fi
-    fi
-    if test "$tcl_ok" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETHOSTBYADDR_R 1
-_ACEOF
 
-    fi
 
-fi
 
-    fi
-fi
 
-#---------------------------------------------------------------------------
-#      Check for serial port interface.
-#
-#      termios.h is present on all POSIX systems.
-#      sys/ioctl.h is almost always present, though what it contains
-#      is system-specific.
-#      sys/modem.h is needed on HP-UX.
-#---------------------------------------------------------------------------
 
 
-for ac_header in termios.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 tcl 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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
+$as_echo_n "checking for build with symbols... " >&6; }
+    # Check whether --enable-symbols was given.
+if test "${enable_symbols+set}" = set; then :
+  enableval=$enable_symbols; tcl_ok=$enableval
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
+  tcl_ok=no
 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
+# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
+    DBGX=""
+    if test "$tcl_ok" = "no"; then
+       CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
+       LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
 
-fi
+$as_echo "#define NDEBUG 1" >>confdefs.h
 
-done
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
+$as_echo "#define TCL_CFG_OPTIMIZED 1" >>confdefs.h
 
-for ac_header in sys/ioctl.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
+    else
+       CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
+       LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
+       if test "$tcl_ok" = "yes"; then
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
+$as_echo "yes (standard debugging)" >&6; }
+       fi
+    fi
 
-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
+    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
 
-# 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 tcl 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
+$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
 
-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
 
-fi
+       if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
 
-done
+$as_echo "#define TCL_COMPILE_DEBUG 1" >>confdefs.h
 
 
-for ac_header in sys/modem.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
+$as_echo "#define TCL_COMPILE_STATS 1" >>confdefs.h
 
-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
+       fi
 
-# 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
+    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+       if test "$tcl_ok" = "all"; then
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem compile debugging" >&5
+$as_echo "enabled symbols mem compile debugging" >&6; }
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
+$as_echo "enabled $tcl_ok debugging" >&6; }
+       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: $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 tcl 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
+$as_echo "#define TCL_TOMMATH 1" >>confdefs.h
 
-fi
 
-done
+$as_echo "#define MP_PREC 4" >>confdefs.h
 
 
 #--------------------------------------------------------------------
-#      Include sys/select.h if it exists and if it supplies things
-#      that appear to be useful and aren't already in sys/types.h.
-#      This appears to be true only on the RS/6000 under AIX.  Some
-#      systems like OSF/1 have a sys/select.h that's of no use, and
-#      other systems like SCO UNIX have a sys/select.h that's
-#      pernicious.  If "fd_set" isn't defined anywhere then set a
-#      special flag.
+#      Detect what compiler flags to set for 64-bit support.
 #--------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5
-echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6
-if test "${tcl_cv_type_fd_set+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
+$as_echo_n "checking for required early compiler flags... " >&6; }
+    tcl_flags=""
+
+    if ${tcl_cv_flag__isoc99_source+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__isoc99_source=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
+#define _ISOC99_SOURCE 1
+#include <stdlib.h>
 int
 main ()
 {
-fd_set readMask, writeMask;
+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_type_fd_set=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__isoc99_source=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_type_fd_set=no
+  tcl_cv_flag__isoc99_source=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5
-echo "${ECHO_T}$tcl_cv_type_fd_set" >&6
-tcl_ok=$tcl_cv_type_fd_set
-if test $tcl_ok = no; then
-    echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5
-echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6
-if test "${tcl_cv_grep_fd_mask+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
+
+       tcl_flags="$tcl_flags _ISOC99_SOURCE"
+    fi
+
+
+    if ${tcl_cv_flag__largefile64_source+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile64_source=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/select.h>
-
+#define _LARGEFILE64_SOURCE 1
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "fd_mask" >/dev/null 2>&1; then
-  tcl_cv_grep_fd_mask=present
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile64_source=yes
 else
-  tcl_cv_grep_fd_mask=missing
+  tcl_cv_flag__largefile64_source=no
 fi
-rm -f conftest*
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5
-echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6
-    if test $tcl_cv_grep_fd_mask = present; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_SELECT_H 1
-_ACEOF
-
-       tcl_ok=yes
-    fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-if test $tcl_ok = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_FD_SET 1
-_ACEOF
 
-fi
+    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
 
-#------------------------------------------------------------------------------
-#       Find out all about time handling differences.
-#------------------------------------------------------------------------------
+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
 
+       tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
+    fi
 
 
-for ac_header in sys/time.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
+    if ${tcl_cv_flag__largefile_source64+:} false; then :
+  $as_echo_n "(cached) " >&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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+#include <sys/stat.h>
+int
+main ()
+{
+char *p = (char *)open64;
+  ;
+  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_header_compiler=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile_source64=no
 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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <$ac_header>
+#define _LARGEFILE_SOURCE64 1
+#include <sys/stat.h>
+int
+main ()
+{
+char *p = (char *)open64;
+  ;
+  return 0;
+}
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile_source64=yes
 else
-  ac_cpp_err=yes
+  tcl_cv_flag__largefile_source64=no
 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
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 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 tcl 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"
+rm -f core 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
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
 
-fi
+$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
 
-done
+       tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
+    fi
 
-    echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
-if test "${ac_cv_header_time+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    if test "x${tcl_flags}" = "x" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
+$as_echo "${tcl_flags}" >&6; }
+    fi
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
+$as_echo_n "checking for 64-bit integer type... " >&6; }
+    if ${tcl_cv_type_64bit+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       tcl_cv_type_64bit=none
+       # See if the compiler knows natively about __int64
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
 
 int
 main ()
 {
-if ((struct tm *) 0)
-return 0;
+__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
-  ac_cv_header_time=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_type_64bit=__int64
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_time=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  tcl_type_64bit="long long"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-echo "${ECHO_T}$ac_cv_header_time" >&6
-if test $ac_cv_header_time = yes; then
+rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
+int
+main ()
+{
+switch (0) {
+            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
+        }
+  ;
+  return 0;
+}
 _ACEOF
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_type_64bit=${tcl_type_64bit}
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
+    if test "${tcl_cv_type_64bit}" = none ; then
 
+$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5
+$as_echo "using long" >&6; }
+    else
 
-
-for ac_func in gmtime_r localtime_r mktime
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<_ACEOF
+#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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 $ac_func
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
+$as_echo "${tcl_cv_type_64bit}" >&6; }
 
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
+       # Now check for auxiliary declarations
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
+$as_echo_n "checking for struct dirent64... " >&6; }
+if ${tcl_cv_struct_dirent64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <dirent.h>
 int
 main ()
 {
-return f != $ac_func;
+struct dirent64 p;
   ;
   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
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_struct_dirent64=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
+  tcl_cv_struct_dirent64=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
+$as_echo "$tcl_cv_struct_dirent64" >&6; }
+       if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
 
-fi
-done
+$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
 
+       fi
 
-    echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5
-echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6
-if test "${tcl_cv_member_tm_tzadj+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
+$as_echo_n "checking for struct stat64... " >&6; }
+if ${tcl_cv_struct_stat64+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <time.h>
+#include <sys/stat.h>
 int
 main ()
 {
-struct tm tm; tm.tm_tzadj;
+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_member_tm_tzadj=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_struct_stat64=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_member_tm_tzadj=no
+  tcl_cv_struct_stat64=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5
-echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6
-    if test $tcl_cv_member_tm_tzadj = yes ; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
+$as_echo "$tcl_cv_struct_stat64" >&6; }
+       if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+
+$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
+
+       fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TM_TZADJ 1
+       for ac_func in open64 lseek64
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-    fi
+fi
+done
 
-    echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5
-echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6
-if test "${tcl_cv_member_tm_gmtoff+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
+$as_echo_n "checking for off64_t... " >&6; }
+       if ${tcl_cv_type_off64_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <time.h>
+#include <sys/types.h>
 int
 main ()
 {
-struct tm tm; tm.tm_gmtoff;
+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_member_tm_gmtoff=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_type_off64_t=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_member_tm_gmtoff=no
+  tcl_cv_type_off64_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5
-echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TM_GMTOFF 1
-_ACEOF
+                       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
+               test "x${ac_cv_func_lseek64}" = "xyes" && \
+               test "x${ac_cv_func_open64}" = "xyes" ; then
+
+$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
 
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
     fi
 
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    echo "$as_me:$LINENO: checking long timezone variable" >&5
-echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6
-if test "${tcl_cv_timezone_long+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+#--------------------------------------------------------------------
+#      Check endianness because we can optimize comparisons of
+#      Tcl_UniChar strings to memcmp on big-endian systems.
+#--------------------------------------------------------------------
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <time.h>
+#include <sys/types.h>
+               #include <sys/param.h>
+
 int
 main ()
 {
-extern long timezone;
-           timezone += 1;
-           exit (0);
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #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
-  tcl_cv_timezone_long=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_timezone_long=no
+  ac_cv_c_bigendian=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5
-echo "${ECHO_T}$tcl_cv_timezone_long" >&6
-    if test $tcl_cv_timezone_long = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIMEZONE_VAR 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
-    else
-       #
-       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-       #
-       echo "$as_me:$LINENO: checking time_t timezone variable" >&5
-echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6
-if test "${tcl_cv_timezone_time+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
 
-           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <time.h>
+#include <limits.h>
+
 int
 main ()
 {
-extern time_t timezone;
-               timezone += 1;
-               exit (0);
+#ifndef _BIG_ENDIAN
+                not big endian
+               #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
-  tcl_cv_timezone_time=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_timezone_time=no
+  ac_cv_c_bigendian=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5
-echo "${ECHO_T}$tcl_cv_timezone_time" >&6
-       if test $tcl_cv_timezone_time = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIMEZONE_VAR 1
-_ACEOF
-
-       fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
 
-
-#--------------------------------------------------------------------
-#      Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But
-#      we might be able to use fstatfs instead. Some systems (OpenBSD?) also
-#      lack blkcnt_t.
-#--------------------------------------------------------------------
-
-if test "$ac_cv_cygwin" != "yes"; then
-    echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
-echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
-if test "${ac_cv_member_struct_stat_st_blocks+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
 int
 main ()
 {
-static struct stat ac_aggr;
-if (ac_aggr.st_blocks)
-return 0;
+return use_ascii (foo) == use_ebcdic (foo);
   ;
   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_member_struct_stat_st_blocks=yes
+if ac_fn_c_try_compile "$LINENO"; 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
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
 {
-static struct stat ac_aggr;
-if (sizeof ac_aggr.st_blocks)
-return 0;
+
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
+
   ;
   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_member_struct_stat_st_blocks=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_bigendian=no
+else
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+#--------------------------------------------------------------------
+#      Supply substitutes for missing POSIX library procedures, or
+#      set flags so Tcl uses alternate procedures.
+#--------------------------------------------------------------------
+
+# Check if Posix compliant getcwd exists, if not we'll use getwd.
+for ac_func in getcwd
+do :
+  ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
+if test "x$ac_cv_func_getcwd" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETCWD 1
+_ACEOF
+
+else
+
+$as_echo "#define USEGETWD 1" >>confdefs.h
+
+fi
+done
+
+# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
+# define USEGETWD even if the posix getcwd exists. Add a test ?
+
+ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
+if test "x$ac_cv_func_mkstemp" = xyes; then :
+  $as_echo "#define HAVE_MKSTEMP 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" mkstemp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
+if test "x$ac_cv_func_opendir" = xyes; then :
+  $as_echo "#define HAVE_OPENDIR 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" opendir.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS opendir.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
+if test "x$ac_cv_func_strtol" = xyes; then :
+  $as_echo "#define HAVE_STRTOL 1" >>confdefs.h
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case " $LIBOBJS " in
+  *" strtol.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
+ ;;
+esac
 
-ac_cv_member_struct_stat_st_blocks=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
+if test "x$ac_cv_func_waitpid" = xyes; then :
+  $as_echo "#define HAVE_WAITPID 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" waitpid.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
+ ;;
+esac
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
-echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
-if test $ac_cv_member_struct_stat_st_blocks = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STAT_ST_BLOCKS 1
-_ACEOF
 
+ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
+if test "x$ac_cv_func_strerror" = xyes; then :
+
+else
+
+$as_echo "#define NO_STRERROR 1" >>confdefs.h
 
 fi
-echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
-echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
-if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
+if test "x$ac_cv_func_getwd" = xyes; then :
+
 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
-int
-main ()
-{
-static struct stat ac_aggr;
-if (ac_aggr.st_blksize)
-return 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
-  ac_cv_member_struct_stat_st_blksize=yes
+
+$as_echo "#define NO_GETWD 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
+if test "x$ac_cv_func_wait3" = xyes; then :
+
 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.  */
-$ac_includes_default
-int
-main ()
-{
-static struct stat ac_aggr;
-if (sizeof ac_aggr.st_blksize)
-return 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
-  ac_cv_member_struct_stat_st_blksize=yes
+$as_echo "#define NO_WAIT3 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
+if test "x$ac_cv_func_uname" = xyes; then :
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_member_struct_stat_st_blksize=no
+$as_echo "#define NO_UNAME 1" >>confdefs.h
+
+fi
+
+
+if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
+       test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
+    # prior to Darwin 7, realpath is not threadsafe, so don't
+    # use it when threads are enabled, c.f. bug # 711232
+    ac_cv_func_realpath=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
+if test "x$ac_cv_func_realpath" = xyes; then :
+
+else
+
+$as_echo "#define NO_REALPATH 1" >>confdefs.h
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+       NEED_FAKE_RFC2553=0
+       for ac_func in getnameinfo getaddrinfo freeaddrinfo gai_strerror
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  NEED_FAKE_RFC2553=1
 fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
-echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
-if test $ac_cv_member_struct_stat_st_blksize = yes; then
+done
+
+       ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+"
+if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+#define HAVE_STRUCT_ADDRINFO 1
 _ACEOF
 
 
+else
+  NEED_FAKE_RFC2553=1
 fi
+ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
 
-fi
-echo "$as_me:$LINENO: checking for blkcnt_t" >&5
-echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6
-if test "${ac_cv_type_blkcnt_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.  */
-$ac_includes_default
-int
-main ()
-{
-if ((blkcnt_t *) 0)
-  return 0;
-if (sizeof (blkcnt_t))
-  return 0;
-  ;
-  return 0;
-}
+"
+if test "x$ac_cv_type_struct_in6_addr" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_IN6_ADDR 1
 _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_type_blkcnt_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_blkcnt_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+  NEED_FAKE_RFC2553=1
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5
-echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6
-if test $ac_cv_type_blkcnt_t = yes; then
+ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+"
+if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_BLKCNT_T 1
+#define HAVE_STRUCT_SOCKADDR_IN6 1
 _ACEOF
 
 
+else
+  NEED_FAKE_RFC2553=1
 fi
+ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
 
-echo "$as_me:$LINENO: checking for fstatfs" >&5
-echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6
-if test "${ac_cv_func_fstatfs+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+"
+if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define fstatfs to an innocuous variant, in case <limits.h> declares fstatfs.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define fstatfs innocuous_fstatfs
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char fstatfs (); 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
+else
+  NEED_FAKE_RFC2553=1
+fi
 
-#undef fstatfs
+if test "x$NEED_FAKE_RFC2553" = "x1"; then
 
-/* 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 fstatfs ();
-/* 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_fstatfs) || defined (__stub___fstatfs)
-choke me
-#else
-char (*f) () = fstatfs;
-#endif
-#ifdef __cplusplus
-}
-#endif
+$as_echo "#define NEED_FAKE_RFC2553 1" >>confdefs.h
 
-int
-main ()
-{
-return f != fstatfs;
-  ;
-  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_fstatfs=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   case " $LIBOBJS " in
+  *" fake-rfc2553.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
+ ;;
+esac
 
-ac_cv_func_fstatfs=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5
-echo "${ECHO_T}$ac_cv_func_fstatfs" >&6
-if test $ac_cv_func_fstatfs = yes; then
-  :
-else
+   ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+if test "x$ac_cv_func_strlcpy" = xyes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_FSTATFS 1
-_ACEOF
+fi
 
 fi
 
 
 #--------------------------------------------------------------------
-#       Some system have no memcmp or it does not work with 8 bit data, this
-#       checks it and add memcmp.o to LIBOBJS if needed
+#      Look for thread-safe variants of some library functions.
 #--------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking for working memcmp" >&5
-echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
-if test "${ac_cv_func_memcmp_working+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_memcmp_working=no
+if test "${TCL_THREADS}" = 1; then
+    ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r"
+if test "x$ac_cv_func_getpwuid_r" = xyes; then :
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwuid_r with 5 args" >&5
+$as_echo_n "checking for getpwuid_r with 5 args... " >&6; }
+if ${tcl_cv_api_getpwuid_r_5+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+
+       #include <sys/types.h>
+       #include <pwd.h>
+
 int
 main ()
 {
 
-  /* Some versions of memcmp are not 8-bit clean.  */
-  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
-  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
-    exit (1);
+       uid_t uid;
+       struct passwd pw, *pwp;
+       char buf[512];
+       int buflen = 512;
 
-  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
-     or more and with at least one buffer not starting on a 4-byte boundary.
-     William Lewis provided this test program.   */
-  {
-    char foo[21];
-    char bar[21];
-    int i;
-    for (i = 0; i < 4; i++)
-      {
-       char *a = foo + i;
-       char *b = bar + i;
-       strcpy (a, "--------01111111");
-       strcpy (b, "--------10000000");
-       if (memcmp (a, b, 16) >= 0)
-         exit (1);
-      }
-    exit (0);
-  }
+       (void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
 
   ;
   return 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
-  ac_cv_func_memcmp_working=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_getpwuid_r_5=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_memcmp_working=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+  tcl_cv_api_getpwuid_r_5=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
-echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
-test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
-    "memcmp.$ac_objext"   | \
-  *" memcmp.$ac_objext"   | \
-    "memcmp.$ac_objext "* | \
-  *" memcmp.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
-esac
-
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwuid_r_5" >&5
+$as_echo "$tcl_cv_api_getpwuid_r_5" >&6; }
+    tcl_ok=$tcl_cv_api_getpwuid_r_5
+    if test "$tcl_ok" = yes; then
 
-#--------------------------------------------------------------------
-#       Some system like SunOS 4 and other BSD like systems have no memmove
-#       (we assume they have bcopy instead). {The replacement define is in
-#       compat/string.h}
-#--------------------------------------------------------------------
+$as_echo "#define HAVE_GETPWUID_R_5 1" >>confdefs.h
 
-echo "$as_me:$LINENO: checking for memmove" >&5
-echo $ECHO_N "checking for memmove... $ECHO_C" >&6
-if test "${ac_cv_func_memmove+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwuid_r with 4 args" >&5
+$as_echo_n "checking for getpwuid_r with 4 args... " >&6; }
+if ${tcl_cv_api_getpwuid_r_4+:} false; then :
+  $as_echo_n "(cached) " >&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 memmove to an innocuous variant, in case <limits.h> declares memmove.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define memmove innocuous_memmove
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char memmove (); 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 memmove
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 memmove ();
-/* 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_memmove) || defined (__stub___memmove)
-choke me
-#else
-char (*f) () = memmove;
-#endif
-#ifdef __cplusplus
-}
-#endif
+           #include <sys/types.h>
+           #include <pwd.h>
 
 int
 main ()
 {
-return f != memmove;
+
+           uid_t uid;
+           struct passwd pw;
+           char buf[512];
+           int buflen = 512;
+
+           (void)getpwnam_r(uid, &pw, buf, buflen);
+
   ;
   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_memmove=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_getpwuid_r_4=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_memmove=no
+  tcl_cv_api_getpwuid_r_4=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5
-echo "${ECHO_T}$ac_cv_func_memmove" >&6
-if test $ac_cv_func_memmove = yes; then
-  :
-else
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwuid_r_4" >&5
+$as_echo "$tcl_cv_api_getpwuid_r_4" >&6; }
+       tcl_ok=$tcl_cv_api_getpwuid_r_4
+       if test "$tcl_ok" = yes; then
 
+$as_echo "#define HAVE_GETPWUID_R_4 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_MEMMOVE 1
-_ACEOF
+       fi
+    fi
+    if test "$tcl_ok" = yes; then
 
+$as_echo "#define HAVE_GETPWUID_R 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_STRING_H 1
-_ACEOF
+    fi
 
 fi
 
+    ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r"
+if test "x$ac_cv_func_getpwnam_r" = xyes; then :
 
-#--------------------------------------------------------------------
-#      On some systems strstr is broken: it returns a pointer even even if
-#      the original string is empty.
-#--------------------------------------------------------------------
-
-
-    echo "$as_me:$LINENO: checking for strstr" >&5
-echo $ECHO_N "checking for strstr... $ECHO_C" >&6
-if test "${ac_cv_func_strstr+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam_r with 5 args" >&5
+$as_echo_n "checking for getpwnam_r with 5 args... " >&6; }
+if ${tcl_cv_api_getpwnam_r_5+:} false; then :
+  $as_echo_n "(cached) " >&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 strstr to an innocuous variant, in case <limits.h> declares strstr.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strstr innocuous_strstr
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strstr (); 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 strstr
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 strstr ();
-/* 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_strstr) || defined (__stub___strstr)
-choke me
-#else
-char (*f) () = strstr;
-#endif
-#ifdef __cplusplus
-}
-#endif
+       #include <sys/types.h>
+       #include <pwd.h>
 
 int
 main ()
 {
-return f != strstr;
+
+       char *name;
+       struct passwd pw, *pwp;
+       char buf[512];
+       int buflen = 512;
+
+       (void) getpwnam_r(name, &pw, buf, buflen, &pwp);
+
   ;
   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_strstr=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_getpwnam_r_5=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_strstr=no
+  tcl_cv_api_getpwnam_r_5=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5
-echo "${ECHO_T}$ac_cv_func_strstr" >&6
-if test $ac_cv_func_strstr = yes; then
-  tcl_ok=1
-else
-  tcl_ok=0
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwnam_r_5" >&5
+$as_echo "$tcl_cv_api_getpwnam_r_5" >&6; }
+    tcl_ok=$tcl_cv_api_getpwnam_r_5
+    if test "$tcl_ok" = yes; then
 
-    if test "$tcl_ok" = 1; then
-       echo "$as_me:$LINENO: checking proper strstr implementation" >&5
-echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6
-if test "${tcl_cv_strstr_unbroken+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  tcl_cv_strstr_unbroken=unknown
+$as_echo "#define HAVE_GETPWNAM_R_5 1" >>confdefs.h
+
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam_r with 4 args" >&5
+$as_echo_n "checking for getpwnam_r with 4 args... " >&6; }
+if ${tcl_cv_api_getpwnam_r_4+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int main() {
-    extern int strstr();
-    exit(strstr("\0test", "test") ? 1 : 0);
+
+           #include <sys/types.h>
+           #include <pwd.h>
+
+int
+main ()
+{
+
+           char *name;
+           struct passwd pw;
+           char buf[512];
+           int buflen = 512;
+
+           (void)getpwnam_r(name, &pw, buf, buflen);
+
+  ;
+  return 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
-  tcl_cv_strstr_unbroken=ok
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_getpwnam_r_4=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-tcl_cv_strstr_unbroken=broken
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+  tcl_cv_api_getpwnam_r_4=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5
-echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6
-       if test "$tcl_cv_strstr_unbroken" = "ok"; then
-           tcl_ok=1
-       else
-           tcl_ok=0
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwnam_r_4" >&5
+$as_echo "$tcl_cv_api_getpwnam_r_4" >&6; }
+       tcl_ok=$tcl_cv_api_getpwnam_r_4
+       if test "$tcl_ok" = yes; then
+
+$as_echo "#define HAVE_GETPWNAM_R_4 1" >>confdefs.h
+
        fi
     fi
-    if test "$tcl_ok" = 0; then
-       case $LIBOBJS in
-    "strstr.$ac_objext"   | \
-  *" strstr.$ac_objext"   | \
-    "strstr.$ac_objext "* | \
-  *" strstr.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;;
-esac
+    if test "$tcl_ok" = yes; then
 
-       USE_COMPAT=1
-    fi
+$as_echo "#define HAVE_GETPWNAM_R 1" >>confdefs.h
 
+    fi
 
-#--------------------------------------------------------------------
-#      Check for strtoul function.  This is tricky because under some
-#      versions of AIX strtoul returns an incorrect terminator
-#      pointer for the string "0".
-#--------------------------------------------------------------------
+fi
 
+    ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r"
+if test "x$ac_cv_func_getgrgid_r" = xyes; then :
 
-    echo "$as_me:$LINENO: checking for strtoul" >&5
-echo $ECHO_N "checking for strtoul... $ECHO_C" >&6
-if test "${ac_cv_func_strtoul+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrgid_r with 5 args" >&5
+$as_echo_n "checking for getgrgid_r with 5 args... " >&6; }
+if ${tcl_cv_api_getgrgid_r_5+:} false; then :
+  $as_echo_n "(cached) " >&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 strtoul to an innocuous variant, in case <limits.h> declares strtoul.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strtoul innocuous_strtoul
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtoul (); 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 strtoul
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 strtoul ();
-/* 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_strtoul) || defined (__stub___strtoul)
-choke me
-#else
-char (*f) () = strtoul;
-#endif
-#ifdef __cplusplus
-}
-#endif
+       #include <sys/types.h>
+       #include <grp.h>
 
 int
 main ()
 {
-return f != strtoul;
+
+       gid_t gid;
+       struct group gr, *grp;
+       char buf[512];
+       int buflen = 512;
+
+       (void) getgrgid_r(gid, &gr, buf, buflen, &grp);
+
   ;
   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_strtoul=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_getgrgid_r_5=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_strtoul=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+  tcl_cv_api_getgrgid_r_5=no
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5
-echo "${ECHO_T}$ac_cv_func_strtoul" >&6
-if test $ac_cv_func_strtoul = yes; then
-  tcl_ok=1
-else
-  tcl_ok=0
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrgid_r_5" >&5
+$as_echo "$tcl_cv_api_getgrgid_r_5" >&6; }
+    tcl_ok=$tcl_cv_api_getgrgid_r_5
+    if test "$tcl_ok" = yes; then
 
-    if test "$tcl_ok" = 1; then
-       echo "$as_me:$LINENO: checking proper strtoul implementation" >&5
-echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6
-if test "${tcl_cv_strtoul_unbroken+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  tcl_cv_strtoul_unbroken=unknown
+$as_echo "#define HAVE_GETGRGID_R_5 1" >>confdefs.h
+
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrgid_r with 4 args" >&5
+$as_echo_n "checking for getgrgid_r with 4 args... " >&6; }
+if ${tcl_cv_api_getgrgid_r_4+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int main() {
-    extern int strtoul();
-    char *term, *string = "0";
-    exit(strtoul(string,&term,0) != 0 || term != string+1);
+
+           #include <sys/types.h>
+           #include <grp.h>
+
+int
+main ()
+{
+
+           gid_t gid;
+           struct group gr;
+           char buf[512];
+           int buflen = 512;
+
+           (void)getgrgid_r(gid, &gr, buf, buflen);
+
+  ;
+  return 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
-  tcl_cv_strtoul_unbroken=ok
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_getgrgid_r_4=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-tcl_cv_strtoul_unbroken=broken
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+  tcl_cv_api_getgrgid_r_4=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5
-echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6
-       if test "$tcl_cv_strtoul_unbroken" = "ok"; then
-           tcl_ok=1
-       else
-           tcl_ok=0
-       fi
-    fi
-    if test "$tcl_ok" = 0; then
-       case $LIBOBJS in
-    "strtoul.$ac_objext"   | \
-  *" strtoul.$ac_objext"   | \
-    "strtoul.$ac_objext "* | \
-  *" strtoul.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;;
-esac
-
-       USE_COMPAT=1
-    fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrgid_r_4" >&5
+$as_echo "$tcl_cv_api_getgrgid_r_4" >&6; }
+       tcl_ok=$tcl_cv_api_getgrgid_r_4
+       if test "$tcl_ok" = yes; then
 
+$as_echo "#define HAVE_GETGRGID_R_4 1" >>confdefs.h
 
-#--------------------------------------------------------------------
-#      Check for the strtod function.  This is tricky because in some
-#      versions of Linux strtod mis-parses strings starting with "+".
-#--------------------------------------------------------------------
+       fi
+    fi
+    if test "$tcl_ok" = yes; then
 
+$as_echo "#define HAVE_GETGRGID_R 1" >>confdefs.h
 
-    echo "$as_me:$LINENO: checking for strtod" >&5
-echo $ECHO_N "checking for strtod... $ECHO_C" >&6
-if test "${ac_cv_func_strtod+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 strtod to an innocuous variant, in case <limits.h> declares strtod.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strtod innocuous_strtod
+    fi
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    ac_fn_c_check_func "$LINENO" "getgrnam_r" "ac_cv_func_getgrnam_r"
+if test "x$ac_cv_func_getgrnam_r" = xyes; then :
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrnam_r with 5 args" >&5
+$as_echo_n "checking for getgrnam_r with 5 args... " >&6; }
+if ${tcl_cv_api_getgrnam_r_5+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-#undef strtod
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 strtod ();
-/* 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_strtod) || defined (__stub___strtod)
-choke me
-#else
-char (*f) () = strtod;
-#endif
-#ifdef __cplusplus
-}
-#endif
+       #include <sys/types.h>
+       #include <grp.h>
 
 int
 main ()
 {
-return f != strtod;
+
+       char *name;
+       struct group gr, *grp;
+       char buf[512];
+       int buflen = 512;
+
+       (void) getgrnam_r(name, &gr, buf, buflen, &grp);
+
   ;
   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_strtod=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_getgrnam_r_5=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_strtod=no
+  tcl_cv_api_getgrnam_r_5=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
-echo "${ECHO_T}$ac_cv_func_strtod" >&6
-if test $ac_cv_func_strtod = yes; then
-  tcl_ok=1
-else
-  tcl_ok=0
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrnam_r_5" >&5
+$as_echo "$tcl_cv_api_getgrnam_r_5" >&6; }
+    tcl_ok=$tcl_cv_api_getgrnam_r_5
+    if test "$tcl_ok" = yes; then
 
-    if test "$tcl_ok" = 1; then
-       echo "$as_me:$LINENO: checking proper strtod implementation" >&5
-echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6
-if test "${tcl_cv_strtod_unbroken+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  tcl_cv_strtod_unbroken=unknown
+$as_echo "#define HAVE_GETGRNAM_R_5 1" >>confdefs.h
+
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrnam_r with 4 args" >&5
+$as_echo_n "checking for getgrnam_r with 4 args... " >&6; }
+if ${tcl_cv_api_getgrnam_r_4+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int main() {
-    extern double strtod();
-    char *term, *string = " +69";
-    exit(strtod(string,&term) != 69 || term != string+4);
+
+           #include <sys/types.h>
+           #include <grp.h>
+
+int
+main ()
+{
+
+           char *name;
+           struct group gr;
+           char buf[512];
+           int buflen = 512;
+
+           (void)getgrnam_r(name, &gr, buf, buflen);
+
+  ;
+  return 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
-  tcl_cv_strtod_unbroken=ok
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_getgrnam_r_4=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-tcl_cv_strtod_unbroken=broken
+  tcl_cv_api_getgrnam_r_4=no
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5
-echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6
-       if test "$tcl_cv_strtod_unbroken" = "ok"; then
-           tcl_ok=1
-       else
-           tcl_ok=0
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrnam_r_4" >&5
+$as_echo "$tcl_cv_api_getgrnam_r_4" >&6; }
+       tcl_ok=$tcl_cv_api_getgrnam_r_4
+       if test "$tcl_ok" = yes; then
+
+$as_echo "#define HAVE_GETGRNAM_R_4 1" >>confdefs.h
+
        fi
     fi
-    if test "$tcl_ok" = 0; then
-       case $LIBOBJS in
-    "strtod.$ac_objext"   | \
-  *" strtod.$ac_objext"   | \
-    "strtod.$ac_objext "* | \
-  *" strtod.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;;
-esac
+    if test "$tcl_ok" = yes; then
+
+$as_echo "#define HAVE_GETGRNAM_R 1" >>confdefs.h
 
-       USE_COMPAT=1
     fi
 
+fi
 
-#--------------------------------------------------------------------
-#      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" that corrects the error.
-#--------------------------------------------------------------------
+    if test "`uname -s`" = "Darwin" && \
+           test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
+       # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
+       # are actually MT-safe as they always return pointers
+       # from TSD instead of static storage.
 
+$as_echo "#define HAVE_MTSAFE_GETHOSTBYNAME 1" >>confdefs.h
 
-    echo "$as_me:$LINENO: checking for strtod" >&5
-echo $ECHO_N "checking for strtod... $ECHO_C" >&6
-if test "${ac_cv_func_strtod+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 strtod to an innocuous variant, in case <limits.h> declares strtod.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strtod innocuous_strtod
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strtod (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+$as_echo "#define HAVE_MTSAFE_GETHOSTBYADDR 1" >>confdefs.h
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef strtod
+    elif test "`uname -s`" = "HP-UX" && \
+             test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
+        # Starting with HPUX 11.00 (we believe), gethostbyX
+        # are actually MT-safe as they always return pointers
+       # from TSD instead of static storage.
+
+$as_echo "#define HAVE_MTSAFE_GETHOSTBYNAME 1" >>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 strtod ();
-/* 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_strtod) || defined (__stub___strtod)
-choke me
-#else
-char (*f) () = strtod;
-#endif
-#ifdef __cplusplus
-}
-#endif
+
+$as_echo "#define HAVE_MTSAFE_GETHOSTBYADDR 1" >>confdefs.h
+
+
+    else
+       ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
+if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 6 args" >&5
+$as_echo_n "checking for gethostbyname_r with 6 args... " >&6; }
+if ${tcl_cv_api_gethostbyname_r_6+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+       #include <netdb.h>
 
 int
 main ()
 {
-return f != strtod;
+
+       char *name;
+       struct hostent *he, *res;
+       char buffer[2048];
+       int buflen = 2048;
+       int h_errnop;
+
+       (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
+
   ;
   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_strtod=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_gethostbyname_r_6=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_strtod=no
+  tcl_cv_api_gethostbyname_r_6=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
-echo "${ECHO_T}$ac_cv_func_strtod" >&6
-if test $ac_cv_func_strtod = yes; then
-  tcl_strtod=1
-else
-  tcl_strtod=0
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyname_r_6" >&5
+$as_echo "$tcl_cv_api_gethostbyname_r_6" >&6; }
+    tcl_ok=$tcl_cv_api_gethostbyname_r_6
+    if test "$tcl_ok" = yes; then
 
-    if test "$tcl_strtod" = 1; then
-       echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5
-echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6
-if test "${tcl_cv_strtod_buggy+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+$as_echo "#define HAVE_GETHOSTBYNAME_R_6 1" >>confdefs.h
 
-           if test "$cross_compiling" = yes; then
-  tcl_cv_strtod_buggy=buggy
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 5 args" >&5
+$as_echo_n "checking for gethostbyname_r with 5 args... " >&6; }
+if ${tcl_cv_api_gethostbyname_r_5+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-               extern double strtod();
-               int main() {
-                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
-                   char *term;
-                   double value;
-                   value = strtod(infString, &term);
-                   if ((term != infString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(nanString, &term);
-                   if ((term != nanString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(spaceString, &term);
-                   if (term == (spaceString+1)) {
-                       exit(1);
-                   }
-                   exit(0);
-               }
+           #include <netdb.h>
+
+int
+main ()
+{
+
+           char *name;
+           struct hostent *he;
+           char buffer[2048];
+           int buflen = 2048;
+           int h_errnop;
+
+           (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
+
+  ;
+  return 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
-  tcl_cv_strtod_buggy=ok
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_gethostbyname_r_5=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-tcl_cv_strtod_buggy=buggy
+  tcl_cv_api_gethostbyname_r_5=no
 fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5
-echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6
-       if test "$tcl_cv_strtod_buggy" = buggy; then
-           case $LIBOBJS in
-    "fixstrtod.$ac_objext"   | \
-  *" fixstrtod.$ac_objext"   | \
-    "fixstrtod.$ac_objext "* | \
-  *" fixstrtod.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;;
-esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyname_r_5" >&5
+$as_echo "$tcl_cv_api_gethostbyname_r_5" >&6; }
+       tcl_ok=$tcl_cv_api_gethostbyname_r_5
+       if test "$tcl_ok" = yes; then
 
-           USE_COMPAT=1
+$as_echo "#define HAVE_GETHOSTBYNAME_R_5 1" >>confdefs.h
+
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 3 args" >&5
+$as_echo_n "checking for gethostbyname_r with 3 args... " >&6; }
+if ${tcl_cv_api_gethostbyname_r_3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+               #include <netdb.h>
+
+int
+main ()
+{
+
+               char *name;
+               struct hostent *he;
+               struct hostent_data data;
+
+               (void) gethostbyname_r(name, he, &data);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_gethostbyname_r_3=yes
+else
+  tcl_cv_api_gethostbyname_r_3=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyname_r_3" >&5
+$as_echo "$tcl_cv_api_gethostbyname_r_3" >&6; }
+           tcl_ok=$tcl_cv_api_gethostbyname_r_3
+           if test "$tcl_ok" = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define strtod fixstrtod
-_ACEOF
+$as_echo "#define HAVE_GETHOSTBYNAME_R_3 1" >>confdefs.h
 
+           fi
        fi
     fi
+    if test "$tcl_ok" = yes; then
+
+$as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
+
+    fi
 
+fi
 
-#--------------------------------------------------------------------
-#      Check for various typedefs and provide substitutes if
-#      they don't exist.
-#--------------------------------------------------------------------
+       ac_fn_c_check_func "$LINENO" "gethostbyaddr_r" "ac_cv_func_gethostbyaddr_r"
+if test "x$ac_cv_func_gethostbyaddr_r" = xyes; then :
 
-echo "$as_me:$LINENO: checking for mode_t" >&5
-echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
-if test "${ac_cv_type_mode_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr_r with 7 args" >&5
+$as_echo_n "checking for gethostbyaddr_r with 7 args... " >&6; }
+if ${tcl_cv_api_gethostbyaddr_r_7+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+
+       #include <netdb.h>
+
 int
 main ()
 {
-if ((mode_t *) 0)
-  return 0;
-if (sizeof (mode_t))
-  return 0;
+
+       char *addr;
+       int length;
+       int type;
+       struct hostent *result;
+       char buffer[2048];
+       int buflen = 2048;
+       int h_errnop;
+
+       (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
+                              &h_errnop);
+
   ;
   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_type_mode_t=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_gethostbyaddr_r_7=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_mode_t=no
+  tcl_cv_api_gethostbyaddr_r_7=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
-echo "${ECHO_T}$ac_cv_type_mode_t" >&6
-if test $ac_cv_type_mode_t = yes; then
-  :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define mode_t int
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyaddr_r_7" >&5
+$as_echo "$tcl_cv_api_gethostbyaddr_r_7" >&6; }
+    tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
+    if test "$tcl_ok" = yes; then
 
-fi
+$as_echo "#define HAVE_GETHOSTBYADDR_R_7 1" >>confdefs.h
 
-echo "$as_me:$LINENO: checking for pid_t" >&5
-echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
-if test "${ac_cv_type_pid_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr_r with 8 args" >&5
+$as_echo_n "checking for gethostbyaddr_r with 8 args... " >&6; }
+if ${tcl_cv_api_gethostbyaddr_r_8+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+
+           #include <netdb.h>
+
 int
 main ()
 {
-if ((pid_t *) 0)
-  return 0;
-if (sizeof (pid_t))
-  return 0;
+
+           char *addr;
+           int length;
+           int type;
+           struct hostent *result, *resultp;
+           char buffer[2048];
+           int buflen = 2048;
+           int h_errnop;
+
+           (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
+                                  &resultp, &h_errnop);
+
   ;
   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_type_pid_t=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_api_gethostbyaddr_r_8=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  tcl_cv_api_gethostbyaddr_r_8=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyaddr_r_8" >&5
+$as_echo "$tcl_cv_api_gethostbyaddr_r_8" >&6; }
+       tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
+       if test "$tcl_ok" = yes; then
+
+$as_echo "#define HAVE_GETHOSTBYADDR_R_8 1" >>confdefs.h
+
+       fi
+    fi
+    if test "$tcl_ok" = yes; then
+
+$as_echo "#define HAVE_GETHOSTBYADDR_R 1" >>confdefs.h
+
+    fi
 
-ac_cv_type_pid_t=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    fi
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-echo "${ECHO_T}$ac_cv_type_pid_t" >&6
-if test $ac_cv_type_pid_t = yes; then
-  :
-else
 
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
+#---------------------------------------------------------------------------
+#      Check for serial port interface.
+#
+#      termios.h is present on all POSIX systems.
+#      sys/ioctl.h is almost always present, though what it contains
+#      is system-specific.
+#      sys/modem.h is needed on HP-UX.
+#---------------------------------------------------------------------------
+
+for ac_header in termios.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
+if test "x$ac_cv_header_termios_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TERMIOS_H 1
 _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+done
+
+for ac_header in sys/ioctl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ioctl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_IOCTL_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/modem.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_modem_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_MODEM_H 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+fi
+
+done
+
+
+#--------------------------------------------------------------------
+#      Include sys/select.h if it exists and if it supplies things
+#      that appear to be useful and aren't already in sys/types.h.
+#      This appears to be true only on the RS/6000 under AIX.  Some
+#      systems like OSF/1 have a sys/select.h that's of no use, and
+#      other systems like SCO UNIX have a sys/select.h that's
+#      pernicious.  If "fd_set" isn't defined anywhere then set a
+#      special flag.
+#--------------------------------------------------------------------
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd_set in sys/types" >&5
+$as_echo_n "checking for fd_set in sys/types... " >&6; }
+if ${tcl_cv_type_fd_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <sys/types.h>
 int
 main ()
 {
-if ((size_t *) 0)
-  return 0;
-if (sizeof (size_t))
-  return 0;
+fd_set readMask, writeMask;
   ;
   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_type_size_t=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_type_fd_set=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
+  tcl_cv_type_fd_set=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
-  :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_type_fd_set" >&5
+$as_echo "$tcl_cv_type_fd_set" >&6; }
+tcl_ok=$tcl_cv_type_fd_set
+if test $tcl_ok = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd_mask in sys/select" >&5
+$as_echo_n "checking for fd_mask in sys/select... " >&6; }
+if ${tcl_cv_grep_fd_mask+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
-echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
-if test "${ac_cv_type_uid_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
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
+#include <sys/select.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "uid_t" >/dev/null 2>&1; then
-  ac_cv_type_uid_t=yes
+  $EGREP "fd_mask" >/dev/null 2>&1; then :
+  tcl_cv_grep_fd_mask=present
 else
-  ac_cv_type_uid_t=no
+  tcl_cv_grep_fd_mask=missing
 fi
 rm -f conftest*
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
-echo "${ECHO_T}$ac_cv_type_uid_t" >&6
-if test $ac_cv_type_uid_t = no; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_grep_fd_mask" >&5
+$as_echo "$tcl_cv_grep_fd_mask" >&6; }
+    if test $tcl_cv_grep_fd_mask = present; then
 
-cat >>confdefs.h <<\_ACEOF
-#define uid_t int
-_ACEOF
+$as_echo "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
 
+       tcl_ok=yes
+    fi
+fi
+if test $tcl_ok = no; then
 
-cat >>confdefs.h <<\_ACEOF
-#define gid_t int
-_ACEOF
+$as_echo "#define NO_FD_SET 1" >>confdefs.h
 
 fi
 
+#------------------------------------------------------------------------------
+#       Find out all about time handling differences.
+#------------------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking for socklen_t" >&5
-echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
-if test "${tcl_cv_type_socklen_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+    for ac_header in sys/time.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIME_H 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-       #include <sys/types.h>
-       #include <sys/socket.h>
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
 
 int
 main ()
 {
-
-       socklen_t foo;
-
+if ((struct tm *) 0)
+return 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_cv_type_socklen_t=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_time=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_type_socklen_t=no
+  ac_cv_header_time=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5
-echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6
-if test $tcl_cv_type_socklen_t = no; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define socklen_t int
+fi
+
+
+    for ac_func in gmtime_r localtime_r mktime
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
+done
+
 
-echo "$as_me:$LINENO: checking for intptr_t" >&5
-echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
-if test "${ac_cv_type_intptr_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking tm_tzadj in struct tm" >&5
+$as_echo_n "checking tm_tzadj in struct tm... " >&6; }
+if ${tcl_cv_member_tm_tzadj+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <time.h>
 int
 main ()
 {
-if ((intptr_t *) 0)
-  return 0;
-if (sizeof (intptr_t))
-  return 0;
+struct tm tm; tm.tm_tzadj;
   ;
   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_type_intptr_t=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_member_tm_tzadj=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_intptr_t=no
+  tcl_cv_member_tm_tzadj=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
-echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
-if test $ac_cv_type_intptr_t = yes; then
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_member_tm_tzadj" >&5
+$as_echo "$tcl_cv_member_tm_tzadj" >&6; }
+    if test $tcl_cv_member_tm_tzadj = yes ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INTPTR_T 1
-_ACEOF
+$as_echo "#define HAVE_TM_TZADJ 1" >>confdefs.h
 
-else
+    fi
 
-    echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5
-echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6
-if test "${tcl_cv_intptr_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking tm_gmtoff in struct tm" >&5
+$as_echo_n "checking tm_gmtoff in struct tm... " >&6; }
+if ${tcl_cv_member_tm_gmtoff+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-    for tcl_cv_intptr_t in "int" "long" "long long" none; do
-       if test "$tcl_cv_intptr_t" != none; then
-           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <time.h>
 int
 main ()
 {
-static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
-test_array [0] = 0
-
+struct tm tm; tm.tm_gmtoff;
   ;
   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=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_member_tm_gmtoff=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_ok=no
+  tcl_cv_member_tm_gmtoff=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-           test "$tcl_ok" = yes && break; fi
-    done
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5
-echo "${ECHO_T}$tcl_cv_intptr_t" >&6
-    if test "$tcl_cv_intptr_t" != none; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_member_tm_gmtoff" >&5
+$as_echo "$tcl_cv_member_tm_gmtoff" >&6; }
+    if test $tcl_cv_member_tm_gmtoff = yes ; then
 
-cat >>confdefs.h <<_ACEOF
-#define intptr_t $tcl_cv_intptr_t
-_ACEOF
+$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
 
     fi
 
-fi
-
-echo "$as_me:$LINENO: checking for uintptr_t" >&5
-echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
-if test "${ac_cv_type_uintptr_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    #
+    # Its important to include time.h in this check, as some systems
+    # (like convex) have timezone functions, etc.
+    #
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking long timezone variable" >&5
+$as_echo_n "checking long timezone variable... " >&6; }
+if ${tcl_cv_timezone_long+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <time.h>
 int
 main ()
 {
-if ((uintptr_t *) 0)
-  return 0;
-if (sizeof (uintptr_t))
-  return 0;
+extern long timezone;
+           timezone += 1;
+           exit (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
-  ac_cv_type_uintptr_t=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_timezone_long=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uintptr_t=no
+  tcl_cv_timezone_long=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
-echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
-if test $ac_cv_type_uintptr_t = yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_timezone_long" >&5
+$as_echo "$tcl_cv_timezone_long" >&6; }
+    if test $tcl_cv_timezone_long = yes ; then
 
-else
+$as_echo "#define HAVE_TIMEZONE_VAR 1" >>confdefs.h
 
-    echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5
-echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6
-if test "${tcl_cv_uintptr_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    else
+       #
+       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+       #
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking time_t timezone variable" >&5
+$as_echo_n "checking time_t timezone variable... " >&6; }
+if ${tcl_cv_timezone_time+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-    for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
-           none; do
-       if test "$tcl_cv_uintptr_t" != none; then
-           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <time.h>
 int
 main ()
 {
-static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))];
-test_array [0] = 0
-
+extern time_t timezone;
+               timezone += 1;
+               exit (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_ok=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_timezone_time=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_ok=no
+  tcl_cv_timezone_time=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-           test "$tcl_ok" = yes && break; fi
-    done
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5
-echo "${ECHO_T}$tcl_cv_uintptr_t" >&6
-    if test "$tcl_cv_uintptr_t" != none; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_timezone_time" >&5
+$as_echo "$tcl_cv_timezone_time" >&6; }
+       if test $tcl_cv_timezone_time = yes ; then
 
-cat >>confdefs.h <<_ACEOF
-#define uintptr_t $tcl_cv_uintptr_t
-_ACEOF
+$as_echo "#define HAVE_TIMEZONE_VAR 1" >>confdefs.h
 
+       fi
     fi
 
-fi
-
 
 #--------------------------------------------------------------------
-#      If a system doesn't have an opendir function (man, that's old!)
-#      then we have to supply a different version of dirent.h which
-#      is compatible with the substitute version of opendir that's
-#      provided.  This version only works with V7-style directories.
+#      Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But
+#      we might be able to use fstatfs instead. Some systems (OpenBSD?) also
+#      lack blkcnt_t.
 #--------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking for opendir" >&5
-echo $ECHO_N "checking for opendir... $ECHO_C" >&6
-if test "${ac_cv_func_opendir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+if test "$ac_cv_cygwin" != "yes"; then
+    ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLOCKS 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define opendir to an innocuous variant, in case <limits.h> declares opendir.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define opendir innocuous_opendir
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char opendir (); 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
+fi
+ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
 
-#undef opendir
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+_ACEOF
 
-/* 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 opendir ();
-/* 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_opendir) || defined (__stub___opendir)
-choke me
-#else
-char (*f) () = opendir;
-#endif
-#ifdef __cplusplus
-}
-#endif
 
-int
-main ()
-{
-return f != opendir;
-  ;
-  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_opendir=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+fi
 
-ac_cv_func_opendir=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+ac_fn_c_check_type "$LINENO" "blkcnt_t" "ac_cv_type_blkcnt_t" "$ac_includes_default"
+if test "x$ac_cv_type_blkcnt_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_BLKCNT_T 1
+_ACEOF
+
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5
-echo "${ECHO_T}$ac_cv_func_opendir" >&6
-if test $ac_cv_func_opendir = yes; then
-  :
+
+ac_fn_c_check_func "$LINENO" "fstatfs" "ac_cv_func_fstatfs"
+if test "x$ac_cv_func_fstatfs" = xyes; then :
+
 else
 
-cat >>confdefs.h <<\_ACEOF
-#define USE_DIRENT2_H 1
-_ACEOF
+$as_echo "#define NO_FSTATFS 1" >>confdefs.h
 
 fi
 
 
 #--------------------------------------------------------------------
-#      The check below checks whether <sys/wait.h> defines the type
-#      "union wait" correctly.  It's needed because of weirdness in
-#      HP-UX where "union wait" is defined in both the BSD and SYS-V
-#      environments.  Checking the usability of WIFEXITED seems to do
-#      the trick.
+#       Some system have no memcmp or it does not work with 8 bit data, this
+#       checks it and add memcmp.o to LIBOBJS if needed
 #--------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking union wait" >&5
-echo $ECHO_N "checking union wait... $ECHO_C" >&6
-if test "${tcl_cv_union_wait+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
+$as_echo_n "checking for working memcmp... " >&6; }
+if ${ac_cv_func_memcmp_working+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_memcmp_working=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/wait.h>
+$ac_includes_default
 int
 main ()
 {
 
-union wait x;
-WIFEXITED(x);          /* Generates compiler error if WIFEXITED
-                        * uses an int. */
+  /* Some versions of memcmp are not 8-bit clean.  */
+  char c0 = '\100', c1 = '\200', c2 = '\201';
+  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+    return 1;
+
+  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+     or more and with at least one buffer not starting on a 4-byte boundary.
+     William Lewis provided this test program.   */
+  {
+    char foo[21];
+    char bar[21];
+    int i;
+    for (i = 0; i < 4; i++)
+      {
+       char *a = foo + i;
+       char *b = bar + i;
+       strcpy (a, "--------01111111");
+       strcpy (b, "--------10000000");
+       if (memcmp (a, b, 16) >= 0)
+         return 1;
+      }
+    return 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
-  tcl_cv_union_wait=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_memcmp_working=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_union_wait=no
+  ac_cv_func_memcmp_working=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5
-echo "${ECHO_T}$tcl_cv_union_wait" >&6
-if test $tcl_cv_union_wait = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_UNION_WAIT 1
-_ACEOF
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
+$as_echo "$ac_cv_func_memcmp_working" >&6; }
+test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
+  *" memcmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+ ;;
+esac
+
+
 
 #--------------------------------------------------------------------
-#      Check whether there is an strncasecmp function on this system.
-#      This is a bit tricky because under SCO it's in -lsocket and
-#      under Sequent Dynix it's in -linet.
+#       Some system like SunOS 4 and other BSD like systems have no memmove
+#       (we assume they have bcopy instead). {The replacement define is in
+#       compat/string.h}
 #--------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking for strncasecmp" >&5
-echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6
-if test "${ac_cv_func_strncasecmp+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
+if test "x$ac_cv_func_memmove" = xyes; then :
+
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define strncasecmp to an innocuous variant, in case <limits.h> declares strncasecmp.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strncasecmp innocuous_strncasecmp
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strncasecmp (); 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
+$as_echo "#define NO_MEMMOVE 1" >>confdefs.h
 
-#undef strncasecmp
 
-/* 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 strncasecmp ();
-/* 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_strncasecmp) || defined (__stub___strncasecmp)
-choke me
-#else
-char (*f) () = strncasecmp;
-#endif
-#ifdef __cplusplus
-}
-#endif
+$as_echo "#define NO_STRING_H 1" >>confdefs.h
 
-int
-main ()
-{
-return f != strncasecmp;
-  ;
-  return 0;
+fi
+
+
+#--------------------------------------------------------------------
+#      On some systems strstr is broken: it returns a pointer even even if
+#      the original string is empty.
+#--------------------------------------------------------------------
+
+
+    ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
+if test "x$ac_cv_func_strstr" = xyes; then :
+  tcl_ok=1
+else
+  tcl_ok=0
+fi
+
+    if test "$tcl_ok" = 1; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking proper strstr implementation" >&5
+$as_echo_n "checking proper strstr implementation... " >&6; }
+if ${tcl_cv_strstr_unbroken+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  tcl_cv_strstr_unbroken=unknown
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main() {
+    extern int strstr();
+    exit(strstr("\0test", "test") ? 1 : 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_strncasecmp=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  tcl_cv_strstr_unbroken=ok
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  tcl_cv_strstr_unbroken=broken
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strstr_unbroken" >&5
+$as_echo "$tcl_cv_strstr_unbroken" >&6; }
+       if test "$tcl_cv_strstr_unbroken" = "ok"; then
+           tcl_ok=1
+       else
+           tcl_ok=0
+       fi
+    fi
+    if test "$tcl_ok" = 0; then
+       case " $LIBOBJS " in
+  *" strstr.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
+ ;;
+esac
+
+       USE_COMPAT=1
+    fi
+
+
+#--------------------------------------------------------------------
+#      Check for strtoul function.  This is tricky because under some
+#      versions of AIX strtoul returns an incorrect terminator
+#      pointer for the string "0".
+#--------------------------------------------------------------------
 
-ac_cv_func_strncasecmp=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5
-echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6
-if test $ac_cv_func_strncasecmp = yes; then
+
+    ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
+if test "x$ac_cv_func_strtoul" = xyes; then :
   tcl_ok=1
 else
   tcl_ok=0
 fi
 
-if test "$tcl_ok" = 0; then
-    echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5
-echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6
-if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    if test "$tcl_ok" = 1; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking proper strtoul implementation" >&5
+$as_echo_n "checking proper strtoul implementation... " >&6; }
+if ${tcl_cv_strtoul_unbroken+:} false; then :
+  $as_echo_n "(cached) " >&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
+  if test "$cross_compiling" = yes; then :
+  tcl_cv_strtoul_unbroken=unknown
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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 strncasecmp ();
-int
-main ()
-{
-strncasecmp ();
-  ;
-  return 0;
+int main() {
+    extern int strtoul();
+    char *term, *string = "0";
+    exit(strtoul(string,&term,0) != 0 || term != string+1);
 }
 _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_strncasecmp=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  tcl_cv_strtoul_unbroken=ok
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_socket_strncasecmp=no
+  tcl_cv_strtoul_unbroken=broken
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6
-if test $ac_cv_lib_socket_strncasecmp = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtoul_unbroken" >&5
+$as_echo "$tcl_cv_strtoul_unbroken" >&6; }
+       if test "$tcl_cv_strtoul_unbroken" = "ok"; then
+           tcl_ok=1
+       else
+           tcl_ok=0
+       fi
+    fi
+    if test "$tcl_ok" = 0; then
+       case " $LIBOBJS " in
+  *" strtoul.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
+ ;;
+esac
+
+       USE_COMPAT=1
+    fi
+
+
+#--------------------------------------------------------------------
+#      Check for the strtod function.  This is tricky because in some
+#      versions of Linux strtod mis-parses strings starting with "+".
+#--------------------------------------------------------------------
+
+
+    ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
+if test "x$ac_cv_func_strtod" = xyes; then :
   tcl_ok=1
 else
   tcl_ok=0
 fi
 
-fi
-if test "$tcl_ok" = 0; then
-    echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5
-echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6
-if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    if test "$tcl_ok" = 1; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking proper strtod implementation" >&5
+$as_echo_n "checking proper strtod implementation... " >&6; }
+if ${tcl_cv_strtod_unbroken+:} false; then :
+  $as_echo_n "(cached) " >&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
+  if test "$cross_compiling" = yes; then :
+  tcl_cv_strtod_unbroken=unknown
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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 strncasecmp ();
-int
-main ()
-{
-strncasecmp ();
-  ;
-  return 0;
+int main() {
+    extern double strtod();
+    char *term, *string = " +69";
+    exit(strtod(string,&term) != 69 || term != string+4);
 }
 _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_strncasecmp=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  tcl_cv_strtod_unbroken=ok
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  tcl_cv_strtod_unbroken=broken
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-ac_cv_lib_inet_strncasecmp=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtod_unbroken" >&5
+$as_echo "$tcl_cv_strtod_unbroken" >&6; }
+       if test "$tcl_cv_strtod_unbroken" = "ok"; then
+           tcl_ok=1
+       else
+           tcl_ok=0
+       fi
+    fi
+    if test "$tcl_ok" = 0; then
+       case " $LIBOBJS " in
+  *" strtod.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
+ ;;
+esac
+
+       USE_COMPAT=1
+    fi
+
+
+#--------------------------------------------------------------------
+#      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" that corrects the error.
+#--------------------------------------------------------------------
+
+
+    ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
+if test "x$ac_cv_func_strtod" = xyes; then :
+  tcl_strtod=1
+else
+  tcl_strtod=0
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5
-echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6
-if test $ac_cv_lib_inet_strncasecmp = yes; then
-  tcl_ok=1
+
+    if test "$tcl_strtod" = 1; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris2.4/Tru64 strtod bugs" >&5
+$as_echo_n "checking for Solaris2.4/Tru64 strtod bugs... " >&6; }
+if ${tcl_cv_strtod_buggy+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  tcl_ok=0
+
+           if test "$cross_compiling" = yes; then :
+  tcl_cv_strtod_buggy=buggy
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+               extern double strtod();
+               int main() {
+                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
+                   char *term;
+                   double value;
+                   value = strtod(infString, &term);
+                   if ((term != infString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(nanString, &term);
+                   if ((term != nanString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(spaceString, &term);
+                   if (term == (spaceString+1)) {
+                       exit(1);
+                   }
+                   exit(0);
+               }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  tcl_cv_strtod_buggy=ok
+else
+  tcl_cv_strtod_buggy=buggy
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 fi
-if test "$tcl_ok" = 0; then
-    case $LIBOBJS in
-    "strncasecmp.$ac_objext"   | \
-  *" strncasecmp.$ac_objext"   | \
-    "strncasecmp.$ac_objext "* | \
-  *" strncasecmp.$ac_objext "* ) ;;
 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtod_buggy" >&5
+$as_echo "$tcl_cv_strtod_buggy" >&6; }
+       if test "$tcl_cv_strtod_buggy" = buggy; then
+           case " $LIBOBJS " in
+  *" fixstrtod.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext"
+ ;;
 esac
 
-    USE_COMPAT=1
-fi
+           USE_COMPAT=1
+
+$as_echo "#define strtod fixstrtod" >>confdefs.h
+
+       fi
+    fi
+
 
 #--------------------------------------------------------------------
-#      The code below deals with several issues related to gettimeofday:
-#      1. Some systems don't provide a gettimeofday function at all
-#         (set NO_GETTOD if this is the case).
-#      2. See if gettimeofday is declared in the <sys/time.h> header file.
-#         if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
-#         declare it.
+#      Check for various typedefs and provide substitutes if
+#      they don't exist.
 #--------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking for gettimeofday" >&5
-echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
-if test "${ac_cv_func_gettimeofday+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = xyes; then :
+
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define gettimeofday to an innocuous variant, in case <limits.h> declares gettimeofday.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define gettimeofday innocuous_gettimeofday
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char gettimeofday (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
 
-#undef gettimeofday
+else
 
-/* 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 ();
-/* 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_gettimeofday) || defined (__stub___gettimeofday)
-choke me
-#else
-char (*f) () = gettimeofday;
-#endif
-#ifdef __cplusplus
-}
-#endif
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
 
-int
-main ()
-{
-return f != gettimeofday;
-  ;
-  return 0;
-}
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
 _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_gettimeofday=yes
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
 
-ac_cv_func_gettimeofday=no
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then :
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5
-echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
-if test $ac_cv_func_gettimeofday = yes; then
-  :
-else
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
 
+$as_echo "#define uid_t int" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_GETTOD 1
-_ACEOF
 
+$as_echo "#define gid_t int" >>confdefs.h
 
 fi
 
-echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5
-echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6
-if test "${tcl_cv_grep_gettimeofday+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
+$as_echo_n "checking for socklen_t... " >&6; }
+if ${tcl_cv_type_socklen_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/time.h>
 
+       #include <sys/types.h>
+       #include <sys/socket.h>
+
+int
+main ()
+{
+
+       socklen_t foo;
+
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gettimeofday" >/dev/null 2>&1; then
-  tcl_cv_grep_gettimeofday=present
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_type_socklen_t=yes
 else
-  tcl_cv_grep_gettimeofday=missing
+  tcl_cv_type_socklen_t=no
 fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_type_socklen_t" >&5
+$as_echo "$tcl_cv_type_socklen_t" >&6; }
+if test $tcl_cv_type_socklen_t = no; then
+
+$as_echo "#define socklen_t int" >>confdefs.h
 
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5
-echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6
-if test $tcl_cv_grep_gettimeofday = missing ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define GETTOD_NOT_DECLARED 1
-_ACEOF
+ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_intptr_t" = xyes; then :
 
-fi
 
-#--------------------------------------------------------------------
-#      The following code checks to see whether it is possible to get
-#      signed chars on this platform.  This is needed in order to
-#      properly generate sign-extended ints from character values.
-#--------------------------------------------------------------------
+$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
 
+else
 
-echo "$as_me:$LINENO: checking whether char is unsigned" >&5
-echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
-if test "${ac_cv_c_char_unsigned+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size signed integer type" >&5
+$as_echo_n "checking for pointer-size signed integer type... " >&6; }
+if ${tcl_cv_intptr_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+    for tcl_cv_intptr_t in "int" "long" "long long" none; do
+       if test "$tcl_cv_intptr_t" != none; then
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
 {
-static int test_array [1 - 2 * !(((char) -1) < 0)];
-test_array [0] = 0
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
+test_array [0] = 0;
+return test_array [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
-  ac_cv_c_char_unsigned=no
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_ok=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_char_unsigned=yes
+  tcl_ok=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           test "$tcl_ok" = yes && break; fi
+    done
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
-echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
-if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define __CHAR_UNSIGNED__ 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_intptr_t" >&5
+$as_echo "$tcl_cv_intptr_t" >&6; }
+    if test "$tcl_cv_intptr_t" != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define intptr_t $tcl_cv_intptr_t
 _ACEOF
 
+    fi
+
 fi
 
-echo "$as_me:$LINENO: checking signed char declarations" >&5
-echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6
-if test "${tcl_cv_char_signed+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+
+$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+
 else
 
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size unsigned integer type" >&5
+$as_echo_n "checking for pointer-size unsigned integer type... " >&6; }
+if ${tcl_cv_uintptr_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+    for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
+           none; do
+       if test "$tcl_cv_uintptr_t" != none; then
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
 int
 main ()
 {
-
-       signed char *p;
-       p = 0;
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))];
+test_array [0] = 0;
+return test_array [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_cv_char_signed=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_ok=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_char_signed=no
+  tcl_ok=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           test "$tcl_ok" = yes && break; fi
+    done
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5
-echo "${ECHO_T}$tcl_cv_char_signed" >&6
-if test $tcl_cv_char_signed = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_uintptr_t" >&5
+$as_echo "$tcl_cv_uintptr_t" >&6; }
+    if test "$tcl_cv_uintptr_t" != none; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SIGNED_CHAR 1
+cat >>confdefs.h <<_ACEOF
+#define uintptr_t $tcl_cv_uintptr_t
 _ACEOF
 
+    fi
+
 fi
 
+
 #--------------------------------------------------------------------
-#  Does putenv() copy or not?  We need to know to avoid memory leaks.
+#      If a system doesn't have an opendir function (man, that's old!)
+#      then we have to supply a different version of dirent.h which
+#      is compatible with the substitute version of opendir that's
+#      provided.  This version only works with V7-style directories.
 #--------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5
-echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6
-if test "${tcl_cv_putenv_copy+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
+if test "x$ac_cv_func_opendir" = xyes; then :
+
 else
 
-    if test "$cross_compiling" = yes; then
-  tcl_cv_putenv_copy=no
+$as_echo "#define USE_DIRENT2_H 1" >>confdefs.h
+
+fi
+
+
+#--------------------------------------------------------------------
+#      The check below checks whether <sys/wait.h> defines the type
+#      "union wait" correctly.  It's needed because of weirdness in
+#      HP-UX where "union wait" is defined in both the BSD and SYS-V
+#      environments.  Checking the usability of WIFEXITED seems to do
+#      the trick.
+#--------------------------------------------------------------------
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking union wait" >&5
+$as_echo_n "checking union wait... " >&6; }
+if ${tcl_cv_union_wait+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/wait.h>
+int
+main ()
+{
 
-       #include <stdlib.h>
-       #define OURVAR "havecopy=yes"
-       int main (int argc, char *argv[])
-       {
-           char *foo, *bar;
-           foo = (char *)strdup(OURVAR);
-           putenv(foo);
-           strcpy((char *)(strchr(foo, '=') + 1), "no");
-           bar = getenv("havecopy");
-           if (!strcmp(bar, "no")) {
-               /* doesnt copy */
-               return 0;
-           } else {
-               /* does copy */
-               return 1;
-           }
-       }
+union wait x;
+WIFEXITED(x);          /* Generates compiler error if WIFEXITED
+                        * uses an int. */
 
+  ;
+  return 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
-  tcl_cv_putenv_copy=no
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_union_wait=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-tcl_cv_putenv_copy=yes
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+  tcl_cv_union_wait=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5
-echo "${ECHO_T}$tcl_cv_putenv_copy" >&6
-if test $tcl_cv_putenv_copy = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_union_wait" >&5
+$as_echo "$tcl_cv_union_wait" >&6; }
+if test $tcl_cv_union_wait = no; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PUTENV_THAT_COPIES 1
-_ACEOF
+$as_echo "#define NO_UNION_WAIT 1" >>confdefs.h
 
 fi
 
 #--------------------------------------------------------------------
-# Check for support of nl_langinfo function
+#      Check whether there is an strncasecmp function on this system.
+#      This is a bit tricky because under SCO it's in -lsocket and
+#      under Sequent Dynix it's in -linet.
 #--------------------------------------------------------------------
 
-
-    # Check whether --enable-langinfo or --disable-langinfo was given.
-if test "${enable_langinfo+set}" = set; then
-  enableval="$enable_langinfo"
-  langinfo_ok=$enableval
+ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
+if test "x$ac_cv_func_strncasecmp" = xyes; then :
+  tcl_ok=1
 else
-  langinfo_ok=yes
-fi;
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-       if test "${ac_cv_header_langinfo_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for langinfo.h" >&5
-echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
-if test "${ac_cv_header_langinfo_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  tcl_ok=0
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
-echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
+
+if test "$tcl_ok" = 0; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strncasecmp in -lsocket" >&5
+$as_echo_n "checking for strncasecmp in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_strncasecmp+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking langinfo.h usability" >&5
-echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-#include <langinfo.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 langinfo.h presence" >&5
-echo $ECHO_N "checking langinfo.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 <langinfo.h>
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strncasecmp ();
+int
+main ()
+{
+return strncasecmp ();
+  ;
+  return 0;
+}
 _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
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_strncasecmp=yes
 else
-  ac_cpp_err=yes
+  ac_cv_lib_socket_strncasecmp=no
 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
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 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: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: langinfo.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: langinfo.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------ ##
-## Report this to the tcl lists.  ##
-## ------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for langinfo.h" >&5
-echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
-if test "${ac_cv_header_langinfo_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_strncasecmp" >&5
+$as_echo "$ac_cv_lib_socket_strncasecmp" >&6; }
+if test "x$ac_cv_lib_socket_strncasecmp" = xyes; then :
+  tcl_ok=1
 else
-  ac_cv_header_langinfo_h=$ac_header_preproc
+  tcl_ok=0
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
-echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
 
 fi
-if test $ac_cv_header_langinfo_h = yes; then
-  langinfo_ok=yes
-else
-  langinfo_ok=no
-fi
-
-
-    fi
-    echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5
-echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6
-    if test "$langinfo_ok" = "yes"; then
-       if test "${tcl_cv_langinfo_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test "$tcl_ok" = 0; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strncasecmp in -linet" >&5
+$as_echo_n "checking for strncasecmp in -linet... " >&6; }
+if ${ac_cv_lib_inet_strncasecmp+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-
-           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strncasecmp ();
 int
 main ()
 {
-nl_langinfo(CODESET);
+return strncasecmp ();
   ;
   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_langinfo_h=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_inet_strncasecmp=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_langinfo_h=no
+  ac_cv_lib_inet_strncasecmp=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_strncasecmp" >&5
+$as_echo "$ac_cv_lib_inet_strncasecmp" >&6; }
+if test "x$ac_cv_lib_inet_strncasecmp" = xyes; then :
+  tcl_ok=1
+else
+  tcl_ok=0
 fi
 
-       echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5
-echo "${ECHO_T}$tcl_cv_langinfo_h" >&6
-       if test $tcl_cv_langinfo_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LANGINFO 1
-_ACEOF
-
-       fi
-    else
-       echo "$as_me:$LINENO: result: $langinfo_ok" >&5
-echo "${ECHO_T}$langinfo_ok" >&6
-    fi
+fi
+if test "$tcl_ok" = 0; then
+    case " $LIBOBJS " in
+  *" strncasecmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext"
+ ;;
+esac
 
+    USE_COMPAT=1
+fi
 
 #--------------------------------------------------------------------
-# Check for support of chflags and mkstemps functions
+#      The code below deals with several issues related to gettimeofday:
+#      1. Some systems don't provide a gettimeofday function at all
+#         (set NO_GETTOD if this is the case).
+#      2. See if gettimeofday is declared in the <sys/time.h> header file.
+#         if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
+#         declare it.
 #--------------------------------------------------------------------
 
+ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
+if test "x$ac_cv_func_gettimeofday" = xyes; then :
 
+else
 
-for ac_func in chflags mkstemps
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+$as_echo "#define NO_GETTOD 1" >>confdefs.h
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday declaration" >&5
+$as_echo_n "checking for gettimeofday declaration... " >&6; }
+if ${tcl_cv_grep_gettimeofday+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-  eval "$as_ac_var=yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gettimeofday" >/dev/null 2>&1; then :
+  tcl_cv_grep_gettimeofday=present
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+  tcl_cv_grep_gettimeofday=missing
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+rm -f conftest*
 
 fi
-done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_grep_gettimeofday" >&5
+$as_echo "$tcl_cv_grep_gettimeofday" >&6; }
+if test $tcl_cv_grep_gettimeofday = missing ; then
 
+$as_echo "#define GETTOD_NOT_DECLARED 1" >>confdefs.h
+
+fi
 
 #--------------------------------------------------------------------
-# Check for support of isnan() function or macro
+#      The following code checks to see whether it is possible to get
+#      signed chars on this platform.  This is needed in order to
+#      properly generate sign-extended ints from character values.
 #--------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking isnan" >&5
-echo $ECHO_N "checking isnan... $ECHO_C" >&6
-if test "${tcl_cv_isnan+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
+$as_echo_n "checking whether char is unsigned... " >&6; }
+if ${ac_cv_c_char_unsigned+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <math.h>
+$ac_includes_default
 int
 main ()
 {
-
-isnan(0.0);                    /* Generates an error if isnan is missing */
+static int test_array [1 - 2 * !(((char) -1) < 0)];
+test_array [0] = 0;
+return test_array [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
-  tcl_cv_isnan=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_char_unsigned=no
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_isnan=no
+  ac_cv_c_char_unsigned=yes
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5
-echo "${ECHO_T}$tcl_cv_isnan" >&6
-if test $tcl_cv_isnan = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_ISNAN 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
+$as_echo "$ac_cv_c_char_unsigned" >&6; }
+if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
+  $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
 
 fi
 
-#--------------------------------------------------------------------
-# Darwin specific API checks and defines
-#--------------------------------------------------------------------
-
-if test "`uname -s`" = "Darwin" ; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking signed char declarations" >&5
+$as_echo_n "checking signed char declarations... " >&6; }
+if ${tcl_cv_char_signed+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-for ac_func in getattrlist
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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 $ac_func
-
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
 
 int
 main ()
 {
-return f != $ac_func;
+
+       signed char *p;
+       p = 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
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_char_signed=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
+  tcl_cv_char_signed=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_char_signed" >&5
+$as_echo "$tcl_cv_char_signed" >&6; }
+if test $tcl_cv_char_signed = yes; then
+
+$as_echo "#define HAVE_SIGNED_CHAR 1" >>confdefs.h
 
 fi
-done
 
+#--------------------------------------------------------------------
+#  Does putenv() copy or not?  We need to know to avoid memory leaks.
+#--------------------------------------------------------------------
 
-for ac_header in copyfile.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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a putenv() that copies the buffer" >&5
+$as_echo_n "checking for a putenv() that copies the buffer... " >&6; }
+if ${tcl_cv_putenv_copy+:} false; then :
+  $as_echo_n "(cached) " >&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
+
+    if test "$cross_compiling" = yes; then :
+  tcl_cv_putenv_copy=no
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-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
+       #include <stdlib.h>
+       #define OURVAR "havecopy=yes"
+       int main (int argc, char *argv[])
+       {
+           char *foo, *bar;
+           foo = (char *)strdup(OURVAR);
+           putenv(foo);
+           strcpy((char *)(strchr(foo, '=') + 1), "no");
+           bar = getenv("havecopy");
+           if (!strcmp(bar, "no")) {
+               /* doesnt copy */
+               return 0;
+           } else {
+               /* does copy */
+               return 1;
+           }
+       }
 
-# 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
+if ac_fn_c_try_run "$LINENO"; then :
+  tcl_cv_putenv_copy=no
 else
-  ac_cpp_err=yes
+  tcl_cv_putenv_copy=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
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 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 tcl 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_putenv_copy" >&5
+$as_echo "$tcl_cv_putenv_copy" >&6; }
+if test $tcl_cv_putenv_copy = yes; then
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+$as_echo "#define HAVE_PUTENV_THAT_COPIES 1" >>confdefs.h
 
 fi
 
-done
+#--------------------------------------------------------------------
+# Check for support of nl_langinfo function
+#--------------------------------------------------------------------
 
 
-for ac_func in copyfile
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
+    # Check whether --enable-langinfo was given.
+if test "${enable_langinfo+set}" = set; then :
+  enableval=$enable_langinfo; langinfo_ok=$enableval
+else
+  langinfo_ok=yes
+fi
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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
+    HAVE_LANGINFO=0
+    if test "$langinfo_ok" = "yes"; then
+       ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
+if test "x$ac_cv_header_langinfo_h" = xyes; then :
+  langinfo_ok=yes
+else
+  langinfo_ok=no
+fi
 
-#undef $ac_func
 
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use nl_langinfo" >&5
+$as_echo_n "checking whether to use nl_langinfo... " >&6; }
+    if test "$langinfo_ok" = "yes"; then
+       if ${tcl_cv_langinfo_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
 int
 main ()
 {
-return f != $ac_func;
+nl_langinfo(CODESET);
   ;
   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
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-    if test $tcl_corefoundation = yes; then
-
-for ac_header in libkern/OSAtomic.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
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_langinfo_h=yes
 else
-  ac_cpp_err=yes
+  tcl_cv_langinfo_h=no
 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
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 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 tcl 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
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_langinfo_h" >&5
+$as_echo "$tcl_cv_langinfo_h" >&6; }
+       if test $tcl_cv_langinfo_h = yes; then
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+$as_echo "#define HAVE_LANGINFO 1" >>confdefs.h
 
-fi
+       fi
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $langinfo_ok" >&5
+$as_echo "$langinfo_ok" >&6; }
+    fi
 
-done
 
+#--------------------------------------------------------------------
+# Check for support of chflags and mkstemps functions
+#--------------------------------------------------------------------
 
-for ac_func in OSSpinLockLock
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+for ac_func in chflags mkstemps
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
+done
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
+#--------------------------------------------------------------------
+# Check for support of isnan() function or macro
+#--------------------------------------------------------------------
 
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking isnan" >&5
+$as_echo_n "checking isnan... " >&6; }
+if ${tcl_cv_isnan+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
 int
 main ()
 {
-return f != $ac_func;
+
+isnan(0.0);                    /* Generates an error if isnan is missing */
+
   ;
   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
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_isnan=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
+  tcl_cv_isnan=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_isnan" >&5
+$as_echo "$tcl_cv_isnan" >&6; }
+if test $tcl_cv_isnan = no; then
+
+$as_echo "#define NO_ISNAN 1" >>confdefs.h
 
 fi
-done
 
-    fi
+#--------------------------------------------------------------------
+# Darwin specific API checks and defines
+#--------------------------------------------------------------------
 
-cat >>confdefs.h <<\_ACEOF
-#define USE_VFORK 1
+if test "`uname -s`" = "Darwin" ; then
+    for ac_func in getattrlist
+do :
+  ac_fn_c_check_func "$LINENO" "getattrlist" "ac_cv_func_getattrlist"
+if test "x$ac_cv_func_getattrlist" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETATTRLIST 1
 _ACEOF
 
+fi
+done
 
-cat >>confdefs.h <<\_ACEOF
-#define TCL_DEFAULT_ENCODING "utf-8"
+    for ac_header in copyfile.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "copyfile.h" "ac_cv_header_copyfile_h" "$ac_includes_default"
+if test "x$ac_cv_header_copyfile_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_COPYFILE_H 1
 _ACEOF
 
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define TCL_LOAD_FROM_MEMORY 1
-_ACEOF
-
+done
 
-cat >>confdefs.h <<\_ACEOF
-#define TCL_WIDE_CLICKS 1
+    for ac_func in copyfile
+do :
+  ac_fn_c_check_func "$LINENO" "copyfile" "ac_cv_func_copyfile"
+if test "x$ac_cv_func_copyfile" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_COPYFILE 1
 _ACEOF
 
-
-for ac_header in AvailabilityMacros.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>
+done
+
+    if test $tcl_corefoundation = yes; then
+       for ac_header in libkern/OSAtomic.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libkern/OSAtomic.h" "ac_cv_header_libkern_OSAtomic_h" "$ac_includes_default"
+if test "x$ac_cv_header_libkern_OSAtomic_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBKERN_OSATOMIC_H 1
 _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>
+done
+
+       for ac_func in OSSpinLockLock
+do :
+  ac_fn_c_check_func "$LINENO" "OSSpinLockLock" "ac_cv_func_OSSpinLockLock"
+if test "x$ac_cv_func_OSSpinLockLock" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OSSPINLOCKLOCK 1
 _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
+done
 
-# 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 tcl 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
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+$as_echo "#define USE_VFORK 1" >>confdefs.h
+
+
+$as_echo "#define TCL_DEFAULT_ENCODING \"utf-8\"" >>confdefs.h
+
+
+$as_echo "#define TCL_LOAD_FROM_MEMORY 1" >>confdefs.h
+
+
+$as_echo "#define TCL_WIDE_CLICKS 1" >>confdefs.h
+
+    for ac_header in AvailabilityMacros.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
+if test "x$ac_cv_header_AvailabilityMacros_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_AVAILABILITYMACROS_H 1
 _ACEOF
 
 fi
 done
 
     if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
-       echo "$as_me:$LINENO: checking if weak import is available" >&5
-echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6
-if test "${tcl_cv_cc_weak_import+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if weak import is available" >&5
+$as_echo_n "checking if weak import is available... " >&6; }
+if ${tcl_cv_cc_weak_import+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
            hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
-           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
                    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
@@ -18110,60 +9849,30 @@ rand();
   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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_cc_weak_import=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_weak_import=no
+  tcl_cv_cc_weak_import=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
            CFLAGS=$hold_cflags
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5
-echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_weak_import" >&5
+$as_echo "$tcl_cv_cc_weak_import" >&6; }
        if test $tcl_cv_cc_weak_import = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WEAK_IMPORT 1
-_ACEOF
+$as_echo "#define HAVE_WEAK_IMPORT 1" >>confdefs.h
 
        fi
-       echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5
-echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6
-if test "${tcl_cv_cc_darwin_c_source+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Darwin SUSv3 extensions are available" >&5
+$as_echo_n "checking if Darwin SUSv3 extensions are available... " >&6; }
+if ${tcl_cv_cc_darwin_c_source+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
            hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
-           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
                    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
@@ -18184,45 +9893,19 @@ 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
+if ac_fn_c_try_compile "$LINENO"; then :
   tcl_cv_cc_darwin_c_source=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_darwin_c_source=no
+  tcl_cv_cc_darwin_c_source=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
            CFLAGS=$hold_cflags
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5
-echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_darwin_c_source" >&5
+$as_echo "$tcl_cv_cc_darwin_c_source" >&6; }
        if test $tcl_cv_cc_darwin_c_source = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define _DARWIN_C_SOURCE 1
-_ACEOF
+$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
 
        fi
     fi
@@ -18230,386 +9913,80 @@ _ACEOF
     DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}'
     DLTEST_SUFFIX=".bundle"
 else
-    DLTEST_LD='${SHLIB_LD}'
-    DLTEST_SUFFIX=""
-fi
-
-#--------------------------------------------------------------------
-#      Check for support of fts functions (readdir replacement)
-#--------------------------------------------------------------------
-
-echo "$as_me:$LINENO: checking for fts" >&5
-echo $ECHO_N "checking for fts... $ECHO_C" >&6
-if test "${tcl_cv_api_fts+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/param.h>
-           #include <sys/stat.h>
-           #include <fts.h>
-
-int
-main ()
-{
-
-           char*const p[2] = {"/", NULL};
-           FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
-           FTSENT *e = fts_read(f); fts_close(f);
-
-  ;
-  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_cv_api_fts=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_api_fts=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5
-echo "${ECHO_T}$tcl_cv_api_fts" >&6
-if test $tcl_cv_api_fts = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FTS 1
-_ACEOF
-
-fi
-
-#--------------------------------------------------------------------
-#      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.
-#--------------------------------------------------------------------
-
-
-
-for ac_header in sys/ioctl.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 tcl 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"
+    DLTEST_LD='${SHLIB_LD}'
+    DLTEST_SUFFIX=""
 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
+#--------------------------------------------------------------------
+#      Check for support of fts functions (readdir replacement)
+#--------------------------------------------------------------------
 
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fts" >&5
+$as_echo_n "checking for fts... " >&6; }
+if ${tcl_cv_api_fts+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-done
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+           #include <sys/param.h>
+           #include <sys/stat.h>
+           #include <fts.h>
 
-for ac_header in sys/filio.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
+int
+main ()
+{
 
-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
+           char*const p[2] = {"/", NULL};
+           FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
+           FTSENT *e = fts_read(f); fts_close(f);
 
-# 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>
+  ;
+  return 0;
+}
 _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
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_api_fts=yes
 else
-  ac_cpp_err=yes
+  tcl_cv_api_fts=no
 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
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_fts" >&5
+$as_echo "$tcl_cv_api_fts" >&6; }
+if test $tcl_cv_api_fts = yes; then
+
+$as_echo "#define HAVE_FTS 1" >>confdefs.h
 
-# 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 tcl 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
+
+#--------------------------------------------------------------------
+#      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.
+#--------------------------------------------------------------------
+
+
+    for ac_header in sys/ioctl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ioctl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_IOCTL_H 1
+_ACEOF
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+
+done
+
+    for ac_header in sys/filio.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/filio.h" "ac_cv_header_sys_filio_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_filio_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_SYS_FILIO_H 1
 _ACEOF
 
 fi
 done
 
 
-    echo "$as_me:$LINENO: checking system version" >&5
-echo $ECHO_N "checking system version... $ECHO_C" >&6
-if test "${tcl_cv_sys_version+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
+$as_echo_n "checking system version... " >&6; }
+if ${tcl_cv_sys_version+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
        if test -f /usr/lib/NextStep/software_version; then
@@ -18628,8 +10005,8 @@ else
        else
            tcl_cv_sys_version=`uname -s`-`uname -r`
            if test "$?" -ne 0 ; then
-               { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
-echo "$as_me: WARNING: can't find uname command" >&2;}
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
+$as_echo "$as_me: WARNING: can't find uname command" >&2;}
                tcl_cv_sys_version=unknown
            else
                # Special check for weird MP-RAS system (uname returns weird
@@ -18645,58 +10022,52 @@ echo "$as_me: WARNING: can't find uname command" >&2;}
        fi
 
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
-echo "${ECHO_T}$tcl_cv_sys_version" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
+$as_echo "$tcl_cv_sys_version" >&6; }
     system=$tcl_cv_sys_version
 
-    echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
-echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
+$as_echo_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... " >&6; }
     case $system in
        OSF*)
 
-cat >>confdefs.h <<\_ACEOF
-#define USE_FIONBIO 1
-_ACEOF
+$as_echo "#define USE_FIONBIO 1" >>confdefs.h
 
-           echo "$as_me:$LINENO: result: FIONBIO" >&5
-echo "${ECHO_T}FIONBIO" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: FIONBIO" >&5
+$as_echo "FIONBIO" >&6; }
            ;;
        SunOS-4*)
 
-cat >>confdefs.h <<\_ACEOF
-#define USE_FIONBIO 1
-_ACEOF
+$as_echo "#define USE_FIONBIO 1" >>confdefs.h
 
-           echo "$as_me:$LINENO: result: FIONBIO" >&5
-echo "${ECHO_T}FIONBIO" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: FIONBIO" >&5
+$as_echo "FIONBIO" >&6; }
            ;;
        *)
-           echo "$as_me:$LINENO: result: O_NONBLOCK" >&5
-echo "${ECHO_T}O_NONBLOCK" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: O_NONBLOCK" >&5
+$as_echo "O_NONBLOCK" >&6; }
            ;;
     esac
 
 
 #------------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking whether to use dll unloading" >&5
-echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6
-# Check whether --enable-dll-unloading or --disable-dll-unloading was given.
-if test "${enable_dll_unloading+set}" = set; then
-  enableval="$enable_dll_unloading"
-  tcl_ok=$enableval
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dll unloading" >&5
+$as_echo_n "checking whether to use dll unloading... " >&6; }
+# Check whether --enable-dll-unloading was given.
+if test "${enable_dll_unloading+set}" = set; then :
+  enableval=$enable_dll_unloading; tcl_ok=$enableval
 else
   tcl_ok=yes
-fi;
+fi
+
 if test $tcl_ok = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define TCL_UNLOAD_DLLS 1
-_ACEOF
+$as_echo "#define TCL_UNLOAD_DLLS 1" >>confdefs.h
 
 fi
-echo "$as_me:$LINENO: result: $tcl_ok" >&5
-echo "${ECHO_T}$tcl_ok" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_ok" >&5
+$as_echo "$tcl_ok" >&6; }
 
 #------------------------------------------------------------------------
 #      Check whether the timezone data is supplied by the OS or has
@@ -18704,31 +10075,31 @@ echo "${ECHO_T}$tcl_ok" >&6
 #      be overriden on the configure command line either way.
 #------------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking for timezone data" >&5
-echo $ECHO_N "checking for timezone data... $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timezone data" >&5
+$as_echo_n "checking for timezone data... " >&6; }
 
-# Check whether --with-tzdata or --without-tzdata was given.
-if test "${with_tzdata+set}" = set; then
-  withval="$with_tzdata"
-  tcl_ok=$withval
+# Check whether --with-tzdata was given.
+if test "${with_tzdata+set}" = set; then :
+  withval=$with_tzdata; tcl_ok=$withval
 else
   tcl_ok=auto
-fi;
+fi
+
 #
 # Any directories that get added here must also be added to the
 # search path in ::tcl::clock::Initialize (library/clock.tcl).
 #
 case $tcl_ok in
     no)
-       echo "$as_me:$LINENO: result: supplied by OS vendor" >&5
-echo "${ECHO_T}supplied by OS vendor" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: supplied by OS vendor" >&5
+$as_echo "supplied by OS vendor" >&6; }
     ;;
     yes)
        # nothing to do here
     ;;
     auto*)
-       if test "${tcl_cv_dir_zoneinfo+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       if ${tcl_cv_dir_zoneinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
        for dir in /usr/share/zoneinfo \
 
        if test -n "$tcl_cv_dir_zoneinfo"; then
            tcl_ok=no
-           echo "$as_me:$LINENO: result: $dir" >&5
-echo "${ECHO_T}$dir" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dir" >&5
+$as_echo "$dir" >&6; }
        else
            tcl_ok=yes
        fi
     ;;
     *)
-       { { echo "$as_me:$LINENO: error: invalid argument: $tcl_ok" >&5
-echo "$as_me: error: invalid argument: $tcl_ok" >&2;}
-   { (exit 1); exit 1; }; }
+       as_fn_error $? "invalid argument: $tcl_ok" "$LINENO" 5
     ;;
 esac
 if test $tcl_ok = yes
 then
-    echo "$as_me:$LINENO: result: supplied by Tcl" >&5
-echo "${ECHO_T}supplied by Tcl" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: supplied by Tcl" >&5
+$as_echo "supplied by Tcl" >&6; }
     INSTALL_TZDATA=install-tzdata
 fi
 
 #      DTrace support
 #--------------------------------------------------------------------
 
-# Check whether --enable-dtrace or --disable-dtrace was given.
-if test "${enable_dtrace+set}" = set; then
-  enableval="$enable_dtrace"
-  tcl_ok=$enableval
+# Check whether --enable-dtrace was given.
+if test "${enable_dtrace+set}" = set; then :
+  enableval=$enable_dtrace; tcl_ok=$enableval
 else
   tcl_ok=no
-fi;
-if test $tcl_ok = yes; then
-    if test "${ac_cv_header_sys_sdt_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
-echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
-if test "${ac_cv_header_sys_sdt_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
-echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5
-echo $ECHO_N "checking sys/sdt.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/sdt.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 sys/sdt.h presence" >&5
-echo $ECHO_N "checking sys/sdt.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/sdt.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/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: sys/sdt.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: sys/sdt.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: sys/sdt.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------ ##
-## Report this to the tcl lists.  ##
-## ------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
-echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
-if test "${ac_cv_header_sys_sdt_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_sys_sdt_h=$ac_header_preproc
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
-echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
 
-fi
-if test $ac_cv_header_sys_sdt_h = yes; then
+if test $tcl_ok = yes; then
+    ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
   tcl_ok=yes
 else
   tcl_ok=no
 if test $tcl_ok = yes; then
     # Extract the first word of "dtrace", so it can be a program name with args.
 set dummy dtrace; 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_path_DTRACE+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_DTRACE+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   case $DTRACE in
   [\\/]* | ?:[\\/]*)
@@ -18940,38 +10173,37 @@ for as_dir in $as_dummy
 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
+IFS=$as_save_IFS
 
   ;;
 esac
 fi
 DTRACE=$ac_cv_path_DTRACE
-
 if test -n "$DTRACE"; then
-  echo "$as_me:$LINENO: result: $DTRACE" >&5
-echo "${ECHO_T}$DTRACE" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
+$as_echo "$DTRACE" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
     test -z "$ac_cv_path_DTRACE" && tcl_ok=no
 fi
-echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5
-echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable DTrace support" >&5
+$as_echo_n "checking whether to enable DTrace support... " >&6; }
 MAKEFILE_SHELL='/bin/sh'
 if test $tcl_ok = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define USE_DTRACE 1
-_ACEOF
+$as_echo "#define USE_DTRACE 1" >>confdefs.h
 
     DTRACE_SRC="\${DTRACE_SRC}"
     DTRACE_HDR="\${DTRACE_HDR}"
@@ -18989,24 +10221,20 @@ _ACEOF
        fi
     fi
 fi
-echo "$as_me:$LINENO: result: $tcl_ok" >&5
-echo "${ECHO_T}$tcl_ok" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_ok" >&5
+$as_echo "$tcl_ok" >&6; }
 
 #--------------------------------------------------------------------
 # The check below checks whether the cpuid instruction is usable.
 #--------------------------------------------------------------------
 
-echo "$as_me:$LINENO: checking whether the cpuid instruction is usable" >&5
-echo $ECHO_N "checking whether the cpuid instruction is usable... $ECHO_C" >&6
-if test "${tcl_cv_cpuid+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cpuid instruction is usable" >&5
+$as_echo_n "checking whether the cpuid instruction is usable... " >&6; }
+if ${tcl_cv_cpuid+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -19025,45 +10253,19 @@ 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
+if ac_fn_c_try_link "$LINENO"; then :
   tcl_cv_cpuid=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cpuid=no
+  tcl_cv_cpuid=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $tcl_cv_cpuid" >&5
-echo "${ECHO_T}$tcl_cv_cpuid" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cpuid" >&5
+$as_echo "$tcl_cv_cpuid" >&6; }
 if test $tcl_cv_cpuid = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CPUID 1
-_ACEOF
+$as_echo "#define HAVE_CPUID 1" >>confdefs.h
 
 fi
 
@@ -19094,38 +10296,38 @@ HTML_DIR='$(DISTDIR)/html'
 if test "`uname -s`" = "Darwin" ; then
 
     if test "`uname -s`" = "Darwin" ; then
-       echo "$as_me:$LINENO: checking how to package libraries" >&5
-echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6
-       # Check whether --enable-framework or --disable-framework was given.
-if test "${enable_framework+set}" = set; then
-  enableval="$enable_framework"
-  enable_framework=$enableval
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to package libraries" >&5
+$as_echo_n "checking how to package libraries... " >&6; }
+       # Check whether --enable-framework was given.
+if test "${enable_framework+set}" = set; then :
+  enableval=$enable_framework; enable_framework=$enableval
 else
   enable_framework=no
-fi;
+fi
+
        if test $enable_framework = yes; then
            if test $SHARED_BUILD = 0; then
-               { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
-echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;}
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
+$as_echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;}
                enable_framework=no
            fi
            if test $tcl_corefoundation = no; then
-               { echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
-echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;}
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
+$as_echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;}
                enable_framework=no
            fi
        fi
        if test $enable_framework = yes; then
-           echo "$as_me:$LINENO: result: framework" >&5
-echo "${ECHO_T}framework" >&6
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: framework" >&5
+$as_echo "framework" >&6; }
            FRAMEWORK_BUILD=1
        else
            if test $SHARED_BUILD = 1; then
-               echo "$as_me:$LINENO: result: shared library" >&5
-echo "${ECHO_T}shared library" >&6
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library" >&5
+$as_echo "shared library" >&6; }
            else
-               echo "$as_me:$LINENO: result: static library" >&5
-echo "${ECHO_T}static library" >&6
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: static library" >&5
+$as_echo "static library" >&6; }
            fi
            FRAMEWORK_BUILD=0
        fi
@@ -19137,20 +10339,18 @@ echo "${ECHO_T}static library" >&6
     TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist'
     EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist'
     EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic'
-                        ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in"
+    ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in"
 
     TCL_YEAR="`date +%Y`"
 fi
 
 if test "$FRAMEWORK_BUILD" = "1" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define TCL_FRAMEWORK 1
-_ACEOF
+$as_echo "#define TCL_FRAMEWORK 1" >>confdefs.h
 
     # Construct a fake local framework structure to make linking with
     # '-framework Tcl' and running of tcltest work
-              ac_config_commands="$ac_config_commands Tcl.framework"
+    ac_config_commands="$ac_config_commands Tcl.framework"
 
     LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
     # default install directory for bundled packages
@@ -19310,7 +10510,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD}
 
 
 
-                                        ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in"
+ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -19330,39 +10530,70 @@ _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.
+# So, we kill variables containing newlines.
 # 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.
-{
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
   (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 \).
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotesdouble-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"
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
-    esac;
-} |
+    esac |
+    sort
+) |
   sed '
+     /^ac_cv_env_/b end
      t clear
-     : 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
-    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
-    cat confcache >$cache_file
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
   else
-    echo "not updating unwritable cache $cache_file"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
@@ -19371,33 +10602,21 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# 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[        ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[    ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[      ]*$//;
-}'
-fi
-
 DEFS=-DHAVE_CONFIG_H
 
 
 DEFS="-DHAVE_TCL_CONFIG_H  -imacros tclConfig.h"
 CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
 
-: ${CONFIG_STATUS=./config.status}
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
 #! $SHELL
 # Generated by $as_me.
 # Run this file to recreate the current configuration.
@@ -19407,230 +10626,365 @@ cat >$CONFIG_STATUS <<_ACEOF
 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
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+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
+  # Pre-4.2 versions of Zsh do 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
+  setopt NO_GLOB_SUBST
 else
-  as_unset=false
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
 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
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
   else
-    $as_unset $as_var
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
   fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 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
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 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
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+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
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
+PS1='$ '
+PS2='> '
+PS4='+ '
 
-       ;;
-  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; }; }
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   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
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
 
-  # 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
-}
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; 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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
 
+# 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
 
-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= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 else
-  as_expr=false
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
 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 (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
     as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
   fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
 
+} # as_fn_mkdir_p
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -19639,31 +10993,20 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 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
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, 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
-
+# values after options handling.
+ac_log="
 This file was extended by tcl $as_me 8.6, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -19671,45 +11014,47 @@ generated by GNU Autoconf 2.59.  Invocation command line was
   CONFIG_COMMANDS = $CONFIG_COMMANDS
   $ $0 $@
 
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
 _ACEOF
 
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
 
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
 
-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_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+_ACEOF
 
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
 
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [TAG]...
 
   -h, --help       print this help, then exit
-  -V, --version    print version number, then exit
-  -q, --quiet      do not print progress messages
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   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
-  --header=FILE[:TEMPLATE]
-                  instantiate the configuration header FILE
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
 
 Configuration files:
 $config_files
@@ -19720,83 +11065,89 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
+Report bugs to the package provider."
 
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 tcl config.status 8.6
-configured by $0, generated by GNU Autoconf 2.59,
-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2012 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
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+test -n "\$AWK" || AWK=awk
 _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.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
 ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
     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 )
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
   -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; }; } ;;
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
 
-  *) ac_config_targets="$ac_config_targets $1" ;;
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
 
   esac
   shift
@@ -19810,44 +11161,56 @@ if $ac_cs_silent; then
 fi
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 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
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
 fi
 
 _ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
 
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #
-# INIT-COMMANDS section.
+# INIT-COMMANDS
 #
-
 VERSION=${TCL_VERSION}
 
 _ACEOF
 
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 
-
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
-  case "$ac_config_target" in
-  # Handling of arguments.
-  "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;;
-  "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;;
-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;;
-  "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;;
-  "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;;
-  "tcl.pc" ) CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;;
-  "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;;
-  "tclConfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS tclConfig.h:../unix/tclConfig.h.in" ;;
-  *) { { 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; }; };;
+  case $ac_config_target in
+    "tclConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS tclConfig.h:../unix/tclConfig.h.in" ;;
+    "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;;
+    "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;;
+    "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;;
+    "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;;
+    "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;;
+    "tcl.pc") CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
+
 # 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
@@ -19859,756 +11222,558 @@ if $ac_need_defaults; then
 fi
 
 # 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,
+# simply because there is no reason against having 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.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_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=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
 }  ||
 {
-  tmp=./confstat$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-_ACEOF
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
-cat >>$CONFIG_STATUS <<_ACEOF
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
 
-#
-# 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,@MAN_FLAGS@,$MAN_FLAGS,;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,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@TCL_THREADS@,$TCL_THREADS,;t t
-s,@TCLSH_PROG@,$TCLSH_PROG,;t t
-s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t
-s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t
-s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@TCL_LIBS@,$TCL_LIBS,;t t
-s,@DL_LIBS@,$DL_LIBS,;t t
-s,@DL_OBJS@,$DL_OBJS,;t t
-s,@PLAT_OBJS@,$PLAT_OBJS,;t t
-s,@PLAT_SRCS@,$PLAT_SRCS,;t t
-s,@LDAIX_SRC@,$LDAIX_SRC,;t t
-s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
-s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
-s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
-s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
-s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
-s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t
-s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t
-s,@STLIB_LD@,$STLIB_LD,;t t
-s,@SHLIB_LD@,$SHLIB_LD,;t t
-s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t
-s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t
-s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
-s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
-s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
-s,@MAKE_LIB@,$MAKE_LIB,;t t
-s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
-s,@INSTALL_LIB@,$INSTALL_LIB,;t t
-s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t
-s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t
-s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
-s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
-s,@DTRACE@,$DTRACE,;t t
-s,@TCL_VERSION@,$TCL_VERSION,;t t
-s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t
-s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t
-s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
-s,@TCL_YEAR@,$TCL_YEAR,;t t
-s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;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_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t
-s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
-s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t
-s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t
-s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
-s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t
-s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t
-s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
-s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
-s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t
-s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t
-s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t
-s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t
-s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t
-s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t
-s,@DTRACE_SRC@,$DTRACE_SRC,;t t
-s,@DTRACE_HDR@,$DTRACE_HDR,;t t
-s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t
-s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t
-s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t
-s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t
-s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t
-s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
-s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t
-s,@HTML_DIR@,$HTML_DIR,;t t
-s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t
-s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t
-s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t
-s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t
-s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t
-s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t
-s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t
-s,@DLTEST_LD@,$DLTEST_LD,;t t
-s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t
-CEOF
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
 
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _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"
 
-_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
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
-  # 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"
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   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_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
 
-  ac_builddir=.
+  print line
+}
 
-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'`
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/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
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
 
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries 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[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[      ]*$//
+}'
+fi
 
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
 
-  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
-" $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
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
-    cat $tmp/out
-    rm -f $tmp/out
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
-
 done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[    ]*#[    ]*define[       ][      ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
 _ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
 
-#
-# CONFIG_HEADER section.
-#
 
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
-ac_dB='[        ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; 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 ;;
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
   esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
 
-  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
-  # 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; }; }
-        # Do quote $f, to prevent DOS paths from being IFS'd.
-        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;;
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
-    done` || { (exit 1); exit 1; }
-  # Remove the trailing spaces.
-  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
 
-_ACEOF
+    # 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.  */
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
 
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h.  The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status.  Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
 
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo '  :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
-  # Write a limited-size here document to $tmp/defines.sed.
-  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#define' lines.
-  echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/defines.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo '  fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
-  # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#undef'
-  echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
-  rm -f conftest.undefs
-  mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-  # 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
-    echo "/* Generated by configure.  */" >$tmp/config.h
-  else
-    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
-  fi
-  cat $tmp/in >>$tmp/config.h
-  rm -f $tmp/in
-  if test x"$ac_file" != x-; then
-    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+  ac_dir=`$as_dirname -- "$ac_file" ||
 $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; }; }; }
-
-      rm -f $ac_file
-      mv $tmp/config.h $ac_file
-    fi
-  else
-    cat $tmp/config.h
-    rm -f $tmp/config.h
-  fi
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
-  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
-  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_dest" : 'X\(//\)[^/]' \| \
-        X"$ac_dest" : 'X\(//\)$' \| \
-        X"$ac_dest" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
-    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; }; }; }
-
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
   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 "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # 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_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     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;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 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;;
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+ ;;
 
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
 
-  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
-  case $ac_dest in
-    Tcl.framework ) n=Tcl &&
+
+  case $ac_file$ac_mode in
+    "Tcl.framework":C) n=Tcl &&
         f=$n.framework && v=Versions/$VERSION &&
         rm -rf $f && mkdir -p $f/$v/Resources &&
         ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
         ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
         unset n f v
      ;;
+
   esac
-done
-_ACEOF
+done # for ac_tag
 
-cat >>$CONFIG_STATUS <<\_ACEOF
 
-{ (exit 0); exit 0; }
+as_fn_exit 0
 _ACEOF
-chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
 
 # configure is writing to config.log, and then calls config.status.
 # config.status does its own redirection, appending to config.log.
@@ -20628,7 +11793,11 @@ if test "$no_create" != yes; then
   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; }
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
 
index 01c3697..f7a8bb3 100644 (file)
@@ -3,7 +3,7 @@ dnl     This file is an input file used by the GNU "autoconf" program to
 dnl    generate the file "configure", which is run during Tcl installation
 dnl    to configure the system for the local environment.
 
-dnl    Ensure that the config (auto)headers support is used, then just 
+dnl    Ensure that the config (auto)headers support is used, then just
 dnl    include the configure sources from ../unix:
 
 m4_include(../unix/aclocal.m4)
index 164d65e..d8049cd 100644 (file)
@@ -29,7 +29,7 @@ MODIFICATIONS.
 
 GOVERNMENT USE: If you are acquiring this software on behalf of the
 U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal 
+in the software and related documentation as defined in the Federal
 Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
 are acquiring the software on behalf of the Department of Defense, the
 software shall be classified as "Commercial Computer Software" and the
@@ -37,4 +37,4 @@ Government shall have only "Restricted Rights" as defined in Clause
 252.227-7014 (b) (3) of DFARs.  Notwithstanding the foregoing, the
 authors grant the U.S. Government and others acting in its behalf
 permission to use and distribute the software in accordance with the
-terms specified in this license. 
+terms specified in this license.
index ef80192..9b7bd1a 100644 (file)
@@ -1412,7 +1412,8 @@ UpdateWaitingListAndServiceEvents(
                (tsdPtr->runLoopNestingLevel > 1
                        || !tsdPtr->runLoopRunning)) {
            tsdPtr->runLoopServicingEvents = 1;
-           while (Tcl_ServiceAll() && tsdPtr->waitTime == 0) {}
+            /* This call seems to simply force event processing through and prevents hangups that have long been observed with Tk-Cocoa.  */
+           Tcl_ServiceAll();
            tsdPtr->runLoopServicingEvents = 0;
        }
        break;
index 868bd4f..159a237 100644 (file)
@@ -36,14 +36,14 @@ needs to conform to the following conventions.
 
     clean:     Delete all files generated by the default build target.
 
-    distclean: Delete all generated files. 
+    distclean: Delete all generated files.
 
     dist:      Produce a copy of the package's source code distribution.
                Must respect the DIST_ROOT variable determining where to
                write the generated directory.
 
 Packages that are written to make use of the Tcl Extension Architecture (TEA)
-and that make use of the tclconfig collection of support files, should 
+and that make use of the tclconfig collection of support files, should
 conform to these conventions without further efforts.
 
 These conventions are subject to revision and refinement over time to
diff --git a/pkgs/itcl4.0.2/configure b/pkgs/itcl4.0.2/configure
deleted file mode 100755 (executable)
index d80a95d..0000000
+++ /dev/null
@@ -1,12662 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for itcl 4.0.2.
-#
-# 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'"
-
-# 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
-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='4.0.2'
-PACKAGE_STRING='itcl 4.0.2'
-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_PATCH_LEVEL 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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CLEANFILES TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CPP INSTALL INSTALL_DATA_DIR INSTALL_DATA INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_LIBRARY SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS TCL_INCLUDES TCL_TOP_DIR_NATIVE TCL_THREADS SHARED_BUILD AR ac_ct_AR CELIB_DIR RC ac_ct_RC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_DBGX MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB VC_MANIFEST_EMBED_DLL VC_MANIFEST_EMBED_EXE itcl_STUB_LIB_FILE itcl_LIB_FILE TCLSH_PROG 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 MAJOR_VERSION MINOR_VERSION PATCHLEVEL itcl_SRC_DIR itcl_INCLUDE_SPEC LIBOBJS 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.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-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'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-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"
-    ac_prev=
-    continue
-  fi
-
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_option in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    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 ;;
-
-  --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 ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    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=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    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'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -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_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    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 ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    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 ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    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 | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    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-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-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    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 ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    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
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_$ac_package='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    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.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    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-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 ;;
-
-  -*) { 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 ;;
-
-  *)
-    # 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
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
-fi
-
-# 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
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-             localstatedir libdir includedir oldincludedir infodir mandir
-do
-  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
-
-# 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
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# 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_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=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
-   { (exit 1); exit 1; }; }
-  else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-  fi
-fi
-(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 4.0.2 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 4.0.2:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-threads        build with threads
-  --enable-shared         build and link with shared libraries (default: on)
-  --enable-64bit          enable 64bit support (default: off)
-  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
-  --disable-rpath         disable rpath support (default: on)
-  --enable-wince          enable Win/CE support (where applicable)
-  --enable-symbols        build with debugging symbols (default: off)
-
-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-tclinclude       directory containing the public Tcl header files
-  --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 4.0.2
-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 4.0.2, 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
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    { 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
-  # 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 "$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
-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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#--------------------------------------------------------------------
-# 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.9"
-
-    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.9" = 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.9" != "${TEA_VERSION}" ; then
-       echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
-echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6
-    else
-       echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
-echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
-    fi
-
-    # If the user did not set CFLAGS, set it now to keep macros
-    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-       CFLAGS=""
-    fi
-
-    case "`uname -s`" in
-       *win32*|*WIN32*|*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"
-           ;;
-       *CYGWIN_*)
-           CYGPATH=echo
-           EXEEXT=".exe"
-           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
-           ;;
-       *)
-           CYGPATH=echo
-           # Maybe we are cross-compiling....
-           case ${host_alias} in
-               *mingw32*)
-               EXEEXT=".exe"
-               TEA_PLATFORM="windows"
-               ;;
-           *)
-               EXEEXT=""
-               TEA_PLATFORM="unix"
-               ;;
-           esac
-           ;;
-    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
-
-    { echo "$as_me:$LINENO: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
-echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
-
-
-
-
-    # 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 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"
-    break
-  elif 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/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 "$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="$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.
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-
-
-    #
-    # 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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 common install locations
-           if test x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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: error: Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" >&5
-echo "$as_me: error: Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" >&2;}
-   { (exit 1); exit 1; }; }
-       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
-
-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
-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
-
-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
-
-  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
-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
-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
-
-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 "$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
-  ac_prog_rejected=no
-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 $# != 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
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-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
-
-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
-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
-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
-
-    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
-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
-
-  test -n "$ac_ct_CC" && break
-done
-
-  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
-    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
-fi
-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
-  { { 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
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-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
-  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
-
-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
-  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
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-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
-
-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
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  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
-
-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
-
-
-
-    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: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tcl was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tcl.framework installed in an arbitrary location.
-       case ${TCL_DEFS} in
-           *TCL_FRAMEWORK*)
-               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
-                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
-                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
-                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
-                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
-                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    echo "$as_me:$LINENO: checking platform" >&5
-echo $ECHO_N "checking platform... $ECHO_C" >&6
-    hold_cc=$CC; CC="$TCL_CC"
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-           #ifdef _WIN32
-               #error win32
-           #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
-  TEA_PLATFORM="unix"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-TEA_PLATFORM="windows"
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-    CC=$hold_cc
-    echo "$as_me:$LINENO: result: $TEA_PLATFORM" >&5
-echo "${ECHO_T}$TEA_PLATFORM" >&6
-
-    # The BUILD_$pkg is to define the correct extern storage class
-    # handling when making this package
-
-cat >>confdefs.h <<_ACEOF
-#define BUILD_${PACKAGE_NAME}
-_ACEOF
-
-    # Do this here as we have fully defined TEA_PLATFORM now
-    if test "${TEA_PLATFORM}" = "windows" ; then
-       EXEEXT=".exe"
-       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
-    fi
-
-    # TEA specific:
-
-
-
-
-
-
-
-
-if test "${TCL_VERSION}" != "8.6"; then
-    { { echo "$as_me:$LINENO: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Itcl ${PACKAGE_VERSION} needs Tcl 8.6.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6." >&5
-echo "$as_me: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Itcl ${PACKAGE_VERSION} needs Tcl 8.6.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-#-----------------------------------------------------------------------
-# 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 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.
-
-    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
-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
-
-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
-
-  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
-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
-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
-
-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 "$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
-  ac_prog_rejected=no
-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 $# != 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
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-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
-
-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
-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
-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
-
-    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
-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
-
-  test -n "$ac_ct_CC" && break
-done
-
-  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); }
-
-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
-  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
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-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
-
-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
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  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
-
-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
-
-
-    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
-    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
-    INSTALL_DATA='${INSTALL} -m 644'
-    INSTALL_PROGRAM='${INSTALL}'
-    INSTALL_SCRIPT='${INSTALL}'
-    INSTALL_LIBRARY='${INSTALL_DATA}'
-
-
-
-
-
-
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    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 >conftest.make <<\_ACEOF
-all:
-       @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-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 conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-  SET_MAKE=
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    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
-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
-if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
-  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
-
-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
-
-  RANLIB=$ac_ct_RANLIB
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-    #--------------------------------------------------------------------
-    # 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
-
-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
-
-#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
-
-( 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 "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-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
-
-fi
-
-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
-if test "${tcl_cv_cc_pipe+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -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
-  tcl_cv_cc_pipe=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_pipe=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-           CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
-echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
-       if test $tcl_cv_cc_pipe = yes; then
-           CFLAGS="$CFLAGS -pipe"
-       fi
-    fi
-
-    #--------------------------------------------------------------------
-    # 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
-
-  ;
-  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
-  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
-  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
-    # finding both strings is unlikely to happen, but who knows?
-    ac_cv_c_bigendian=unknown
-  fi
-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
-
-( 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
-
-
-    #--------------------------------------------------------------------
-    # 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
-    ;;
-  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
-
-
-    # TEA specific: 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}'
-
-
-
-
-    echo "$as_me:$LINENO: checking dirent.h" >&5
-echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
-if test "${tcl_cv_dirent_h+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 <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_cv_dirent_h=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_dirent_h=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
-echo "${ECHO_T}$tcl_cv_dirent_h" >&6
-
-    if test $tcl_cv_dirent_h = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_DIRENT_H 1
-_ACEOF
-
-    fi
-
-    # TEA specific:
-    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 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
-
-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
-
-fi
-if test $ac_cv_header_float_h = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_FLOAT_H 1
-_ACEOF
-
-fi
-
-
-    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
-
-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
-
-  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
-
-fi
-if test $ac_cv_header_values_h = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_VALUES_H 1
-_ACEOF
-
-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
-
-    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 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
-
-    fi
-
-    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
-
-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__
-# 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="
-                itcl2TclOO.c
-               itclBase.c
-               itclBuiltin.c
-                itclClass.c
-                itclCmd.c
-                itclEnsemble.c
-                itclHelpers.c
-               itclInfo.c
-                itclLinkage.c
-                itclMethod.c
-                itclObject.c
-               itclParse.c
-               itclStubs.c
-                itclStubInit.c
-               itclResolve.c
-               itclTclIntStubsFcn.c
-               itclUtil.c
-                itclMigrate2TclCore.c
-               itclTestRegisterC.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
-               # To add more dirs here (like 'src'), you have to update VPATH
-               # in Makefile.in as well
-               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
-                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-                   -a ! -f "${srcdir}/macosx/$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
-
-
-
-
-    vars="generic/itcl.h
-                generic/itclDecls.h
-               generic/itclInt.h
-                generic/itclMigrate2TclCore.h
-                generic/itclTclIntStubsFcn.h
-                generic/itcl2TclOO.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. -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" \
-           -a ! -f "${srcdir}/macosx/$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 library/itclWidget.tcl library/itclHullCmds.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
-
-
-
-#--------------------------------------------------------------------
-# __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.
-#--------------------------------------------------------------------
-
-if test "${TEA_PLATFORM}" = "windows" ; then
-
-    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
-               # To add more dirs here (like 'src'), you have to update VPATH
-               # in Makefile.in as well
-               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
-                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-                   -a ! -f "${srcdir}/macosx/$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
-
-
-
-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 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 "$as_me:$LINENO: checking for Tcl public headers" >&5
-echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6
-
-
-# Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi;
-
-    if test "${ac_cv_c_tclh+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       # 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
-               { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
-echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
-   { (exit 1); exit 1; }; }
-           fi
-       else
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tcl was built as a framework, attempt to use
-               # the framework's Headers directory
-               case ${TCL_DEFS} in
-                   *TCL_FRAMEWORK*)
-                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tcl is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TCL_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$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`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TCL_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           fi
-           for i in $list ; do
-               if test -f "$i/tcl.h" ; then
-                   ac_cv_c_tclh=$i
-                   break
-               fi
-           done
-       fi
-
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-       { { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
-echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
-   { (exit 1); exit 1; }; }
-    else
-       echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
-echo "${ECHO_T}${ac_cv_c_tclh}" >&6
-    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}\"
-
-
-
-
-    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
-
-    echo "$as_me:$LINENO: checking for Tcl private include files" >&5
-echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6
-
-    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
-    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
-
-    # Check to see if tcl<Plat>Port.h isn't already with the public headers
-    # Don't look for tclInt.h because that resides with tcl.h in the core
-    # sources, but the <plat>Port headers are in a different directory
-    if test "${TEA_PLATFORM}" = "windows" -a \
-       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
-       result="private headers found with public headers"
-    elif test "${TEA_PLATFORM}" = "unix" -a \
-       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
-       result="private headers found with public headers"
-    else
-       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
-       if test "${TEA_PLATFORM}" = "windows"; then
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
-       else
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
-       fi
-       # Overwrite the previous TCL_INCLUDES as this should capture both
-       # public and private headers in the same set.
-       # We want to ensure these are substituted so as not to require
-       # any *_NATIVE vars be defined in the Makefile
-       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-       if test "`uname -s`" = "Darwin"; then
-            # If Tcl was built as a framework, attempt to use
-            # the framework's Headers and PrivateHeaders directories
-            case ${TCL_DEFS} in
-               *TCL_FRAMEWORK*)
-                   if test -d "${TCL_BIN_DIR}/Headers" -a \
-                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
-                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
-                   else
-                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
-                   fi
-                   ;;
-           esac
-           result="Using ${TCL_INCLUDES}"
-       else
-           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
-               { { echo "$as_me:$LINENO: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&5
-echo "$as_me: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&2;}
-   { (exit 1); exit 1; }; }
-           fi
-           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
-       fi
-    fi
-
-
-
-
-    echo "$as_me:$LINENO: result: ${result}" >&5
-echo "${ECHO_T}${result}" >&6
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# This auto-enables if Tcl was compiled threaded.
-#--------------------------------------------------------------------
-
-
-    # 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=yes
-fi;
-
-    if test "${enable_threads+set}" = set; then
-       enableval="$enable_threads"
-       tcl_ok=$enableval
-    else
-       tcl_ok=yes
-    fi
-
-    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:
-
-           # USE_THREAD_ALLOC tells us to try the special thread-based
-           # allocator that significantly reduces lock contention
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_THREAD_ALLOC 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
-
-           if test "`uname -s`" = "SunOS" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-_ACEOF
-
-           fi
-
-cat >>confdefs.h <<\_ACEOF
-#define _THREAD_SAFE 1
-_ACEOF
-
-           echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_pthread_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthread_pthread_mutex_init=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_pthread_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
-if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-           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]
-               echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
-echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $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 __pthread_mutex_init ();
-int
-main ()
-{
-__pthread_mutex_init ();
-  ;
-  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_pthread___pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthread___pthread_mutex_init=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_pthread___pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
-if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-           fi
-
-           if test "$tcl_ok" = "yes"; then
-               # The space is needed
-               THREADS_LIBS=" -lpthread"
-           else
-               echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
-if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthreads  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_pthreads_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthreads_pthread_mutex_init=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_pthreads_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
-if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-               if test "$tcl_ok" = "yes"; then
-                   # The space is needed
-                   THREADS_LIBS=" -lpthreads"
-               else
-                   echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
-if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_c_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_pthread_mutex_init=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_c_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
-if test $ac_cv_lib_c_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-                   if test "$tcl_ok" = "no"; then
-                       echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
-if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_c_r_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_r_pthread_mutex_init=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_c_r_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
-if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-                       if test "$tcl_ok" = "yes"; then
-                           # The space is needed
-                           THREADS_LIBS=" -pthread"
-                       else
-                           TCL_THREADS=0
-                           { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
-echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
-                       fi
-                   fi
-               fi
-           fi
-       fi
-    else
-       TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo "$as_me:$LINENO: checking for building with threads" >&5
-echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
-    if test "${TCL_THREADS}" = 1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_THREADS 1
-_ACEOF
-
-       echo "$as_me:$LINENO: result: yes (default)" >&5
-echo "${ECHO_T}yes (default)" >&6
-    else
-       echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-    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
-               { echo "$as_me:$LINENO: WARNING:
-    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
-    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
-echo "$as_me: WARNING:
-    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
-    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
-           fi
-           ;;
-       *)
-           if test "${TCL_THREADS}" = "1"; then
-               { echo "$as_me:$LINENO: WARNING:
-    --enable-threads requested, but building against a Tcl that is NOT
-    thread-enabled.  This is an OK configuration that will also run in
-    a thread-enabled core." >&5
-echo "$as_me: WARNING:
-    --enable-threads requested, but building against a Tcl that is NOT
-    thread-enabled.  This is an OK configuration that will also run in
-    a thread-enabled core." >&2;}
-           fi
-           ;;
-    esac
-
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    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;
-
-    if test "${enable_shared+set}" = set; then
-       enableval="$enable_shared"
-       tcl_ok=$enableval
-    else
-       tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-       echo "$as_me:$LINENO: result: shared" >&5
-echo "${ECHO_T}shared" >&6
-       SHARED_BUILD=1
-    else
-       echo "$as_me:$LINENO: result: static" >&5
-echo "${ECHO_T}static" >&6
-       SHARED_BUILD=0
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_BUILD 1
-_ACEOF
-
-    fi
-
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-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
-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
-if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
-  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
-
-  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
-
-  RANLIB=$ac_ct_RANLIB
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-
-
-    # Step 0.a: Enable 64 bit support?
-
-    echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
-echo $ECHO_N "checking if 64bit support is requested... $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
-    # Force 64bit on with VIS
-    if test "$do64bitVIS" = "yes"; then
-  do64bit=yes
-fi
-
-
-    # Step 0.c: Check if visibility support is available. Do this here so
-    # that platform specific alternatives can be used below if this fails.
-
-    echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
-echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6
-if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-           extern __attribute__((__visibility__("hidden"))) void f(void);
-           void f(void) {}
-int
-main ()
-{
-f();
-  ;
-  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_cv_cc_visibility_hidden=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_visibility_hidden=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-       CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
-echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6
-    if test $tcl_cv_cc_visibility_hidden = yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HIDDEN 1
-_ACEOF
-
-
-fi
-
-
-    # Step 0.d: Disable -rpath support?
-
-    echo "$as_me:$LINENO: checking if rpath support is requested" >&5
-echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6
-    # Check whether --enable-rpath or --disable-rpath was given.
-if test "${enable_rpath+set}" = set; then
-  enableval="$enable_rpath"
-  doRpath=$enableval
-else
-  doRpath=yes
-fi;
-    echo "$as_me:$LINENO: result: $doRpath" >&5
-echo "${ECHO_T}$doRpath" >&6
-
-    # TEA specific: 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
-
-
-    # Set the variable "system" to hold the name and version number
-    # for the system.
-
-
-    echo "$as_me:$LINENO: checking system version" >&5
-echo $ECHO_N "checking system version... $ECHO_C" >&6
-if test "${tcl_cv_sys_version+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       # TEA specific:
-       if test "${TEA_PLATFORM}" = "windows" ; then
-           tcl_cv_sys_version=windows
-       else
-           tcl_cv_sys_version=`uname -s`-`uname -r`
-           if test "$?" -ne 0 ; then
-               { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
-echo "$as_me: WARNING: can't find uname command" >&2;}
-               tcl_cv_sys_version=unknown
-           else
-               if test "`uname -s`" = "AIX" ; then
-                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
-               fi
-           fi
-       fi
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
-echo "${ECHO_T}$tcl_cv_sys_version" >&6
-    system=$tcl_cv_sys_version
-
-
-    # Require ranlib early so we can override it in special cases below.
-
-
-
-    # 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 removed some core-only vars.
-
-    do64bit_ok=no
-    # default to '{$LIBS}' and set to "" on per-platform necessary basis
-    SHLIB_LD_LIBS='${LIBS}'
-    # When ld needs options to work in 64-bit mode, put them in
-    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
-    # is disabled by the user. [Bug 1016796]
-    LDFLAGS_ARCH=""
-    UNSHARED_LIB_SUFFIX=""
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    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"
-
-else
-
-       CFLAGS_OPTIMIZE=-O
-       CFLAGS_WARNING=""
-
-fi
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}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="${ac_tool_prefix}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
-
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # 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_ac_ct_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_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_ac_ct_AR="ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  AR=$ac_ct_AR
-else
-  AR="$ac_cv_prog_AR"
-fi
-
-    STLIB_LD='${AR} cr'
-    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
-    if test "x$SHLIB_VERSION" = x; then
-  SHLIB_VERSION=""
-else
-  SHLIB_VERSION=".$SHLIB_VERSION"
-fi
-
-    case $system in
-       # TEA specific:
-       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.
-           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
-           # MACHINE is IX86 for LINK, but this is used by the manifest,
-           # which requires x86|amd64|ia64.
-           MACHINE="X86"
-           if test "$do64bit" != "no" ; then
-               if test "x${MSSDK}x" = "xx" ; then
-                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
-               fi
-               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
-               PATH64=""
-               case "$do64bit" in
-                   amd64|x64|yes)
-                       MACHINE="AMD64" ; # default to AMD64 64-bit build
-                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
-                       ;;
-                   ia64)
-                       MACHINE="IA64"
-                       PATH64="${MSSDK}/Bin/Win64"
-                       ;;
-               esac
-               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
-                   { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
-echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
-                   { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
-echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
-                   do64bit="no"
-               else
-                   echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
-echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6
-                   do64bit_ok="yes"
-               fi
-           fi
-
-           if test "$doWince" != "no" ; then
-               if test "$do64bit" != "no" ; 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}
-           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
-           echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
-echo "${ECHO_T}found $CELIB_DIR" >&6
-       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
-               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
-               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
-               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" != "no" ; then
-                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
-                   CC="\"${PATH64}/cl.exe\""
-                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
-                   RC="\"${MSSDK}/bin/rc.exe\""
-                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
-                   LINKBIN="\"${PATH64}/link.exe\""
-                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
-                   # Avoid 'unresolved external symbol __security_cookie'
-                   # errors, c.f. http://support.microsoft.com/?id=894573
-
-    vars="bufferoverflowU.lib"
-    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
-
-
-               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
-               if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; 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_RC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$RC"; then
-  ac_cv_prog_RC="$RC" # 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_RC="${ac_tool_prefix}windres"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-RC=$ac_cv_prog_RC
-if test -n "$RC"; then
-  echo "$as_me:$LINENO: result: $RC" >&5
-echo "${ECHO_T}$RC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RC"; then
-  ac_ct_RC=$RC
-  # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; 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_RC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_RC"; then
-  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # 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_RC="windres"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_RC=$ac_cv_prog_ac_ct_RC
-if test -n "$ac_ct_RC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_RC" >&5
-echo "${ECHO_T}$ac_ct_RC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  RC=$ac_ct_RC
-else
-  RC="$ac_cv_prog_RC"
-fi
-
-               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}"
-
-               echo "$as_me:$LINENO: checking for cross-compile version of gcc" >&5
-echo $ECHO_N "checking for cross-compile version of gcc... $ECHO_C" >&6
-if test "${ac_cv_cross+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.  */
-
-                           #ifdef _WIN32
-                               #error cross-compiler
-                           #endif
-
-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_cross=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_cross=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_cross" >&5
-echo "${ECHO_T}$ac_cv_cross" >&6
-                     if test "$ac_cv_cross" = "yes"; then
-                       case "$do64bit" in
-                           amd64|x64|yes)
-                               CC="x86_64-w64-mingw32-gcc"
-                               LD="x86_64-w64-mingw32-ld"
-                               AR="x86_64-w64-mingw32-ar"
-                               RANLIB="x86_64-w64-mingw32-ranlib"
-                               RC="x86_64-w64-mingw32-windres"
-                           ;;
-                           *)
-                               CC="i686-w64-mingw32-gcc"
-                               LD="i686-w64-mingw32-ld"
-                               AR="i686-w64-mingw32-ar"
-                               RANLIB="i686-w64-mingw32-ranlib"
-                               RC="i686-w64-mingw32-windres"
-                           ;;
-                       esac
-               fi
-
-           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
-               # and also
-               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
-               # This essentially turns it all on.
-               LDFLAGS_DEBUG="-debug -debugtype:cv"
-               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_SUFFIX=".dll"
-           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
-
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       AIX-*)
-           if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
-
-               # AIX requires the _r compiler when gcc isn't being used
-               case "${CC}" in
-                   *_r|*_r\ *)
-                       # ok ...
-                       ;;
-                   *)
-                       # Make sure only first arg gets _r
-                       CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
-                       ;;
-               esac
-               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"
-
-           LD_LIBRARY_PATH_VAR="LIBPATH"
-
-           # 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 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_ARCH="-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"
-               if test "$GCC" = yes; then
-
-                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-
-else
-
-                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-
-fi
-
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-
-else
-
-               if test "$GCC" = yes; then
-
-                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
-
-else
-
-                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
-                   LDFLAGS="$LDFLAGS -brtl"
-
-fi
-
-               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
-               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-fi
-
-           ;;
-       BeOS*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -nostart'
-           SHLIB_SUFFIX=".so"
-
-           #-----------------------------------------------------------
-           # Check for inet_ntoa in -lbind, for BeOS (which also needs
-           # -lsocket, even if the network functions are in -lnet which
-           # is always linked to, for compatibility.
-           #-----------------------------------------------------------
-           echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
-echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
-if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $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 inet_ntoa ();
-int
-main ()
-{
-inet_ntoa ();
-  ;
-  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_bind_inet_ntoa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_bind_inet_ntoa=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_bind_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
-if test $ac_cv_lib_bind_inet_ntoa = yes; then
-  LIBS="$LIBS -lbind -lsocket"
-fi
-
-           ;;
-       BSD/OS-4.*)
-           SHLIB_CFLAGS="-export-dynamic -fPIC"
-           SHLIB_LD='${CC} -shared'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       CYGWIN_*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD='${CC} -shared'
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
-           SHLIB_SUFFIX=".dll"
-           EXEEXT=".exe"
-           do64bit_ok=yes
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       Haiku*)
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
-           echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
-echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6
-if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnetwork  $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 inet_ntoa ();
-int
-main ()
-{
-inet_ntoa ();
-  ;
-  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_network_inet_ntoa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_network_inet_ntoa=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_network_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6
-if test $ac_cv_lib_network_inet_ntoa = yes; then
-  LIBS="$LIBS -lnetwork"
-fi
-
-           ;;
-       HP-UX-*.11.*)
-           # Use updated header definitions where possible
-
-cat >>confdefs.h <<\_ACEOF
-#define _XOPEN_SOURCE_EXTENDED 1
-_ACEOF
-
-           # TEA specific: Needed by Tcl, but not most extensions
-           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
-           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
-
-           if test "`uname -m`" = ia64; then
-
-               SHLIB_SUFFIX=".so"
-               # Use newer C++ library for C++ extensions
-               #if test "$GCC" != "yes" ; then
-               #   CPPFLAGS="-AA"
-               #fi
-
-else
-
-               SHLIB_SUFFIX=".sl"
-
-fi
-
-           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
-
-               LDFLAGS="$LDFLAGS -Wl,-E"
-               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
-               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
-
-fi
-
-           if test "$GCC" = yes; then
-
-               SHLIB_LD='${CC} -shared'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-else
-
-               CFLAGS="$CFLAGS -z"
-               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-               #CFLAGS="$CFLAGS +DAportable"
-               SHLIB_CFLAGS="+z"
-               SHLIB_LD="ld -b"
-
-fi
-
-
-           # Check to enable 64-bit flags for compiler/linker
-           if test "$do64bit" = "yes"; then
-
-               if test "$GCC" = yes; then
-
-                   case `${CC} -dumpmachine` in
-                       hppa64*)
-                           # 64-bit gcc in use.  Fix flags for GNU ld.
-                           do64bit_ok=yes
-                           SHLIB_LD='${CC} -shared'
-                           if test $doRpath = yes; then
-
-                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-                           ;;
-                       *)
-                           { 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_ARCH="+DD64"
-
-fi
-
-
-fi
- ;;
-       IRIX-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-fi
-
-           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_SUFFIX=".so"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-fi
-
-
-           # 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_ARCH="-64"
-
-fi
-
-
-fi
-
-           ;;
-       Linux*|GNU*|NetBSD-Debian)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-
-           # TEA specific:
-           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
-
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           if test "`uname -m`" = "alpha"; then
-  CFLAGS="$CFLAGS -mieee"
-fi
-
-           if test $do64bit = yes; then
-
-               echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_m64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                   hold_cflags=$CFLAGS
-                   CFLAGS="$CFLAGS -m64"
-                   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 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_cv_cc_m64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_m64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                   CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
-echo "${ECHO_T}$tcl_cv_cc_m64" >&6
-               if test $tcl_cv_cc_m64 = yes; then
-
-                   CFLAGS="$CFLAGS -m64"
-                   do64bit_ok=yes
-
-fi
-
-
-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
-
-           ;;
-       Lynx*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           CFLAGS_OPTIMIZE=-02
-           SHLIB_LD='${CC} -shared'
-           LD_FLAGS="-Wl,--export-dynamic"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-           ;;
-       OpenBSD-*)
-           arch=`arch -s`
-           case "$arch" in
-           vax)
-               SHLIB_SUFFIX=""
-               SHARED_LIB_SUFFIX=""
-               LDFLAGS=""
-               ;;
-           *)
-               case "$arch" in
-               alpha|sparc64)
-                   SHLIB_CFLAGS="-fPIC"
-                   ;;
-               *)
-                   SHLIB_CFLAGS="-fpic"
-                   ;;
-               esac
-               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-               SHLIB_SUFFIX=".so"
-               if test $doRpath = yes; then
-
-                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
-               LDFLAGS="-Wl,-export-dynamic"
-               ;;
-           esac
-           case "$arch" in
-           vax)
-               CFLAGS_OPTIMIZE="-O1"
-               ;;
-           *)
-               CFLAGS_OPTIMIZE="-O2"
-               ;;
-           esac
-           if test "${TCL_THREADS}" = "1"; then
-
-               # On OpenBSD:   Compile with -pthread
-               #               Don't link with -lpthread
-               LIBS=`echo $LIBS | sed s/-lpthread//`
-               CFLAGS="$CFLAGS -pthread"
-
-fi
-
-           # OpenBSD doesn't do version numbers with dots.
-           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       NetBSD-*)
-           # NetBSD has ELF and can use 'cc -shared' to build shared libs
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           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
-
-           ;;
-       FreeBSD-*)
-           # This configuration from FreeBSD Ports.
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD="${CC} -shared"
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
-           SHLIB_SUFFIX=".so"
-           LDFLAGS=""
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-           if test "${TCL_THREADS}" = "1"; then
-
-               # The -pthread needs to go in the LDFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
-fi
-
-           case $system in
-           FreeBSD-3.*)
-               # Version numbers are dot-stripped by system policy.
-               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
-               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
-               TCL_LIB_VERSIONS_OK=nodots
-               ;;
-           esac
-           ;;
-       Darwin-*)
-           CFLAGS_OPTIMIZE="-Os"
-           SHLIB_CFLAGS="-fno-common"
-           # To avoid discrepancies between what headers configure sees during
-           # preprocessing tests and compiling tests, move any -isysroot and
-           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
-           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
-           CFLAGS="`echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
-           if test $do64bit = yes; then
-
-               case `arch` in
-                   ppc)
-                       echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           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 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_cv_cc_arch_ppc64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_arch_ppc64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                           CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
-echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
-                       if test $tcl_cv_cc_arch_ppc64 = yes; then
-
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           do64bit_ok=yes
-
-fi
-;;
-                   i386)
-                       echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           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 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_cv_cc_arch_x86_64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_arch_x86_64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                           CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
-echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
-                       if test $tcl_cv_cc_arch_x86_64 = yes; then
-
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           do64bit_ok=yes
-
-fi
-;;
-                   *)
-                       { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
-echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
-               esac
-
-else
-
-               # Check for combined 32-bit and 64-bit fat build
-               if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
-                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
-
-                   fat_32_64=yes
-fi
-
-
-fi
-
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
-echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_single_module+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
-               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
-  tcl_cv_ld_single_module=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_single_module=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-               LDFLAGS=$hold_ldflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
-echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
-           if test $tcl_cv_ld_single_module = yes; then
-
-               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
-
-fi
-
-           # TEA specific: link shlib with current and compatibility version flags
-           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
-           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
-           SHLIB_SUFFIX=".dylib"
-           # Don't use -prebind when building for Mac OS X 10.4 or later only:
-           if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
-               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
-
-               LDFLAGS="$LDFLAGS -prebind"
-fi
-
-           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
-           echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
-echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_search_paths_first+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-               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
-  tcl_cv_ld_search_paths_first=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_search_paths_first=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-               LDFLAGS=$hold_ldflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
-echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
-           if test $tcl_cv_ld_search_paths_first = yes; then
-
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-
-fi
-
-           if test "$tcl_cv_cc_visibility_hidden" != yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE __private_extern__
-_ACEOF
-
-               tcl_cv_cc_visibility_hidden=yes
-
-fi
-
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-           # TEA specific: for combined 32 & 64 bit fat builds of Tk
-           # extensions, verify that 64-bit build is possible.
-           if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
-
-               if test "${TEA_WINDOWINGSYSTEM}" = x11; then
-
-                   echo "$as_me:$LINENO: checking for 64-bit X11" >&5
-echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6
-if test "${tcl_cv_lib_x11_64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
-                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <X11/Xlib.h>
-int
-main ()
-{
-XrmInitialize();
-  ;
-  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_cv_lib_x11_64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_lib_x11_64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
-echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6
-
-fi
-
-               if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
-
-                   echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
-echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6
-if test "${tcl_cv_lib_tk_64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
-                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <tk.h>
-int
-main ()
-{
-Tk_InitStubs(NULL, "", 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
-  tcl_cv_lib_tk_64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_lib_tk_64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
-echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6
-
-fi
-
-               # remove 64-bit arch flags from CFLAGS et al. if configuration
-               # does not support 64-bit.
-               if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
-
-                   { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
-echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
-                   for v in CFLAGS CPPFLAGS LDFLAGS; do
-                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
-                   done
-fi
-
-
-fi
-
-           ;;
-       OS/390-*)
-           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
-
-cat >>confdefs.h <<\_ACEOF
-#define _OE_SOCKETS 1
-_ACEOF
-
-           ;;
-       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_SUFFIX=".so"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-fi
-
-           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"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SCO_SV-3.2*)
-           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"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SunOS-5.[0-6])
-           # Careful to not let 5.10+ fall into this case
-
-           # 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"
-           SHLIB_SUFFIX=".so"
-           if test "$GCC" = yes; then
-
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-else
-
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-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 "`${CC} -dumpversion | awk -F. '{print $1}'`" -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_ARCH="-xarch=v9a"
-
-else
-
-                           CFLAGS="$CFLAGS -xarch=v9"
-                           LDFLAGS_ARCH="-xarch=v9"
-
-fi
-
-                       # Solaris 64 uses this as well
-                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
-
-fi
-
-
-else
-  if test "$arch" = "amd64 i386"; then
-
-                   if test "$GCC" = yes; then
-
-                       case $system in
-                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
-                               do64bit_ok=yes
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               { 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
-                       case $system in
-                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               CFLAGS="$CFLAGS -xarch=amd64"
-                               LDFLAGS="$LDFLAGS -xarch=amd64";;
-                       esac
-
-fi
-
-
-else
-  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
-echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
-fi
-
-fi
-
-
-fi
-
-
-           SHLIB_SUFFIX=".so"
-           if test "$GCC" = yes; then
-
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               if test "$do64bit_ok" = yes; then
-
-                   if test "$arch" = "sparcv9 sparc"; 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` | ..."
-                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
-
-else
-  if test "$arch" = "amd64 i386"; then
-
-                       # JH: static-libgcc is necessary for core Tcl, but may
-                       # not be necessary for extensions.
-                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
-
-fi
-
-fi
-
-
-fi
-
-
-else
-
-               case $system in
-                   SunOS-5.[1-9][0-9]*)
-                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
-                   *)
-                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
-               esac
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-
-fi
-
-           ;;
-       UNIX_SV* | UnixWare-5*)
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_LD='${CC} -G'
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-           # that don't grok the -Bexport option.  Test that it does.
-           echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
-echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_Bexport+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-               hold_ldflags=$LDFLAGS
-               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
-  tcl_cv_ld_Bexport=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_Bexport=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-               LDFLAGS=$hold_ldflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
-echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
-           if test $tcl_cv_ld_Bexport = yes; then
-
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-
-fi
-
-           CC_SEARCH_FLAGS=""
-           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
-
-
-
-
-    # Add in the arch flags late to ensure it wasn't removed.
-    # Not necessary in TEA, but this is aligned with core
-    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
-
-    # 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 "$GCC" = yes; then
-
-       case $system in
-           AIX-*) ;;
-           BSD/OS*) ;;
-           CYGWIN_*|MINGW32_*) ;;
-           IRIX*) ;;
-           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
-           Darwin-*) ;;
-           SCO_SV-3.2*) ;;
-           windows) ;;
-           *) SHLIB_CFLAGS="-fPIC" ;;
-       esac
-fi
-
-
-    if test "$tcl_cv_cc_visibility_hidden" != yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE extern
-_ACEOF
-
-
-fi
-
-
-    if test "$SHARED_LIB_SUFFIX" = ""; then
-
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
-fi
-
-    if test "$UNSHARED_LIB_SUFFIX" = ""; then
-
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
-fi
-
-
-    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
-       echo "$as_me:$LINENO: checking for SEH support in compiler" >&5
-echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6
-if test "${tcl_cv_seh+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  tcl_cv_seh=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-           int main(int argc, char** argv) {
-               int a, b = 0;
-               __try {
-                   a = 666 / b;
-               }
-               __except (EXCEPTION_EXECUTE_HANDLER) {
-                   return 0;
-               }
-               return 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
-  tcl_cv_seh=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-tcl_cv_seh=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5
-echo "${ECHO_T}$tcl_cv_seh" >&6
-       if test "$tcl_cv_seh" = "no" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NO_SEH 1
-_ACEOF
-
-       fi
-
-       #
-       # Check to see if the excpt.h include file provided contains the
-       # definition for EXCEPTION_DISPOSITION; if not, which is the case
-       # with Cygwin's version as of 2002-04-10, define it to be int,
-       # sufficient for getting the current code to work.
-       #
-       echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5
-echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6
-if test "${tcl_cv_eh_disposition+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 WIN32_LEAN_AND_MEAN
-#          include <windows.h>
-#          undef WIN32_LEAN_AND_MEAN
-
-int
-main ()
-{
-
-               EXCEPTION_DISPOSITION x;
-
-  ;
-  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_eh_disposition=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_eh_disposition=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5
-echo "${ECHO_T}$tcl_cv_eh_disposition" >&6
-       if test "$tcl_cv_eh_disposition" = "no" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define EXCEPTION_DISPOSITION int
-_ACEOF
-
-       fi
-
-       # Check to see if winnt.h defines CHAR, SHORT, and LONG
-       # even if VOID has already been #defined. The win32api
-       # used by mingw and cygwin is known to do this.
-
-       echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5
-echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6
-if test "${tcl_cv_winnt_ignore_void+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 VOID void
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-int
-main ()
-{
-
-               CHAR c;
-               SHORT s;
-               LONG l;
-
-  ;
-  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_winnt_ignore_void=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_winnt_ignore_void=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5
-echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6
-       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WINNT_IGNORE_VOID 1
-_ACEOF
-
-       fi
-    fi
-
-       # See if the compiler supports casting to a union type.
-       # This is used to stop gcc from printing a compiler
-       # warning when initializing a union member.
-
-       echo "$as_me:$LINENO: checking for cast to union support" >&5
-echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6
-if test "${tcl_cv_cast_to_union+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 ()
-{
-
-                 union foo { int i; double d; };
-                 union foo f = (union foo) (int) 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_cv_cast_to_union=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cast_to_union=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5
-echo "${ECHO_T}$tcl_cv_cast_to_union" >&6
-       if test "$tcl_cv_cast_to_union" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CAST_TO_UNION 1
-_ACEOF
-
-       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 "${tcl_cv_flag__largefile_source64+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 ()
-{
-char *p = (char *)open64;
-  ;
-  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__largefile_source64=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 _LARGEFILE_SOURCE64 1
-#include <sys/stat.h>
-int
-main ()
-{
-char *p = (char *)open64;
-  ;
-  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__largefile_source64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_flag__largefile_source64=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__largefile_source64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define _LARGEFILE_SOURCE64 1
-_ACEOF
-
-       tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
-    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
-       # TEA specific: 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 <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
-echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
-echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
-       if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_DIRENT64 1
-_ACEOF
-
-       fi
-
-       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
-echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
-echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
-       if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_STAT64 1
-_ACEOF
-
-       fi
-
-
-
-for ac_func in open64 lseek64
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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 $ac_func
-
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-       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" && \
-               test "x${ac_cv_func_lseek64}" = "xyes" && \
-               test "x${ac_cv_func_open64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TYPE_OFF64_T 1
-_ACEOF
-
-           echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-       else
-           echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-       fi
-    fi
-
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-
-    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;
-    DBGX=""
-    if test "$tcl_ok" = "no"; then
-       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
-       LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
-       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
-    # TEA specific:
-    if test "${TEA_PLATFORM}" != "windows" ; then
-       LDFLAGS_DEFAULT="${LDFLAGS}"
-    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
-
-
-#--------------------------------------------------------------------
-# Check for intptr_t (for INT2PTR & PTR2INT macros).
-#--------------------------------------------------------------------
-
-echo "$as_me:$LINENO: checking for intptr_t" >&5
-echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
-if test "${ac_cv_type_intptr_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.  */
-$ac_includes_default
-int
-main ()
-{
-if ((intptr_t *) 0)
-  return 0;
-if (sizeof (intptr_t))
-  return 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
-  ac_cv_type_intptr_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_intptr_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
-echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
-if test $ac_cv_type_intptr_t = yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INTPTR_T 1
-_ACEOF
-
-else
-
-    echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5
-echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6
-if test "${tcl_cv_intptr_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-    for tcl_cv_intptr_t in "int" "long" "long long" none; do
-       if test "$tcl_cv_intptr_t" != none; then
-           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
-int
-main ()
-{
-static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
-test_array [0] = 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_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_ext
-           test "$tcl_ok" = yes && break; fi
-    done
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5
-echo "${ECHO_T}$tcl_cv_intptr_t" >&6
-    if test "$tcl_cv_intptr_t" != none; then
-
-cat >>confdefs.h <<_ACEOF
-#define intptr_t $tcl_cv_intptr_t
-_ACEOF
-
-    fi
-
-fi
-
-
-#--------------------------------------------------------------------
-# Everyone should be linking against the Tcl stub library.  If you
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.
-#--------------------------------------------------------------------
-
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_TCL_STUBS 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_TCLOO_STUBS 1
-_ACEOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    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)"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-print("manifest needed")
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "manifest needed" >/dev/null 2>&1; then
-
-       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
-       VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
-       VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
-       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
-
-    CLEANFILES="$CLEANFILES *.manifest"
-
-
-fi
-rm -f conftest*
-
-       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
-           if test x"${TK_BIN_DIR}" != x ; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-           fi
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-           if test "$GCC" = "yes"; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
-           fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-       else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-           if test "$GCC" = "yes"; then
-               PKG_LIB_FILE=lib${PKG_LIB_FILE}
-           fi
-       fi
-       # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
-       if test "$GCC" = "yes"; then
-           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
-       fi
-       # 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 their 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.
-#--------------------------------------------------------------------
-
-itcl_STUB_LIB_FILE=${PKG_STUB_LIB_FILE}
-itcl_LIB_FILE=${PKG_LIB_FILE}
-
-
-
-#--------------------------------------------------------------------
-# 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
-# ${CYGPATH} because it's being used directly by make.
-# Require that we use a tclsh shell version 8.2 or later since earlier
-# versions have bugs in the pkg_mkIndex routine.
-#--------------------------------------------------------------------
-
-
-    echo "$as_me:$LINENO: checking for tclsh" >&5
-echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
-    if test -f "${TCL_BIN_DIR}/Makefile" ; then
-        # tclConfig.sh is in Tcl build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
-        fi
-    else
-        # tclConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
-        fi
-        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${TCLSH_PROG}" ; then
-                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
-    fi
-    echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
-echo "${ECHO_T}${TCLSH_PROG}" >&6
-
-
-
-#--------------------------------------------------------------------
-# These are for itclConfig.sh
-#--------------------------------------------------------------------
-
-
-    #--------------------------------------------------------------------
-    # These are for itclConfig.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="${libdir}/itcl${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`/${PKG_STUB_LIB_FILE}"
-    itcl_STUB_LIB_PATH="${pkglibdir}/${PKG_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`
-
-
-eval itcl_INCLUDE_SPEC="${itcl_SRC_DIR}/generic"
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-#--------------------------------------------------------------------
-
-                              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, 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.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `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 \
-       "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
-    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
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# 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[        ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[    ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[      ]*$//;
-}'
-fi
-
-# 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
-
-
-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
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
-
-: ${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.
-# Compiler output produced by configure, useful for debugging
-# 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
-
-# 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:$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
-    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 4.0.2, 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 4.0.2
-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
-_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
-
-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
-
-_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" ;;
-  "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
-
-# 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
-
-# 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_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;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,@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,@CLEANFILES@,$CLEANFILES,;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,@CPP@,$CPP,;t t
-s,@INSTALL@,$INSTALL,;t t
-s,@INSTALL_DATA_DIR@,$INSTALL_DATA_DIR,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_LIBRARY@,$INSTALL_LIBRARY,;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,@TCL_INCLUDES@,$TCL_INCLUDES,;t t
-s,@TCL_TOP_DIR_NATIVE@,$TCL_TOP_DIR_NATIVE,;t t
-s,@TCL_THREADS@,$TCL_THREADS,;t t
-s,@SHARED_BUILD@,$SHARED_BUILD,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@CELIB_DIR@,$CELIB_DIR,;t t
-s,@RC@,$RC,;t t
-s,@ac_ct_RC@,$ac_ct_RC,;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_LD_LIBS@,$SHLIB_LD_LIBS,;t t
-s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
-s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
-s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
-s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
-s,@TCL_DBGX@,$TCL_DBGX,;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,@VC_MANIFEST_EMBED_DLL@,$VC_MANIFEST_EMBED_DLL,;t t
-s,@VC_MANIFEST_EMBED_EXE@,$VC_MANIFEST_EMBED_EXE,;t t
-s,@itcl_STUB_LIB_FILE@,$itcl_STUB_LIB_FILE,;t t
-s,@itcl_LIB_FILE@,$itcl_LIB_FILE,;t t
-s,@TCLSH_PROG@,$TCLSH_PROG,;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,@MAJOR_VERSION@,$MAJOR_VERSION,;t t
-s,@MINOR_VERSION@,$MINOR_VERSION,;t t
-s,@PATCHLEVEL@,$PATCHLEVEL,;t t
-s,@itcl_SRC_DIR@,$itcl_SRC_DIR,;t t
-s,@itcl_INCLUDE_SPEC@,$itcl_INCLUDE_SPEC,;t t
-s,@LIBOBJS@,$LIBOBJS,;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"
-
-_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
-
-  # 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
-
-
-
-  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
-" $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
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-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
-
similarity index 100%
rename from pkgs/itcl4.0.2/README
rename to pkgs/itcl4.0.3/README
similarity index 100%
rename from pkgs/itcl4.0.2/TODO
rename to pkgs/itcl4.0.3/TODO
diff --git a/pkgs/itcl4.0.3/configure b/pkgs/itcl4.0.3/configure
new file mode 100755 (executable)
index 0000000..6d24606
--- /dev/null
@@ -0,0 +1,10076 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for itcl 4.0.3.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 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 more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+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
+IFS=$as_save_IFS
+
+     ;;
+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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; 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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# 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
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # 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 sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# 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'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='itcl'
+PACKAGE_TARNAME='itcl'
+PACKAGE_VERSION='4.0.3'
+PACKAGE_STRING='itcl 4.0.3'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+itcl_INCLUDE_SPEC
+itcl_SRC_DIR
+PATCHLEVEL
+MINOR_VERSION
+MAJOR_VERSION
+itcl_STUB_LIB_PATH
+itcl_BUILD_STUB_LIB_PATH
+itcl_STUB_LIB_SPEC
+itcl_BUILD_STUB_LIB_SPEC
+itcl_LIB_SPEC
+itcl_BUILD_LIB_SPEC
+TCLSH_PROG
+itcl_LIB_FILE
+itcl_STUB_LIB_FILE
+VC_MANIFEST_EMBED_EXE
+VC_MANIFEST_EMBED_DLL
+RANLIB_STUB
+MAKE_STUB_LIB
+MAKE_STATIC_LIB
+MAKE_SHARED_LIB
+MAKE_LIB
+TCL_DBGX
+LDFLAGS_DEFAULT
+CFLAGS_DEFAULT
+LD_LIBRARY_PATH_VAR
+SHLIB_CFLAGS
+SHLIB_LD_LIBS
+SHLIB_LD
+STLIB_LD
+CFLAGS_WARNING
+CFLAGS_OPTIMIZE
+CFLAGS_DEBUG
+RC
+CELIB_DIR
+AR
+SHARED_BUILD
+TCL_THREADS
+TCL_TOP_DIR_NATIVE
+TCL_INCLUDES
+PKG_OBJECTS
+PKG_SOURCES
+MATH_LIBS
+EGREP
+GREP
+RANLIB
+SET_MAKE
+INSTALL_LIBRARY
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+INSTALL_DATA
+INSTALL_DATA_DIR
+INSTALL
+CPP
+TCL_SHLIB_LD_LIBS
+TCL_LD_FLAGS
+TCL_EXTRA_CFLAGS
+TCL_DEFS
+TCL_LIBS
+CLEANFILES
+OBJEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+TCL_STUB_LIB_SPEC
+TCL_STUB_LIB_FLAG
+TCL_STUB_LIB_FILE
+TCL_LIB_SPEC
+TCL_LIB_FLAG
+TCL_LIB_FILE
+TCL_SRC_DIR
+TCL_BIN_DIR
+TCL_PATCH_LEVEL
+TCL_VERSION
+CONFIG_CLEAN_FILES
+LN_S
+PKG_CFLAGS
+PKG_LIBS
+PKG_INCLUDES
+PKG_HEADERS
+PKG_TCL_SOURCES
+PKG_STUB_OBJECTS
+PKG_STUB_SOURCES
+PKG_STUB_LIB_FILE
+PKG_LIB_FILE
+EXEEXT
+CYGPATH
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_tcl
+with_tclinclude
+enable_threads
+enable_shared
+enable_64bit
+enable_64bit_vis
+enable_rpath
+enable_wince
+with_celib
+enable_symbols
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+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.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    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 ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -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_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$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 ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    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 ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    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 | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    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-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-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    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 ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    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-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 ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_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
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
+               datadir sysconfdir sharedstatedir localstatedir includedir \
+               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+               libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# 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
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# 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 the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_myself" : 'X\(//\)[^/]' \| \
+        X"$as_myself" : 'X\(//\)$' \| \
+        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    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=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# 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 4.0.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 \`..']
+
+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]
+  --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]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/itcl]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of itcl 4.0.3:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-threads        build with threads
+  --enable-shared         build and link with shared libraries (default: on)
+  --enable-64bit          enable 64bit support (default: off)
+  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
+  --disable-rpath         disable rpath support (default: on)
+  --enable-wince          enable Win/CE support (where applicable)
+  --enable-symbols        build with debugging symbols (default: off)
+
+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-tclinclude       directory containing the public Tcl header files
+  --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>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) 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.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested 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
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+itcl configure 4.0.3
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 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
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); 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 $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* 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_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+        return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+           return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+cat >config.log <<_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 4.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+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`
+/usr/bin/hostinfo      = `(/usr/bin/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=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append 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
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset 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: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > 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
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_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 $ac_precious_vars; 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,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_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
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_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.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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
+
+
+
+#--------------------------------------------------------------------
+# 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.9"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
+$as_echo_n "checking for correct TEA configuration... " >&6; }
+    if test x"${PACKAGE_NAME}" = x ; then
+       as_fn_error $? "
+The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5
+    fi
+    if test x"3.9" = x ; then
+       as_fn_error $? "
+TEA version not specified." "$LINENO" 5
+    elif test "3.9" != "${TEA_VERSION}" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
+$as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
+$as_echo "ok (TEA ${TEA_VERSION})" >&6; }
+    fi
+
+    # If the user did not set CFLAGS, set it now to keep macros
+    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
+    if test "${CFLAGS+set}" != "set" ; then
+       CFLAGS=""
+    fi
+
+    case "`uname -s`" in
+       *win32*|*WIN32*|*MINGW32_*)
+           # Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CYGPATH+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CYGPATH="cygpath -w"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
+fi
+fi
+CYGPATH=$ac_cv_prog_CYGPATH
+if test -n "$CYGPATH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
+$as_echo "$CYGPATH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+           EXEEXT=".exe"
+           TEA_PLATFORM="windows"
+           ;;
+       *CYGWIN_*)
+           CYGPATH=echo
+           EXEEXT=".exe"
+           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
+           ;;
+       *)
+           CYGPATH=echo
+           # Maybe we are cross-compiling....
+           case ${host_alias} in
+               *mingw32*)
+               EXEEXT=".exe"
+               TEA_PLATFORM="windows"
+               ;;
+           *)
+               EXEEXT=""
+               TEA_PLATFORM="unix"
+               ;;
+           esac
+           ;;
+    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
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
+$as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
+
+
+
+
+    # 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_...
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "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 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"
+    break
+  elif 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/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
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+#--------------------------------------------------------------------
+# Load the tclConfig.sh file
+#--------------------------------------------------------------------
+
+
+
+    #
+    # 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 was given.
+if test "${with_tcl+set}" = set; then :
+  withval=$with_tcl; with_tclconfig="${withval}"
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
+$as_echo_n "checking for Tcl configuration... " >&6; }
+       if ${ac_cv_c_tclconfig+:} false; then :
+  $as_echo_n "(cached) " >&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
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
+$as_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
+                   as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
+               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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 common install locations
+           if test x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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"
+           as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
+       else
+           no_tcl=
+           TCL_BIN_DIR="${ac_cv_c_tclconfig}"
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
+       fi
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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_fn_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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+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 $# != 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
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* 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 -std 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 -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
+
+    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+$as_echo "loading" >&6; }
+       . "${TCL_BIN_DIR}/tclConfig.sh"
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tcl was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tcl.framework installed in an arbitrary location.
+       case ${TCL_DEFS} in
+           *TCL_FRAMEWORK*)
+               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
+                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
+                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
+                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
+                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5
+$as_echo_n "checking platform... " >&6; }
+    hold_cc=$CC; CC="$TCL_CC"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+           #ifdef _WIN32
+               #error win32
+           #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  TEA_PLATFORM="unix"
+else
+  TEA_PLATFORM="windows"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CC=$hold_cc
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
+$as_echo "$TEA_PLATFORM" >&6; }
+
+    # The BUILD_$pkg is to define the correct extern storage class
+    # handling when making this package
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_${PACKAGE_NAME} /**/
+_ACEOF
+
+    # Do this here as we have fully defined TEA_PLATFORM now
+    if test "${TEA_PLATFORM}" = "windows" ; then
+       EXEEXT=".exe"
+       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
+    fi
+
+    # TEA specific:
+
+
+
+
+
+
+
+
+if test "${TCL_VERSION}" != "8.6"; then
+    as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
+Itcl ${PACKAGE_VERSION} needs Tcl 8.6.
+Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6." "$LINENO" 5
+fi
+
+#-----------------------------------------------------------------------
+# 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
+           { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
+$as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
+           prefix=${TCL_PREFIX}
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5
+$as_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
+           { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
+$as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
+           exec_prefix=${TCL_EXEC_PREFIX}
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5
+$as_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 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.
+
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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_fn_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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+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 $# != 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
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* 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 -std 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 -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+
+    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
+    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
+    INSTALL_DATA='${INSTALL} -m 644'
+    INSTALL_PROGRAM='${INSTALL}'
+    INSTALL_SCRIPT='${INSTALL}'
+    INSTALL_LIBRARY='${INSTALL_DATA}'
+
+
+
+
+
+
+
+
+    #--------------------------------------------------------------------
+    # Checks to see if the make program sets the $MAKE variable.
+    #--------------------------------------------------------------------
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+    #--------------------------------------------------------------------
+    # Find ranlib
+    #--------------------------------------------------------------------
+
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+    #--------------------------------------------------------------------
+    # Determines the correct binary file extension (.o, .obj, .exe etc.)
+    #--------------------------------------------------------------------
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+
+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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.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
+
+#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))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+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
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
+$as_echo_n "checking if the compiler understands -pipe... " >&6; }
+if ${tcl_cv_cc_pipe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_cc_pipe=yes
+else
+  tcl_cv_cc_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
+$as_echo "$tcl_cv_cc_pipe" >&6; }
+       if test $tcl_cv_cc_pipe = yes; then
+           CFLAGS="$CFLAGS -pipe"
+       fi
+    fi
+
+    #--------------------------------------------------------------------
+    # Common compiler flag setup
+    #--------------------------------------------------------------------
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+               #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; 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
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_bigendian=no
+else
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ 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").
+    #--------------------------------------------------------------------
+
+    ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin"
+if test "x$ac_cv_func_sin" = xyes; then :
+  MATH_LIBS=""
+else
+  MATH_LIBS="-lm"
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5
+$as_echo_n "checking for main in -lieee... " >&6; }
+if ${ac_cv_lib_ieee_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lieee  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ieee_main=yes
+else
+  ac_cv_lib_ieee_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5
+$as_echo "$ac_cv_lib_ieee_main" >&6; }
+if test "x$ac_cv_lib_ieee_main" = xyes; then :
+  MATH_LIBS="-lieee $MATH_LIBS"
+fi
+
+
+    #--------------------------------------------------------------------
+    # Interactive UNIX requires -linet instead of -lsocket, plus it
+    # needs net/errno.h to define the socket-related error codes.
+    #--------------------------------------------------------------------
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5
+$as_echo_n "checking for main in -linet... " >&6; }
+if ${ac_cv_lib_inet_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_inet_main=yes
+else
+  ac_cv_lib_inet_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5
+$as_echo "$ac_cv_lib_inet_main" >&6; }
+if test "x$ac_cv_lib_inet_main" = xyes; then :
+  LIBS="$LIBS -linet"
+fi
+
+    ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_net_errno_h" = xyes; then :
+
+
+$as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h
+
+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
+    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+if test "x$ac_cv_func_connect" = xyes; then :
+  tcl_checkSocket=0
+else
+  tcl_checkSocket=1
+fi
+
+    if test "$tcl_checkSocket" = 1; then
+       ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
+if test "x$ac_cv_func_setsockopt" = xyes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
+$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_setsockopt+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char setsockopt ();
+int
+main ()
+{
+return setsockopt ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_setsockopt=yes
+else
+  ac_cv_lib_socket_setsockopt=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
+$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
+if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
+  LIBS="$LIBS -lsocket"
+else
+  tcl_checkBoth=1
+fi
+
+fi
+
+    fi
+    if test "$tcl_checkBoth" = 1; then
+       tk_oldLibs=$LIBS
+       LIBS="$LIBS -lsocket -lnsl"
+       ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept"
+if test "x$ac_cv_func_accept" = xyes; then :
+  tcl_checkNsl=0
+else
+  LIBS=$tk_oldLibs
+fi
+
+    fi
+    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_nsl_gethostbyname=yes
+else
+  ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
+  LIBS="$LIBS -lnsl"
+fi
+
+fi
+
+
+    # TEA specific: 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}'
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5
+$as_echo_n "checking dirent.h... " >&6; }
+if ${tcl_cv_dirent_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_dirent_h=yes
+else
+  tcl_cv_dirent_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5
+$as_echo "$tcl_cv_dirent_h" >&6; }
+
+    if test $tcl_cv_dirent_h = no; then
+
+$as_echo "#define NO_DIRENT_H 1" >>confdefs.h
+
+    fi
+
+    # TEA specific:
+    ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_ERRNO_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
+if test "x$ac_cv_header_float_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_FLOAT_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default"
+if test "x$ac_cv_header_values_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_VALUES_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
+if test "x$ac_cv_header_limits_h" = xyes; then :
+
+$as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h
+
+else
+
+$as_echo "#define NO_LIMITS_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+  tcl_ok=1
+else
+  tcl_ok=0
+fi
+
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+
+$as_echo "#define NO_STDLIB_H 1" >>confdefs.h
+
+    fi
+    ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
+if test "x$ac_cv_header_string_h" = xyes; then :
+  tcl_ok=1
+else
+  tcl_ok=0
+fi
+
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+
+$as_echo "#define NO_STRING_H 1" >>confdefs.h
+
+    fi
+
+    ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_wait_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_DLFCN_H 1" >>confdefs.h
+
+fi
+
+
+
+    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
+    for ac_header in sys/param.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PARAM_H 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__
+# 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="
+                itcl2TclOO.c
+               itclBase.c
+               itclBuiltin.c
+                itclClass.c
+                itclCmd.c
+                itclEnsemble.c
+                itclHelpers.c
+               itclInfo.c
+                itclLinkage.c
+                itclMethod.c
+                itclObject.c
+               itclParse.c
+               itclStubs.c
+                itclStubInit.c
+               itclResolve.c
+               itclTclIntStubsFcn.c
+               itclUtil.c
+                itclMigrate2TclCore.c
+               itclTestRegisterC.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
+               # To add more dirs here (like 'src'), you have to update VPATH
+               # in Makefile.in as well
+               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+                   -a ! -f "${srcdir}/macosx/$i" \
+                   ; then
+                   as_fn_error $? "could not find source file '$i'" "$LINENO" 5
+               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
+
+
+
+
+    vars="generic/itcl.h
+                generic/itclDecls.h
+               generic/itclInt.h
+                generic/itclMigrate2TclCore.h
+                generic/itclTclIntStubsFcn.h
+                generic/itcl2TclOO.h
+                generic/itclIntDecls.h
+               "
+    for i in $vars; do
+       # check for existence, be strict because it is installed
+       if test ! -f "${srcdir}/$i" ; then
+           as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
+       fi
+       PKG_HEADERS="$PKG_HEADERS $i"
+    done
+
+
+
+    vars="-I. -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" \
+           -a ! -f "${srcdir}/macosx/$i" \
+           ; then
+           as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5
+       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 library/itclWidget.tcl library/itclHullCmds.tcl"
+    for i in $vars; do
+       # check for existence, be strict because it is installed
+       if test ! -f "${srcdir}/$i" ; then
+           as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
+       fi
+       PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
+    done
+
+
+
+#--------------------------------------------------------------------
+# __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.
+#--------------------------------------------------------------------
+
+if test "${TEA_PLATFORM}" = "windows" ; then
+
+    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
+               # To add more dirs here (like 'src'), you have to update VPATH
+               # in Makefile.in as well
+               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+                   -a ! -f "${srcdir}/macosx/$i" \
+                   ; then
+                   as_fn_error $? "could not find source file '$i'" "$LINENO" 5
+               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
+
+
+
+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 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
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
+$as_echo_n "checking for Tcl public headers... " >&6; }
+
+
+# Check whether --with-tclinclude was given.
+if test "${with_tclinclude+set}" = set; then :
+  withval=$with_tclinclude; with_tclinclude=${withval}
+fi
+
+
+    if ${ac_cv_c_tclh+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       # 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
+               as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
+           fi
+       else
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tcl was built as a framework, attempt to use
+               # the framework's Headers directory
+               case ${TCL_DEFS} in
+                   *TCL_FRAMEWORK*)
+                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tcl is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TCL_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$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`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TCL_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           fi
+           for i in $list ; do
+               if test -f "$i/tcl.h" ; then
+                   ac_cv_c_tclh=$i
+                   break
+               fi
+           done
+       fi
+
+fi
+
+
+    # Print a message based on how we determined the include path
+
+    if test x"${ac_cv_c_tclh}" = x ; then
+       as_fn_error $? "tcl.h not found.  Please specify its location with --with-tclinclude" "$LINENO" 5
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
+$as_echo "${ac_cv_c_tclh}" >&6; }
+    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}\"
+
+
+
+
+    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private include files" >&5
+$as_echo_n "checking for Tcl private include files... " >&6; }
+
+    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
+    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
+
+    # Check to see if tcl<Plat>Port.h isn't already with the public headers
+    # Don't look for tclInt.h because that resides with tcl.h in the core
+    # sources, but the <plat>Port headers are in a different directory
+    if test "${TEA_PLATFORM}" = "windows" -a \
+       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
+       result="private headers found with public headers"
+    elif test "${TEA_PLATFORM}" = "unix" -a \
+       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
+       result="private headers found with public headers"
+    else
+       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
+       if test "${TEA_PLATFORM}" = "windows"; then
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
+       else
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
+       fi
+       # Overwrite the previous TCL_INCLUDES as this should capture both
+       # public and private headers in the same set.
+       # We want to ensure these are substituted so as not to require
+       # any *_NATIVE vars be defined in the Makefile
+       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+       if test "`uname -s`" = "Darwin"; then
+            # If Tcl was built as a framework, attempt to use
+            # the framework's Headers and PrivateHeaders directories
+            case ${TCL_DEFS} in
+               *TCL_FRAMEWORK*)
+                   if test -d "${TCL_BIN_DIR}/Headers" -a \
+                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
+                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
+                   else
+                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
+                   fi
+                   ;;
+           esac
+           result="Using ${TCL_INCLUDES}"
+       else
+           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
+               as_fn_error $? "Cannot find private header tclInt.h in ${TCL_SRC_DIR}" "$LINENO" 5
+           fi
+           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
+       fi
+    fi
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${result}" >&5
+$as_echo "${result}" >&6; }
+
+
+#--------------------------------------------------------------------
+# Check whether --enable-threads or --disable-threads was given.
+# This auto-enables if Tcl was compiled threaded.
+#--------------------------------------------------------------------
+
+
+    # Check whether --enable-threads was given.
+if test "${enable_threads+set}" = set; then :
+  enableval=$enable_threads; tcl_ok=$enableval
+else
+  tcl_ok=yes
+fi
+
+
+    if test "${enable_threads+set}" = set; then
+       enableval="$enable_threads"
+       tcl_ok=$enableval
+    else
+       tcl_ok=yes
+    fi
+
+    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:
+
+           # USE_THREAD_ALLOC tells us to try the special thread-based
+           # allocator that significantly reduces lock contention
+
+$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
+
+
+$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+           if test "`uname -s`" = "SunOS" ; then
+
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+           fi
+
+$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
+$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init ();
+int
+main ()
+{
+return pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_mutex_init=yes
+else
+  ac_cv_lib_pthread_pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+           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]
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
+$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __pthread_mutex_init ();
+int
+main ()
+{
+return __pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread___pthread_mutex_init=yes
+else
+  ac_cv_lib_pthread___pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+           fi
+
+           if test "$tcl_ok" = "yes"; then
+               # The space is needed
+               THREADS_LIBS=" -lpthread"
+           else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
+$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
+if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthreads  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init ();
+int
+main ()
+{
+return pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthreads_pthread_mutex_init=yes
+else
+  ac_cv_lib_pthreads_pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+               if test "$tcl_ok" = "yes"; then
+                   # The space is needed
+                   THREADS_LIBS=" -lpthreads"
+               else
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
+$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
+if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init ();
+int
+main ()
+{
+return pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_pthread_mutex_init=yes
+else
+  ac_cv_lib_c_pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+                   if test "$tcl_ok" = "no"; then
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
+$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init ();
+int
+main ()
+{
+return pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_mutex_init=yes
+else
+  ac_cv_lib_c_r_pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+                       if test "$tcl_ok" = "yes"; then
+                           # The space is needed
+                           THREADS_LIBS=" -pthread"
+                       else
+                           TCL_THREADS=0
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
+$as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
+                       fi
+                   fi
+               fi
+           fi
+       fi
+    else
+       TCL_THREADS=0
+    fi
+    # Do checking message here to not mess up interleaved configure output
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
+$as_echo_n "checking for building with threads... " >&6; }
+    if test "${TCL_THREADS}" = 1; then
+
+$as_echo "#define TCL_THREADS 1" >>confdefs.h
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
+$as_echo "yes (default)" >&6; }
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    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
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
+$as_echo "$as_me: WARNING:
+    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
+           fi
+           ;;
+       *)
+           if test "${TCL_THREADS}" = "1"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+    --enable-threads requested, but building against a Tcl that is NOT
+    thread-enabled.  This is an OK configuration that will also run in
+    a thread-enabled core." >&5
+$as_echo "$as_me: WARNING:
+    --enable-threads requested, but building against a Tcl that is NOT
+    thread-enabled.  This is an OK configuration that will also run in
+    a thread-enabled core." >&2;}
+           fi
+           ;;
+    esac
+
+
+
+#--------------------------------------------------------------------
+# The statement below defines a collection of symbols related to
+# building as a shared library instead of a static library.
+#--------------------------------------------------------------------
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
+$as_echo_n "checking how to build libraries... " >&6; }
+    # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; tcl_ok=$enableval
+else
+  tcl_ok=yes
+fi
+
+
+    if test "${enable_shared+set}" = set; then
+       enableval="$enable_shared"
+       tcl_ok=$enableval
+    else
+       tcl_ok=yes
+    fi
+
+    if test "$tcl_ok" = "yes" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
+$as_echo "shared" >&6; }
+       SHARED_BUILD=1
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+$as_echo "static" >&6; }
+       SHARED_BUILD=0
+
+$as_echo "#define STATIC_BUILD 1" >>confdefs.h
+
+    fi
+
+
+
+#--------------------------------------------------------------------
+# This macro figures out what flags to use with the compiler/linker
+# when building shared/static debug/optimized objects.  This information
+# can be taken from the tclConfig.sh file, but this figures it all out.
+#--------------------------------------------------------------------
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+
+
+    # Step 0.a: Enable 64 bit support?
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
+$as_echo_n "checking if 64bit support is requested... " >&6; }
+    # Check whether --enable-64bit was given.
+if test "${enable_64bit+set}" = set; then :
+  enableval=$enable_64bit; do64bit=$enableval
+else
+  do64bit=no
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
+$as_echo "$do64bit" >&6; }
+
+    # Step 0.b: Enable Solaris 64 bit VIS support?
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
+$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
+    # Check whether --enable-64bit-vis was given.
+if test "${enable_64bit_vis+set}" = set; then :
+  enableval=$enable_64bit_vis; do64bitVIS=$enableval
+else
+  do64bitVIS=no
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
+$as_echo "$do64bitVIS" >&6; }
+    # Force 64bit on with VIS
+    if test "$do64bitVIS" = "yes"; then :
+  do64bit=yes
+fi
+
+    # Step 0.c: Check if visibility support is available. Do this here so
+    # that platform specific alternatives can be used below if this fails.
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
+$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
+if ${tcl_cv_cc_visibility_hidden+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+           extern __attribute__((__visibility__("hidden"))) void f(void);
+           void f(void) {}
+int
+main ()
+{
+f();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_cc_visibility_hidden=yes
+else
+  tcl_cv_cc_visibility_hidden=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
+$as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
+    if test $tcl_cv_cc_visibility_hidden = yes; then :
+
+
+$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
+
+
+$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
+
+
+fi
+
+    # Step 0.d: Disable -rpath support?
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
+$as_echo_n "checking if rpath support is requested... " >&6; }
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; doRpath=$enableval
+else
+  doRpath=yes
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
+$as_echo "$doRpath" >&6; }
+
+    # TEA specific: Cross-compiling options for Windows/CE builds?
+
+    if test "${TEA_PLATFORM}" = windows; then :
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5
+$as_echo_n "checking if Windows/CE build is requested... " >&6; }
+       # Check whether --enable-wince was given.
+if test "${enable_wince+set}" = set; then :
+  enableval=$enable_wince; doWince=$enableval
+else
+  doWince=no
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5
+$as_echo "$doWince" >&6; }
+
+fi
+
+    # Set the variable "system" to hold the name and version number
+    # for the system.
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
+$as_echo_n "checking system version... " >&6; }
+if ${tcl_cv_sys_version+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       # TEA specific:
+       if test "${TEA_PLATFORM}" = "windows" ; then
+           tcl_cv_sys_version=windows
+       else
+           tcl_cv_sys_version=`uname -s`-`uname -r`
+           if test "$?" -ne 0 ; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
+$as_echo "$as_me: WARNING: can't find uname command" >&2;}
+               tcl_cv_sys_version=unknown
+           else
+               if test "`uname -s`" = "AIX" ; then
+                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
+               fi
+           fi
+       fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
+$as_echo "$tcl_cv_sys_version" >&6; }
+    system=$tcl_cv_sys_version
+
+
+    # Require ranlib early so we can override it in special cases below.
+
+
+
+    # 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 removed some core-only vars.
+
+    do64bit_ok=no
+    # default to '{$LIBS}' and set to "" on per-platform necessary basis
+    SHLIB_LD_LIBS='${LIBS}'
+    # When ld needs options to work in 64-bit mode, put them in
+    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
+    # is disabled by the user. [Bug 1016796]
+    LDFLAGS_ARCH=""
+    UNSHARED_LIB_SUFFIX=""
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    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"
+
+else
+
+       CFLAGS_OPTIMIZE=-O
+       CFLAGS_WARNING=""
+
+fi
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+    STLIB_LD='${AR} cr'
+    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+    if test "x$SHLIB_VERSION" = x; then :
+  SHLIB_VERSION=""
+else
+  SHLIB_VERSION=".$SHLIB_VERSION"
+fi
+    case $system in
+       # TEA specific:
+       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.
+           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+           # MACHINE is IX86 for LINK, but this is used by the manifest,
+           # which requires x86|amd64|ia64.
+           MACHINE="X86"
+           if test "$do64bit" != "no" ; then
+               if test "x${MSSDK}x" = "xx" ; then
+                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
+               fi
+               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
+               PATH64=""
+               case "$do64bit" in
+                   amd64|x64|yes)
+                       MACHINE="AMD64" ; # default to AMD64 64-bit build
+                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+                       ;;
+                   ia64)
+                       MACHINE="IA64"
+                       PATH64="${MSSDK}/Bin/Win64"
+                       ;;
+               esac
+               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
+$as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5
+$as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
+                   do64bit="no"
+               else
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: result:    Using 64-bit $MACHINE mode" >&5
+$as_echo "   Using 64-bit $MACHINE mode" >&6; }
+                   do64bit_ok="yes"
+               fi
+           fi
+
+           if test "$doWince" != "no" ; then
+               if test "$do64bit" != "no" ; then
+                   as_fn_error $? "Windows/CE and 64-bit builds incompatible" "$LINENO" 5
+               fi
+               if test "$GCC" = "yes" ; then
+                   as_fn_error $? "Windows/CE and GCC builds incompatible" "$LINENO" 5
+               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 was given.
+if test "${with_celib+set}" = set; then :
+  withval=$with_celib; with_celibconfig=${withval}
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5
+$as_echo_n "checking for Windows/CE celib directory... " >&6; }
+       if ${ac_cv_c_celibconfig+:} false; then :
+  $as_echo_n "(cached) " >&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
+                   as_fn_error $? "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5
+               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
+           as_fn_error $? "Cannot find celib support library directory" "$LINENO" 5
+       else
+           no_celib=
+           CELIB_DIR=${ac_cv_c_celibconfig}
+           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $CELIB_DIR" >&5
+$as_echo "found $CELIB_DIR" >&6; }
+       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
+               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
+               if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
+                   -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
+                   as_fn_error $? "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5
+                   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" != "no" ; then
+                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
+                   CC="\"${PATH64}/cl.exe\""
+                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+                   RC="\"${MSSDK}/bin/rc.exe\""
+                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+                   LINKBIN="\"${PATH64}/link.exe\""
+                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+                   # Avoid 'unresolved external symbol __security_cookie'
+                   # errors, c.f. http://support.microsoft.com/?id=894573
+
+    vars="bufferoverflowU.lib"
+    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
+
+
+               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
+               if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RC"; then
+  ac_cv_prog_RC="$RC" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RC="${ac_tool_prefix}windres"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RC=$ac_cv_prog_RC
+if test -n "$RC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
+$as_echo "$RC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RC"; then
+  ac_ct_RC=$RC
+  # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RC"; then
+  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RC="windres"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RC=$ac_cv_prog_ac_ct_RC
+if test -n "$ac_ct_RC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
+$as_echo "$ac_ct_RC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RC" = x; then
+    RC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RC=$ac_ct_RC
+  fi
+else
+  RC="$ac_cv_prog_RC"
+fi
+
+               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}"
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
+$as_echo_n "checking for cross-compile version of gcc... " >&6; }
+if ${ac_cv_cross+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+                           #ifdef _WIN32
+                               #error cross-compiler
+                           #endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_cross=yes
+else
+  ac_cv_cross=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
+$as_echo "$ac_cv_cross" >&6; }
+                     if test "$ac_cv_cross" = "yes"; then
+                       case "$do64bit" in
+                           amd64|x64|yes)
+                               CC="x86_64-w64-mingw32-gcc"
+                               LD="x86_64-w64-mingw32-ld"
+                               AR="x86_64-w64-mingw32-ar"
+                               RANLIB="x86_64-w64-mingw32-ranlib"
+                               RC="x86_64-w64-mingw32-windres"
+                           ;;
+                           *)
+                               CC="i686-w64-mingw32-gcc"
+                               LD="i686-w64-mingw32-ld"
+                               AR="i686-w64-mingw32-ar"
+                               RANLIB="i686-w64-mingw32-ranlib"
+                               RC="i686-w64-mingw32-windres"
+                           ;;
+                       esac
+               fi
+
+           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
+               # and also
+               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
+               # This essentially turns it all on.
+               LDFLAGS_DEBUG="-debug -debugtype:cv"
+               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_SUFFIX=".dll"
+           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       AIX-*)
+           if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then :
+
+               # AIX requires the _r compiler when gcc isn't being used
+               case "${CC}" in
+                   *_r|*_r\ *)
+                       # ok ...
+                       ;;
+                   *)
+                       # Make sure only first arg gets _r
+                       CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
+                       ;;
+               esac
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
+$as_echo "Using $CC for compiling with threads" >&6; }
+
+fi
+           LIBS="$LIBS -lc"
+           SHLIB_CFLAGS=""
+           SHLIB_SUFFIX=".so"
+
+           LD_LIBRARY_PATH_VAR="LIBPATH"
+
+           # Check to enable 64-bit flags for compiler/linker
+           if test "$do64bit" = yes; then :
+
+               if test "$GCC" = yes; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+
+else
+
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS -q64"
+                   LDFLAGS_ARCH="-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"
+               if test "$GCC" = yes; then :
+
+                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+
+else
+
+                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+
+fi
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+
+else
+
+               if test "$GCC" = yes; then :
+
+                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
+
+else
+
+                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
+                   LDFLAGS="$LDFLAGS -brtl"
+
+fi
+               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+fi
+           ;;
+       BeOS*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -nostart'
+           SHLIB_SUFFIX=".so"
+
+           #-----------------------------------------------------------
+           # Check for inet_ntoa in -lbind, for BeOS (which also needs
+           # -lsocket, even if the network functions are in -lnet which
+           # is always linked to, for compatibility.
+           #-----------------------------------------------------------
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
+$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
+if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbind  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntoa ();
+int
+main ()
+{
+return inet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bind_inet_ntoa=yes
+else
+  ac_cv_lib_bind_inet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
+$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
+if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
+  LIBS="$LIBS -lbind -lsocket"
+fi
+
+           ;;
+       BSD/OS-4.*)
+           SHLIB_CFLAGS="-export-dynamic -fPIC"
+           SHLIB_LD='${CC} -shared'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       CYGWIN_*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD='${CC} -shared'
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
+           SHLIB_SUFFIX=".dll"
+           EXEEXT=".exe"
+           do64bit_ok=yes
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       Haiku*)
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
+$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
+if ${ac_cv_lib_network_inet_ntoa+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnetwork  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntoa ();
+int
+main ()
+{
+return inet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_network_inet_ntoa=yes
+else
+  ac_cv_lib_network_inet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
+$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
+if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
+  LIBS="$LIBS -lnetwork"
+fi
+
+           ;;
+       HP-UX-*.11.*)
+           # Use updated header definitions where possible
+
+$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
+
+           # TEA specific: Needed by Tcl, but not most extensions
+           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
+           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
+
+           if test "`uname -m`" = ia64; then :
+
+               SHLIB_SUFFIX=".so"
+               # Use newer C++ library for C++ extensions
+               #if test "$GCC" != "yes" ; then
+               #   CPPFLAGS="-AA"
+               #fi
+
+else
+
+               SHLIB_SUFFIX=".sl"
+
+fi
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_shl_load=yes
+else
+  ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+           if test "$tcl_ok" = yes; then :
+
+               LDFLAGS="$LDFLAGS -Wl,-E"
+               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+
+fi
+           if test "$GCC" = yes; then :
+
+               SHLIB_LD='${CC} -shared'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+else
+
+               CFLAGS="$CFLAGS -z"
+               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+               #CFLAGS="$CFLAGS +DAportable"
+               SHLIB_CFLAGS="+z"
+               SHLIB_LD="ld -b"
+
+fi
+
+           # Check to enable 64-bit flags for compiler/linker
+           if test "$do64bit" = "yes"; then :
+
+               if test "$GCC" = yes; then :
+
+                   case `${CC} -dumpmachine` in
+                       hppa64*)
+                           # 64-bit gcc in use.  Fix flags for GNU ld.
+                           do64bit_ok=yes
+                           SHLIB_LD='${CC} -shared'
+                           if test $doRpath = yes; then :
+
+                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+                           ;;
+                       *)
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+                           ;;
+                   esac
+
+else
+
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS +DD64"
+                   LDFLAGS_ARCH="+DD64"
+
+fi
+
+fi ;;
+       IRIX-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+fi
+           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_SUFFIX=".so"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+fi
+
+           # Check to enable 64-bit flags for compiler/linker
+
+           if test "$do64bit" = yes; then :
+
+               if test "$GCC" = yes; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
+$as_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_ARCH="-64"
+
+fi
+
+fi
+           ;;
+       Linux*|GNU*|NetBSD-Debian)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+
+           # TEA specific:
+           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           if test "`uname -m`" = "alpha"; then :
+  CFLAGS="$CFLAGS -mieee"
+fi
+           if test $do64bit = yes; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
+$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
+if ${tcl_cv_cc_m64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                   hold_cflags=$CFLAGS
+                   CFLAGS="$CFLAGS -m64"
+                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_cc_m64=yes
+else
+  tcl_cv_cc_m64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                   CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
+$as_echo "$tcl_cv_cc_m64" >&6; }
+               if test $tcl_cv_cc_m64 = yes; then :
+
+                   CFLAGS="$CFLAGS -m64"
+                   do64bit_ok=yes
+
+fi
+
+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
+           ;;
+       Lynx*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           CFLAGS_OPTIMIZE=-02
+           SHLIB_LD='${CC} -shared'
+           LD_FLAGS="-Wl,--export-dynamic"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+           ;;
+       OpenBSD-*)
+           arch=`arch -s`
+           case "$arch" in
+           vax)
+               SHLIB_SUFFIX=""
+               SHARED_LIB_SUFFIX=""
+               LDFLAGS=""
+               ;;
+           *)
+               case "$arch" in
+               alpha|sparc64)
+                   SHLIB_CFLAGS="-fPIC"
+                   ;;
+               *)
+                   SHLIB_CFLAGS="-fpic"
+                   ;;
+               esac
+               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+               SHLIB_SUFFIX=".so"
+               if test $doRpath = yes; then :
+
+                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
+               LDFLAGS="-Wl,-export-dynamic"
+               ;;
+           esac
+           case "$arch" in
+           vax)
+               CFLAGS_OPTIMIZE="-O1"
+               ;;
+           *)
+               CFLAGS_OPTIMIZE="-O2"
+               ;;
+           esac
+           if test "${TCL_THREADS}" = "1"; then :
+
+               # On OpenBSD:   Compile with -pthread
+               #               Don't link with -lpthread
+               LIBS=`echo $LIBS | sed s/-lpthread//`
+               CFLAGS="$CFLAGS -pthread"
+
+fi
+           # OpenBSD doesn't do version numbers with dots.
+           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       NetBSD-*)
+           # NetBSD has ELF and can use 'cc -shared' to build shared libs
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           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
+           ;;
+       FreeBSD-*)
+           # This configuration from FreeBSD Ports.
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD="${CC} -shared"
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
+           SHLIB_SUFFIX=".so"
+           LDFLAGS=""
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+           if test "${TCL_THREADS}" = "1"; then :
+
+               # The -pthread needs to go in the LDFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+fi
+           case $system in
+           FreeBSD-3.*)
+               # Version numbers are dot-stripped by system policy.
+               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
+               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+               TCL_LIB_VERSIONS_OK=nodots
+               ;;
+           esac
+           ;;
+       Darwin-*)
+           CFLAGS_OPTIMIZE="-Os"
+           SHLIB_CFLAGS="-fno-common"
+           # To avoid discrepancies between what headers configure sees during
+           # preprocessing tests and compiling tests, move any -isysroot and
+           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
+           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
+           CFLAGS="`echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
+           if test $do64bit = yes; then :
+
+               case `arch` in
+                   ppc)
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
+$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
+if ${tcl_cv_cc_arch_ppc64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_cc_arch_ppc64=yes
+else
+  tcl_cv_cc_arch_ppc64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                           CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
+$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
+                       if test $tcl_cv_cc_arch_ppc64 = yes; then :
+
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           do64bit_ok=yes
+
+fi;;
+                   i386)
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
+$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
+if ${tcl_cv_cc_arch_x86_64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_cc_arch_x86_64=yes
+else
+  tcl_cv_cc_arch_x86_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                           CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
+$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
+                       if test $tcl_cv_cc_arch_x86_64 = yes; then :
+
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           do64bit_ok=yes
+
+fi;;
+                   *)
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
+$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
+               esac
+
+else
+
+               # Check for combined 32-bit and 64-bit fat build
+               if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
+                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
+
+                   fat_32_64=yes
+fi
+
+fi
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
+$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
+if ${tcl_cv_ld_single_module+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_ld_single_module=yes
+else
+  tcl_cv_ld_single_module=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LDFLAGS=$hold_ldflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
+$as_echo "$tcl_cv_ld_single_module" >&6; }
+           if test $tcl_cv_ld_single_module = yes; then :
+
+               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+
+fi
+           # TEA specific: link shlib with current and compatibility version flags
+           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
+           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
+           SHLIB_SUFFIX=".dylib"
+           # Don't use -prebind when building for Mac OS X 10.4 or later only:
+           if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
+               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then :
+
+               LDFLAGS="$LDFLAGS -prebind"
+fi
+           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
+$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
+if ${tcl_cv_ld_search_paths_first+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_ld_search_paths_first=yes
+else
+  tcl_cv_ld_search_paths_first=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LDFLAGS=$hold_ldflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
+$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
+           if test $tcl_cv_ld_search_paths_first = yes; then :
+
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+
+fi
+           if test "$tcl_cv_cc_visibility_hidden" != yes; then :
+
+
+$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
+
+               tcl_cv_cc_visibility_hidden=yes
+
+fi
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+           # TEA specific: for combined 32 & 64 bit fat builds of Tk
+           # extensions, verify that 64-bit build is possible.
+           if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then :
+
+               if test "${TEA_WINDOWINGSYSTEM}" = x11; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
+$as_echo_n "checking for 64-bit X11... " >&6; }
+if ${tcl_cv_lib_x11_64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
+                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_lib_x11_64=yes
+else
+  tcl_cv_lib_x11_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
+$as_echo "$tcl_cv_lib_x11_64" >&6; }
+
+fi
+               if test "${TEA_WINDOWINGSYSTEM}" = aqua; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
+$as_echo_n "checking for 64-bit Tk... " >&6; }
+if ${tcl_cv_lib_tk_64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
+                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <tk.h>
+int
+main ()
+{
+Tk_InitStubs(NULL, "", 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_lib_tk_64=yes
+else
+  tcl_cv_lib_tk_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
+$as_echo "$tcl_cv_lib_tk_64" >&6; }
+
+fi
+               # remove 64-bit arch flags from CFLAGS et al. if configuration
+               # does not support 64-bit.
+               if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
+$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
+                   for v in CFLAGS CPPFLAGS LDFLAGS; do
+                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
+                   done
+fi
+
+fi
+           ;;
+       OS/390-*)
+           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
+
+$as_echo "#define _OE_SOCKETS 1" >>confdefs.h
+
+           ;;
+       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_SUFFIX=".so"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+fi
+           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"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SCO_SV-3.2*)
+           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"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SunOS-5.[0-6])
+           # Careful to not let 5.10+ fall into this case
+
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+
+$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_SUFFIX=".so"
+           if test "$GCC" = yes; then :
+
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+else
+
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+fi
+           ;;
+       SunOS-5*)
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+
+$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+
+           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 "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
+
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
+$as_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_ARCH="-xarch=v9a"
+
+else
+
+                           CFLAGS="$CFLAGS -xarch=v9"
+                           LDFLAGS_ARCH="-xarch=v9"
+
+fi
+                       # Solaris 64 uses this as well
+                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
+
+fi
+
+else
+  if test "$arch" = "amd64 i386"; then :
+
+                   if test "$GCC" = yes; then :
+
+                       case $system in
+                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
+                               do64bit_ok=yes
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
+                       esac
+
+else
+
+                       do64bit_ok=yes
+                       case $system in
+                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               CFLAGS="$CFLAGS -xarch=amd64"
+                               LDFLAGS="$LDFLAGS -xarch=amd64";;
+                       esac
+
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
+fi
+fi
+
+fi
+
+           SHLIB_SUFFIX=".so"
+           if test "$GCC" = yes; then :
+
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               if test "$do64bit_ok" = yes; then :
+
+                   if test "$arch" = "sparcv9 sparc"; 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` | ..."
+                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+
+else
+  if test "$arch" = "amd64 i386"; then :
+
+                       # JH: static-libgcc is necessary for core Tcl, but may
+                       # not be necessary for extensions.
+                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
+
+fi
+fi
+
+fi
+
+else
+
+               case $system in
+                   SunOS-5.[1-9][0-9]*)
+                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
+                   *)
+                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
+               esac
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+
+fi
+           ;;
+       UNIX_SV* | UnixWare-5*)
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_LD='${CC} -G'
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
+           # that don't grok the -Bexport option.  Test that it does.
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
+$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
+if ${tcl_cv_ld_Bexport+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_ld_Bexport=yes
+else
+  tcl_cv_ld_Bexport=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LDFLAGS=$hold_ldflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
+$as_echo "$tcl_cv_ld_Bexport" >&6; }
+           if test $tcl_cv_ld_Bexport = yes; then :
+
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+
+fi
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+    esac
+
+    if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
+$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
+
+fi
+
+
+
+    # Add in the arch flags late to ensure it wasn't removed.
+    # Not necessary in TEA, but this is aligned with core
+    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
+
+    # 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 "$GCC" = yes; then :
+
+       case $system in
+           AIX-*) ;;
+           BSD/OS*) ;;
+           CYGWIN_*|MINGW32_*) ;;
+           IRIX*) ;;
+           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
+           Darwin-*) ;;
+           SCO_SV-3.2*) ;;
+           windows) ;;
+           *) SHLIB_CFLAGS="-fPIC" ;;
+       esac
+fi
+
+    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
+
+
+$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
+
+
+fi
+
+    if test "$SHARED_LIB_SUFFIX" = ""; then :
+
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
+fi
+    if test "$UNSHARED_LIB_SUFFIX" = ""; then :
+
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+fi
+
+    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
+$as_echo_n "checking for SEH support in compiler... " >&6; }
+if ${tcl_cv_seh+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  tcl_cv_seh=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+           int main(int argc, char** argv) {
+               int a, b = 0;
+               __try {
+                   a = 666 / b;
+               }
+               __except (EXCEPTION_EXECUTE_HANDLER) {
+                   return 0;
+               }
+               return 1;
+           }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  tcl_cv_seh=yes
+else
+  tcl_cv_seh=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
+$as_echo "$tcl_cv_seh" >&6; }
+       if test "$tcl_cv_seh" = "no" ; then
+
+$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
+
+       fi
+
+       #
+       # Check to see if the excpt.h include file provided contains the
+       # definition for EXCEPTION_DISPOSITION; if not, which is the case
+       # with Cygwin's version as of 2002-04-10, define it to be int,
+       # sufficient for getting the current code to work.
+       #
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
+$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
+if ${tcl_cv_eh_disposition+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#          define WIN32_LEAN_AND_MEAN
+#          include <windows.h>
+#          undef WIN32_LEAN_AND_MEAN
+
+int
+main ()
+{
+
+               EXCEPTION_DISPOSITION x;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_eh_disposition=yes
+else
+  tcl_cv_eh_disposition=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
+$as_echo "$tcl_cv_eh_disposition" >&6; }
+       if test "$tcl_cv_eh_disposition" = "no" ; then
+
+$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
+
+       fi
+
+       # Check to see if winnt.h defines CHAR, SHORT, and LONG
+       # even if VOID has already been #defined. The win32api
+       # used by mingw and cygwin is known to do this.
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
+$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
+if ${tcl_cv_winnt_ignore_void+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define VOID void
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+int
+main ()
+{
+
+               CHAR c;
+               SHORT s;
+               LONG l;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_winnt_ignore_void=yes
+else
+  tcl_cv_winnt_ignore_void=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
+$as_echo "$tcl_cv_winnt_ignore_void" >&6; }
+       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
+
+$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
+
+       fi
+    fi
+
+       # See if the compiler supports casting to a union type.
+       # This is used to stop gcc from printing a compiler
+       # warning when initializing a union member.
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
+$as_echo_n "checking for cast to union support... " >&6; }
+if ${tcl_cv_cast_to_union+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+                 union foo { int i; double d; };
+                 union foo f = (union foo) (int) 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_cast_to_union=yes
+else
+  tcl_cv_cast_to_union=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
+$as_echo "$tcl_cv_cast_to_union" >&6; }
+       if test "$tcl_cv_cast_to_union" = "yes"; then
+
+$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
+
+       fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # These must be called after we do the basic CFLAGS checks and
+    # verify any possible 64-bit or similar switches are necessary
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
+$as_echo_n "checking for required early compiler flags... " >&6; }
+    tcl_flags=""
+
+    if ${tcl_cv_flag__isoc99_source+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__isoc99_source=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _ISOC99_SOURCE 1
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__isoc99_source=yes
+else
+  tcl_cv_flag__isoc99_source=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
+
+$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
+
+       tcl_flags="$tcl_flags _ISOC99_SOURCE"
+    fi
+
+
+    if ${tcl_cv_flag__largefile64_source+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile64_source=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _LARGEFILE64_SOURCE 1
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile64_source=yes
+else
+  tcl_cv_flag__largefile64_source=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
+
+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+
+       tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
+    fi
+
+
+    if ${tcl_cv_flag__largefile_source64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+int
+main ()
+{
+char *p = (char *)open64;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile_source64=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _LARGEFILE_SOURCE64 1
+#include <sys/stat.h>
+int
+main ()
+{
+char *p = (char *)open64;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile_source64=yes
+else
+  tcl_cv_flag__largefile_source64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
+
+$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
+
+       tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
+    fi
+
+    if test "x${tcl_flags}" = "x" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
+$as_echo "${tcl_flags}" >&6; }
+    fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
+$as_echo_n "checking for 64-bit integer type... " >&6; }
+    if ${tcl_cv_type_64bit+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       tcl_cv_type_64bit=none
+       # See if the compiler knows natively about __int64
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+__int64 value = (__int64) 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_type_64bit=__int64
+else
+  tcl_type_64bit="long long"
+fi
+rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+switch (0) {
+            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
+        }
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_type_64bit=${tcl_type_64bit}
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    if test "${tcl_cv_type_64bit}" = none ; then
+
+$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5
+$as_echo "using long" >&6; }
+    elif test "${tcl_cv_type_64bit}" = "__int64" \
+               -a "${TEA_PLATFORM}" = "windows" ; then
+       # TEA specific: We actually want to use the default tcl.h checks in
+       # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
+$as_echo "using Tcl header defaults" >&6; }
+    else
+
+cat >>confdefs.h <<_ACEOF
+#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
+_ACEOF
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
+$as_echo "${tcl_cv_type_64bit}" >&6; }
+
+       # Now check for auxiliary declarations
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
+$as_echo_n "checking for struct dirent64... " >&6; }
+if ${tcl_cv_struct_dirent64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <dirent.h>
+int
+main ()
+{
+struct dirent64 p;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_struct_dirent64=yes
+else
+  tcl_cv_struct_dirent64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
+$as_echo "$tcl_cv_struct_dirent64" >&6; }
+       if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+
+$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
+
+       fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
+$as_echo_n "checking for struct stat64... " >&6; }
+if ${tcl_cv_struct_stat64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 p;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_struct_stat64=yes
+else
+  tcl_cv_struct_stat64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
+$as_echo "$tcl_cv_struct_stat64" >&6; }
+       if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+
+$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
+
+       fi
+
+       for ac_func in open64 lseek64
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
+$as_echo_n "checking for off64_t... " >&6; }
+       if ${tcl_cv_type_off64_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+int
+main ()
+{
+off64_t offset;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_type_off64_t=yes
+else
+  tcl_cv_type_off64_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+                       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
+               test "x${ac_cv_func_lseek64}" = "xyes" && \
+               test "x${ac_cv_func_open64}" = "xyes" ; then
+
+$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
+
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
+    fi
+
+
+
+#--------------------------------------------------------------------
+# Set the default compiler switches based on the --enable-symbols option.
+#--------------------------------------------------------------------
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
+$as_echo_n "checking for build with symbols... " >&6; }
+    # Check whether --enable-symbols was given.
+if test "${enable_symbols+set}" = set; then :
+  enableval=$enable_symbols; tcl_ok=$enableval
+else
+  tcl_ok=no
+fi
+
+    DBGX=""
+    if test "$tcl_ok" = "no"; then
+       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
+       LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    else
+       CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
+       LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+       if test "$tcl_ok" = "yes"; then
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
+$as_echo "yes (standard debugging)" >&6; }
+       fi
+    fi
+    # TEA specific:
+    if test "${TEA_PLATFORM}" != "windows" ; then
+       LDFLAGS_DEFAULT="${LDFLAGS}"
+    fi
+
+
+
+
+    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+
+$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
+
+    fi
+
+    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+       if test "$tcl_ok" = "all"; then
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
+$as_echo "enabled symbols mem debugging" >&6; }
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
+$as_echo "enabled $tcl_ok debugging" >&6; }
+       fi
+    fi
+
+
+#--------------------------------------------------------------------
+# Check for intptr_t (for INT2PTR & PTR2INT macros).
+#--------------------------------------------------------------------
+
+ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_intptr_t" = xyes; then :
+
+
+$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size signed integer type" >&5
+$as_echo_n "checking for pointer-size signed integer type... " >&6; }
+if ${tcl_cv_intptr_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    for tcl_cv_intptr_t in "int" "long" "long long" none; do
+       if test "$tcl_cv_intptr_t" != none; then
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           test "$tcl_ok" = yes && break; fi
+    done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_intptr_t" >&5
+$as_echo "$tcl_cv_intptr_t" >&6; }
+    if test "$tcl_cv_intptr_t" != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define intptr_t $tcl_cv_intptr_t
+_ACEOF
+
+    fi
+
+fi
+
+
+#--------------------------------------------------------------------
+# Everyone should be linking against the Tcl stub library.  If you
+# can't for some reason, remove this definition.  If you aren't using
+# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
+# link against the non-stubbed Tcl library.
+#--------------------------------------------------------------------
+
+
+$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
+
+
+$as_echo "#define USE_TCLOO_STUBS 1" >>confdefs.h
+
+
+#--------------------------------------------------------------------
+# This macro generates a line to use when building a library.  It
+# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
+# and TEA_LOAD_TCLCONFIG macros above.
+#--------------------------------------------------------------------
+
+
+    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)"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+print("manifest needed")
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "manifest needed" >/dev/null 2>&1; then :
+
+       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
+       VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
+       VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
+       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
+
+    CLEANFILES="$CLEANFILES *.manifest"
+
+
+fi
+rm -f conftest*
+
+       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
+           if test x"${TK_BIN_DIR}" != x ; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+           fi
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+           if test "$GCC" = "yes"; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
+           fi
+           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+       else
+           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           if test "$GCC" = "yes"; then
+               PKG_LIB_FILE=lib${PKG_LIB_FILE}
+           fi
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       if test "$GCC" = "yes"; then
+           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
+       fi
+       # 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 their 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.
+#--------------------------------------------------------------------
+
+itcl_STUB_LIB_FILE=${PKG_STUB_LIB_FILE}
+itcl_LIB_FILE=${PKG_LIB_FILE}
+
+
+
+#--------------------------------------------------------------------
+# 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
+# ${CYGPATH} because it's being used directly by make.
+# Require that we use a tclsh shell version 8.2 or later since earlier
+# versions have bugs in the pkg_mkIndex routine.
+#--------------------------------------------------------------------
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
+$as_echo_n "checking for tclsh... " >&6; }
+    if test -f "${TCL_BIN_DIR}/Makefile" ; then
+        # tclConfig.sh is in Tcl build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+        fi
+    else
+        # tclConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+        fi
+        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${TCLSH_PROG}" ; then
+                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
+$as_echo "${TCLSH_PROG}" >&6; }
+
+
+
+#--------------------------------------------------------------------
+# These are for itclConfig.sh
+#--------------------------------------------------------------------
+
+
+    #--------------------------------------------------------------------
+    # These are for itclConfig.sh
+    #--------------------------------------------------------------------
+
+    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
+    eval pkglibdir="${libdir}/itcl${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`/${PKG_STUB_LIB_FILE}"
+    itcl_STUB_LIB_PATH="${pkglibdir}/${PKG_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`
+
+
+eval itcl_INCLUDE_SPEC="${itcl_SRC_DIR}/generic"
+
+
+#--------------------------------------------------------------------
+# Finally, substitute all of the various values into the Makefile.
+#--------------------------------------------------------------------
+
+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, 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.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `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, we kill variables containing newlines.
+# 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.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# 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 branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[     `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+       g
+       s/^\n//
+       s/\n/ /g
+       p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+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
+IFS=$as_save_IFS
+
+     ;;
+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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; 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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# 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
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# 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'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by itcl $as_me 4.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   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 the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+itcl config.status 4.0.3
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+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=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+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 || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
+    "itclConfig.sh") CONFIG_FILES="$CONFIG_FILES itclConfig.sh" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# 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
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries 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[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[      ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X "  :F $CONFIG_FILES      "
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # 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.  */
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+
+  esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# 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 || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
similarity index 99%
rename from pkgs/itcl4.0.2/configure.in
rename to pkgs/itcl4.0.3/configure.in
index 70a6e3b..a60869f 100755 (executable)
@@ -10,7 +10,7 @@
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([itcl], [4.0.2])
+AC_INIT([itcl], [4.0.3])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
similarity index 98%
rename from pkgs/itcl4.0.2/generic/itcl.h
rename to pkgs/itcl4.0.3/generic/itcl.h
index c280395..8f7efb3 100644 (file)
@@ -82,10 +82,10 @@ extern "C" {
 #define ITCL_MAJOR_VERSION     4
 #define ITCL_MINOR_VERSION     0
 #define ITCL_RELEASE_LEVEL      TCL_FINAL_RELEASE
-#define ITCL_RELEASE_SERIAL     2
+#define ITCL_RELEASE_SERIAL     3
 
 #define ITCL_VERSION            "4.0"
-#define ITCL_PATCH_LEVEL        "4.0.2"
+#define ITCL_PATCH_LEVEL        "4.0.3"
 
 
 /*
similarity index 99%
rename from pkgs/itcl4.0.2/generic/itclBase.c
rename to pkgs/itcl4.0.3/generic/itclBase.c
index c559222..0f0ecc8 100644 (file)
@@ -321,7 +321,6 @@ Initialize (
     Tcl_InitHashTable(&infoPtr->procMethods, TCL_ONE_WORD_KEYS);
     Tcl_InitObjHashTable(&infoPtr->instances);
     Tcl_InitHashTable(&infoPtr->objectInstances, TCL_ONE_WORD_KEYS);
-//    Tcl_InitObjHashTable(&infoPtr->myEnsembles);
     Tcl_InitObjHashTable(&infoPtr->classTypes);
     infoPtr->ensembleInfo = (EnsembleInfo *)ckalloc(sizeof(EnsembleInfo));
     memset(infoPtr->ensembleInfo, 0, sizeof(EnsembleInfo));
@@ -392,7 +391,7 @@ Initialize (
     objPtr = Tcl_NewStringObj("::itcl::clazz", -1);
     infoPtr->clazzObjectPtr = Tcl_GetObjectFromObj(interp, objPtr);
 
-    // work around for SF bug #254 needed because of problem in TclOO 1.0.2 !!
+    /* work around for SF bug #254 needed because of problem in TclOO 1.0.2 !! */
     if (Tcl_PkgPresent(interp, "TclOO", "1.0.2", 1) != NULL) {
        Itcl_IncrObjectRefCount(infoPtr->clazzObjectPtr);
     }
similarity index 99%
rename from pkgs/itcl4.0.2/generic/itclClass.c
rename to pkgs/itcl4.0.3/generic/itclClass.c
index 20e1816..79aad41 100644 (file)
@@ -639,7 +639,7 @@ CallDeleteOneObject(
     ItclObjectInfo *infoPtr = data[1];
     void *callbackPtr;
     int classIsDeleted;
-    
+
     if (result != TCL_OK) {
         return result;
     }
@@ -2470,6 +2470,12 @@ ItclDeleteFunction(
 {
     Tcl_HashEntry *hPtr;
 
+    hPtr = Tcl_FindHashEntry(&imPtr->iclsPtr->infoPtr->procMethods,
+           (char *) imPtr->tmPtr);
+    if (hPtr != NULL) {
+       Itcl_ReleaseData(imPtr->iclsPtr);
+       Tcl_DeleteHashEntry(hPtr);
+    }
     hPtr = Tcl_FindHashEntry(&imPtr->infoPtr->classes, (char *)imPtr->iclsPtr);
     if (hPtr != NULL) {
        /* unlink owerself from list of class functions */
similarity index 99%
rename from pkgs/itcl4.0.2/generic/itclInfo.c
rename to pkgs/itcl4.0.3/generic/itclInfo.c
index 7419e4c..bf43819 100644 (file)
@@ -928,19 +928,49 @@ Itcl_BiInfoInheritCmd(
     } else {
        contextIclsPtr = GetClassFromClassName(interp, upNsPtr->fullName, NULL);
     }
+
+    /*
+     * Note the assumption here that imPtr != NULL.
+     * This implies an assumption above that callContextPtr != NULL, and
+     * that the call to GetClassFromClassName() is never taken.
+     */
+
     if (imPtr->iclsPtr->infoPtr->useOldResolvers) {
         if (contextIoPtr != NULL) {
-            if (upNsPtr != contextIclsPtr->nsPtr) {
-               Tcl_HashEntry *hPtr;
-               hPtr = Tcl_FindHashEntry(
+
+           /*
+            * For consistency with Itcl 3, we must exhibit different
+            * context selection depending on whether the invocation
+            * was [$obj info inherit] or [info inherit] in a class context.
+            * Itcl 4 implements the routing of the direct [info inherit]
+            * by prepending a [my].  To distinguish the cases we look for
+            * that leading [my].  It is conceivable this would be confused
+            * with the literal command [my info inherit], but as it happens,
+            * such a command cannot be resolved in an Itcl method body, so
+            * it's at least very unlikely if not impossible for that confusion
+            * to arise.  See also Itcl_BiInfoHeritageCmd().
+            */
+
+           Tcl_Obj * const * objv = Itcl_GetCallFrameObjv(interp);
+           int isDirectCall = (strcmp(Tcl_GetString(objv[0]), "my") == 0);
+
+           /*
+            * The default behavior is to query the heritage of the
+            * invoking object....
+            */
+            contextIclsPtr = contextIoPtr->iclsPtr;
+           if (isDirectCall && upNsPtr != contextIclsPtr->nsPtr) {
+               Tcl_HashEntry *hPtr = Tcl_FindHashEntry(
                        &imPtr->iclsPtr->infoPtr->namespaceClasses,
                        (char *)upNsPtr);
-               if (hPtr != NULL) {
+               if (hPtr) {
+                   /*
+                    * ...but when invoked as [info inherit] and in
+                    * a class namespace, we query that class instead.
+                    */
                    contextIclsPtr = Tcl_GetHashValue(hPtr);
-               } else {
-                    contextIclsPtr = contextIoPtr->iclsPtr;
-               }
-            }
+               }
+           }
         }
     } else {
         if (strcmp(Tcl_GetString(imPtr->namePtr), "info") == 0) {
@@ -1041,17 +1071,19 @@ Itcl_BiInfoHeritageCmd(
     }
     if (contextIclsPtr->infoPtr->useOldResolvers) {
         if (contextIoPtr != NULL) {
-            if (upNsPtr != contextIclsPtr->nsPtr) {
-               Tcl_HashEntry *hPtr;
-               hPtr = Tcl_FindHashEntry(
+           /* See Itcl_InfoInheritCmd() comments. */
+           Tcl_Obj * const * objv = Itcl_GetCallFrameObjv(interp);
+           int isDirectCall = (strcmp(Tcl_GetString(objv[0]), "my") == 0);
+
+            contextIclsPtr = contextIoPtr->iclsPtr;
+           if (isDirectCall && upNsPtr != contextIclsPtr->nsPtr) {
+               Tcl_HashEntry *hPtr = Tcl_FindHashEntry(
                        &imPtr->iclsPtr->infoPtr->namespaceClasses,
                        (char *)upNsPtr);
-               if (hPtr != NULL) {
-                   contextIclsPtr = Tcl_GetHashValue(hPtr);
-               } else {
-                    contextIclsPtr = contextIoPtr->iclsPtr;
-               }
-            }
+               if (hPtr) {
+                   contextIclsPtr = Tcl_GetHashValue(hPtr);
+               }
+           }
         }
     } else {
         if (strcmp(Tcl_GetString(imPtr->namePtr), "info") == 0) {
similarity index 99%
rename from pkgs/itcl4.0.2/generic/itclInt.h
rename to pkgs/itcl4.0.3/generic/itclInt.h
index d1e66cf..ffa1fab 100644 (file)
@@ -150,8 +150,7 @@ typedef struct ItclObjectInfo {
     Tcl_HashTable procMethods;      /* maps from procPtr to mFunc */
     Tcl_HashTable instances;        /* maps from instanceNumber to ioPtr */
     Tcl_HashTable objectInstances;  /* maps from ioPtr to instanceNumber */
-//    Tcl_HashTable myEnsembles;      /* maps from ensemble name (::itcl::find)
-//                                     * etc. to ensemble pathName */
+    Tcl_HashTable unused;           /* Obsolete field */
     Tcl_HashTable classTypes;       /* maps from class type i.e. "widget"
                                      * to define value i.e. ITCL_WIDGET */
     int protection;                 /* protection level currently in effect */
similarity index 95%
rename from pkgs/itcl4.0.2/generic/itclMethod.c
rename to pkgs/itcl4.0.3/generic/itclMethod.c
index 907f508..c89ade7 100644 (file)
@@ -40,8 +40,6 @@ static int ItclCreateMemberCode(Tcl_Interp* interp, ItclClass *iclsPtr,
 static int ItclCreateMemberFunc(Tcl_Interp* interp, ItclClass *iclsPtr,
        Tcl_Obj *namePtr, const char* arglist, const char* body,
         ItclMemberFunc** imPtrPtr, int flags);
-static int Itcl_GetUplevelContext(Tcl_Interp *interp, ItclClass **iclsPtrPtr,
-               ItclObject **ioPtrPtr, int level);
 
 \f
 /*
@@ -750,6 +748,7 @@ Itcl_ChangeMemberFunc(
                 (char *)imPtr->tmPtr, &isNewEntry);
         if (isNewEntry) {
             Tcl_SetHashValue(hPtr, imPtr);
+           Itcl_PreserveData(imPtr->iclsPtr);
         }
     }
     ItclAddClassFunctionDictInfo(interp, imPtr->iclsPtr, imPtr);
@@ -1156,10 +1155,6 @@ CallItclObjectCmd(
     ItclObject *ioPtr = data[1];
     int objc = PTR2INT(data[2]);
     Tcl_Obj **objv = data[3];
-    void * ptr;
-    ItclClass *contextIclsPtr = NULL;
-    ItclObject *contextIoPtr = NULL;
-    ItclObjectInfo *infoPtr;
     
     ItclShowArgs(1, "CallItclObjectCmd", objc, objv);
     if (ioPtr != NULL) {
@@ -1174,35 +1169,7 @@ CallItclObjectCmd(
         result =  ItclObjectCmd(imPtr, interp, oPtr, imPtr->iclsPtr->clsPtr,
                 objc, objv);
     } else {
-        ptr = Itcl_GetCallFrameVarFramePtr(interp);
-        if (Itcl_GetUplevelCallFrame(interp, 0) != ptr) {
-            /* we are executing an uplevel command (SF bug #244) */
-            if (ioPtr != NULL) {
-                if (imPtr->codePtr->flags & ITCL_BUILTIN) {
-                    /* it is a builtin command (SF bug #255 and # 256) */
-                    result = ItclObjectCmd(imPtr, interp, oPtr, NULL, objc, objv);
-                } else {
-                    infoPtr = (ItclObjectInfo *)Tcl_GetAssocData(interp,
-                            ITCL_INTERP_DATA, NULL);
-                    if (Itcl_GetStackSize(&infoPtr->contextStack) <= 1) {
-                        oPtr = ioPtr->oPtr;
-                        result = ItclObjectCmd(imPtr, interp, oPtr, NULL, objc, objv);
-                    } else {
-                        /* we are executing an uplevel command (SF bug #250) */
-                        if (Itcl_GetUplevelContext(interp, &contextIclsPtr, &contextIoPtr, -1) != TCL_OK) {
-                            return TCL_ERROR;
-                        }
-                        oPtr = contextIoPtr->oPtr;
-                        result =  ItclObjectCmd(imPtr, interp, oPtr, imPtr->iclsPtr->clsPtr,
-                                objc, objv);
-                    }
-                }
-            } else {
-                result = ItclObjectCmd(imPtr, interp, oPtr, NULL, objc, objv);
-           }
-        } else {
-            result = ItclObjectCmd(imPtr, interp, oPtr, NULL, objc, objv);
-       }
+       result = ItclObjectCmd(imPtr, interp, NULL, NULL, objc, objv);
     }
     if (result != TCL_OK) {
        if (ioPtr != NULL && ioPtr->hadConstructorError == 0) {
@@ -1493,79 +1460,6 @@ Itcl_GetContext(
     }
     return TCL_OK;
 }
-
-int
-Itcl_GetUplevelContext(
-    Tcl_Interp *interp,           /* current interpreter */
-    ItclClass **iclsPtrPtr,       /* returns:  class definition or NULL */
-    ItclObject **ioPtrPtr,
-    int level)        /* returns:  object data or NULL */
-{
-    Tcl_Namespace *activeNs = Tcl_GetCurrentNamespace(interp);
-    Tcl_HashEntry *hPtr;
-    ItclCallContext *callContextPtr;
-    ItclObjectInfo *infoPtr;
-
-    /*
-     *  Return NULL for anything that cannot be found.
-     */
-    *ioPtrPtr = NULL;
-
-    if (!Itcl_IsClassNamespace(activeNs)) {
-        /*
-         *  If there is no class/object context, return an error message.
-         */
-        Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
-            "namespace \"", activeNs->fullName, "\" is not a class namespace",
-            (char*)NULL);
-
-        return TCL_ERROR;
-    }
-    /*
-     *  If the active namespace is a class namespace, then return
-     *  all known info.  See if the current call frame is a known
-     *  object context, and if so, return that context.
-     */
-    infoPtr = (ItclObjectInfo *)Tcl_GetAssocData(interp,
-            ITCL_INTERP_DATA, NULL);
-    if (Itcl_GetStackSize(&infoPtr->contextStack)-1+level < 0 ||
-            level > Itcl_GetStackSize(&infoPtr->contextStack)) {
-        Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
-            "INTERNAL ERROR in Itcl_GetUplevelContext",
-            (char*)NULL);
-        return TCL_ERROR;
-    }
-    callContextPtr = Itcl_GetStackValue(&infoPtr->contextStack,
-            Itcl_GetStackSize(&infoPtr->contextStack)-1+level);
-    if ((callContextPtr != NULL) && (callContextPtr->imPtr != NULL)) {
-        *iclsPtrPtr = callContextPtr->imPtr->iclsPtr;
-    } else {
-        hPtr = Tcl_FindHashEntry(&infoPtr->namespaceClasses,
-                (char *)activeNs);
-        if (hPtr != NULL) {
-            *iclsPtrPtr = (ItclClass *)Tcl_GetHashValue(hPtr);
-        }
-    }
-    if (*iclsPtrPtr == NULL) {
-        Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
-            "namespace \"", activeNs->fullName, "\" is not a class namespace",
-            (char*)NULL);
-
-        return TCL_ERROR;
-    }
-
-    if (callContextPtr == NULL) {
-       /* must be a class namespace without an object */
-       *ioPtrPtr = NULL;
-       return TCL_OK;
-    }
-    *ioPtrPtr = callContextPtr->ioPtr;
-    if ((*ioPtrPtr == NULL) && ((*iclsPtrPtr)->nsPtr != NULL)) {
-        /* maybe we are in a constructor try currIoPtr */
-        *ioPtrPtr = (*iclsPtrPtr)->infoPtr->currIoPtr;
-    }
-    return TCL_OK;
-}
 \f
 /*
  * ------------------------------------------------------------------------
similarity index 96%
rename from pkgs/itcl4.0.2/generic/itclMigrate2TclCore.c
rename to pkgs/itcl4.0.3/generic/itclMigrate2TclCore.c
index dbdd921..b28e5be 100644 (file)
@@ -101,14 +101,6 @@ Itcl_ActivateCallFrame(
     return (Tcl_CallFrame *) oldFramePtr;
 }
 
-void *
-Itcl_GetCallFrameVarFramePtr(
-    Tcl_Interp *interp)
-{
-
-    return ((Interp *)interp)->varFramePtr;
-}
-
 Tcl_Namespace *
 Itcl_GetUplevelNamespace(
     Tcl_Interp *interp,
@@ -134,8 +126,6 @@ Itcl_GetCallFrameClientData(
 {
     /* suggested fix for SF bug #250 use varFramePtr instead of framePtr
      * seems to have no side effect concerning test suite, but does NOT fix the bug
-     * there is a different fix using Itcl_GetUplevelContext, which works.
-     * We are using framePtr again
      */
     CallFrame *framePtr = ((Interp *)interp)->varFramePtr;
     if (framePtr == NULL) {
similarity index 97%
rename from pkgs/itcl4.0.2/generic/itclMigrate2TclCore.h
rename to pkgs/itcl4.0.3/generic/itclMigrate2TclCore.h
index 58f14ad..0de66d6 100644 (file)
@@ -80,7 +80,6 @@ MODULE_SCOPE int Itcl_GetCallVarFrameObjc(Tcl_Interp *interp);
 MODULE_SCOPE int Itcl_IsVarLink(Tcl_Var var);
 MODULE_SCOPE int Itcl_IsCallFrameLinkVar(Tcl_Interp *interp, const char *name);
 MODULE_SCOPE Tcl_Obj * const * Itcl_GetCallVarFrameObjv(Tcl_Interp *interp);
-MODULE_SCOPE void *Itcl_GetCallFrameVarFramePtr(Tcl_Interp *interp);
 #define Tcl_SetNamespaceResolver _Tcl_SetNamespaceResolver
 MODULE_SCOPE int _Tcl_SetNamespaceResolver(Tcl_Namespace *nsPtr,
         struct Tcl_Resolve *resolvePtr);
similarity index 99%
rename from pkgs/itcl4.0.2/generic/itclObject.c
rename to pkgs/itcl4.0.3/generic/itclObject.c
index a4c6137..1fcc708 100644 (file)
@@ -3088,21 +3088,8 @@ ItclObjectCmd(
 
     } else {
        ItclShowArgs(1, "run CallPublicObjectCmd2", objc, objv);
-        if (objc == 1) {
-            /* add a "my" at the beginning of the arguments */
-            incr = 1;
-            newObjv = (Tcl_Obj **)ckalloc(sizeof(Tcl_Obj *)*(objc+incr));
-            myPtr = Tcl_NewStringObj("my", 2);
-            Tcl_IncrRefCount(myPtr);
-            newObjv[0] = myPtr;
-            memcpy(newObjv+incr, objv, (sizeof(Tcl_Obj*)*(objc)));
-           ItclShowArgs(1, "run CallPublicObjectCmd3", objc+incr, newObjv);
-            Tcl_NRAddCallback(interp, CallPublicObjectCmd, oPtr, clsPtr,
-                    INT2PTR(objc+incr), newObjv);
-        } else {
-           Tcl_NRAddCallback(interp, CallPublicObjectCmd, oPtr, clsPtr,
-                   INT2PTR(objc), (ClientData)objv);
-        }
+       Tcl_NRAddCallback(interp, CallPublicObjectCmd, oPtr, clsPtr,
+               INT2PTR(objc), (ClientData)objv);
     }
 
     result = Itcl_NRRunCallbacks(interp, callbackPtr);
similarity index 98%
rename from pkgs/itcl4.0.2/generic/itclParse.c
rename to pkgs/itcl4.0.3/generic/itclParse.c
index 29db9ce..f118cd8 100644 (file)
@@ -189,13 +189,9 @@ Itcl_ParseInit(
     Tcl_Interp *interp,     /* interpreter to be updated */
     ItclObjectInfo *infoPtr) /* info regarding all known objects and classes */
 {
-//    Tcl_HashEntry *hPtr;
     Tcl_Namespace *parserNs;
-//    Tcl_Obj *objPtr;
-//    Tcl_Obj *namePtr;
     ProtectionCmdInfo *pInfoPtr;
     Tcl_DString buffer;
-//    int isNew;
     int i;
 
     /*
@@ -266,14 +262,6 @@ Itcl_ParseInit(
     if (Itcl_CreateEnsemble(interp, "::itcl::find") != TCL_OK) {
         return TCL_ERROR;
     }
-/*
-    namePtr = Tcl_NewStringObj("::itcl::find", -1);
-    objPtr = Tcl_GetObjResult(interp);
-    Tcl_IncrRefCount(objPtr);
-    hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
-    Tcl_SetHashValue(hPtr, objPtr);
-    Tcl_DecrRefCount(namePtr);
-*/
 
     if (Itcl_AddEnsemblePart(interp, "::itcl::find",
             "classes", "?pattern?",
@@ -299,14 +287,6 @@ Itcl_ParseInit(
     if (Itcl_CreateEnsemble(interp, "::itcl::delete") != TCL_OK) {
         return TCL_ERROR;
     }
-/*
-    namePtr = Tcl_NewStringObj("::itcl::delete", -1);
-    objPtr = Tcl_GetObjResult(interp);
-    Tcl_IncrRefCount(objPtr);
-    hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
-    Tcl_SetHashValue(hPtr, objPtr);
-    Tcl_DecrRefCount(namePtr);
-*/
 
     if (Itcl_AddEnsemblePart(interp, "::itcl::delete",
             "class", "name ?name...?",
@@ -339,14 +319,6 @@ Itcl_ParseInit(
     if (Itcl_CreateEnsemble(interp, "::itcl::is") != TCL_OK) {
         return TCL_ERROR;
     }
-/*
-    namePtr = Tcl_NewStringObj("::itcl::is", -1);
-    objPtr = Tcl_GetObjResult(interp);
-    Tcl_IncrRefCount(objPtr);
-    hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
-    Tcl_SetHashValue(hPtr, objPtr);
-    Tcl_DecrRefCount(namePtr);
-*/
 
     if (Itcl_AddEnsemblePart(interp, "::itcl::is",
             "class", "name", Itcl_IsClassCmd,
@@ -390,14 +362,6 @@ Itcl_ParseInit(
             (ClientData)infoPtr, Itcl_ReleaseData) != TCL_OK) {
         return TCL_ERROR;
     }
-/*
-    namePtr = Tcl_NewStringObj("::itcl::filter", -1);
-    objPtr = Tcl_GetObjResult(interp);
-    Tcl_IncrRefCount(objPtr);
-    hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
-    Tcl_SetHashValue(hPtr, objPtr);
-    Tcl_DecrRefCount(namePtr);
-*/
 
     Itcl_PreserveData((ClientData)infoPtr);
 
@@ -407,14 +371,6 @@ Itcl_ParseInit(
     if (Itcl_CreateEnsemble(interp, "::itcl::forward") != TCL_OK) {
         return TCL_ERROR;
     }
-/*
-    namePtr = Tcl_NewStringObj("::itcl::forward", -1);
-    objPtr = Tcl_GetObjResult(interp);
-    Tcl_IncrRefCount(objPtr);
-    hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
-    Tcl_SetHashValue(hPtr, objPtr);
-    Tcl_DecrRefCount(namePtr);
-*/
 
     if (Itcl_AddEnsemblePart(interp, "::itcl::forward",
             "add", "objectOrClass srcCommand targetCommand ? options ... ?",
@@ -438,14 +394,6 @@ Itcl_ParseInit(
     if (Itcl_CreateEnsemble(interp, "::itcl::mixin") != TCL_OK) {
         return TCL_ERROR;
     }
-/*
-    namePtr = Tcl_NewStringObj("::itcl::mixin", -1);
-    objPtr = Tcl_GetObjResult(interp);
-    Tcl_IncrRefCount(objPtr);
-    hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
-    Tcl_SetHashValue(hPtr, objPtr);
-    Tcl_DecrRefCount(namePtr);
-*/
 
     if (Itcl_AddEnsemblePart(interp, "::itcl::mixin",
             "add", "objectOrClass class ? class ... ?",
@@ -469,13 +417,6 @@ Itcl_ParseInit(
     if (Itcl_CreateEnsemble(interp, "::itcl::import::stub") != TCL_OK) {
         return TCL_ERROR;
     }
-/*
-    namePtr = Tcl_NewStringObj("::itcl::stubs", -1);
-    objPtr = Tcl_GetObjResult(interp);
-    hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
-    Tcl_SetHashValue(hPtr, objPtr);
-    Tcl_DecrRefCount(namePtr);
-*/
 
     if (Itcl_AddEnsemblePart(interp, "::itcl::import::stub",
             "create", "name", Itcl_StubCreateCmd,
@@ -545,14 +486,6 @@ Itcl_ParseInit(
     if (Itcl_CreateEnsemble(interp, "::itcl::parser::delegate") != TCL_OK) {
         return TCL_ERROR;
     }
-/*
-    namePtr = Tcl_NewStringObj("::itcl::delegate", -1);
-    objPtr = Tcl_GetObjResult(interp);
-    Tcl_IncrRefCount(objPtr);
-    hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
-    Tcl_SetHashValue(hPtr, objPtr);
-    Tcl_DecrRefCount(namePtr);
-*/
 
     if (Itcl_AddEnsemblePart(interp, "::itcl::parser::delegate",
             "method", "name to targetName as scipt using script",
@@ -1030,6 +963,7 @@ ItclClassBaseCmd(
                    (char *)imPtr->tmPtr, &isNewEntry);
            if (isNewEntry) {
                Tcl_SetHashValue(hPtr2, imPtr);
+               Itcl_PreserveData(iclsPtr);
            }
            if (iclsPtr->flags & (ITCL_TYPE|ITCL_WIDGET|ITCL_WIDGETADAPTOR)) {
                if (argumentPtr == NULL) {
@@ -1037,6 +971,14 @@ ItclClassBaseCmd(
                    imPtr->codePtr->argumentPtr = argumentPtr;
                    Tcl_IncrRefCount(argumentPtr);
                }
+               /*
+                * We're overwriting the tmPtr field, so yank out the
+                * entry in the procMethods map based on the old one.
+                */
+               if (isNewEntry) {
+                   Itcl_ReleaseData(iclsPtr);
+                   Tcl_DeleteHashEntry(hPtr2);
+               }
                imPtr->tmPtr = (ClientData)Itcl_NewProcMethod(interp,
                    iclsPtr->oPtr, ItclCheckCallMethod, ItclAfterCallMethod,
                     ItclProcErrorProc, imPtr, imPtr->namePtr, argumentPtr,
@@ -1046,10 +988,12 @@ ItclClassBaseCmd(
                imPtr->accessCmd = Tcl_CreateObjCommand(interp,
                        Tcl_GetString(imPtr->fullNamePtr),
                        Itcl_ExecMethod, imPtr, Itcl_ReleaseData);
+               Itcl_PreserveData(imPtr);
            } else {
                imPtr->accessCmd = Tcl_CreateObjCommand(interp,
                        Tcl_GetString(imPtr->fullNamePtr),
                        Itcl_ExecProc, imPtr, Itcl_ReleaseData);
+               Itcl_PreserveData(imPtr);
            }
             Tcl_DStringInit(&buffer);
         }
similarity index 99%
rename from pkgs/tdbc1.0.2/tclconfig/tcl.m4
rename to pkgs/itcl4.0.3/tclconfig/tcl.m4
index e7b1113..b0ae59f 100644 (file)
@@ -3369,15 +3369,15 @@ print("manifest needed")
            if test "$GCC" = "yes"; then
                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
            fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
        else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
            if test "$GCC" = "yes"; then
                PKG_LIB_FILE=lib${PKG_LIB_FILE}
            fi
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
        if test "$GCC" = "yes"; then
            PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
        fi
@@ -3391,13 +3391,13 @@ print("manifest needed")
            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}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
            RANLIB=:
        else
-           eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     fi
 
     # These are escaped so that only CFLAGS is picked up at configure time.
similarity index 98%
rename from pkgs/itcl4.0.2/tests/info.test
rename to pkgs/itcl4.0.3/tests/info.test
index cbbd83c..e93abbb 100644 (file)
@@ -344,6 +344,10 @@ test info-4.2b {query inheritance info} {
     list [ti info inherit] [ti do info inherit]
 } {::test_info_base {}}
 
+test info-4.2c {query inheritance info} {
+    ti do ti info inherit
+} {::test_info_base}
+
 test info-4.3a {query heritage info (wrong # args)} {
     list [catch {ti info heritage x} result] $result
 } {1 {wrong # args: should be "info heritage"}}
@@ -352,6 +356,10 @@ test info-4.3b {query heritage info} {
     list [ti info heritage] [ti do info heritage]
 } {{::test_info ::test_info_base} ::test_info_base}
 
+test info-4.3c {query heritage info} {
+    ti do ti info heritage
+} {::test_info ::test_info_base}
+
 test info-4.4a {query argument list (wrong # args)} {
     list [catch {ti info args} result] $result \
          [catch {ti info args x y} result] $result
similarity index 97%
rename from pkgs/itcl4.0.2/tests/sfbugs.test
rename to pkgs/itcl4.0.3/tests/sfbugs.test
index 0b8b116..6f26d37 100644 (file)
@@ -227,7 +227,7 @@ test sfbug-250 { SF bug #250
     $a m1
 
 } -result {m2} \
-  -cleanup {::itcl::delete class B}
+  -cleanup {::itcl::delete class B}
 
 test sfbug-Schelte {bug with onfo reported from Schelte SF bug xxx
 } -body {
@@ -400,6 +400,19 @@ $tc api-call
     }
 }
 
+test sfbug-261 { SF bug #261 } -setup {
+    itcl::class A {
+       public method a1 {} {a2}
+       public method a2 {} {uplevel a3 hello}
+       public method a3 {s} {return $s}
+    }
+    A x
+} -body {
+    x a1
+} -cleanup {
+    itcl::delete class A
+} -result hello
+
 #test sfbug-xxx { SF bug xxx
 #} -body {
 #    set ::test_status ""
similarity index 99%
rename from pkgs/sqlite3.8.7.1/Makefile.in
rename to pkgs/sqlite3.8.8.3/Makefile.in
index 657191d..5ddd72b 100644 (file)
@@ -307,9 +307,9 @@ dist: dist-clean
        mkdir -p $(DIST_DIR)
        cp -p $(srcdir)/README* $(srcdir)/license* \
                $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
-               $(DIST_DIR)/
+               $(srcdir)/configure.ac $(DIST_DIR)/
        chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-       chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
+       chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.ac
 
        for i in $(srcdir)/*.[ch]; do \
            if [ -f $$i ]; then \
similarity index 99%
rename from pkgs/sqlite3.8.7.1/configure
rename to pkgs/sqlite3.8.8.3/configure
index c27ea94..37fd3a5 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sqlite 3.8.7.1.
+# Generated by GNU Autoconf 2.69 for sqlite 3.8.8.3.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sqlite'
 PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.8.7.1'
-PACKAGE_STRING='sqlite 3.8.7.1'
+PACKAGE_VERSION='3.8.8.3'
+PACKAGE_STRING='sqlite 3.8.8.3'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1294,7 +1294,7 @@ 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 sqlite 3.8.7.1 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.8.8.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1355,7 +1355,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sqlite 3.8.7.1:";;
+     short | recursive ) echo "Configuration of sqlite 3.8.8.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1457,7 +1457,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sqlite configure 3.8.7.1
+sqlite configure 3.8.8.3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1868,7 +1868,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sqlite $as_me 3.8.7.1, which was
+It was created by sqlite $as_me 3.8.8.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -5400,7 +5400,11 @@ done
 
 
 
-    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_FTS3=1"
+    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_FTS4=1"
+
+
+
+    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_FTS3_PARENTHESIS=1"
 
 
 
@@ -8580,7 +8584,8 @@ $as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
 #--------------------------------------------------------------------
 # Redefine fdatasync as fsync on systems that lack fdatasync
 #--------------------------------------------------------------------
-
+#
+#AC_CHECK_FUNC(fdatasync, , AC_DEFINE(fdatasync, fsync))
 for ac_header in malloc.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
@@ -8593,16 +8598,8 @@ fi
 
 done
 
-ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
-if test "x$ac_cv_func_fdatasync" = xyes; then :
-
-else
-  $as_echo "#define fdatasync fsync" >>confdefs.h
-
-fi
-
 # Check for library functions that SQLite can optionally use.
-for ac_func in strchrnul usleep utime localtime_r gmtime_r malloc_usable_size
+for ac_func in fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime flock
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -8771,15 +8768,15 @@ rm -f conftest*
            if test "$GCC" = "yes"; then
                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
            fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
        else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
            if test "$GCC" = "yes"; then
                PKG_LIB_FILE=lib${PKG_LIB_FILE}
            fi
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
        if test "$GCC" = "yes"; then
            PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
        fi
@@ -8793,13 +8790,13 @@ rm -f conftest*
            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}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
            RANLIB=:
        else
-           eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     fi
 
     # These are escaped so that only CFLAGS is picked up at configure time.
@@ -9412,7 +9409,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sqlite $as_me 3.8.7.1, which was
+This file was extended by sqlite $as_me 3.8.8.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9465,7 +9462,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-sqlite config.status 3.8.7.1
+sqlite config.status 3.8.8.3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
similarity index 96%
rename from pkgs/sqlite3.8.7.1/configure.in
rename to pkgs/sqlite3.8.8.3/configure.ac
index 2f31f0d..1019e56 100755 (executable)
@@ -19,7 +19,7 @@ dnl   to configure the system for the local environment.
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([sqlite], [3.8.7.1])
+AC_INIT([sqlite], [3.8.8.3])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
@@ -75,7 +75,8 @@ TEA_ADD_SOURCES([tclsqlite3.c])
 TEA_ADD_HEADERS([])
 TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${srcdir}/generic`\"])
 TEA_ADD_LIBS([])
-TEA_ADD_CFLAGS([-DSQLITE_ENABLE_FTS3=1])
+TEA_ADD_CFLAGS([-DSQLITE_ENABLE_FTS4=1])
+TEA_ADD_CFLAGS([-DSQLITE_ENABLE_FTS3_PARENTHESIS=1])
 TEA_ADD_CFLAGS([-DSQLITE_3_SUFFIX_ONLY=1])
 TEA_ADD_CFLAGS([-DSQLITE_ENABLE_RTREE=1])
 TEA_ADD_CFLAGS([-DSQLITE_OMIT_DEPRECATED=1])
@@ -169,11 +170,11 @@ AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
 #--------------------------------------------------------------------
 # Redefine fdatasync as fsync on systems that lack fdatasync
 #--------------------------------------------------------------------
-
+#
+#AC_CHECK_FUNC(fdatasync, , AC_DEFINE(fdatasync, fsync))
 AC_CHECK_HEADERS([malloc.h])
-AC_CHECK_FUNC(fdatasync, , AC_DEFINE(fdatasync, fsync))
 # Check for library functions that SQLite can optionally use.
-AC_CHECK_FUNCS([strchrnul usleep utime localtime_r gmtime_r malloc_usable_size])
+AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime flock])
 
 AC_FUNC_STRERROR_R
 
similarity index 97%
rename from pkgs/sqlite3.8.7.1/generic/sqlite3.c
rename to pkgs/sqlite3.8.8.3/generic/sqlite3.c
index 5c8e1c1..7d513fa 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
 ** This file is an amalgamation of many separate C source files from SQLite
-** version 3.8.7.1.  By combining all the individual C code files into this 
+** version 3.8.8.3.  By combining all the individual C code files into this 
 ** single large file, the entire code can be compiled as a single translation
 ** unit.  This allows many compilers to do optimizations that would not be
 ** possible if the files were compiled separately.  Performance improvements
 #define _SQLITEINT_H_
 
 /*
+** Include the header file used to customize the compiler options for MSVC.
+** This should be done first so that it can successfully prevent spurious
+** compiler warnings due to subsequent content in this file and other files
+** that are included by this file.
+*/
+/************** Include msvc.h in the middle of sqliteInt.h ******************/
+/************** Begin file msvc.h ********************************************/
+/*
+** 2015 January 12
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains code that is specific to MSVC.
+*/
+#ifndef _MSVC_H_
+#define _MSVC_H_
+
+#if defined(_MSC_VER)
+#pragma warning(disable : 4054)
+#pragma warning(disable : 4055)
+#pragma warning(disable : 4100)
+#pragma warning(disable : 4127)
+#pragma warning(disable : 4152)
+#pragma warning(disable : 4189)
+#pragma warning(disable : 4206)
+#pragma warning(disable : 4210)
+#pragma warning(disable : 4232)
+#pragma warning(disable : 4244)
+#pragma warning(disable : 4305)
+#pragma warning(disable : 4306)
+#pragma warning(disable : 4702)
+#pragma warning(disable : 4706)
+#endif /* defined(_MSC_VER) */
+
+#endif /* _MSVC_H_ */
+
+/************** End of msvc.h ************************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+
+/*
 ** These #defines should enable >2GB file support on POSIX if the
 ** underlying operating system supports it.  If the OS lacks
 ** large file support, or if the OS is windows, these should be no-ops.
@@ -181,7 +228,7 @@ extern "C" {
 /*
 ** These no-op macros are used in front of interfaces to mark those
 ** interfaces as either deprecated or experimental.  New applications
-** should not use deprecated interfaces - they are support for backwards
+** should not use deprecated interfaces - they are supported for backwards
 ** compatibility only.  Application writers should be aware that
 ** experimental interfaces are subject to change in point releases.
 **
@@ -231,9 +278,9 @@ extern "C" {
 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
 ** [sqlite_version()] and [sqlite_source_id()].
 */
-#define SQLITE_VERSION        "3.8.7.1"
-#define SQLITE_VERSION_NUMBER 3008007
-#define SQLITE_SOURCE_ID      "2014-10-29 13:59:56 3b7b72c4685aa5cf5e675c2c47ebec10d9704221"
+#define SQLITE_VERSION        "3.8.8.3"
+#define SQLITE_VERSION_NUMBER 3008008
+#define SQLITE_SOURCE_ID      "2015-02-25 13:29:11 9d6c1880fb75660bbabd693175579529785f8a6b"
 
 /*
 ** CAPI3REF: Run-Time Library Version Numbers
@@ -325,7 +372,7 @@ SQLITE_API const char *sqlite3_compileoption_get(int N);
 ** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but
 ** can be fully or partially disabled using a call to [sqlite3_config()]
 ** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],
-** or [SQLITE_CONFIG_MUTEX].  ^(The return value of the
+** or [SQLITE_CONFIG_SERIALIZED].  ^(The return value of the
 ** sqlite3_threadsafe() function shows only the compile-time setting of
 ** thread safety, not any run-time changes to that setting made by
 ** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
@@ -1345,7 +1392,7 @@ struct sqlite3_vfs {
 ** </ul>
 **
 ** When unlocking, the same SHARED or EXCLUSIVE flag must be supplied as
-** was given no the corresponding lock.  
+** was given on the corresponding lock.  
 **
 ** The xShmLock method can transition between unlocked and SHARED or
 ** between unlocked and EXCLUSIVE.  It cannot transition between SHARED
@@ -1628,26 +1675,28 @@ struct sqlite3_mem_methods {
 ** SQLITE_CONFIG_SERIALIZED configuration option.</dd>
 **
 ** [[SQLITE_CONFIG_MALLOC]] <dt>SQLITE_CONFIG_MALLOC</dt>
-** <dd> ^(This option takes a single argument which is a pointer to an
-** instance of the [sqlite3_mem_methods] structure.  The argument specifies
+** <dd> ^(The SQLITE_CONFIG_MALLOC option takes a single argument which is 
+** a pointer to an instance of the [sqlite3_mem_methods] structure.
+** The argument specifies
 ** alternative low-level memory allocation routines to be used in place of
 ** the memory allocation routines built into SQLite.)^ ^SQLite makes
 ** its own private copy of the content of the [sqlite3_mem_methods] structure
 ** before the [sqlite3_config()] call returns.</dd>
 **
 ** [[SQLITE_CONFIG_GETMALLOC]] <dt>SQLITE_CONFIG_GETMALLOC</dt>
-** <dd> ^(This option takes a single argument which is a pointer to an
-** instance of the [sqlite3_mem_methods] structure.  The [sqlite3_mem_methods]
+** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which
+** is a pointer to an instance of the [sqlite3_mem_methods] structure.
+** The [sqlite3_mem_methods]
 ** structure is filled with the currently defined memory allocation routines.)^
 ** This option can be used to overload the default memory allocation
 ** routines with a wrapper that simulations memory allocation failure or
 ** tracks memory usage, for example. </dd>
 **
 ** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt>
-** <dd> ^This option takes single argument of type int, interpreted as a 
-** boolean, which enables or disables the collection of memory allocation 
-** statistics. ^(When memory allocation statistics are disabled, the 
-** following SQLite interfaces become non-operational:
+** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes single argument of type int,
+** interpreted as a boolean, which enables or disables the collection of
+** memory allocation statistics. ^(When memory allocation statistics are
+** disabled, the following SQLite interfaces become non-operational:
 **   <ul>
 **   <li> [sqlite3_memory_used()]
 **   <li> [sqlite3_memory_highwater()]
@@ -1660,53 +1709,67 @@ struct sqlite3_mem_methods {
 ** </dd>
 **
 ** [[SQLITE_CONFIG_SCRATCH]] <dt>SQLITE_CONFIG_SCRATCH</dt>
-** <dd> ^This option specifies a static memory buffer that SQLite can use for
-** scratch memory.  There are three arguments:  A pointer an 8-byte
+** <dd> ^The SQLITE_CONFIG_SCRATCH option specifies a static memory buffer
+** that SQLite can use for scratch memory.  ^(There are three arguments
+** to SQLITE_CONFIG_SCRATCH:  A pointer an 8-byte
 ** aligned memory buffer from which the scratch allocations will be
 ** drawn, the size of each scratch allocation (sz),
-** and the maximum number of scratch allocations (N).  The sz
-** argument must be a multiple of 16.
+** and the maximum number of scratch allocations (N).)^
 ** The first argument must be a pointer to an 8-byte aligned buffer
 ** of at least sz*N bytes of memory.
-** ^SQLite will use no more than two scratch buffers per thread.  So
-** N should be set to twice the expected maximum number of threads.
-** ^SQLite will never require a scratch buffer that is more than 6
-** times the database page size. ^If SQLite needs needs additional
+** ^SQLite will not use more than one scratch buffers per thread.
+** ^SQLite will never request a scratch buffer that is more than 6
+** times the database page size.
+** ^If SQLite needs needs additional
 ** scratch memory beyond what is provided by this configuration option, then 
-** [sqlite3_malloc()] will be used to obtain the memory needed.</dd>
+** [sqlite3_malloc()] will be used to obtain the memory needed.<p>
+** ^When the application provides any amount of scratch memory using
+** SQLITE_CONFIG_SCRATCH, SQLite avoids unnecessary large
+** [sqlite3_malloc|heap allocations].
+** This can help [Robson proof|prevent memory allocation failures] due to heap
+** fragmentation in low-memory embedded systems.
+** </dd>
 **
 ** [[SQLITE_CONFIG_PAGECACHE]] <dt>SQLITE_CONFIG_PAGECACHE</dt>
-** <dd> ^This option specifies a static memory buffer that SQLite can use for
-** the database page cache with the default page cache implementation.  
+** <dd> ^The SQLITE_CONFIG_PAGECACHE option specifies a static memory buffer
+** that SQLite can use for the database page cache with the default page
+** cache implementation.  
 ** This configuration should not be used if an application-define page
-** cache implementation is loaded using the SQLITE_CONFIG_PCACHE2 option.
-** There are three arguments to this option: A pointer to 8-byte aligned
+** cache implementation is loaded using the [SQLITE_CONFIG_PCACHE2]
+** configuration option.
+** ^There are three arguments to SQLITE_CONFIG_PAGECACHE: A pointer to
+** 8-byte aligned
 ** memory, the size of each page buffer (sz), and the number of pages (N).
 ** The sz argument should be the size of the largest database page
-** (a power of two between 512 and 32768) plus a little extra for each
-** page header.  ^The page header size is 20 to 40 bytes depending on
-** the host architecture.  ^It is harmless, apart from the wasted memory,
-** to make sz a little too large.  The first
-** argument should point to an allocation of at least sz*N bytes of memory.
+** (a power of two between 512 and 65536) plus some extra bytes for each
+** page header.  ^The number of extra bytes needed by the page header
+** can be determined using the [SQLITE_CONFIG_PCACHE_HDRSZ] option 
+** to [sqlite3_config()].
+** ^It is harmless, apart from the wasted memory,
+** for the sz parameter to be larger than necessary.  The first
+** argument should pointer to an 8-byte aligned block of memory that
+** is at least sz*N bytes of memory, otherwise subsequent behavior is
+** undefined.
 ** ^SQLite will use the memory provided by the first argument to satisfy its
 ** memory needs for the first N pages that it adds to cache.  ^If additional
 ** page cache memory is needed beyond what is provided by this option, then
-** SQLite goes to [sqlite3_malloc()] for the additional storage space.
-** The pointer in the first argument must
-** be aligned to an 8-byte boundary or subsequent behavior of SQLite
-** will be undefined.</dd>
+** SQLite goes to [sqlite3_malloc()] for the additional storage space.</dd>
 **
 ** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt>
-** <dd> ^This option specifies a static memory buffer that SQLite will use
-** for all of its dynamic memory allocation needs beyond those provided
-** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE].
-** There are three arguments: An 8-byte aligned pointer to the memory,
+** <dd> ^The SQLITE_CONFIG_HEAP option specifies a static memory buffer 
+** that SQLite will use for all of its dynamic memory allocation needs
+** beyond those provided for by [SQLITE_CONFIG_SCRATCH] and
+** [SQLITE_CONFIG_PAGECACHE].
+** ^The SQLITE_CONFIG_HEAP option is only available if SQLite is compiled
+** with either [SQLITE_ENABLE_MEMSYS3] or [SQLITE_ENABLE_MEMSYS5] and returns
+** [SQLITE_ERROR] if invoked otherwise.
+** ^There are three arguments to SQLITE_CONFIG_HEAP:
+** An 8-byte aligned pointer to the memory,
 ** the number of bytes in the memory buffer, and the minimum allocation size.
 ** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts
 ** to using its default memory allocator (the system malloc() implementation),
 ** undoing any prior invocation of [SQLITE_CONFIG_MALLOC].  ^If the
-** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or
-** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory
+** memory pointer is not NULL then the alternative memory
 ** allocator is engaged to handle all of SQLites memory allocation needs.
 ** The first pointer (the memory pointer) must be aligned to an 8-byte
 ** boundary or subsequent behavior of SQLite will be undefined.
@@ -1714,11 +1777,11 @@ struct sqlite3_mem_methods {
 ** for the minimum allocation size are 2**5 through 2**8.</dd>
 **
 ** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt>
-** <dd> ^(This option takes a single argument which is a pointer to an
-** instance of the [sqlite3_mutex_methods] structure.  The argument specifies
-** alternative low-level mutex routines to be used in place
-** the mutex routines built into SQLite.)^  ^SQLite makes a copy of the
-** content of the [sqlite3_mutex_methods] structure before the call to
+** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a
+** pointer to an instance of the [sqlite3_mutex_methods] structure.
+** The argument specifies alternative low-level mutex routines to be used
+** in place the mutex routines built into SQLite.)^  ^SQLite makes a copy of
+** the content of the [sqlite3_mutex_methods] structure before the call to
 ** [sqlite3_config()] returns. ^If SQLite is compiled with
 ** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
 ** the entire mutexing subsystem is omitted from the build and hence calls to
@@ -1726,8 +1789,8 @@ struct sqlite3_mem_methods {
 ** return [SQLITE_ERROR].</dd>
 **
 ** [[SQLITE_CONFIG_GETMUTEX]] <dt>SQLITE_CONFIG_GETMUTEX</dt>
-** <dd> ^(This option takes a single argument which is a pointer to an
-** instance of the [sqlite3_mutex_methods] structure.  The
+** <dd> ^(The SQLITE_CONFIG_GETMUTEX option takes a single argument which
+** is a pointer to an instance of the [sqlite3_mutex_methods] structure.  The
 ** [sqlite3_mutex_methods]
 ** structure is filled with the currently defined mutex routines.)^
 ** This option can be used to overload the default mutex allocation
@@ -1739,25 +1802,25 @@ struct sqlite3_mem_methods {
 ** return [SQLITE_ERROR].</dd>
 **
 ** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt>
-** <dd> ^(This option takes two arguments that determine the default
-** memory allocation for the lookaside memory allocator on each
-** [database connection].  The first argument is the
+** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine
+** the default size of lookaside memory on each [database connection].
+** The first argument is the
 ** size of each lookaside buffer slot and the second is the number of
-** slots allocated to each database connection.)^  ^(This option sets the
-** <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
-** verb to [sqlite3_db_config()] can be used to change the lookaside
+** slots allocated to each database connection.)^  ^(SQLITE_CONFIG_LOOKASIDE
+** sets the <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
+** option to [sqlite3_db_config()] can be used to change the lookaside
 ** configuration on individual connections.)^ </dd>
 **
 ** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt>
-** <dd> ^(This option takes a single argument which is a pointer to
-** an [sqlite3_pcache_methods2] object.  This object specifies the interface
-** to a custom page cache implementation.)^  ^SQLite makes a copy of the
-** object and uses it for page cache memory allocations.</dd>
+** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is 
+** a pointer to an [sqlite3_pcache_methods2] object.  This object specifies
+** the interface to a custom page cache implementation.)^
+** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd>
 **
 ** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt>
-** <dd> ^(This option takes a single argument which is a pointer to an
-** [sqlite3_pcache_methods2] object.  SQLite copies of the current
-** page cache implementation into that object.)^ </dd>
+** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which
+** is a pointer to an [sqlite3_pcache_methods2] object.  SQLite copies of
+** the current page cache implementation into that object.)^ </dd>
 **
 ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt>
 ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite
@@ -1780,10 +1843,11 @@ struct sqlite3_mem_methods {
 ** function must be threadsafe. </dd>
 **
 ** [[SQLITE_CONFIG_URI]] <dt>SQLITE_CONFIG_URI
-** <dd>^(This option takes a single argument of type int. If non-zero, then
-** URI handling is globally enabled. If the parameter is zero, then URI handling
-** is globally disabled.)^ ^If URI handling is globally enabled, all filenames
-** passed to [sqlite3_open()], [sqlite3_open_v2()], [sqlite3_open16()] or
+** <dd>^(The SQLITE_CONFIG_URI option takes a single argument of type int.
+** If non-zero, then URI handling is globally enabled. If the parameter is zero,
+** then URI handling is globally disabled.)^ ^If URI handling is globally
+** enabled, all filenames passed to [sqlite3_open()], [sqlite3_open_v2()],
+** [sqlite3_open16()] or
 ** specified as part of [ATTACH] commands are interpreted as URIs, regardless
 ** of whether or not the [SQLITE_OPEN_URI] flag is set when the database
 ** connection is opened. ^If it is globally disabled, filenames are
@@ -1793,9 +1857,10 @@ struct sqlite3_mem_methods {
 ** [SQLITE_USE_URI] symbol defined.)^
 **
 ** [[SQLITE_CONFIG_COVERING_INDEX_SCAN]] <dt>SQLITE_CONFIG_COVERING_INDEX_SCAN
-** <dd>^This option takes a single integer argument which is interpreted as
-** a boolean in order to enable or disable the use of covering indices for
-** full table scans in the query optimizer.  ^The default setting is determined
+** <dd>^The SQLITE_CONFIG_COVERING_INDEX_SCAN option takes a single integer
+** argument which is interpreted as a boolean in order to enable or disable
+** the use of covering indices for full table scans in the query optimizer.
+** ^The default setting is determined
 ** by the [SQLITE_ALLOW_COVERING_INDEX_SCAN] compile-time option, or is "on"
 ** if that compile-time option is omitted.
 ** The ability to disable the use of covering indices for full table scans
@@ -1835,19 +1900,39 @@ struct sqlite3_mem_methods {
 ** ^The default setting can be overridden by each database connection using
 ** either the [PRAGMA mmap_size] command, or by using the
 ** [SQLITE_FCNTL_MMAP_SIZE] file control.  ^(The maximum allowed mmap size
-** cannot be changed at run-time.  Nor may the maximum allowed mmap size
-** exceed the compile-time maximum mmap size set by the
+** will be silently truncated if necessary so that it does not exceed the
+** compile-time maximum mmap size set by the
 ** [SQLITE_MAX_MMAP_SIZE] compile-time option.)^
 ** ^If either argument to this option is negative, then that argument is
 ** changed to its compile-time default.
 **
 ** [[SQLITE_CONFIG_WIN32_HEAPSIZE]]
 ** <dt>SQLITE_CONFIG_WIN32_HEAPSIZE
-** <dd>^This option is only available if SQLite is compiled for Windows
-** with the [SQLITE_WIN32_MALLOC] pre-processor macro defined.
-** SQLITE_CONFIG_WIN32_HEAPSIZE takes a 32-bit unsigned integer value
+** <dd>^The SQLITE_CONFIG_WIN32_HEAPSIZE option is only available if SQLite is
+** compiled for Windows with the [SQLITE_WIN32_MALLOC] pre-processor macro
+** defined. ^SQLITE_CONFIG_WIN32_HEAPSIZE takes a 32-bit unsigned integer value
 ** that specifies the maximum size of the created heap.
 ** </dl>
+**
+** [[SQLITE_CONFIG_PCACHE_HDRSZ]]
+** <dt>SQLITE_CONFIG_PCACHE_HDRSZ
+** <dd>^The SQLITE_CONFIG_PCACHE_HDRSZ option takes a single parameter which
+** is a pointer to an integer and writes into that integer the number of extra
+** bytes per page required for each page in [SQLITE_CONFIG_PAGECACHE].
+** The amount of extra space required can change depending on the compiler,
+** target platform, and SQLite version.
+**
+** [[SQLITE_CONFIG_PMASZ]]
+** <dt>SQLITE_CONFIG_PMASZ
+** <dd>^The SQLITE_CONFIG_PMASZ option takes a single parameter which
+** is an unsigned integer and sets the "Minimum PMA Size" for the multithreaded
+** sorter to that integer.  The default minimum PMA Size is set by the
+** [SQLITE_SORTER_PMASZ] compile-time option.  New threads are launched
+** to help with sort operations when multithreaded sorting
+** is enabled (using the [PRAGMA threads] command) and the amount of content
+** to be sorted exceeds the page size times the minimum of the
+** [PRAGMA cache_size] setting and this value.
+** </dl>
 */
 #define SQLITE_CONFIG_SINGLETHREAD  1  /* nil */
 #define SQLITE_CONFIG_MULTITHREAD   2  /* nil */
@@ -1872,6 +1957,8 @@ struct sqlite3_mem_methods {
 #define SQLITE_CONFIG_SQLLOG       21  /* xSqllog, void* */
 #define SQLITE_CONFIG_MMAP_SIZE    22  /* sqlite3_int64, sqlite3_int64 */
 #define SQLITE_CONFIG_WIN32_HEAPSIZE      23  /* int nByte */
+#define SQLITE_CONFIG_PCACHE_HDRSZ        24  /* int *psz */
+#define SQLITE_CONFIG_PMASZ               25  /* unsigned int szPma */
 
 /*
 ** CAPI3REF: Database Connection Configuration Options
@@ -1999,47 +2086,45 @@ SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
 /*
 ** CAPI3REF: Count The Number Of Rows Modified
 **
-** ^This function returns the number of database rows that were changed
-** or inserted or deleted by the most recently completed SQL statement
-** on the [database connection] specified by the first parameter.
-** ^(Only changes that are directly specified by the [INSERT], [UPDATE],
-** or [DELETE] statement are counted.  Auxiliary changes caused by
-** triggers or [foreign key actions] are not counted.)^ Use the
-** [sqlite3_total_changes()] function to find the total number of changes
-** including changes caused by triggers and foreign key actions.
-**
-** ^Changes to a view that are simulated by an [INSTEAD OF trigger]
-** are not counted.  Only real table changes are counted.
-**
-** ^(A "row change" is a change to a single row of a single table
-** caused by an INSERT, DELETE, or UPDATE statement.  Rows that
-** are changed as side effects of [REPLACE] constraint resolution,
-** rollback, ABORT processing, [DROP TABLE], or by any other
-** mechanisms do not count as direct row changes.)^
-**
-** A "trigger context" is a scope of execution that begins and
-** ends with the script of a [CREATE TRIGGER | trigger]. 
-** Most SQL statements are
-** evaluated outside of any trigger.  This is the "top level"
-** trigger context.  If a trigger fires from the top level, a
-** new trigger context is entered for the duration of that one
-** trigger.  Subtriggers create subcontexts for their duration.
-**
-** ^Calling [sqlite3_exec()] or [sqlite3_step()] recursively does
-** not create a new trigger context.
-**
-** ^This function returns the number of direct row changes in the
-** most recent INSERT, UPDATE, or DELETE statement within the same
-** trigger context.
-**
-** ^Thus, when called from the top level, this function returns the
-** number of changes in the most recent INSERT, UPDATE, or DELETE
-** that also occurred at the top level.  ^(Within the body of a trigger,
-** the sqlite3_changes() interface can be called to find the number of
-** changes in the most recently completed INSERT, UPDATE, or DELETE
-** statement within the body of the same trigger.
-** However, the number returned does not include changes
-** caused by subtriggers since those have their own context.)^
+** ^This function returns the number of rows modified, inserted or
+** deleted by the most recently completed INSERT, UPDATE or DELETE
+** statement on the database connection specified by the only parameter.
+** ^Executing any other type of SQL statement does not modify the value
+** returned by this function.
+**
+** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
+** considered - auxiliary changes caused by [CREATE TRIGGER | triggers], 
+** [foreign key actions] or [REPLACE] constraint resolution are not counted.
+** 
+** Changes to a view that are intercepted by 
+** [INSTEAD OF trigger | INSTEAD OF triggers] are not counted. ^The value 
+** returned by sqlite3_changes() immediately after an INSERT, UPDATE or 
+** DELETE statement run on a view is always zero. Only changes made to real 
+** tables are counted.
+**
+** Things are more complicated if the sqlite3_changes() function is
+** executed while a trigger program is running. This may happen if the
+** program uses the [changes() SQL function], or if some other callback
+** function invokes sqlite3_changes() directly. Essentially:
+** 
+** <ul>
+**   <li> ^(Before entering a trigger program the value returned by
+**        sqlite3_changes() function is saved. After the trigger program 
+**        has finished, the original value is restored.)^
+** 
+**   <li> ^(Within a trigger program each INSERT, UPDATE and DELETE 
+**        statement sets the value returned by sqlite3_changes() 
+**        upon completion as normal. Of course, this value will not include 
+**        any changes performed by sub-triggers, as the sqlite3_changes() 
+**        value will be saved and restored after each sub-trigger has run.)^
+** </ul>
+** 
+** ^This means that if the changes() SQL function (or similar) is used
+** by the first INSERT, UPDATE or DELETE statement within a trigger, it 
+** returns the value as set when the calling statement began executing.
+** ^If it is used by the second or subsequent such statement within a trigger 
+** program, the value returned reflects the number of rows modified by the 
+** previous INSERT, UPDATE or DELETE statement within the same trigger.
 **
 ** See also the [sqlite3_total_changes()] interface, the
 ** [count_changes pragma], and the [changes() SQL function].
@@ -2053,20 +2138,17 @@ SQLITE_API int sqlite3_changes(sqlite3*);
 /*
 ** CAPI3REF: Total Number Of Rows Modified
 **
-** ^This function returns the number of row changes caused by [INSERT],
-** [UPDATE] or [DELETE] statements since the [database connection] was opened.
-** ^(The count returned by sqlite3_total_changes() includes all changes
-** from all [CREATE TRIGGER | trigger] contexts and changes made by
-** [foreign key actions]. However,
-** the count does not include changes used to implement [REPLACE] constraints,
-** do rollbacks or ABORT processing, or [DROP TABLE] processing.  The
-** count does not include rows of views that fire an [INSTEAD OF trigger],
-** though if the INSTEAD OF trigger makes changes of its own, those changes 
-** are counted.)^
-** ^The sqlite3_total_changes() function counts the changes as soon as
-** the statement that makes them is completed (when the statement handle
-** is passed to [sqlite3_reset()] or [sqlite3_finalize()]).
-**
+** ^This function returns the total number of rows inserted, modified or
+** deleted by all [INSERT], [UPDATE] or [DELETE] statements completed
+** since the database connection was opened, including those executed as
+** part of trigger programs. ^Executing any other type of SQL statement
+** does not affect the value returned by sqlite3_total_changes().
+** 
+** ^Changes made as part of [foreign key actions] are included in the
+** count, but those made as part of REPLACE constraint resolution are
+** not. ^Changes to a view that are intercepted by INSTEAD OF triggers 
+** are not counted.
+** 
 ** See also the [sqlite3_changes()] interface, the
 ** [count_changes pragma], and the [total_changes() SQL function].
 **
@@ -2153,6 +2235,7 @@ SQLITE_API int sqlite3_complete16(const void *sql);
 
 /*
 ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
+** KEYWORDS: {busy-handler callback} {busy handler}
 **
 ** ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X
 ** that might be invoked with argument P whenever
@@ -2169,7 +2252,7 @@ SQLITE_API int sqlite3_complete16(const void *sql);
 ** ^The first argument to the busy handler is a copy of the void* pointer which
 ** is the third argument to sqlite3_busy_handler().  ^The second argument to
 ** the busy handler callback is the number of times that the busy handler has
-** been invoked for the same locking event.  ^If the
+** been invoked previously for the same locking event.  ^If the
 ** busy callback returns 0, then no additional attempts are made to
 ** access the database and [SQLITE_BUSY] is returned
 ** to the application.
@@ -2544,13 +2627,14 @@ SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
 ** applications to access the same PRNG for other purposes.
 **
 ** ^A call to this routine stores N bytes of randomness into buffer P.
-** ^If N is less than one, then P can be a NULL pointer.
+** ^The P parameter can be a NULL pointer.
 **
 ** ^If this routine has not been previously called or if the previous
-** call had N less than one, then the PRNG is seeded using randomness
-** obtained from the xRandomness method of the default [sqlite3_vfs] object.
-** ^If the previous call to this routine had an N of 1 or more then
-** the pseudo-randomness is generated
+** call had N less than one or a NULL pointer for P, then the PRNG is
+** seeded using randomness obtained from the xRandomness method of
+** the default [sqlite3_vfs] object.
+** ^If the previous call to this routine had an N of 1 or more and a
+** non-NULL P then the pseudo-randomness is generated
 ** internally and without recourse to the [sqlite3_vfs] xRandomness
 ** method.
 */
@@ -4272,9 +4356,9 @@ SQLITE_API int sqlite3_create_function_v2(
 ** These constant define integer codes that represent the various
 ** text encodings supported by SQLite.
 */
-#define SQLITE_UTF8           1
-#define SQLITE_UTF16LE        2
-#define SQLITE_UTF16BE        3
+#define SQLITE_UTF8           1    /* IMP: R-37514-35566 */
+#define SQLITE_UTF16LE        2    /* IMP: R-03371-37637 */
+#define SQLITE_UTF16BE        3    /* IMP: R-51971-34154 */
 #define SQLITE_UTF16          4    /* Use native byte order */
 #define SQLITE_ANY            5    /* Deprecated */
 #define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */
@@ -4623,7 +4707,8 @@ typedef void (*sqlite3_destructor_type)(void*);
 ** the [sqlite3_context] pointer, the results are undefined.
 */
 SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
-SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,sqlite3_uint64,void(*)(void*));
+SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
+                           sqlite3_uint64,void(*)(void*));
 SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
 SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
 SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
@@ -5255,20 +5340,27 @@ SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
 /*
 ** CAPI3REF: Extract Metadata About A Column Of A Table
 **
-** ^This routine returns metadata about a specific column of a specific
-** database table accessible using the [database connection] handle
-** passed as the first function argument.
+** ^(The sqlite3_table_column_metadata(X,D,T,C,....) routine returns
+** information about column C of table T in database D
+** on [database connection] X.)^  ^The sqlite3_table_column_metadata()
+** interface returns SQLITE_OK and fills in the non-NULL pointers in
+** the final five arguments with appropriate values if the specified
+** column exists.  ^The sqlite3_table_column_metadata() interface returns
+** SQLITE_ERROR and if the specified column does not exist.
+** ^If the column-name parameter to sqlite3_table_column_metadata() is a
+** NULL pointer, then this routine simply checks for the existance of the
+** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
+** does not.
 **
 ** ^The column is identified by the second, third and fourth parameters to
-** this function. ^The second parameter is either the name of the database
+** this function. ^(The second parameter is either the name of the database
 ** (i.e. "main", "temp", or an attached database) containing the specified
-** table or NULL. ^If it is NULL, then all attached databases are searched
+** table or NULL.)^ ^If it is NULL, then all attached databases are searched
 ** for the table using the same algorithm used by the database engine to
 ** resolve unqualified table references.
 **
 ** ^The third and fourth parameters to this function are the table and column
-** name of the desired column, respectively. Neither of these parameters
-** may be NULL.
+** name of the desired column, respectively.
 **
 ** ^Metadata is returned by writing to the memory locations passed as the 5th
 ** and subsequent parameters to this function. ^Any of these arguments may be
@@ -5287,16 +5379,17 @@ SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
 ** </blockquote>)^
 **
 ** ^The memory pointed to by the character pointers returned for the
-** declaration type and collation sequence is valid only until the next
+** declaration type and collation sequence is valid until the next
 ** call to any SQLite API function.
 **
 ** ^If the specified table is actually a view, an [error code] is returned.
 **
-** ^If the specified column is "rowid", "oid" or "_rowid_" and an
+** ^If the specified column is "rowid", "oid" or "_rowid_" and the table 
+** is not a [WITHOUT ROWID] table and an
 ** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output
 ** parameters are set for the explicitly declared column. ^(If there is no
-** explicitly declared [INTEGER PRIMARY KEY] column, then the output
-** parameters are set as follows:
+** [INTEGER PRIMARY KEY] column, then the outputs
+** for the [rowid] are set as follows:
 **
 ** <pre>
 **     data type: "INTEGER"
@@ -5306,13 +5399,9 @@ SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
 **     auto increment: 0
 ** </pre>)^
 **
-** ^(This function may load one or more schemas from database files. If an
-** error occurs during this process, or if the requested table or column
-** cannot be found, an [error code] is returned and an error message left
-** in the [database connection] (to be retrieved using sqlite3_errmsg()).)^
-**
-** ^This API is only available if the library was compiled with the
-** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.
+** ^This function causes all database schemas to be read from disk and
+** parsed, if that has not already been done, and returns an error if
+** any errors are encountered while loading the schema.
 */
 SQLITE_API int sqlite3_table_column_metadata(
   sqlite3 *db,                /* Connection handle */
@@ -5765,26 +5854,42 @@ typedef struct sqlite3_blob sqlite3_blob;
 **     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
 ** </pre>)^
 **
+** ^(Parameter zDb is not the filename that contains the database, but 
+** rather the symbolic name of the database. For attached databases, this is
+** the name that appears after the AS keyword in the [ATTACH] statement.
+** For the main database file, the database name is "main". For TEMP
+** tables, the database name is "temp".)^
+**
 ** ^If the flags parameter is non-zero, then the BLOB is opened for read
-** and write access. ^If it is zero, the BLOB is opened for read access.
-** ^It is not possible to open a column that is part of an index or primary 
-** key for writing. ^If [foreign key constraints] are enabled, it is 
-** not possible to open a column that is part of a [child key] for writing.
-**
-** ^Note that the database name is not the filename that contains
-** the database but rather the symbolic name of the database that
-** appears after the AS keyword when the database is connected using [ATTACH].
-** ^For the main database file, the database name is "main".
-** ^For TEMP tables, the database name is "temp".
-**
-** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is written
-** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set
-** to be a null pointer.)^
-** ^This function sets the [database connection] error code and message
-** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related
-** functions. ^Note that the *ppBlob variable is always initialized in a
-** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob
-** regardless of the success or failure of this routine.
+** and write access. ^If the flags parameter is zero, the BLOB is opened for
+** read-only access.
+**
+** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is stored
+** in *ppBlob. Otherwise an [error code] is returned and, unless the error
+** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided
+** the API is not misused, it is always safe to call [sqlite3_blob_close()] 
+** on *ppBlob after this function it returns.
+**
+** This function fails with SQLITE_ERROR if any of the following are true:
+** <ul>
+**   <li> ^(Database zDb does not exist)^, 
+**   <li> ^(Table zTable does not exist within database zDb)^, 
+**   <li> ^(Table zTable is a WITHOUT ROWID table)^, 
+**   <li> ^(Column zColumn does not exist)^,
+**   <li> ^(Row iRow is not present in the table)^,
+**   <li> ^(The specified column of row iRow contains a value that is not
+**         a TEXT or BLOB value)^,
+**   <li> ^(Column zColumn is part of an index, PRIMARY KEY or UNIQUE 
+**         constraint and the blob is being opened for read/write access)^,
+**   <li> ^([foreign key constraints | Foreign key constraints] are enabled, 
+**         column zColumn is part of a [child key] definition and the blob is
+**         being opened for read/write access)^.
+** </ul>
+**
+** ^Unless it returns SQLITE_MISUSE, this function sets the 
+** [database connection] error code and message accessible via 
+** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. 
+**
 **
 ** ^(If the row that a BLOB handle points to is modified by an
 ** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects
@@ -5802,13 +5907,9 @@ typedef struct sqlite3_blob sqlite3_blob;
 ** interface.  Use the [UPDATE] SQL command to change the size of a
 ** blob.
 **
-** ^The [sqlite3_blob_open()] interface will fail for a [WITHOUT ROWID]
-** table.  Incremental BLOB I/O is not possible on [WITHOUT ROWID] tables.
-**
 ** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces
-** and the built-in [zeroblob] SQL function can be used, if desired,
-** to create an empty, zero-filled blob in which to read or write using
-** this interface.
+** and the built-in [zeroblob] SQL function may be used to create a 
+** zero-filled blob to read or write using the incremental-blob interface.
 **
 ** To avoid a resource leak, every open [BLOB handle] should eventually
 ** be released by a call to [sqlite3_blob_close()].
@@ -5850,24 +5951,22 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_i
 /*
 ** CAPI3REF: Close A BLOB Handle
 **
-** ^Closes an open [BLOB handle].
-**
-** ^Closing a BLOB shall cause the current transaction to commit
-** if there are no other BLOBs, no pending prepared statements, and the
-** database connection is in [autocommit mode].
-** ^If any writes were made to the BLOB, they might be held in cache
-** until the close operation if they will fit.
-**
-** ^(Closing the BLOB often forces the changes
-** out to disk and so if any I/O errors occur, they will likely occur
-** at the time when the BLOB is closed.  Any errors that occur during
-** closing are reported as a non-zero return value.)^
+** ^This function closes an open [BLOB handle]. ^(The BLOB handle is closed
+** unconditionally.  Even if this routine returns an error code, the 
+** handle is still closed.)^
 **
-** ^(The BLOB is closed unconditionally.  Even if this routine returns
-** an error code, the BLOB is still closed.)^
+** ^If the blob handle being closed was opened for read-write access, and if
+** the database is in auto-commit mode and there are no other open read-write
+** blob handles or active write statements, the current transaction is
+** committed. ^If an error occurs while committing the transaction, an error
+** code is returned and the transaction rolled back.
 **
-** ^Calling this routine with a null pointer (such as would be returned
-** by a failed call to [sqlite3_blob_open()]) is a harmless no-op.
+** Calling this function with an argument that is not a NULL pointer or an
+** open blob handle results in undefined behaviour. ^Calling this routine 
+** with a null pointer (such as would be returned by a failed call to 
+** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
+** is passed a valid open blob handle, the values returned by the 
+** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
 */
 SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
 
@@ -5917,21 +6016,27 @@ SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
 /*
 ** CAPI3REF: Write Data Into A BLOB Incrementally
 **
-** ^This function is used to write data into an open [BLOB handle] from a
-** caller-supplied buffer. ^N bytes of data are copied from the buffer Z
-** into the open BLOB, starting at offset iOffset.
+** ^(This function is used to write data into an open [BLOB handle] from a
+** caller-supplied buffer. N bytes of data are copied from the buffer Z
+** into the open BLOB, starting at offset iOffset.)^
+**
+** ^(On success, sqlite3_blob_write() returns SQLITE_OK.
+** Otherwise, an  [error code] or an [extended error code] is returned.)^
+** ^Unless SQLITE_MISUSE is returned, this function sets the 
+** [database connection] error code and message accessible via 
+** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. 
 **
 ** ^If the [BLOB handle] passed as the first argument was not opened for
 ** writing (the flags parameter to [sqlite3_blob_open()] was zero),
 ** this function returns [SQLITE_READONLY].
 **
-** ^This function may only modify the contents of the BLOB; it is
+** This function may only modify the contents of the BLOB; it is
 ** not possible to increase the size of a BLOB using this API.
 ** ^If offset iOffset is less than N bytes from the end of the BLOB,
-** [SQLITE_ERROR] is returned and no data is written.  ^If N is
-** less than zero [SQLITE_ERROR] is returned and no data is written.
-** The size of the BLOB (and hence the maximum value of N+iOffset)
-** can be determined using the [sqlite3_blob_bytes()] interface.
+** [SQLITE_ERROR] is returned and no data is written. The size of the 
+** BLOB (and hence the maximum value of N+iOffset) can be determined 
+** using the [sqlite3_blob_bytes()] interface. ^If N or iOffset are less 
+** than zero [SQLITE_ERROR] is returned and no data is written.
 **
 ** ^An attempt to write to an expired [BLOB handle] fails with an
 ** error code of [SQLITE_ABORT].  ^Writes to the BLOB that occurred
@@ -5940,9 +6045,6 @@ SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
 ** have been overwritten by the statement that expired the BLOB handle
 ** or by other independent statements.
 **
-** ^(On success, sqlite3_blob_write() returns SQLITE_OK.
-** Otherwise, an  [error code] or an [extended error code] is returned.)^
-**
 ** This routine only works on a [BLOB handle] which has been created
 ** by a prior successful call to [sqlite3_blob_open()] and which has not
 ** been closed by [sqlite3_blob_close()].  Passing any other pointer in
@@ -5995,34 +6097,34 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
 **
 ** The SQLite source code contains multiple implementations
 ** of these mutex routines.  An appropriate implementation
-** is selected automatically at compile-time.  ^(The following
+** is selected automatically at compile-time.  The following
 ** implementations are available in the SQLite core:
 **
 ** <ul>
 ** <li>   SQLITE_MUTEX_PTHREADS
 ** <li>   SQLITE_MUTEX_W32
 ** <li>   SQLITE_MUTEX_NOOP
-** </ul>)^
+** </ul>
 **
-** ^The SQLITE_MUTEX_NOOP implementation is a set of routines
+** The SQLITE_MUTEX_NOOP implementation is a set of routines
 ** that does no real locking and is appropriate for use in
-** a single-threaded application.  ^The SQLITE_MUTEX_PTHREADS and
+** a single-threaded application.  The SQLITE_MUTEX_PTHREADS and
 ** SQLITE_MUTEX_W32 implementations are appropriate for use on Unix
 ** and Windows.
 **
-** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
+** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
 ** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
 ** implementation is included with the library. In this case the
 ** application must supply a custom mutex implementation using the
 ** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
 ** before calling sqlite3_initialize() or any other public sqlite3_
-** function that calls sqlite3_initialize().)^
+** function that calls sqlite3_initialize().
 **
 ** ^The sqlite3_mutex_alloc() routine allocates a new
-** mutex and returns a pointer to it. ^If it returns NULL
-** that means that a mutex could not be allocated.  ^SQLite
-** will unwind its stack and return an error.  ^(The argument
-** to sqlite3_mutex_alloc() is one of these integer constants:
+** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc()
+** routine returns NULL if it is unable to allocate the requested
+** mutex.  The argument to sqlite3_mutex_alloc() must one of these
+** integer constants:
 **
 ** <ul>
 ** <li>  SQLITE_MUTEX_FAST
@@ -6035,7 +6137,8 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
 ** <li>  SQLITE_MUTEX_STATIC_PMEM
 ** <li>  SQLITE_MUTEX_STATIC_APP1
 ** <li>  SQLITE_MUTEX_STATIC_APP2
-** </ul>)^
+** <li>  SQLITE_MUTEX_STATIC_APP3
+** </ul>
 **
 ** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)
 ** cause sqlite3_mutex_alloc() to create
@@ -6043,14 +6146,14 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
 ** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
 ** The mutex implementation does not need to make a distinction
 ** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
-** not want to.  ^SQLite will only request a recursive mutex in
-** cases where it really needs one.  ^If a faster non-recursive mutex
+** not want to.  SQLite will only request a recursive mutex in
+** cases where it really needs one.  If a faster non-recursive mutex
 ** implementation is available on the host platform, the mutex subsystem
 ** might return such a mutex in response to SQLITE_MUTEX_FAST.
 **
 ** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other
 ** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return
-** a pointer to a static preexisting mutex.  ^Six static mutexes are
+** a pointer to a static preexisting mutex.  ^Nine static mutexes are
 ** used by the current version of SQLite.  Future versions of SQLite
 ** may add additional static mutexes.  Static mutexes are for internal
 ** use by SQLite only.  Applications that use SQLite mutexes should
@@ -6059,16 +6162,13 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
 **
 ** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
 ** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
-** returns a different mutex on every call.  ^But for the static
+** returns a different mutex on every call.  ^For the static
 ** mutex types, the same mutex is returned on every call that has
 ** the same type number.
 **
 ** ^The sqlite3_mutex_free() routine deallocates a previously
-** allocated dynamic mutex.  ^SQLite is careful to deallocate every
-** dynamic mutex that it allocates.  The dynamic mutexes must not be in
-** use when they are deallocated.  Attempting to deallocate a static
-** mutex results in undefined behavior.  ^SQLite never deallocates
-** a static mutex.
+** allocated dynamic mutex.  Attempting to deallocate a static
+** mutex results in undefined behavior.
 **
 ** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
 ** to enter a mutex.  ^If another thread is already within the mutex,
@@ -6076,23 +6176,21 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
 ** SQLITE_BUSY.  ^The sqlite3_mutex_try() interface returns [SQLITE_OK]
 ** upon successful entry.  ^(Mutexes created using
 ** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.
-** In such cases the,
+** In such cases, the
 ** mutex must be exited an equal number of times before another thread
-** can enter.)^  ^(If the same thread tries to enter any other
-** kind of mutex more than once, the behavior is undefined.
-** SQLite will never exhibit
-** such behavior in its own use of mutexes.)^
+** can enter.)^  If the same thread tries to enter any mutex other
+** than an SQLITE_MUTEX_RECURSIVE more than once, the behavior is undefined.
 **
 ** ^(Some systems (for example, Windows 95) do not support the operation
 ** implemented by sqlite3_mutex_try().  On those systems, sqlite3_mutex_try()
-** will always return SQLITE_BUSY.  The SQLite core only ever uses
-** sqlite3_mutex_try() as an optimization so this is acceptable behavior.)^
+** will always return SQLITE_BUSY. The SQLite core only ever uses
+** sqlite3_mutex_try() as an optimization so this is acceptable 
+** behavior.)^
 **
 ** ^The sqlite3_mutex_leave() routine exits a mutex that was
-** previously entered by the same thread.   ^(The behavior
+** previously entered by the same thread.   The behavior
 ** is undefined if the mutex is not currently entered by the
-** calling thread or is not currently allocated.  SQLite will
-** never do either.)^
+** calling thread or is not currently allocated.
 **
 ** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or
 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines
@@ -6113,9 +6211,9 @@ SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
 ** used to allocate and use mutexes.
 **
 ** Usually, the default mutex implementations provided by SQLite are
-** sufficient, however the user has the option of substituting a custom
+** sufficient, however the application has the option of substituting a custom
 ** implementation for specialized deployments or systems for which SQLite
-** does not provide a suitable implementation. In this case, the user
+** does not provide a suitable implementation. In this case, the application
 ** creates and populates an instance of this structure to pass
 ** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
 ** Additionally, an instance of this structure can be used as an
@@ -6156,13 +6254,13 @@ SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
 ** (i.e. it is acceptable to provide an implementation that segfaults if
 ** it is passed a NULL pointer).
 **
-** The xMutexInit() method must be threadsafe.  ^It must be harmless to
+** The xMutexInit() method must be threadsafe.  It must be harmless to
 ** invoke xMutexInit() multiple times within the same process and without
 ** intervening calls to xMutexEnd().  Second and subsequent calls to
 ** xMutexInit() must be no-ops.
 **
-** ^xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
-** and its associates).  ^Similarly, xMutexAlloc() must not use SQLite memory
+** xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
+** and its associates).  Similarly, xMutexAlloc() must not use SQLite memory
 ** allocation for a static mutex.  ^However xMutexAlloc() may use SQLite
 ** memory allocation for a fast or recursive mutex.
 **
@@ -6188,29 +6286,29 @@ struct sqlite3_mutex_methods {
 ** CAPI3REF: Mutex Verification Routines
 **
 ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines
-** are intended for use inside assert() statements.  ^The SQLite core
+** are intended for use inside assert() statements.  The SQLite core
 ** never uses these routines except inside an assert() and applications
-** are advised to follow the lead of the core.  ^The SQLite core only
+** are advised to follow the lead of the core.  The SQLite core only
 ** provides implementations for these routines when it is compiled
-** with the SQLITE_DEBUG flag.  ^External mutex implementations
+** with the SQLITE_DEBUG flag.  External mutex implementations
 ** are only required to provide these routines if SQLITE_DEBUG is
 ** defined and if NDEBUG is not defined.
 **
-** ^These routines should return true if the mutex in their argument
+** These routines should return true if the mutex in their argument
 ** is held or not held, respectively, by the calling thread.
 **
-** ^The implementation is not required to provide versions of these
+** The implementation is not required to provide versions of these
 ** routines that actually work. If the implementation does not provide working
 ** versions of these routines, it should at least provide stubs that always
 ** return true so that one does not get spurious assertion failures.
 **
-** ^If the argument to sqlite3_mutex_held() is a NULL pointer then
+** If the argument to sqlite3_mutex_held() is a NULL pointer then
 ** the routine should return 1.   This seems counter-intuitive since
 ** clearly the mutex cannot be held if it does not exist.  But
 ** the reason the mutex does not exist is because the build is not
 ** using mutexes.  And we do not want the assert() containing the
 ** call to sqlite3_mutex_held() to fail, so a non-zero return is
-** the appropriate thing to do.  ^The sqlite3_mutex_notheld()
+** the appropriate thing to do.  The sqlite3_mutex_notheld()
 ** interface should also return 1 when given a NULL pointer.
 */
 #ifndef NDEBUG
@@ -6943,6 +7041,10 @@ typedef struct sqlite3_backup sqlite3_backup;
 ** must be different or else sqlite3_backup_init(D,N,S,M) will fail with
 ** an error.
 **
+** ^A call to sqlite3_backup_init() will fail, returning SQLITE_ERROR, if 
+** there is already a read or read-write transaction open on the 
+** destination database.
+**
 ** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is
 ** returned and an error code and error message are stored in the
 ** destination [database connection] D.
@@ -7266,12 +7368,10 @@ SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
 ** CAPI3REF: Write-Ahead Log Commit Hook
 **
 ** ^The [sqlite3_wal_hook()] function is used to register a callback that
-** will be invoked each time a database connection commits data to a
-** [write-ahead log] (i.e. whenever a transaction is committed in
-** [journal_mode | journal_mode=WAL mode]). 
+** is invoked each time data is committed to a database in wal mode.
 **
-** ^The callback is invoked by SQLite after the commit has taken place and 
-** the associated write-lock on the database released, so the implementation 
+** ^(The callback is invoked by SQLite after the commit has taken place and 
+** the associated write-lock on the database released)^, so the implementation 
 ** may read, write or [checkpoint] the database as required.
 **
 ** ^The first parameter passed to the callback function when it is invoked
@@ -7336,97 +7436,114 @@ SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
 /*
 ** CAPI3REF: Checkpoint a database
 **
-** ^The [sqlite3_wal_checkpoint(D,X)] interface causes database named X
-** on [database connection] D to be [checkpointed].  ^If X is NULL or an
-** empty string, then a checkpoint is run on all databases of
-** connection D.  ^If the database connection D is not in
-** [WAL | write-ahead log mode] then this interface is a harmless no-op.
-** ^The [sqlite3_wal_checkpoint(D,X)] interface initiates a
-** [sqlite3_wal_checkpoint_v2|PASSIVE] checkpoint.
-** Use the [sqlite3_wal_checkpoint_v2()] interface to get a FULL
-** or RESET checkpoint.
+** ^(The sqlite3_wal_checkpoint(D,X) is equivalent to
+** [sqlite3_wal_checkpoint_v2](D,X,[SQLITE_CHECKPOINT_PASSIVE],0,0).)^
 **
-** ^The [wal_checkpoint pragma] can be used to invoke this interface
-** from SQL.  ^The [sqlite3_wal_autocheckpoint()] interface and the
-** [wal_autocheckpoint pragma] can be used to cause this interface to be
-** run whenever the WAL reaches a certain size threshold.
+** In brief, sqlite3_wal_checkpoint(D,X) causes the content in the 
+** [write-ahead log] for database X on [database connection] D to be
+** transferred into the database file and for the write-ahead log to
+** be reset.  See the [checkpointing] documentation for addition
+** information.
 **
-** See also: [sqlite3_wal_checkpoint_v2()]
+** This interface used to be the only way to cause a checkpoint to
+** occur.  But then the newer and more powerful [sqlite3_wal_checkpoint_v2()]
+** interface was added.  This interface is retained for backwards
+** compatibility and as a convenience for applications that need to manually
+** start a callback but which do not need the full power (and corresponding
+** complication) of [sqlite3_wal_checkpoint_v2()].
 */
 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
 
 /*
 ** CAPI3REF: Checkpoint a database
 **
-** Run a checkpoint operation on WAL database zDb attached to database 
-** handle db. The specific operation is determined by the value of the 
-** eMode parameter:
+** ^(The sqlite3_wal_checkpoint_v2(D,X,M,L,C) interface runs a checkpoint
+** operation on database X of [database connection] D in mode M.  Status
+** information is written back into integers pointed to by L and C.)^
+** ^(The M parameter must be a valid [checkpoint mode]:)^
 **
 ** <dl>
 ** <dt>SQLITE_CHECKPOINT_PASSIVE<dd>
-**   Checkpoint as many frames as possible without waiting for any database 
-**   readers or writers to finish. Sync the db file if all frames in the log
-**   are checkpointed. This mode is the same as calling 
-**   sqlite3_wal_checkpoint(). The [sqlite3_busy_handler|busy-handler callback]
-**   is never invoked.
+**   ^Checkpoint as many frames as possible without waiting for any database 
+**   readers or writers to finish, then sync the database file if all frames 
+**   in the log were checkpointed. ^The [busy-handler callback]
+**   is never invoked in the SQLITE_CHECKPOINT_PASSIVE mode.  
+**   ^On the other hand, passive mode might leave the checkpoint unfinished
+**   if there are concurrent readers or writers.
 **
 ** <dt>SQLITE_CHECKPOINT_FULL<dd>
-**   This mode blocks (it invokes the
+**   ^This mode blocks (it invokes the
 **   [sqlite3_busy_handler|busy-handler callback]) until there is no
 **   database writer and all readers are reading from the most recent database
-**   snapshot. It then checkpoints all frames in the log file and syncs the
-**   database file. This call blocks database writers while it is running,
-**   but not database readers.
+**   snapshot. ^It then checkpoints all frames in the log file and syncs the
+**   database file. ^This mode blocks new database writers while it is pending,
+**   but new database readers are allowed to continue unimpeded.
 **
 ** <dt>SQLITE_CHECKPOINT_RESTART<dd>
-**   This mode works the same way as SQLITE_CHECKPOINT_FULL, except after 
-**   checkpointing the log file it blocks (calls the 
-**   [sqlite3_busy_handler|busy-handler callback])
-**   until all readers are reading from the database file only. This ensures 
-**   that the next client to write to the database file restarts the log file 
-**   from the beginning. This call blocks database writers while it is running,
-**   but not database readers.
+**   ^This mode works the same way as SQLITE_CHECKPOINT_FULL with the addition
+**   that after checkpointing the log file it blocks (calls the 
+**   [busy-handler callback])
+**   until all readers are reading from the database file only. ^This ensures 
+**   that the next writer will restart the log file from the beginning.
+**   ^Like SQLITE_CHECKPOINT_FULL, this mode blocks new
+**   database writer attempts while it is pending, but does not impede readers.
+**
+** <dt>SQLITE_CHECKPOINT_TRUNCATE<dd>
+**   ^This mode works the same way as SQLITE_CHECKPOINT_RESTART with the
+**   addition that it also truncates the log file to zero bytes just prior
+**   to a successful return.
 ** </dl>
 **
-** If pnLog is not NULL, then *pnLog is set to the total number of frames in
-** the log file before returning. If pnCkpt is not NULL, then *pnCkpt is set to
-** the total number of checkpointed frames (including any that were already
-** checkpointed when this function is called). *pnLog and *pnCkpt may be
-** populated even if sqlite3_wal_checkpoint_v2() returns other than SQLITE_OK.
-** If no values are available because of an error, they are both set to -1
-** before returning to communicate this to the caller.
-**
-** All calls obtain an exclusive "checkpoint" lock on the database file. If
+** ^If pnLog is not NULL, then *pnLog is set to the total number of frames in
+** the log file or to -1 if the checkpoint could not run because
+** of an error or because the database is not in [WAL mode]. ^If pnCkpt is not
+** NULL,then *pnCkpt is set to the total number of checkpointed frames in the
+** log file (including any that were already checkpointed before the function
+** was called) or to -1 if the checkpoint could not run due to an error or
+** because the database is not in WAL mode. ^Note that upon successful
+** completion of an SQLITE_CHECKPOINT_TRUNCATE, the log file will have been
+** truncated to zero bytes and so both *pnLog and *pnCkpt will be set to zero.
+**
+** ^All calls obtain an exclusive "checkpoint" lock on the database file. ^If
 ** any other process is running a checkpoint operation at the same time, the 
-** lock cannot be obtained and SQLITE_BUSY is returned. Even if there is a 
+** lock cannot be obtained and SQLITE_BUSY is returned. ^Even if there is a 
 ** busy-handler configured, it will not be invoked in this case.
 **
-** The SQLITE_CHECKPOINT_FULL and RESTART modes also obtain the exclusiv
-** "writer" lock on the database file. If the writer lock cannot be obtained
-** immediately, and a busy-handler is configured, it is invoked and the writer
-** lock retried until either the busy-handler returns 0 or the lock is
-** successfully obtained. The busy-handler is also invoked while waiting for
-** database readers as described above. If the busy-handler returns 0 before
+** ^The SQLITE_CHECKPOINT_FULL, RESTART and TRUNCATE modes also obtain th
+** exclusive "writer" lock on the database file. ^If the writer lock cannot be
+** obtained immediately, and a busy-handler is configured, it is invoked and
+** the writer lock retried until either the busy-handler returns 0 or the lock
+** is successfully obtained. ^The busy-handler is also invoked while waiting for
+** database readers as described above. ^If the busy-handler returns 0 before
 ** the writer lock is obtained or while waiting for database readers, the
 ** checkpoint operation proceeds from that point in the same way as 
 ** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible 
-** without blocking any further. SQLITE_BUSY is returned in this case.
+** without blocking any further. ^SQLITE_BUSY is returned in this case.
 **
-** If parameter zDb is NULL or points to a zero length string, then the
-** specified operation is attempted on all WAL databases. In this case the
-** values written to output parameters *pnLog and *pnCkpt are undefined. If 
+** ^If parameter zDb is NULL or points to a zero length string, then the
+** specified operation is attempted on all WAL databases [attached] to 
+** [database connection] db.  In this case the
+** values written to output parameters *pnLog and *pnCkpt are undefined. ^If 
 ** an SQLITE_BUSY error is encountered when processing one or more of the 
 ** attached WAL databases, the operation is still attempted on any remaining 
-** attached databases and SQLITE_BUSY is returned to the caller. If any other 
+** attached databases and SQLITE_BUSY is returned at the end. ^If any other 
 ** error occurs while processing an attached database, processing is abandoned 
-** and the error code returned to the caller immediately. If no error 
+** and the error code is returned to the caller immediately. ^If no error 
 ** (SQLITE_BUSY or otherwise) is encountered while processing the attached 
 ** databases, SQLITE_OK is returned.
 **
-** If database zDb is the name of an attached database that is not in WAL
-** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. If
+** ^If database zDb is the name of an attached database that is not in WAL
+** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. ^If
 ** zDb is not NULL (or a zero length string) and is not the name of any
 ** attached database, SQLITE_ERROR is returned to the caller.
+**
+** ^Unless it returns SQLITE_MISUSE,
+** the sqlite3_wal_checkpoint_v2() interface
+** sets the error information that is queried by
+** [sqlite3_errcode()] and [sqlite3_errmsg()].
+**
+** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
+** from SQL.
 */
 SQLITE_API int sqlite3_wal_checkpoint_v2(
   sqlite3 *db,                    /* Database handle */
@@ -7437,16 +7554,18 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
 );
 
 /*
-** CAPI3REF: Checkpoint operation parameters
+** CAPI3REF: Checkpoint Mode Values
+** KEYWORDS: {checkpoint mode}
 **
-** These constants can be used as the 3rd parameter to
-** [sqlite3_wal_checkpoint_v2()].  See the [sqlite3_wal_checkpoint_v2()]
-** documentation for additional information about the meaning and use of
-** each of these values.
+** These constants define all valid values for the "checkpoint mode" passed
+** as the third parameter to the [sqlite3_wal_checkpoint_v2()] interface.
+** See the [sqlite3_wal_checkpoint_v2()] documentation for details on the
+** meaning of each of these checkpoint modes.
 */
-#define SQLITE_CHECKPOINT_PASSIVE 0
-#define SQLITE_CHECKPOINT_FULL    1
-#define SQLITE_CHECKPOINT_RESTART 2
+#define SQLITE_CHECKPOINT_PASSIVE  0  /* Do as much as possible w/o blocking */
+#define SQLITE_CHECKPOINT_FULL     1  /* Wait for writers, then checkpoint */
+#define SQLITE_CHECKPOINT_RESTART  2  /* Like FULL but wait for for readers */
+#define SQLITE_CHECKPOINT_TRUNCATE 3  /* Like RESTART but also truncate WAL */
 
 /*
 ** CAPI3REF: Virtual Table Interface Configuration
@@ -7535,6 +7654,106 @@ SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
 /* #define SQLITE_ABORT 4  // Also an error code */
 #define SQLITE_REPLACE  5
 
+/*
+** CAPI3REF: Prepared Statement Scan Status Opcodes
+** KEYWORDS: {scanstatus options}
+**
+** The following constants can be used for the T parameter to the
+** [sqlite3_stmt_scanstatus(S,X,T,V)] interface.  Each constant designates a
+** different metric for sqlite3_stmt_scanstatus() to return.
+**
+** When the value returned to V is a string, space to hold that string is
+** managed by the prepared statement S and will be automatically freed when
+** S is finalized.
+**
+** <dl>
+** [[SQLITE_SCANSTAT_NLOOP]] <dt>SQLITE_SCANSTAT_NLOOP</dt>
+** <dd>^The [sqlite3_int64] variable pointed to by the T parameter will be
+** set to the total number of times that the X-th loop has run.</dd>
+**
+** [[SQLITE_SCANSTAT_NVISIT]] <dt>SQLITE_SCANSTAT_NVISIT</dt>
+** <dd>^The [sqlite3_int64] variable pointed to by the T parameter will be set
+** to the total number of rows examined by all iterations of the X-th loop.</dd>
+**
+** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt>
+** <dd>^The "double" variable pointed to by the T parameter will be set to the
+** query planner's estimate for the average number of rows output from each
+** iteration of the X-th loop.  If the query planner's estimates was accurate,
+** then this value will approximate the quotient NVISIT/NLOOP and the
+** product of this value for all prior loops with the same SELECTID will
+** be the NLOOP value for the current loop.
+**
+** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt>
+** <dd>^The "const char *" variable pointed to by the T parameter will be set
+** to a zero-terminated UTF-8 string containing the name of the index or table
+** used for the X-th loop.
+**
+** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt>
+** <dd>^The "const char *" variable pointed to by the T parameter will be set
+** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]
+** description for the X-th loop.
+**
+** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECT</dt>
+** <dd>^The "int" variable pointed to by the T parameter will be set to the
+** "select-id" for the X-th loop.  The select-id identifies which query or
+** subquery the loop is part of.  The main query has a select-id of zero.
+** The select-id is the same value as is output in the first column
+** of an [EXPLAIN QUERY PLAN] query.
+** </dl>
+*/
+#define SQLITE_SCANSTAT_NLOOP    0
+#define SQLITE_SCANSTAT_NVISIT   1
+#define SQLITE_SCANSTAT_EST      2
+#define SQLITE_SCANSTAT_NAME     3
+#define SQLITE_SCANSTAT_EXPLAIN  4
+#define SQLITE_SCANSTAT_SELECTID 5
+
+/*
+** CAPI3REF: Prepared Statement Scan Status
+**
+** This interface returns information about the predicted and measured
+** performance for pStmt.  Advanced applications can use this
+** interface to compare the predicted and the measured performance and
+** issue warnings and/or rerun [ANALYZE] if discrepancies are found.
+**
+** Since this interface is expected to be rarely used, it is only
+** available if SQLite is compiled using the [SQLITE_ENABLE_STMT_SCANSTATUS]
+** compile-time option.
+**
+** The "iScanStatusOp" parameter determines which status information to return.
+** The "iScanStatusOp" must be one of the [scanstatus options] or the behavior
+** of this interface is undefined.
+** ^The requested measurement is written into a variable pointed to by
+** the "pOut" parameter.
+** Parameter "idx" identifies the specific loop to retrieve statistics for.
+** Loops are numbered starting from zero. ^If idx is out of range - less than
+** zero or greater than or equal to the total number of loops used to implement
+** the statement - a non-zero value is returned and the variable that pOut
+** points to is unchanged.
+**
+** ^Statistics might not be available for all loops in all statements. ^In cases
+** where there exist loops with no available statistics, this function behaves
+** as if the loop did not exist - it returns non-zero and leave the variable
+** that pOut points to unchanged.
+**
+** See also: [sqlite3_stmt_scanstatus_reset()]
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_stmt_scanstatus(
+  sqlite3_stmt *pStmt,      /* Prepared statement for which info desired */
+  int idx,                  /* Index of loop to report on */
+  int iScanStatusOp,        /* Information desired.  SQLITE_SCANSTAT_* */
+  void *pOut                /* Result written here */
+);     
+
+/*
+** CAPI3REF: Zero Scan-Status Counters
+**
+** ^Zero all [sqlite3_stmt_scanstatus()] related event counters.
+**
+** This API is only available if the library is built with pre-processor
+** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
 
 
 /*
@@ -7987,10 +8206,9 @@ struct sqlite3_rtree_query_info {
 #endif
 
 /*
-** The SQLITE_DEFAULT_MEMSTATUS macro must be defined as either 0 or 1.
-** It determines whether or not the features related to 
-** SQLITE_CONFIG_MEMSTATUS are available by default or not. This value can
-** be overridden at runtime using the sqlite3_config() API.
+** EVIDENCE-OF: R-25715-37072 Memory allocation statistics are enabled by
+** default unless SQLite is compiled with SQLITE_DEFAULT_MEMSTATUS=0 in
+** which case memory allocation statistics are disabled by default.
 */
 #if !defined(SQLITE_DEFAULT_MEMSTATUS)
 # define SQLITE_DEFAULT_MEMSTATUS 1
@@ -8043,7 +8261,7 @@ struct sqlite3_rtree_query_info {
 ** But _XOPEN_SOURCE define causes problems for Mac OS X, so omit
 ** it.
 */
-#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__)
+#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__CYGWIN__)
 #  define _XOPEN_SOURCE 600
 #endif
 
@@ -8620,7 +8838,7 @@ typedef INT8_TYPE i8;              /* 1-byte signed integer */
 ** gives a possible range of values of approximately 1.0e986 to 1e-986.
 ** But the allowed values are "grainy".  Not every value is representable.
 ** For example, quantities 16 and 17 are both represented by a LogEst
-** of 40.  However, since LogEst quantaties are suppose to be estimates,
+** of 40.  However, since LogEst quantities are suppose to be estimates,
 ** not exact values, this imprecision is not a problem.
 **
 ** "LogEst" is short for "Logarithmic Estimate".
@@ -8730,7 +8948,7 @@ SQLITE_PRIVATE const int sqlite3one;
 #endif
 #ifndef SQLITE_MAX_MMAP_SIZE
 # if defined(__linux__) \
-  || defined(_WIN32) \
+  || defined(_WIN32) || defined(__CYGWIN__) \
   || (defined(__APPLE__) && defined(__MACH__)) \
   || defined(__sun)
 #   define SQLITE_MAX_MMAP_SIZE 0x7fff0000  /* 2147418112 */
@@ -8956,7 +9174,7 @@ typedef struct With With;
 /* TODO: This definition is just included so other modules compile. It
 ** needs to be revisited.
 */
-#define SQLITE_N_BTREE_META 10
+#define SQLITE_N_BTREE_META 16
 
 /*
 ** If defined as non-zero, auto-vacuum is enabled by default. Otherwise
@@ -9020,7 +9238,7 @@ SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int);
 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster);
 SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree*, int);
 SQLITE_PRIVATE int sqlite3BtreeCommit(Btree*);
-SQLITE_PRIVATE int sqlite3BtreeRollback(Btree*,int);
+SQLITE_PRIVATE int sqlite3BtreeRollback(Btree*,int,int);
 SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree*,int);
 SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree*, int*, int flags);
 SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree*);
@@ -9053,7 +9271,7 @@ SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *);
 SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree*, int, int*);
 SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree*, int, int*);
 SQLITE_PRIVATE int sqlite3BtreeClearTableOfCursor(BtCursor*);
-SQLITE_PRIVATE void sqlite3BtreeTripAllCursors(Btree*, int);
+SQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree*, int, int);
 
 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);
 SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);
@@ -9071,6 +9289,11 @@ SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p);
 ** For example, the free-page-count field is located at byte offset 36 of
 ** the database file header. The incr-vacuum-flag field is located at
 ** byte offset 64 (== 36+4*7).
+**
+** The BTREE_DATA_VERSION value is not really a value stored in the header.
+** It is a read-only number computed by the pager.  But we merge it with
+** the header value access routines since its access pattern is the same.
+** Call it a "virtual meta value".
 */
 #define BTREE_FREE_PAGE_COUNT     0
 #define BTREE_SCHEMA_VERSION      1
@@ -9081,6 +9304,7 @@ SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p);
 #define BTREE_USER_VERSION        6
 #define BTREE_INCR_VACUUM         7
 #define BTREE_APPLICATION_ID      8
+#define BTREE_DATA_VERSION        15  /* A virtual meta-value */
 
 /*
 ** Values that may be OR'd together to form the second argument of an
@@ -9133,6 +9357,7 @@ SQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *);
 SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBt, int iVersion);
 SQLITE_PRIVATE void sqlite3BtreeCursorHints(BtCursor *, unsigned int mask);
 SQLITE_PRIVATE int sqlite3BtreeIsReadonly(Btree *pBt);
+SQLITE_PRIVATE int sqlite3HeaderSizeBtree(void);
 
 #ifndef NDEBUG
 SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor*);
@@ -9675,6 +9900,12 @@ SQLITE_PRIVATE   void sqlite3VdbeSetLineNumber(Vdbe*,int);
 # define VDBE_OFFSET_LINENO(x) 0
 #endif
 
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+SQLITE_PRIVATE void sqlite3VdbeScanStatus(Vdbe*, int, int, int, LogEst, const char*);
+#else
+# define sqlite3VdbeScanStatus(a,b,c,d,e)
+#endif
+
 #endif
 
 /************** End of vdbe.h ************************************************/
@@ -9855,6 +10086,7 @@ SQLITE_PRIVATE   int sqlite3PagerWalFramesize(Pager *pPager);
 
 /* Functions used to query pager state and configuration. */
 SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager*);
+SQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager*);
 SQLITE_PRIVATE int sqlite3PagerRefcount(Pager*);
 SQLITE_PRIVATE int sqlite3PagerMemUsed(Pager*);
 SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*, int);
@@ -9871,6 +10103,8 @@ SQLITE_PRIVATE int sqlite3SectorSize(sqlite3_file *);
 /* Functions used to truncate the database file. */
 SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno);
 
+SQLITE_PRIVATE void sqlite3PagerRekey(DbPage*, Pgno, u16);
+
 #if defined(SQLITE_HAS_CODEC) && !defined(SQLITE_OMIT_WAL)
 SQLITE_PRIVATE void *sqlite3PagerCodec(DbPage *);
 #endif
@@ -10058,6 +10292,10 @@ SQLITE_PRIVATE void sqlite3PcacheStats(int*,int*,int*,int*);
 
 SQLITE_PRIVATE void sqlite3PCacheSetDefault(void);
 
+/* Return the header size */
+SQLITE_PRIVATE int sqlite3HeaderSizePcache(void);
+SQLITE_PRIVATE int sqlite3HeaderSizePcache1(void);
+
 #endif /* _PCACHE_H_ */
 
 /************** End of pcache.h **********************************************/
@@ -10132,7 +10370,7 @@ SQLITE_PRIVATE void sqlite3PCacheSetDefault(void);
 #if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
 #  define SQLITE_OS_OTHER 0
 #  ifndef SQLITE_OS_WIN
-#    if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \
+#    if defined(_WIN32) || defined(WIN32) || defined(__MSVCRT__) || \
         defined(__MINGW32__) || defined(__BORLANDC__)
 #      define SQLITE_OS_WIN 1
 #      define SQLITE_OS_UNIX 0
@@ -10590,6 +10828,7 @@ struct sqlite3 {
   int errCode;                  /* Most recent error code (SQLITE_*) */
   int errMask;                  /* & result codes with this before returning */
   u16 dbOptFlags;               /* Flags to enable/disable optimizations */
+  u8 enc;                       /* Text encoding */
   u8 autoCommit;                /* The auto-commit flag. */
   u8 temp_store;                /* 1: file 2: memory 0: default */
   u8 mallocFailed;              /* True if we have seen a malloc failure */
@@ -10691,7 +10930,8 @@ struct sqlite3 {
 /*
 ** A macro to discover the encoding of a database.
 */
-#define ENC(db) ((db)->aDb[0].pSchema->enc)
+#define SCHEMA_ENC(db) ((db)->aDb[0].pSchema->enc)
+#define ENC(db)        ((db)->enc)
 
 /*
 ** Possible values for the sqlite3.flags.
@@ -10744,7 +10984,7 @@ struct sqlite3 {
 #define SQLITE_SubqCoroutine  0x0100   /* Evaluate subqueries as coroutines */
 #define SQLITE_Transitive     0x0200   /* Transitive constraints */
 #define SQLITE_OmitNoopJoin   0x0400   /* Omit unused tables in joins */
-#define SQLITE_Stat3          0x0800   /* Use the SQLITE_STAT3 table */
+#define SQLITE_Stat34         0x0800   /* Use STAT3 or STAT4 data */
 #define SQLITE_AllOpts        0xffff   /* All optimizations */
 
 /*
@@ -11315,7 +11555,6 @@ struct Index {
   u8 *aSortOrder;          /* for each column: True==DESC, False==ASC */
   char **azColl;           /* Array of collation sequence names for index */
   Expr *pPartIdxWhere;     /* WHERE clause for partial indices */
-  KeyInfo *pKeyInfo;       /* A KeyInfo object suitable for this index */
   int tnum;                /* DB Page containing root of this index */
   LogEst szIdxRow;         /* Estimated average row size in bytes */
   u16 nKeyCol;             /* Number of columns forming the key */
@@ -11326,12 +11565,14 @@ struct Index {
   unsigned uniqNotNull:1;  /* True if UNIQUE and NOT NULL for all columns */
   unsigned isResized:1;    /* True if resizeIndexObject() has been called */
   unsigned isCovering:1;   /* True if this is a covering index */
+  unsigned noSkipScan:1;   /* Do not try to use skip-scan if true */
 #ifdef SQLITE_ENABLE_STAT3_OR_STAT4
   int nSample;             /* Number of elements in aSample[] */
   int nSampleCol;          /* Size of IndexSample.anEq[] and so on */
   tRowcnt *aAvgEq;         /* Average nEq values for keys not in aSample */
   IndexSample *aSample;    /* Samples of the left-most key */
-  tRowcnt *aiRowEst;       /* Non-logarithmic stat1 data for this table */
+  tRowcnt *aiRowEst;       /* Non-logarithmic stat1 data for this index */
+  tRowcnt nRowEst0;        /* Non-logarithmic number of rows in the index */
 #endif
 };
 
@@ -11529,7 +11770,7 @@ struct Expr {
   int iTable;            /* TK_COLUMN: cursor number of table holding column
                          ** TK_REGISTER: register number
                          ** TK_TRIGGER: 1 -> new, 0 -> old
-                         ** EP_Unlikely:  1000 times likelihood */
+                         ** EP_Unlikely:  134217728 times likelihood */
   ynVar iColumn;         /* TK_COLUMN: column index.  -1 for rowid.
                          ** TK_VARIABLE: variable number (always >= 1). */
   i16 iAgg;              /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
@@ -11544,7 +11785,7 @@ struct Expr {
 /*
 ** The following are the meanings of bits in the Expr.flags field.
 */
-#define EP_FromJoin  0x000001 /* Originated in ON or USING clause of a join */
+#define EP_FromJoin  0x000001 /* Originates in ON/USING clause of outer join */
 #define EP_Agg       0x000002 /* Contains one or more aggregate functions */
 #define EP_Resolved  0x000004 /* IDs have been resolved to COLUMNs */
 #define EP_Error     0x000008 /* Expression contains one or more errors */
@@ -11564,6 +11805,7 @@ struct Expr {
 #define EP_NoReduce  0x020000 /* Cannot EXPRDUP_REDUCE this Expr */
 #define EP_Unlikely  0x040000 /* unlikely() or likelihood() function */
 #define EP_Constant  0x080000 /* Node is a constant */
+#define EP_CanBeNull 0x100000 /* Can be null despite NOT NULL constraint */
 
 /*
 ** These macros can be used to test, set, or clear bits in the 
@@ -11876,7 +12118,7 @@ struct Select {
 #define SF_HasTypeInfo     0x0020  /* FROM subqueries have Table metadata */
 #define SF_Compound        0x0040  /* Part of a compound query */
 #define SF_Values          0x0080  /* Synthesized from VALUES clause */
-                    /*     0x0100  NOT USED */
+#define SF_AllValues       0x0100  /* All terms of compound are VALUES */
 #define SF_NestedFrom      0x0200  /* Part of a parenthesized FROM clause */
 #define SF_MaybeConvert    0x0400  /* Need convertCompoundSelectToSubquery() */
 #define SF_Recursive       0x0800  /* The recursive part of a recursive CTE */
@@ -12366,6 +12608,7 @@ struct Sqlite3Config {
   int nPage;                        /* Number of pages in pPage[] */
   int mxParserStack;                /* maximum depth of the parser stack */
   int sharedCacheEnabled;           /* true if shared-cache mode enabled */
+  u32 szPma;                        /* Maximum Sorter PMA size */
   /* The above might be initialized to non-zero.  The following need to always
   ** initially be zero, however. */
   int isInit;                       /* True after initialization has finished */
@@ -12421,9 +12664,11 @@ struct Walker {
   void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */
   Parse *pParse;                            /* Parser context.  */
   int walkerDepth;                          /* Number of subqueries */
+  u8 eCode;                                 /* A small processing code */
   union {                                   /* Extra data for callback */
     NameContext *pNC;                          /* Naming context */
-    int i;                                     /* Integer value */
+    int n;                                     /* A counter */
+    int iCur;                                  /* A cursor number */
     SrcList *pSrcList;                         /* FROM clause */
     struct SrcCount *pSrcCount;                /* Counting column references */
   } u;
@@ -12501,7 +12746,7 @@ SQLITE_PRIVATE int sqlite3CantopenError(int);
 ** the SQLITE_ENABLE_FTS4 macro to serve as an alias for SQLITE_ENABLE_FTS3.
 */
 #if defined(SQLITE_ENABLE_FTS4) && !defined(SQLITE_ENABLE_FTS3)
-# define SQLITE_ENABLE_FTS3
+# define SQLITE_ENABLE_FTS3 1
 #endif
 
 /*
@@ -12824,6 +13069,7 @@ SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3*);
 SQLITE_PRIVATE int sqlite3ExprIsConstant(Expr*);
 SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr*);
 SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr*, u8);
+SQLITE_PRIVATE int sqlite3ExprIsTableConstant(Expr*,int);
 SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr*, int*);
 SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr*);
 SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
@@ -13069,7 +13315,7 @@ SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *);
 SQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum*, char*, int, int);
 SQLITE_PRIVATE void sqlite3StrAccumAppend(StrAccum*,const char*,int);
 SQLITE_PRIVATE void sqlite3StrAccumAppendAll(StrAccum*,const char*);
-SQLITE_PRIVATE void sqlite3AppendSpace(StrAccum*,int);
+SQLITE_PRIVATE void sqlite3AppendChar(StrAccum*,int,char);
 SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum*);
 SQLITE_PRIVATE void sqlite3StrAccumReset(StrAccum*);
 SQLITE_PRIVATE void sqlite3SelectDestInit(SelectDest*,int,int);
@@ -13285,7 +13531,7 @@ SQLITE_PRIVATE   void sqlite3ParserTrace(FILE*, char *);
 #ifdef SQLITE_ENABLE_IOTRACE
 # define IOTRACE(A)  if( sqlite3IoTrace ){ sqlite3IoTrace A; }
 SQLITE_PRIVATE   void sqlite3VdbeIOTraceSql(Vdbe*);
-SQLITE_PRIVATE void (*sqlite3IoTrace)(const char*,...);
+void (*sqlite3IoTrace)(const char*,...);
 #else
 # define IOTRACE(A)
 # define sqlite3VdbeIOTraceSql(X)
@@ -13392,16 +13638,16 @@ SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[] = {
      48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 3x */
      64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 4x */
      80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, /* 5x */
-     96, 97, 66, 67, 68, 69, 70, 71, 72, 73,106,107,108,109,110,111, /* 6x */
-    112, 81, 82, 83, 84, 85, 86, 87, 88, 89,122,123,124,125,126,127, /* 7x */
+     96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, /* 6x */
+    112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, /* 7x */
     128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, /* 8x */
-    144,145,146,147,148,149,150,151,152,153,154,155,156,157,156,159, /* 9x */
+    144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, /* 9x */
     160,161,162,163,164,165,166,167,168,169,170,171,140,141,142,175, /* Ax */
     176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, /* Bx */
     192,129,130,131,132,133,134,135,136,137,202,203,204,205,206,207, /* Cx */
     208,145,146,147,148,149,150,151,152,153,218,219,220,221,222,223, /* Dx */
-    224,225,162,163,164,165,166,167,168,169,232,203,204,205,206,207, /* Ex */
-    239,240,241,242,243,244,245,246,247,248,249,219,220,221,222,255, /* Fx */
+    224,225,162,163,164,165,166,167,168,169,234,235,236,237,238,239, /* Ex */
+    240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255, /* Fx */
 #endif
 };
 
@@ -13481,15 +13727,30 @@ SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
 **
 ** EVIDENCE-OF: R-38799-08373 URI filenames can be enabled or disabled
 ** using the SQLITE_USE_URI=1 or SQLITE_USE_URI=0 compile-time options.
+**
+** EVIDENCE-OF: R-43642-56306 By default, URI handling is globally
+** disabled. The default value may be changed by compiling with the
+** SQLITE_USE_URI symbol defined.
 */
 #ifndef SQLITE_USE_URI
 # define  SQLITE_USE_URI 0
 #endif
 
+/* EVIDENCE-OF: R-38720-18127 The default setting is determined by the
+** SQLITE_ALLOW_COVERING_INDEX_SCAN compile-time option, or is "on" if
+** that compile-time option is omitted.
+*/
 #ifndef SQLITE_ALLOW_COVERING_INDEX_SCAN
 # define SQLITE_ALLOW_COVERING_INDEX_SCAN 1
 #endif
 
+/* The minimum PMA size is set to this value multiplied by the database
+** page size in bytes.
+*/
+#ifndef SQLITE_SORTER_PMASZ
+# define SQLITE_SORTER_PMASZ 250
+#endif
+
 /*
 ** The following singleton contains the global configuration for
 ** the SQLite library.
@@ -13520,6 +13781,7 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {
    0,                         /* nPage */
    0,                         /* mxParserStack */
    0,                         /* sharedCacheEnabled */
+   SQLITE_SORTER_PMASZ,       /* szPma */
    /* All the rest should always be initialized to zero */
    0,                         /* isInit */
    0,                         /* inProgress */
@@ -13575,8 +13837,8 @@ SQLITE_PRIVATE const Token sqlite3IntTokens[] = {
 **
 ** IMPORTANT:  Changing the pending byte to any value other than
 ** 0x40000000 results in an incompatible database file format!
-** Changing the pending byte during operating results in undefined
-** and dileterious behavior.
+** Changing the pending byte during operation will result in undefined
+** and incorrect behavior.
 */
 #ifndef SQLITE_OMIT_WSD
 SQLITE_PRIVATE int sqlite3PendingByte = 0x40000000;
@@ -13626,88 +13888,88 @@ static const char * const azCompileOpt[] = {
 #define CTIMEOPT_VAL_(opt) #opt
 #define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt)
 
-#ifdef SQLITE_32BIT_ROWID
+#if SQLITE_32BIT_ROWID
   "32BIT_ROWID",
 #endif
-#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC
+#if SQLITE_4_BYTE_ALIGNED_MALLOC
   "4_BYTE_ALIGNED_MALLOC",
 #endif
-#ifdef SQLITE_CASE_SENSITIVE_LIKE
+#if SQLITE_CASE_SENSITIVE_LIKE
   "CASE_SENSITIVE_LIKE",
 #endif
-#ifdef SQLITE_CHECK_PAGES
+#if SQLITE_CHECK_PAGES
   "CHECK_PAGES",
 #endif
-#ifdef SQLITE_COVERAGE_TEST
+#if SQLITE_COVERAGE_TEST
   "COVERAGE_TEST",
 #endif
-#ifdef SQLITE_DEBUG
+#if SQLITE_DEBUG
   "DEBUG",
 #endif
-#ifdef SQLITE_DEFAULT_LOCKING_MODE
+#if SQLITE_DEFAULT_LOCKING_MODE
   "DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE),
 #endif
 #if defined(SQLITE_DEFAULT_MMAP_SIZE) && !defined(SQLITE_DEFAULT_MMAP_SIZE_xc)
   "DEFAULT_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_DEFAULT_MMAP_SIZE),
 #endif
-#ifdef SQLITE_DISABLE_DIRSYNC
+#if SQLITE_DISABLE_DIRSYNC
   "DISABLE_DIRSYNC",
 #endif
-#ifdef SQLITE_DISABLE_LFS
+#if SQLITE_DISABLE_LFS
   "DISABLE_LFS",
 #endif
-#ifdef SQLITE_ENABLE_ATOMIC_WRITE
+#if SQLITE_ENABLE_API_ARMOR
+  "ENABLE_API_ARMOR",
+#endif
+#if SQLITE_ENABLE_ATOMIC_WRITE
   "ENABLE_ATOMIC_WRITE",
 #endif
-#ifdef SQLITE_ENABLE_CEROD
+#if SQLITE_ENABLE_CEROD
   "ENABLE_CEROD",
 #endif
-#ifdef SQLITE_ENABLE_COLUMN_METADATA
+#if SQLITE_ENABLE_COLUMN_METADATA
   "ENABLE_COLUMN_METADATA",
 #endif
-#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
+#if SQLITE_ENABLE_EXPENSIVE_ASSERT
   "ENABLE_EXPENSIVE_ASSERT",
 #endif
-#ifdef SQLITE_ENABLE_FTS1
+#if SQLITE_ENABLE_FTS1
   "ENABLE_FTS1",
 #endif
-#ifdef SQLITE_ENABLE_FTS2
+#if SQLITE_ENABLE_FTS2
   "ENABLE_FTS2",
 #endif
-#ifdef SQLITE_ENABLE_FTS3
+#if SQLITE_ENABLE_FTS3
   "ENABLE_FTS3",
 #endif
-#ifdef SQLITE_ENABLE_FTS3_PARENTHESIS
+#if SQLITE_ENABLE_FTS3_PARENTHESIS
   "ENABLE_FTS3_PARENTHESIS",
 #endif
-#ifdef SQLITE_ENABLE_FTS4
+#if SQLITE_ENABLE_FTS4
   "ENABLE_FTS4",
 #endif
-#ifdef SQLITE_ENABLE_ICU
+#if SQLITE_ENABLE_ICU
   "ENABLE_ICU",
 #endif
-#ifdef SQLITE_ENABLE_IOTRACE
+#if SQLITE_ENABLE_IOTRACE
   "ENABLE_IOTRACE",
 #endif
-#ifdef SQLITE_ENABLE_LOAD_EXTENSION
-  "ENABLE_LOAD_EXTENSION",
-#endif
-#ifdef SQLITE_ENABLE_LOCKING_STYLE
+#if SQLITE_ENABLE_LOCKING_STYLE
   "ENABLE_LOCKING_STYLE=" CTIMEOPT_VAL(SQLITE_ENABLE_LOCKING_STYLE),
 #endif
-#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
+#if SQLITE_ENABLE_MEMORY_MANAGEMENT
   "ENABLE_MEMORY_MANAGEMENT",
 #endif
-#ifdef SQLITE_ENABLE_MEMSYS3
+#if SQLITE_ENABLE_MEMSYS3
   "ENABLE_MEMSYS3",
 #endif
-#ifdef SQLITE_ENABLE_MEMSYS5
+#if SQLITE_ENABLE_MEMSYS5
   "ENABLE_MEMSYS5",
 #endif
-#ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK
+#if SQLITE_ENABLE_OVERSIZE_CELL_CHECK
   "ENABLE_OVERSIZE_CELL_CHECK",
 #endif
-#ifdef SQLITE_ENABLE_RTREE
+#if SQLITE_ENABLE_RTREE
   "ENABLE_RTREE",
 #endif
 #if defined(SQLITE_ENABLE_STAT4)
@@ -13715,31 +13977,31 @@ static const char * const azCompileOpt[] = {
 #elif defined(SQLITE_ENABLE_STAT3)
   "ENABLE_STAT3",
 #endif
-#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
+#if SQLITE_ENABLE_UNLOCK_NOTIFY
   "ENABLE_UNLOCK_NOTIFY",
 #endif
-#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT
+#if SQLITE_ENABLE_UPDATE_DELETE_LIMIT
   "ENABLE_UPDATE_DELETE_LIMIT",
 #endif
-#ifdef SQLITE_HAS_CODEC
+#if SQLITE_HAS_CODEC
   "HAS_CODEC",
 #endif
-#ifdef SQLITE_HAVE_ISNAN
+#if HAVE_ISNAN || SQLITE_HAVE_ISNAN
   "HAVE_ISNAN",
 #endif
-#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
+#if SQLITE_HOMEGROWN_RECURSIVE_MUTEX
   "HOMEGROWN_RECURSIVE_MUTEX",
 #endif
-#ifdef SQLITE_IGNORE_AFP_LOCK_ERRORS
+#if SQLITE_IGNORE_AFP_LOCK_ERRORS
   "IGNORE_AFP_LOCK_ERRORS",
 #endif
-#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
+#if SQLITE_IGNORE_FLOCK_LOCK_ERRORS
   "IGNORE_FLOCK_LOCK_ERRORS",
 #endif
 #ifdef SQLITE_INT64_TYPE
   "INT64_TYPE",
 #endif
-#ifdef SQLITE_LOCK_TRACE
+#if SQLITE_LOCK_TRACE
   "LOCK_TRACE",
 #endif
 #if defined(SQLITE_MAX_MMAP_SIZE) && !defined(SQLITE_MAX_MMAP_SIZE_xc)
@@ -13748,226 +14010,226 @@ static const char * const azCompileOpt[] = {
 #ifdef SQLITE_MAX_SCHEMA_RETRY
   "MAX_SCHEMA_RETRY=" CTIMEOPT_VAL(SQLITE_MAX_SCHEMA_RETRY),
 #endif
-#ifdef SQLITE_MEMDEBUG
+#if SQLITE_MEMDEBUG
   "MEMDEBUG",
 #endif
-#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT
+#if SQLITE_MIXED_ENDIAN_64BIT_FLOAT
   "MIXED_ENDIAN_64BIT_FLOAT",
 #endif
-#ifdef SQLITE_NO_SYNC
+#if SQLITE_NO_SYNC
   "NO_SYNC",
 #endif
-#ifdef SQLITE_OMIT_ALTERTABLE
+#if SQLITE_OMIT_ALTERTABLE
   "OMIT_ALTERTABLE",
 #endif
-#ifdef SQLITE_OMIT_ANALYZE
+#if SQLITE_OMIT_ANALYZE
   "OMIT_ANALYZE",
 #endif
-#ifdef SQLITE_OMIT_ATTACH
+#if SQLITE_OMIT_ATTACH
   "OMIT_ATTACH",
 #endif
-#ifdef SQLITE_OMIT_AUTHORIZATION
+#if SQLITE_OMIT_AUTHORIZATION
   "OMIT_AUTHORIZATION",
 #endif
-#ifdef SQLITE_OMIT_AUTOINCREMENT
+#if SQLITE_OMIT_AUTOINCREMENT
   "OMIT_AUTOINCREMENT",
 #endif
-#ifdef SQLITE_OMIT_AUTOINIT
+#if SQLITE_OMIT_AUTOINIT
   "OMIT_AUTOINIT",
 #endif
-#ifdef SQLITE_OMIT_AUTOMATIC_INDEX
+#if SQLITE_OMIT_AUTOMATIC_INDEX
   "OMIT_AUTOMATIC_INDEX",
 #endif
-#ifdef SQLITE_OMIT_AUTORESET
+#if SQLITE_OMIT_AUTORESET
   "OMIT_AUTORESET",
 #endif
-#ifdef SQLITE_OMIT_AUTOVACUUM
+#if SQLITE_OMIT_AUTOVACUUM
   "OMIT_AUTOVACUUM",
 #endif
-#ifdef SQLITE_OMIT_BETWEEN_OPTIMIZATION
+#if SQLITE_OMIT_BETWEEN_OPTIMIZATION
   "OMIT_BETWEEN_OPTIMIZATION",
 #endif
-#ifdef SQLITE_OMIT_BLOB_LITERAL
+#if SQLITE_OMIT_BLOB_LITERAL
   "OMIT_BLOB_LITERAL",
 #endif
-#ifdef SQLITE_OMIT_BTREECOUNT
+#if SQLITE_OMIT_BTREECOUNT
   "OMIT_BTREECOUNT",
 #endif
-#ifdef SQLITE_OMIT_BUILTIN_TEST
+#if SQLITE_OMIT_BUILTIN_TEST
   "OMIT_BUILTIN_TEST",
 #endif
-#ifdef SQLITE_OMIT_CAST
+#if SQLITE_OMIT_CAST
   "OMIT_CAST",
 #endif
-#ifdef SQLITE_OMIT_CHECK
+#if SQLITE_OMIT_CHECK
   "OMIT_CHECK",
 #endif
-#ifdef SQLITE_OMIT_COMPLETE
+#if SQLITE_OMIT_COMPLETE
   "OMIT_COMPLETE",
 #endif
-#ifdef SQLITE_OMIT_COMPOUND_SELECT
+#if SQLITE_OMIT_COMPOUND_SELECT
   "OMIT_COMPOUND_SELECT",
 #endif
-#ifdef SQLITE_OMIT_CTE
+#if SQLITE_OMIT_CTE
   "OMIT_CTE",
 #endif
-#ifdef SQLITE_OMIT_DATETIME_FUNCS
+#if SQLITE_OMIT_DATETIME_FUNCS
   "OMIT_DATETIME_FUNCS",
 #endif
-#ifdef SQLITE_OMIT_DECLTYPE
+#if SQLITE_OMIT_DECLTYPE
   "OMIT_DECLTYPE",
 #endif
-#ifdef SQLITE_OMIT_DEPRECATED
+#if SQLITE_OMIT_DEPRECATED
   "OMIT_DEPRECATED",
 #endif
-#ifdef SQLITE_OMIT_DISKIO
+#if SQLITE_OMIT_DISKIO
   "OMIT_DISKIO",
 #endif
-#ifdef SQLITE_OMIT_EXPLAIN
+#if SQLITE_OMIT_EXPLAIN
   "OMIT_EXPLAIN",
 #endif
-#ifdef SQLITE_OMIT_FLAG_PRAGMAS
+#if SQLITE_OMIT_FLAG_PRAGMAS
   "OMIT_FLAG_PRAGMAS",
 #endif
-#ifdef SQLITE_OMIT_FLOATING_POINT
+#if SQLITE_OMIT_FLOATING_POINT
   "OMIT_FLOATING_POINT",
 #endif
-#ifdef SQLITE_OMIT_FOREIGN_KEY
+#if SQLITE_OMIT_FOREIGN_KEY
   "OMIT_FOREIGN_KEY",
 #endif
-#ifdef SQLITE_OMIT_GET_TABLE
+#if SQLITE_OMIT_GET_TABLE
   "OMIT_GET_TABLE",
 #endif
-#ifdef SQLITE_OMIT_INCRBLOB
+#if SQLITE_OMIT_INCRBLOB
   "OMIT_INCRBLOB",
 #endif
-#ifdef SQLITE_OMIT_INTEGRITY_CHECK
+#if SQLITE_OMIT_INTEGRITY_CHECK
   "OMIT_INTEGRITY_CHECK",
 #endif
-#ifdef SQLITE_OMIT_LIKE_OPTIMIZATION
+#if SQLITE_OMIT_LIKE_OPTIMIZATION
   "OMIT_LIKE_OPTIMIZATION",
 #endif
-#ifdef SQLITE_OMIT_LOAD_EXTENSION
+#if SQLITE_OMIT_LOAD_EXTENSION
   "OMIT_LOAD_EXTENSION",
 #endif
-#ifdef SQLITE_OMIT_LOCALTIME
+#if SQLITE_OMIT_LOCALTIME
   "OMIT_LOCALTIME",
 #endif
-#ifdef SQLITE_OMIT_LOOKASIDE
+#if SQLITE_OMIT_LOOKASIDE
   "OMIT_LOOKASIDE",
 #endif
-#ifdef SQLITE_OMIT_MEMORYDB
+#if SQLITE_OMIT_MEMORYDB
   "OMIT_MEMORYDB",
 #endif
-#ifdef SQLITE_OMIT_OR_OPTIMIZATION
+#if SQLITE_OMIT_OR_OPTIMIZATION
   "OMIT_OR_OPTIMIZATION",
 #endif
-#ifdef SQLITE_OMIT_PAGER_PRAGMAS
+#if SQLITE_OMIT_PAGER_PRAGMAS
   "OMIT_PAGER_PRAGMAS",
 #endif
-#ifdef SQLITE_OMIT_PRAGMA
+#if SQLITE_OMIT_PRAGMA
   "OMIT_PRAGMA",
 #endif
-#ifdef SQLITE_OMIT_PROGRESS_CALLBACK
+#if SQLITE_OMIT_PROGRESS_CALLBACK
   "OMIT_PROGRESS_CALLBACK",
 #endif
-#ifdef SQLITE_OMIT_QUICKBALANCE
+#if SQLITE_OMIT_QUICKBALANCE
   "OMIT_QUICKBALANCE",
 #endif
-#ifdef SQLITE_OMIT_REINDEX
+#if SQLITE_OMIT_REINDEX
   "OMIT_REINDEX",
 #endif
-#ifdef SQLITE_OMIT_SCHEMA_PRAGMAS
+#if SQLITE_OMIT_SCHEMA_PRAGMAS
   "OMIT_SCHEMA_PRAGMAS",
 #endif
-#ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
+#if SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
   "OMIT_SCHEMA_VERSION_PRAGMAS",
 #endif
-#ifdef SQLITE_OMIT_SHARED_CACHE
+#if SQLITE_OMIT_SHARED_CACHE
   "OMIT_SHARED_CACHE",
 #endif
-#ifdef SQLITE_OMIT_SUBQUERY
+#if SQLITE_OMIT_SUBQUERY
   "OMIT_SUBQUERY",
 #endif
-#ifdef SQLITE_OMIT_TCL_VARIABLE
+#if SQLITE_OMIT_TCL_VARIABLE
   "OMIT_TCL_VARIABLE",
 #endif
-#ifdef SQLITE_OMIT_TEMPDB
+#if SQLITE_OMIT_TEMPDB
   "OMIT_TEMPDB",
 #endif
-#ifdef SQLITE_OMIT_TRACE
+#if SQLITE_OMIT_TRACE
   "OMIT_TRACE",
 #endif
-#ifdef SQLITE_OMIT_TRIGGER
+#if SQLITE_OMIT_TRIGGER
   "OMIT_TRIGGER",
 #endif
-#ifdef SQLITE_OMIT_TRUNCATE_OPTIMIZATION
+#if SQLITE_OMIT_TRUNCATE_OPTIMIZATION
   "OMIT_TRUNCATE_OPTIMIZATION",
 #endif
-#ifdef SQLITE_OMIT_UTF16
+#if SQLITE_OMIT_UTF16
   "OMIT_UTF16",
 #endif
-#ifdef SQLITE_OMIT_VACUUM
+#if SQLITE_OMIT_VACUUM
   "OMIT_VACUUM",
 #endif
-#ifdef SQLITE_OMIT_VIEW
+#if SQLITE_OMIT_VIEW
   "OMIT_VIEW",
 #endif
-#ifdef SQLITE_OMIT_VIRTUALTABLE
+#if SQLITE_OMIT_VIRTUALTABLE
   "OMIT_VIRTUALTABLE",
 #endif
-#ifdef SQLITE_OMIT_WAL
+#if SQLITE_OMIT_WAL
   "OMIT_WAL",
 #endif
-#ifdef SQLITE_OMIT_WSD
+#if SQLITE_OMIT_WSD
   "OMIT_WSD",
 #endif
-#ifdef SQLITE_OMIT_XFER_OPT
+#if SQLITE_OMIT_XFER_OPT
   "OMIT_XFER_OPT",
 #endif
-#ifdef SQLITE_PERFORMANCE_TRACE
+#if SQLITE_PERFORMANCE_TRACE
   "PERFORMANCE_TRACE",
 #endif
-#ifdef SQLITE_PROXY_DEBUG
+#if SQLITE_PROXY_DEBUG
   "PROXY_DEBUG",
 #endif
-#ifdef SQLITE_RTREE_INT_ONLY
+#if SQLITE_RTREE_INT_ONLY
   "RTREE_INT_ONLY",
 #endif
-#ifdef SQLITE_SECURE_DELETE
+#if SQLITE_SECURE_DELETE
   "SECURE_DELETE",
 #endif
-#ifdef SQLITE_SMALL_STACK
+#if SQLITE_SMALL_STACK
   "SMALL_STACK",
 #endif
-#ifdef SQLITE_SOUNDEX
+#if SQLITE_SOUNDEX
   "SOUNDEX",
 #endif
-#ifdef SQLITE_SYSTEM_MALLOC
+#if SQLITE_SYSTEM_MALLOC
   "SYSTEM_MALLOC",
 #endif
-#ifdef SQLITE_TCL
+#if SQLITE_TCL
   "TCL",
 #endif
 #if defined(SQLITE_TEMP_STORE) && !defined(SQLITE_TEMP_STORE_xc)
   "TEMP_STORE=" CTIMEOPT_VAL(SQLITE_TEMP_STORE),
 #endif
-#ifdef SQLITE_TEST
+#if SQLITE_TEST
   "TEST",
 #endif
 #if defined(SQLITE_THREADSAFE)
   "THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE),
 #endif
-#ifdef SQLITE_USE_ALLOCA
+#if SQLITE_USE_ALLOCA
   "USE_ALLOCA",
 #endif
-#ifdef SQLITE_USER_AUTHENTICATION
+#if SQLITE_USER_AUTHENTICATION
   "USER_AUTHENTICATION",
 #endif
-#ifdef SQLITE_WIN32_MALLOC
+#if SQLITE_WIN32_MALLOC
   "WIN32_MALLOC",
 #endif
-#ifdef SQLITE_ZERO_MALLOC
+#if SQLITE_ZERO_MALLOC
   "ZERO_MALLOC"
 #endif
 };
@@ -13981,6 +14243,13 @@ static const char * const azCompileOpt[] = {
 */
 SQLITE_API int sqlite3_compileoption_used(const char *zOptName){
   int i, n;
+
+#if SQLITE_ENABLE_API_ARMOR
+  if( zOptName==0 ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   if( sqlite3StrNICmp(zOptName, "SQLITE_", 7)==0 ) zOptName += 7;
   n = sqlite3Strlen30(zOptName);
 
@@ -14162,6 +14431,7 @@ struct VdbeFrame {
   Vdbe *v;                /* VM this frame belongs to */
   VdbeFrame *pParent;     /* Parent of this frame, or NULL if parent is main */
   Op *aOp;                /* Program instructions for parent frame */
+  i64 *anExec;            /* Event counters from parent frame */
   Mem *aMem;              /* Array of memory cells for parent frame */
   u8 *aOnceFlag;          /* Array of OP_Once flags for parent frame */
   VdbeCursor **apCsr;     /* Array of Vdbe cursors for parent frame */
@@ -14174,7 +14444,8 @@ struct VdbeFrame {
   int nOnceFlag;          /* Number of entries in aOnceFlag */
   int nChildMem;          /* Number of memory cells for child frame */
   int nChildCsr;          /* Number of cursors for child frame */
-  int nChange;            /* Statement changes (Vdbe.nChanges)     */
+  int nChange;            /* Statement changes (Vdbe.nChange)     */
+  int nDbChange;          /* Value of db->nChange */
 };
 
 #define VdbeFrameMem(p) ((Mem *)&((u8 *)p)[ROUND8(sizeof(VdbeFrame))])
@@ -14325,6 +14596,16 @@ struct Explain {
 */
 typedef unsigned bft;  /* Bit Field Type */
 
+typedef struct ScanStatus ScanStatus;
+struct ScanStatus {
+  int addrExplain;                /* OP_Explain for loop */
+  int addrLoop;                   /* Address of "loops" counter */
+  int addrVisit;                  /* Address of "rows visited" counter */
+  int iSelectID;                  /* The "Select-ID" for this loop */
+  LogEst nEst;                    /* Estimated output rows per loop */
+  char *zName;                    /* Name of table or index */
+};
+
 /*
 ** An instance of the virtual machine.  This structure contains the complete
 ** state of the virtual machine.
@@ -14397,6 +14678,11 @@ struct Vdbe {
   int nOnceFlag;          /* Size of array aOnceFlag[] */
   u8 *aOnceFlag;          /* Flags for OP_Once */
   AuxData *pAuxData;      /* Linked list of auxdata allocations */
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+  i64 *anExec;            /* Number of times each op has been executed */
+  int nScan;              /* Entries in aScan[] */
+  ScanStatus *aScan;      /* Scan definitions for sqlite3_stmt_scanstatus() */
+#endif
 };
 
 /*
@@ -14586,6 +14872,9 @@ SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetF
   if( op<0 || op>=ArraySize(wsdStat.nowValue) ){
     return SQLITE_MISUSE_BKPT;
   }
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   *pCurrent = wsdStat.nowValue[op];
   *pHighwater = wsdStat.mxValue[op];
   if( resetFlag ){
@@ -14605,6 +14894,11 @@ SQLITE_API int sqlite3_db_status(
   int resetFlag         /* Reset high-water mark if true */
 ){
   int rc = SQLITE_OK;   /* Return code */
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || pCurrent==0|| pHighwater==0 ){
+    return SQLITE_MISUSE_BKPT;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   switch( op ){
     case SQLITE_DBSTATUS_LOOKASIDE_USED: {
@@ -14783,7 +15077,7 @@ SQLITE_API int sqlite3_db_status(
 ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** SQLite processes all times and dates as Julian Day numbers.  The
+** SQLite processes all times and dates as julian day numbers.  The
 ** dates and times are stored as the number of days since noon
 ** in Greenwich on November 24, 4714 B.C. according to the Gregorian
 ** calendar system. 
@@ -14798,7 +15092,7 @@ SQLITE_API int sqlite3_db_status(
 **
 ** The Gregorian calendar system is used for all dates and times,
 ** even those that predate the Gregorian calendar.  Historians usually
-** use the Julian calendar for dates prior to 1582-10-15 and for some
+** use the julian calendar for dates prior to 1582-10-15 and for some
 ** dates afterwards, depending on locale.  Beware of this difference.
 **
 ** The conversion algorithms are implemented based on descriptions
@@ -15070,7 +15364,7 @@ static int setDateTimeToCurrent(sqlite3_context *context, DateTime *p){
 }
 
 /*
-** Attempt to parse the given string into a Julian Day Number.  Return
+** Attempt to parse the given string into a julian day number.  Return
 ** the number of errors.
 **
 ** The following are acceptable forms for the input string:
@@ -15178,8 +15472,9 @@ static void clearYMD_HMS_TZ(DateTime *p){
 ** already, check for an MSVC build environment that provides 
 ** localtime_s().
 */
-#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
-     defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
+#if !HAVE_LOCALTIME_R && !HAVE_LOCALTIME_S \
+    && defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
+#undef  HAVE_LOCALTIME_S
 #define HAVE_LOCALTIME_S 1
 #endif
 
@@ -15199,8 +15494,7 @@ static void clearYMD_HMS_TZ(DateTime *p){
 */
 static int osLocaltime(time_t *t, struct tm *pTm){
   int rc;
-#if (!defined(HAVE_LOCALTIME_R) || !HAVE_LOCALTIME_R) \
-      && (!defined(HAVE_LOCALTIME_S) || !HAVE_LOCALTIME_S)
+#if !HAVE_LOCALTIME_R && !HAVE_LOCALTIME_S
   struct tm *pX;
 #if SQLITE_THREADSAFE>0
   sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
@@ -15217,7 +15511,7 @@ static int osLocaltime(time_t *t, struct tm *pTm){
 #ifndef SQLITE_OMIT_BUILTIN_TEST
   if( sqlite3GlobalConfig.bLocaltimeFault ) return 1;
 #endif
-#if defined(HAVE_LOCALTIME_R) && HAVE_LOCALTIME_R
+#if HAVE_LOCALTIME_R
   rc = localtime_r(t, pTm)==0;
 #else
   rc = localtime_s(pTm, t);
@@ -15641,7 +15935,7 @@ static void dateFunc(
 **   %f  ** fractional seconds  SS.SSS
 **   %H  hour 00-24
 **   %j  day of year 000-366
-**   %J  ** Julian day number
+**   %J  ** julian day number
 **   %m  month 01-12
 **   %M  minute 00-59
 **   %s  seconds since 1970-01-01
@@ -15661,8 +15955,10 @@ static void strftimeFunc(
   size_t i,j;
   char *z;
   sqlite3 *db;
-  const char *zFmt = (const char*)sqlite3_value_text(argv[0]);
+  const char *zFmt;
   char zBuf[100];
+  if( argc==0 ) return;
+  zFmt = (const char*)sqlite3_value_text(argv[0]);
   if( zFmt==0 || isDate(context, argc-1, argv+1, &x) ) return;
   db = sqlite3_context_db_handle(context);
   for(i=0, n=1; zFmt[i]; i++, n++){
@@ -15856,7 +16152,7 @@ static void currentTimeFunc(
   iT = sqlite3StmtCurrentTime(context);
   if( iT<=0 ) return;
   t = iT/1000 - 10000*(sqlite3_int64)21086676;
-#ifdef HAVE_GMTIME_R
+#if HAVE_GMTIME_R
   pTm = gmtime_r(&t, &sNow);
 #else
   sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
@@ -16266,6 +16562,10 @@ SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
   int rc = sqlite3_initialize();
   if( rc ) return rc;
 #endif
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( pVfs==0 ) return SQLITE_MISUSE_BKPT;
+#endif
+
   MUTEX_LOGIC( mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
   sqlite3_mutex_enter(mutex);
   vfsUnlink(pVfs);
@@ -16526,9 +16826,9 @@ static malloc_zone_t* _sqliteZone_;
 ** The malloc.h header file is needed for malloc_usable_size() function
 ** on some systems (e.g. Linux).
 */
-#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLOC_USABLE_SIZE)
-#  define SQLITE_USE_MALLOC_H
-#  define SQLITE_USE_MALLOC_USABLE_SIZE
+#if HAVE_MALLOC_H && HAVE_MALLOC_USABLE_SIZE
+#  define SQLITE_USE_MALLOC_H 1
+#  define SQLITE_USE_MALLOC_USABLE_SIZE 1
 /*
 ** The MSVCRT has malloc_usable_size(), but it is called _msize().  The
 ** use of _msize() is automatic, but can be disabled by compiling with
@@ -18623,6 +18923,7 @@ SQLITE_PRIVATE int sqlite3MutexEnd(void){
 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){
 #ifndef SQLITE_OMIT_AUTOINIT
   if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;
+  if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;
 #endif
   return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
 }
@@ -19079,8 +19380,12 @@ static sqlite3_mutex *pthreadMutexAlloc(int iType){
       break;
     }
     default: {
-      assert( iType-2 >= 0 );
-      assert( iType-2 < ArraySize(staticMutexes) );
+#ifdef SQLITE_ENABLE_API_ARMOR
+      if( iType-2<0 || iType-2>=ArraySize(staticMutexes) ){
+        (void)SQLITE_MISUSE_BKPT;
+        return 0;
+      }
+#endif
       p = &staticMutexes[iType-2];
 #if SQLITE_MUTEX_NREF
       p->id = iType;
@@ -19588,8 +19893,8 @@ SQLITE_API int sqlite3_open_file_count = 0;
 */
 struct sqlite3_mutex {
   CRITICAL_SECTION mutex;    /* Mutex controlling the lock */
-  int id;                    /* Mutex type */
 #ifdef SQLITE_DEBUG
+  int id;                    /* Mutex type */
   volatile int nRef;         /* Number of enterances */
   volatile DWORD owner;      /* Thread holding this mutex */
   volatile int trace;        /* True to trace changes */
@@ -19607,7 +19912,7 @@ struct sqlite3_mutex {
 #define SQLITE3_MUTEX_INITIALIZER { SQLITE_W32_MUTEX_INITIALIZER, 0, \
                                     0L, (DWORD)0, 0 }
 #else
-#define SQLITE3_MUTEX_INITIALIZER { SQLITE_W32_MUTEX_INITIALIZER, 0 }
+#define SQLITE3_MUTEX_INITIALIZER { SQLITE_W32_MUTEX_INITIALIZER }
 #endif
 
 #ifdef SQLITE_DEBUG
@@ -19761,6 +20066,12 @@ static sqlite3_mutex *winMutexAlloc(int iType){
       break;
     }
     default: {
+#ifdef SQLITE_ENABLE_API_ARMOR
+      if( iType-2<0 || iType-2>=ArraySize(winMutex_staticMutexes) ){
+        (void)SQLITE_MISUSE_BKPT;
+        return 0;
+      }
+#endif
       assert( iType-2 >= 0 );
       assert( iType-2 < ArraySize(winMutex_staticMutexes) );
       assert( winMutex_isInit==1 );
@@ -20302,11 +20613,12 @@ SQLITE_PRIVATE void *sqlite3ScratchMalloc(int n){
 
 
 #if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
-  /* Verify that no more than two scratch allocations per thread
-  ** are outstanding at one time.  (This is only checked in the
-  ** single-threaded case since checking in the multi-threaded case
-  ** would be much more complicated.) */
-  assert( scratchAllocOut<=1 );
+  /* EVIDENCE-OF: R-12970-05880 SQLite will not use more than one scratch
+  ** buffers per thread.
+  **
+  ** This can only be checked in single-threaded mode.
+  */
+  assert( scratchAllocOut==0 );
   if( p ) scratchAllocOut++;
 #endif
 
@@ -20757,17 +21069,6 @@ SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
 */
 
 /*
-** If the strchrnul() library function is available, then set
-** HAVE_STRCHRNUL.  If that routine is not available, this module
-** will supply its own.  The built-in version is slower than
-** the glibc version so the glibc version is definitely preferred.
-*/
-#if !defined(HAVE_STRCHRNUL)
-# define HAVE_STRCHRNUL 0
-#endif
-
-
-/*
 ** Conversion types fall into various categories as defined by the
 ** following enumeration.
 */
@@ -20954,7 +21255,7 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
   const et_info *infop;      /* Pointer to the appropriate info structure */
   char *zOut;                /* Rendering buffer */
   int nOut;                  /* Size of the rendering buffer */
-  char *zExtra;              /* Malloced memory used by some conversion */
+  char *zExtra = 0;          /* Malloced memory used by some conversion */
 #ifndef SQLITE_OMIT_FLOATING_POINT
   int  exp, e2;              /* exponent of real numbers */
   int nsd;                   /* Number of significant digits returned */
@@ -21071,7 +21372,6 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
         break;
       }
     }
-    zExtra = 0;
 
     /*
     ** At this point, variables are initialized as follows:
@@ -21362,13 +21662,16 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
         }else{
           c = va_arg(ap,int);
         }
-        buf[0] = (char)c;
-        if( precision>=0 ){
-          for(idx=1; idx<precision; idx++) buf[idx] = (char)c;
-          length = precision;
-        }else{
-          length =1;
+        if( precision>1 ){
+          width -= precision-1;
+          if( width>1 && !flag_leftjustify ){
+            sqlite3AppendChar(pAccum, width-1, ' ');
+            width = 0;
+          }
+          sqlite3AppendChar(pAccum, precision-1, c);
         }
+        length = 1;
+        buf[0] = c;
         bufpt = buf;
         break;
       case etSTRING:
@@ -21469,11 +21772,14 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
     ** the output.
     */
     width -= length;
-    if( width>0 && !flag_leftjustify ) sqlite3AppendSpace(pAccum, width);
+    if( width>0 && !flag_leftjustify ) sqlite3AppendChar(pAccum, width, ' ');
     sqlite3StrAccumAppend(pAccum, bufpt, length);
-    if( width>0 && flag_leftjustify ) sqlite3AppendSpace(pAccum, width);
+    if( width>0 && flag_leftjustify ) sqlite3AppendChar(pAccum, width, ' ');
 
-    if( zExtra ) sqlite3_free(zExtra);
+    if( zExtra ){
+      sqlite3_free(zExtra);
+      zExtra = 0;
+    }
   }/* End for loop over the format string */
 } /* End of function */
 
@@ -21500,6 +21806,11 @@ static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
     char *zOld = (p->zText==p->zBase ? 0 : p->zText);
     i64 szNew = p->nChar;
     szNew += N + 1;
+    if( szNew+p->nChar<=p->mxAlloc ){
+      /* Force exponential buffer size growth as long as it does not overflow,
+      ** to avoid having to call this routine too often */
+      szNew += p->nChar;
+    }
     if( szNew > p->mxAlloc ){
       sqlite3StrAccumReset(p);
       setStrAccumError(p, STRACCUM_TOOBIG);
@@ -21516,6 +21827,7 @@ static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
       assert( p->zText!=0 || p->nChar==0 );
       if( zOld==0 && p->nChar>0 ) memcpy(zNew, p->zText, p->nChar);
       p->zText = zNew;
+      p->nAlloc = sqlite3DbMallocSize(p->db, zNew);
     }else{
       sqlite3StrAccumReset(p);
       setStrAccumError(p, STRACCUM_NOMEM);
@@ -21526,11 +21838,11 @@ static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
 }
 
 /*
-** Append N space characters to the given string buffer.
+** Append N copies of character c to the given string buffer.
 */
-SQLITE_PRIVATE void sqlite3AppendSpace(StrAccum *p, int N){
+SQLITE_PRIVATE void sqlite3AppendChar(StrAccum *p, int N, char c){
   if( p->nChar+N >= p->nAlloc && (N = sqlite3StrAccumEnlarge(p, N))<=0 ) return;
-  while( (N--)>0 ) p->zText[p->nChar++] = ' ';
+  while( (N--)>0 ) p->zText[p->nChar++] = c;
 }
 
 /*
@@ -21685,6 +21997,13 @@ SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
   char *z;
   char zBase[SQLITE_PRINT_BUF_SIZE];
   StrAccum acc;
+
+#ifdef SQLITE_ENABLE_API_ARMOR  
+  if( zFormat==0 ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
 #ifndef SQLITE_OMIT_AUTOINIT
   if( sqlite3_initialize() ) return 0;
 #endif
@@ -21727,6 +22046,13 @@ SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
 SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
   StrAccum acc;
   if( n<=0 ) return zBuf;
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( zBuf==0 || zFormat==0 ) {
+    (void)SQLITE_MISUSE_BKPT;
+    if( zBuf && n>0 ) zBuf[0] = 0;
+    return zBuf;
+  }
+#endif
   sqlite3StrAccumInit(&acc, zBuf, n, 0);
   acc.useMalloc = 0;
   sqlite3VXPrintf(&acc, 0, zFormat, ap);
@@ -21918,11 +22244,19 @@ SQLITE_API void sqlite3_randomness(int N, void *pBuf){
 #endif
 
 #if SQLITE_THREADSAFE
-  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PRNG);
-  sqlite3_mutex_enter(mutex);
+  sqlite3_mutex *mutex;
 #endif
 
-  if( N<=0 ){
+#ifndef SQLITE_OMIT_AUTOINIT
+  if( sqlite3_initialize() ) return;
+#endif
+
+#if SQLITE_THREADSAFE
+  mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PRNG);
+#endif
+
+  sqlite3_mutex_enter(mutex);
+  if( N<=0 || pBuf==0 ){
     wsdPrng.isInit = 0;
     sqlite3_mutex_leave(mutex);
     return;
@@ -22024,6 +22358,8 @@ SQLITE_PRIVATE void sqlite3PrngRestoreState(void){
 ** of multiple cores can do so, while also allowing applications to stay
 ** single-threaded if desired.
 */
+#if SQLITE_OS_WIN
+#endif
 
 #if SQLITE_MAX_WORKER_THREADS>0
 
@@ -22812,7 +23148,7 @@ SQLITE_PRIVATE void sqlite3UtfSelfTest(void){
 **
 */
 /* #include <stdarg.h> */
-#ifdef SQLITE_HAVE_ISNAN
+#if HAVE_ISNAN || SQLITE_HAVE_ISNAN
 # include <math.h>
 #endif
 
@@ -22853,7 +23189,7 @@ SQLITE_PRIVATE int sqlite3FaultSim(int iTest){
 */
 SQLITE_PRIVATE int sqlite3IsNaN(double x){
   int rc;   /* The value return */
-#if !defined(SQLITE_HAVE_ISNAN)
+#if !SQLITE_HAVE_ISNAN && !HAVE_ISNAN
   /*
   ** Systems that support the isnan() library function should probably
   ** make use of it by compiling with -DSQLITE_HAVE_ISNAN.  But we have
@@ -22883,9 +23219,9 @@ SQLITE_PRIVATE int sqlite3IsNaN(double x){
   volatile double y = x;
   volatile double z = y;
   rc = (y!=z);
-#else  /* if defined(SQLITE_HAVE_ISNAN) */
+#else  /* if HAVE_ISNAN */
   rc = isnan(x);
-#endif /* SQLITE_HAVE_ISNAN */
+#endif /* HAVE_ISNAN */
   testcase( rc );
   return rc;
 }
@@ -23046,6 +23382,11 @@ SQLITE_PRIVATE int sqlite3Dequote(char *z){
 */
 SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
   register unsigned char *a, *b;
+  if( zLeft==0 ){
+    return zRight ? -1 : 0;
+  }else if( zRight==0 ){
+    return 1;
+  }
   a = (unsigned char *)zLeft;
   b = (unsigned char *)zRight;
   while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
@@ -23053,6 +23394,11 @@ SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
 }
 SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
   register unsigned char *a, *b;
+  if( zLeft==0 ){
+    return zRight ? -1 : 0;
+  }else if( zRight==0 ){
+    return 1;
+  }
   a = (unsigned char *)zLeft;
   b = (unsigned char *)zRight;
   while( N-- > 0 && *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
@@ -24699,7 +25045,7 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
 # include <sys/mman.h>
 #endif
 
-#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS
+#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS || defined(__CYGWIN__) || defined(HAVE_FLOCK)
 # include <sys/ioctl.h>
 # if OS_VXWORKS
 #  include <semaphore.h>
@@ -27045,7 +27391,7 @@ static int dotlockClose(sqlite3_file *id) {
 ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off or if
 ** compiling for VXWORKS.
 */
-#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
+#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS || defined(__CYGWIN__) || defined(HAVE_FLOCK)
 
 /*
 ** Retry flock() calls that fail with EINTR
@@ -28063,9 +28409,9 @@ static int seekAndWriteFd(
   TIMER_START;
 
 #if defined(USE_PREAD)
-  do{ rc = osPwrite(fd, pBuf, nBuf, iOff); }while( rc<0 && errno==EINTR );
+  do{ rc = (int)osPwrite(fd, pBuf, nBuf, iOff); }while( rc<0 && errno==EINTR );
 #elif defined(USE_PREAD64)
-  do{ rc = osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
+  do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
 #else
   do{
     i64 iSeek = lseek(fd, iOff, SEEK_SET);
@@ -28196,9 +28542,9 @@ SQLITE_API int sqlite3_fullsync_count = 0;
 ** We do not trust systems to provide a working fdatasync().  Some do.
 ** Others do no.  To be safe, we will stick with the (slightly slower)
 ** fsync(). If you know that your system does support fdatasync() correctly,
-** then simply compile with -Dfdatasync=fdatasync
+** then simply compile with -Dfdatasync=fdatasync or -DHAVE_FDATASYNC
 */
-#if !defined(fdatasync)
+#if !defined(fdatasync) && !HAVE_FDATASYNC
 # define fdatasync fsync
 #endif
 
@@ -28519,24 +28865,28 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){
       }while( err==EINTR );
       if( err ) return SQLITE_IOERR_WRITE;
 #else
-      /* If the OS does not have posix_fallocate(), fake it. First use
-      ** ftruncate() to set the file size, then write a single byte to
-      ** the last byte in each block within the extended region. This
-      ** is the same technique used by glibc to implement posix_fallocate()
-      ** on systems that do not have a real fallocate() system call.
+      /* If the OS does not have posix_fallocate(), fake it. Write a 
+      ** single byte to the last byte in each block that falls entirely
+      ** within the extended region. Then, if required, a single byte
+      ** at offset (nSize-1), to set the size of the file correctly.
+      ** This is a similar technique to that used by glibc on systems
+      ** that do not have a real fallocate() call.
       */
       int nBlk = buf.st_blksize;  /* File-system block size */
+      int nWrite = 0;             /* Number of bytes written by seekAndWrite */
       i64 iWrite;                 /* Next offset to write to */
 
-      if( robust_ftruncate(pFile->h, nSize) ){
-        pFile->lastErrno = errno;
-        return unixLogError(SQLITE_IOERR_TRUNCATE, "ftruncate", pFile->zPath);
-      }
       iWrite = ((buf.st_size + 2*nBlk - 1)/nBlk)*nBlk-1;
-      while( iWrite<nSize ){
-        int nWrite = seekAndWrite(pFile, iWrite, "", 1);
+      assert( iWrite>=buf.st_size );
+      assert( (iWrite/nBlk)==((buf.st_size+nBlk-1)/nBlk) );
+      assert( ((iWrite+1)%nBlk)==0 );
+      for(/*no-op*/; iWrite<nSize; iWrite+=nBlk ){
+        nWrite = seekAndWrite(pFile, iWrite, "", 1);
+        if( nWrite!=1 ) return SQLITE_IOERR_WRITE;
+      }
+      if( nWrite==0 || (nSize%nBlk) ){
+        nWrite = seekAndWrite(pFile, nSize-1, "", 1);
         if( nWrite!=1 ) return SQLITE_IOERR_WRITE;
-        iWrite += nBlk;
       }
 #endif
     }
@@ -29826,7 +30176,7 @@ IOMETHODS(
   0                         /* xShmMap method */
 )
 
-#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
+#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS || defined(__CYGWIN__) || defined(HAVE_FLOCK)
 IOMETHODS(
   flockIoFinder,            /* Finder function name */
   flockIoMethods,           /* sqlite3_io_methods object name */
@@ -29865,6 +30215,19 @@ IOMETHODS(
 )
 #endif
 
+#if defined(__CYGWIN__)
+IOMETHODS(
+  cygwinIoFinder,            /* Finder function name */
+  cygwinIoMethods,           /* sqlite3_io_methods object name */
+  1,                        /* shared memory is disabled */
+  flockClose,               /* xClose method */
+  flockLock,                /* xLock method */
+  flockUnlock,              /* xUnlock method */
+  flockCheckReservedLock,   /* xCheckReservedLock method */
+  0                         /* xShmMap method */
+)
+#endif
+
 /*
 ** The proxy locking method is a "super-method" in the sense that it
 ** opens secondary file descriptors for the conch and lock files and
@@ -30188,6 +30551,15 @@ static int fillInUnixFile(
     unixLeaveMutex();
   }
 #endif
+
+#if defined(__CYGWIN__)
+  else if( pLockingStyle == &cygwinIoMethods ){
+    if ((osFcntl(h, F_LCK_MANDATORY, 1) != 0) && (errno != EINVAL)) {
+      /* The API exists but it refused to enable mandatory locking! */
+      rc = SQLITE_IOERR_ACCESS;
+    }
+  }
+#endif
   
   pNew->lastErrno = 0;
 #if OS_VXWORKS
@@ -30217,6 +30589,8 @@ static const char *unixTempFileDir(void){
      0,
      0,
      0,
+     0,
+     0,
      "/var/tmp",
      "/usr/tmp",
      "/tmp",
@@ -30229,6 +30603,8 @@ static const char *unixTempFileDir(void){
   azDirs[0] = sqlite3_temp_directory;
   if( !azDirs[1] ) azDirs[1] = getenv("SQLITE_TMPDIR");
   if( !azDirs[2] ) azDirs[2] = getenv("TMPDIR");
+  if( !azDirs[3] ) azDirs[2] = getenv("TMP");
+  if( !azDirs[4] ) azDirs[3] = getenv("TEMP");
   for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
     if( zDir==0 ) continue;
     if( osStat(zDir, &buf) ) continue;
@@ -30666,19 +31042,6 @@ static int unixOpen(
     if( envforce!=NULL ){
       useProxy = atoi(envforce)>0;
     }else{
-      if( statfs(zPath, &fsInfo) == -1 ){
-        /* In theory, the close(fd) call is sub-optimal. If the file opened
-        ** with fd is a database file, and there are other connections open
-        ** on that file that are currently holding advisory locks on it,
-        ** then the call to close() will cancel those locks. In practice,
-        ** we're assuming that statfs() doesn't fail very often. At least
-        ** not while other file descriptors opened by the same process on
-        ** the same file are working.  */
-        p->lastErrno = errno;
-        robust_close(p, fd, __LINE__);
-        rc = SQLITE_IOERR_ACCESS;
-        goto open_finished;
-      }
       useProxy = !(fsInfo.f_flags&MNT_LOCAL);
     }
     if( useProxy ){
@@ -30848,7 +31211,7 @@ static int unixFullPathname(
 #include <dlfcn.h>
 static void *unixDlOpen(sqlite3_vfs *NotUsed, const char *zFilename){
   UNUSED_PARAMETER(NotUsed);
-  return dlopen(zFilename, RTLD_NOW | RTLD_GLOBAL);
+  return dlopen(zFilename, RTLD_NOW | RTLD_LOCAL);
 }
 
 /*
@@ -31566,7 +31929,7 @@ static int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){
       if( 0==proxyBreakConchLock(pFile, myHostID) ){
         rc = SQLITE_OK;
         if( lockType==EXCLUSIVE_LOCK ){
-          rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, SHARED_LOCK);          
+          rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, SHARED_LOCK);
         }
         if( !rc ){
           rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType);
@@ -32294,20 +32657,26 @@ SQLITE_API int sqlite3_os_init(void){
   static sqlite3_vfs aVfs[] = {
 #if SQLITE_ENABLE_LOCKING_STYLE && (OS_VXWORKS || defined(__APPLE__))
     UNIXVFS("unix",          autolockIoFinder ),
+#elif defined(__CYGWIN__)
+    UNIXVFS("unix",          cygwinIoFinder ),
 #else
     UNIXVFS("unix",          posixIoFinder ),
 #endif
     UNIXVFS("unix-none",     nolockIoFinder ),
     UNIXVFS("unix-dotfile",  dotlockIoFinder ),
+#if defined(__CYGWIN__)
+    UNIXVFS("unix-excl",     cygwinIoFinder ),
+#else
     UNIXVFS("unix-excl",     posixIoFinder ),
+#endif
 #if OS_VXWORKS
     UNIXVFS("unix-namedsem", semIoFinder ),
 #endif
-#if SQLITE_ENABLE_LOCKING_STYLE
+#if SQLITE_ENABLE_LOCKING_STYLE || defined(__CYGWIN__)
     UNIXVFS("unix-posix",    posixIoFinder ),
-#if !OS_VXWORKS
-    UNIXVFS("unix-flock",    flockIoFinder ),
 #endif
+#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS || defined(__CYGWIN__) || defined(HAVE_FLOCK)
+    UNIXVFS("unix-flock",    flockIoFinder ),
 #endif
 #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
     UNIXVFS("unix-afp",      afpIoFinder ),
@@ -32585,6 +32954,11 @@ SQLITE_API int sqlite3_open_file_count = 0;
  with SQLITE_OMIT_WAL."
 #endif
 
+#if !SQLITE_OS_WINNT && SQLITE_MAX_MMAP_SIZE>0
+#  error "Memory mapped files require support from the Windows NT kernel,\
+ compile with SQLITE_MAX_MMAP_SIZE=0."
+#endif
+
 /*
 ** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions
 ** based on the sub-platform)?
@@ -32670,7 +33044,11 @@ SQLITE_API int sqlite3_open_file_count = 0;
 ** 4-bytes-per-character for UTF8.
 */
 #ifndef SQLITE_WIN32_MAX_PATH_BYTES
+# if defined(SQLITE_MAX_PATH_LENGTH) && SQLITE_MAX_PATH_LENGTH > (SQLITE_WIN32_MAX_PATH_CHARS*4)
+#  define SQLITE_WIN32_MAX_PATH_BYTES   SQLITE_MAX_PATH_LENGTH
+# else
 #  define SQLITE_WIN32_MAX_PATH_BYTES   (SQLITE_WIN32_MAX_PATH_CHARS*4)
+# endif
 #endif
 
 /*
@@ -32714,10 +33092,11 @@ SQLITE_API int sqlite3_open_file_count = 0;
 
 /*
 ** Do we need to manually define the Win32 file mapping APIs for use with WAL
-** mode (e.g. these APIs are available in the Windows CE SDK; however, they
-** are not present in the header file)?
+** mode or memory mapped files (e.g. these APIs are available in the Windows
+** CE SDK; however, they are not present in the header file)?
 */
-#if SQLITE_WIN32_FILEMAPPING_API && !defined(SQLITE_OMIT_WAL)
+#if SQLITE_WIN32_FILEMAPPING_API && \
+        (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0)
 /*
 ** Two of the file mapping APIs are different under WinRT.  Figure out which
 ** set we need.
@@ -32745,7 +33124,7 @@ WINBASEAPI LPVOID WINAPI MapViewOfFile(HANDLE, DWORD, DWORD, DWORD, SIZE_T);
 ** This file mapping API is common to both Win32 and WinRT.
 */
 WINBASEAPI BOOL WINAPI UnmapViewOfFile(LPCVOID);
-#endif /* SQLITE_WIN32_FILEMAPPING_API && !defined(SQLITE_OMIT_WAL) */
+#endif /* SQLITE_WIN32_FILEMAPPING_API */
 
 /*
 ** Some Microsoft compilers lack this definition.
@@ -33038,7 +33417,7 @@ static struct win_syscall {
         LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE))aSyscall[5].pCurrent)
 
 #if (!SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_ANSI) && \
-        !defined(SQLITE_OMIT_WAL))
+        (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0))
   { "CreateFileMappingA",      (SYSCALL)CreateFileMappingA,      0 },
 #else
   { "CreateFileMappingA",      (SYSCALL)0,                       0 },
@@ -33048,7 +33427,7 @@ static struct win_syscall {
         DWORD,DWORD,DWORD,LPCSTR))aSyscall[6].pCurrent)
 
 #if SQLITE_OS_WINCE || (!SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) && \
-        !defined(SQLITE_OMIT_WAL))
+        (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0))
   { "CreateFileMappingW",      (SYSCALL)CreateFileMappingW,      0 },
 #else
   { "CreateFileMappingW",      (SYSCALL)0,                       0 },
@@ -33088,7 +33467,7 @@ static struct win_syscall {
   { "FileTimeToLocalFileTime", (SYSCALL)0,                       0 },
 #endif
 
-#define osFileTimeToLocalFileTime ((BOOL(WINAPI*)(CONST FILETIME*, \
+#define osFileTimeToLocalFileTime ((BOOL(WINAPI*)(const FILETIME*, \
         LPFILETIME))aSyscall[11].pCurrent)
 
 #if SQLITE_OS_WINCE
@@ -33097,7 +33476,7 @@ static struct win_syscall {
   { "FileTimeToSystemTime",    (SYSCALL)0,                       0 },
 #endif
 
-#define osFileTimeToSystemTime ((BOOL(WINAPI*)(CONST FILETIME*, \
+#define osFileTimeToSystemTime ((BOOL(WINAPI*)(const FILETIME*, \
         LPSYSTEMTIME))aSyscall[12].pCurrent)
 
   { "FlushFileBuffers",        (SYSCALL)FlushFileBuffers,        0 },
@@ -33388,7 +33767,8 @@ static struct win_syscall {
         LPOVERLAPPED))aSyscall[48].pCurrent)
 #endif
 
-#if SQLITE_OS_WINCE || (!SQLITE_OS_WINRT && !defined(SQLITE_OMIT_WAL))
+#if SQLITE_OS_WINCE || (!SQLITE_OS_WINRT && \
+        (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0))
   { "MapViewOfFile",           (SYSCALL)MapViewOfFile,           0 },
 #else
   { "MapViewOfFile",           (SYSCALL)0,                       0 },
@@ -33435,7 +33815,7 @@ static struct win_syscall {
 
   { "SystemTimeToFileTime",    (SYSCALL)SystemTimeToFileTime,    0 },
 
-#define osSystemTimeToFileTime ((BOOL(WINAPI*)(CONST SYSTEMTIME*, \
+#define osSystemTimeToFileTime ((BOOL(WINAPI*)(const SYSTEMTIME*, \
         LPFILETIME))aSyscall[56].pCurrent)
 
 #if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT
@@ -33458,7 +33838,7 @@ static struct win_syscall {
 #define osUnlockFileEx ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \
         LPOVERLAPPED))aSyscall[58].pCurrent)
 
-#if SQLITE_OS_WINCE || !defined(SQLITE_OMIT_WAL)
+#if SQLITE_OS_WINCE || !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
   { "UnmapViewOfFile",         (SYSCALL)UnmapViewOfFile,         0 },
 #else
   { "UnmapViewOfFile",         (SYSCALL)0,                       0 },
@@ -33521,7 +33901,7 @@ static struct win_syscall {
 #define osGetFileInformationByHandleEx ((BOOL(WINAPI*)(HANDLE, \
         FILE_INFO_BY_HANDLE_CLASS,LPVOID,DWORD))aSyscall[66].pCurrent)
 
-#if SQLITE_OS_WINRT && !defined(SQLITE_OMIT_WAL)
+#if SQLITE_OS_WINRT && (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0)
   { "MapViewOfFileFromApp",    (SYSCALL)MapViewOfFileFromApp,    0 },
 #else
   { "MapViewOfFileFromApp",    (SYSCALL)0,                       0 },
@@ -33585,7 +33965,7 @@ static struct win_syscall {
 
 #define osGetProcessHeap ((HANDLE(WINAPI*)(VOID))aSyscall[74].pCurrent)
 
-#if SQLITE_OS_WINRT && !defined(SQLITE_OMIT_WAL)
+#if SQLITE_OS_WINRT && (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0)
   { "CreateFileMappingFromApp", (SYSCALL)CreateFileMappingFromApp, 0 },
 #else
   { "CreateFileMappingFromApp", (SYSCALL)0,                      0 },
@@ -33747,8 +34127,8 @@ SQLITE_API int sqlite3_win32_reset_heap(){
   int rc;
   MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
   MUTEX_LOGIC( sqlite3_mutex *pMem; )    /* The memsys static mutex */
-  MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
-  MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
+  MUTEX_LOGIC( pMaster = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER); )
+  MUTEX_LOGIC( pMem = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MEM); )
   sqlite3_mutex_enter(pMaster);
   sqlite3_mutex_enter(pMem);
   winMemAssertMagic();
@@ -33842,7 +34222,7 @@ SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){
 }
 
 #if SQLITE_MAX_WORKER_THREADS>0 && !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && \
-        SQLITE_THREADSAFE>0 && !defined(__CYGWIN__)
+        SQLITE_THREADSAFE>0 && (defined(_MSC_VER) || defined(__MSVCRT__))
 SQLITE_PRIVATE DWORD sqlite3Win32Wait(HANDLE hObject){
   DWORD rc;
   while( (rc = osWaitForSingleObjectEx(hObject, INFINITE,
@@ -35023,7 +35403,7 @@ static int winRead(
   int amt,                   /* Number of bytes to read */
   sqlite3_int64 offset       /* Begin reading at this offset */
 ){
-#if !SQLITE_OS_WINCE
+#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED)
   OVERLAPPED overlapped;          /* The offset for ReadFile. */
 #endif
   winFile *pFile = (winFile*)id;  /* file handle */
@@ -35055,7 +35435,7 @@ static int winRead(
   }
 #endif
 
-#if SQLITE_OS_WINCE
+#if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED)
   if( winSeekFile(pFile, offset) ){
     OSTRACE(("READ file=%p, rc=SQLITE_FULL\n", pFile->h));
     return SQLITE_FULL;
@@ -35127,13 +35507,13 @@ static int winWrite(
   }
 #endif
 
-#if SQLITE_OS_WINCE
+#if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED)
   rc = winSeekFile(pFile, offset);
   if( rc==0 ){
 #else
   {
 #endif
-#if !SQLITE_OS_WINCE
+#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED)
     OVERLAPPED overlapped;        /* The offset for WriteFile. */
 #endif
     u8 *aRem = (u8 *)pBuf;        /* Data yet to be written */
@@ -35141,14 +35521,14 @@ static int winWrite(
     DWORD nWrite;                 /* Bytes written by each WriteFile() call */
     DWORD lastErrno = NO_ERROR;   /* Value returned by GetLastError() */
 
-#if !SQLITE_OS_WINCE
+#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED)
     memset(&overlapped, 0, sizeof(OVERLAPPED));
     overlapped.Offset = (LONG)(offset & 0xffffffff);
     overlapped.OffsetHigh = (LONG)((offset>>32) & 0x7fffffff);
 #endif
 
     while( nRem>0 ){
-#if SQLITE_OS_WINCE
+#if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED)
       if( !osWriteFile(pFile->h, aRem, nRem, &nWrite, 0) ){
 #else
       if( !osWriteFile(pFile->h, aRem, nRem, &nWrite, &overlapped) ){
@@ -35161,7 +35541,7 @@ static int winWrite(
         lastErrno = osGetLastError();
         break;
       }
-#if !SQLITE_OS_WINCE
+#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED)
       offset += nWrite;
       overlapped.Offset = (LONG)(offset & 0xffffffff);
       overlapped.OffsetHigh = (LONG)((offset>>32) & 0x7fffffff);
@@ -38570,18 +38950,6 @@ struct PCache {
   PgHdr *pPage1;                      /* Reference to page 1 */
 };
 
-/*
-** Some of the assert() macros in this code are too expensive to run
-** even during normal debugging.  Use them only rarely on long-running
-** tests.  Enable the expensive asserts using the
-** -DSQLITE_ENABLE_EXPENSIVE_ASSERT=1 compile-time option.
-*/
-#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
-# define expensive_assert(X)  assert(X)
-#else
-# define expensive_assert(X)
-#endif
-
 /********************************** Linked List Management ********************/
 
 /* Allowed values for second argument to pcacheManageDirtyList() */
@@ -38735,7 +39103,8 @@ SQLITE_PRIVATE int sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
   if( pCache->szPage ){
     sqlite3_pcache *pNew;
     pNew = sqlite3GlobalConfig.pcache2.xCreate(
-                szPage, pCache->szExtra + sizeof(PgHdr), pCache->bPurgeable
+                szPage, pCache->szExtra + ROUND8(sizeof(PgHdr)),
+                pCache->bPurgeable
     );
     if( pNew==0 ) return SQLITE_NOMEM;
     sqlite3GlobalConfig.pcache2.xCachesize(pNew, numberOfCachePages(pCache));
@@ -39190,6 +39559,13 @@ SQLITE_PRIVATE void sqlite3PcacheShrink(PCache *pCache){
   sqlite3GlobalConfig.pcache2.xShrink(pCache->pCache);
 }
 
+/*
+** Return the size of the header added by this middleware layer
+** in the page-cache hierarchy.
+*/
+SQLITE_PRIVATE int sqlite3HeaderSizePcache(void){ return ROUND8(sizeof(PgHdr)); }
+
+
 #if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)
 /*
 ** For all dirty pages currently in the cache, invoke the specified
@@ -39503,7 +39879,7 @@ static PgHdr1 *pcache1AllocPage(PCache1 *pCache){
     pPg = 0;
   }
 #else
-  pPg = pcache1Alloc(sizeof(PgHdr1) + pCache->szPage + pCache->szExtra);
+  pPg = pcache1Alloc(ROUND8(sizeof(PgHdr1)) + pCache->szPage + pCache->szExtra);
   p = (PgHdr1 *)&((u8 *)pPg)[pCache->szPage];
 #endif
   pcache1EnterMutex(pCache->pGroup);
@@ -40188,6 +40564,11 @@ SQLITE_PRIVATE void sqlite3PCacheSetDefault(void){
   sqlite3_config(SQLITE_CONFIG_PCACHE2, &defaultMethods);
 }
 
+/*
+** Return the size of the header on each page of this PCACHE implementation.
+*/
+SQLITE_PRIVATE int sqlite3HeaderSizePcache1(void){ return ROUND8(sizeof(PgHdr1)); }
+
 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
 /*
 ** This function is called to free superfluous dynamically allocated memory
@@ -41544,6 +41925,8 @@ struct Pager {
   u8 setMaster;               /* True if a m-j name has been written to jrnl */
   u8 doNotSpill;              /* Do not spill the cache when non-zero */
   u8 subjInMemory;            /* True to use in-memory sub-journals */
+  u8 bUseFetch;               /* True to use xFetch() */
+  u8 hasBeenUsed;             /* True if any content previously read from this pager*/
   Pgno dbSize;                /* Number of pages in the database */
   Pgno dbOrigSize;            /* dbSize before the current transaction */
   Pgno dbFileSize;            /* Number of pages in the database file */
@@ -41561,9 +41944,9 @@ struct Pager {
   sqlite3_backup *pBackup;    /* Pointer to list of ongoing backup processes */
   PagerSavepoint *aSavepoint; /* Array of active savepoints */
   int nSavepoint;             /* Number of elements in aSavepoint[] */
+  u32 iDataVersion;           /* Changes whenever database content changes */
   char dbFileVers[16];        /* Changes whenever database file changes */
 
-  u8 bUseFetch;               /* True to use xFetch() */
   int nMmapOut;               /* Number of mmap pages currently outstanding */
   sqlite3_int64 szMmap;       /* Desired maximum mmap size */
   PgHdr *pMmapFreelist;       /* List of free mmap page headers (pDirty) */
@@ -42579,11 +42962,20 @@ static int writeMasterJournal(Pager *pPager, const char *zMaster){
 ** Discard the entire contents of the in-memory page-cache.
 */
 static void pager_reset(Pager *pPager){
+  pPager->iDataVersion++;
   sqlite3BackupRestart(pPager->pBackup);
   sqlite3PcacheClear(pPager->pPCache);
 }
 
 /*
+** Return the pPager->iDataVersion value
+*/
+SQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager *pPager){
+  assert( pPager->eState>PAGER_OPEN );
+  return pPager->iDataVersion;
+}
+
+/*
 ** Free all structures in the Pager.aSavepoint[] array and set both
 ** Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal
 ** if it is open and the pager is not in exclusive mode.
@@ -43797,7 +44189,7 @@ static int readDbPage(PgHdr *pPg, u32 iFrame){
       **
       ** For an encrypted database, the situation is more complex:  bytes
       ** 24..39 of the database are white noise.  But the probability of
-      ** white noising equaling 16 bytes of 0xff is vanishingly small so
+      ** white noise equaling 16 bytes of 0xff is vanishingly small so
       ** we should still be ok.
       */
       memset(pPager->dbFileVers, 0xff, sizeof(pPager->dbFileVers));
@@ -44785,7 +45177,7 @@ static int pagerAcquireMapPage(
   PgHdr **ppPage                  /* OUT: Acquired page object */
 ){
   PgHdr *p;                       /* Memory mapped page to return */
-
+  
   if( pPager->pMmapFreelist ){
     *ppPage = p = pPager->pMmapFreelist;
     pPager->pMmapFreelist = p->pDirty;
@@ -46016,16 +46408,12 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
       );
     }
 
-    if( !pPager->tempFile && (
-        pPager->pBackup 
-     || sqlite3PcachePagecount(pPager->pPCache)>0 
-     || USEFETCH(pPager)
-    )){
-      /* The shared-lock has just been acquired on the database file
-      ** and there are already pages in the cache (from a previous
-      ** read or write transaction).  Check to see if the database
-      ** has been modified.  If the database has changed, flush the
-      ** cache.
+    if( !pPager->tempFile && pPager->hasBeenUsed ){
+      /* The shared-lock has just been acquired then check to
+      ** see if the database has been modified.  If the database has changed,
+      ** flush the cache.  The pPager->hasBeenUsed flag prevents this from
+      ** occurring on the very first access to a file, in order to save a
+      ** single unnecessary sqlite3OsRead() call at the start-up.
       **
       ** Database changes is detected by looking at 15 bytes beginning
       ** at offset 24 into the file.  The first 4 of these 16 bytes are
@@ -46190,6 +46578,7 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
   if( pgno==0 ){
     return SQLITE_CORRUPT_BKPT;
   }
+  pPager->hasBeenUsed = 1;
 
   /* If the pager is in the error state, return an error immediately. 
   ** Otherwise, request the page from the PCache layer. */
@@ -46339,6 +46728,7 @@ SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){
   assert( pgno!=0 );
   assert( pPager->pPCache!=0 );
   pPage = sqlite3PcacheFetch(pPager->pPCache, pgno, 0);
+  assert( pPage==0 || pPager->hasBeenUsed );
   return sqlite3PcacheFetchFinish(pPager->pPCache, pgno, pPage);
 }
 
@@ -47205,6 +47595,7 @@ SQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager *pPager){
   }
 
   PAGERTRACE(("COMMIT %d\n", PAGERID(pPager)));
+  pPager->iDataVersion++;
   rc = pager_end_transaction(pPager, pPager->setMaster, 1);
   return pager_error(pPager, rc);
 }
@@ -47746,6 +48137,18 @@ SQLITE_PRIVATE int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, i
 #endif
 
 /*
+** The page handle passed as the first argument refers to a dirty page 
+** with a page number other than iNew. This function changes the page's 
+** page number to iNew and sets the value of the PgHdr.flags field to 
+** the value passed as the third parameter.
+*/
+SQLITE_PRIVATE void sqlite3PagerRekey(DbPage *pPg, Pgno iNew, u16 flags){
+  assert( pPg->pgno!=iNew );
+  pPg->flags = flags;
+  sqlite3PcacheMove(pPg, iNew);
+}
+
+/*
 ** Return a pointer to the data for the specified page.
 */
 SQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *pPg){
@@ -47961,7 +48364,8 @@ SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int eMode, int *pnLog,
   int rc = SQLITE_OK;
   if( pPager->pWal ){
     rc = sqlite3WalCheckpoint(pPager->pWal, eMode,
-        pPager->xBusyHandler, pPager->pBusyHandlerArg,
+        (eMode==SQLITE_CHECKPOINT_PASSIVE ? 0 : pPager->xBusyHandler),
+        pPager->pBusyHandlerArg,
         pPager->ckptSyncFlags, pPager->pageSize, (u8 *)pPager->pTmpSpace,
         pnLog, pnCkpt
     );
@@ -48143,6 +48547,7 @@ SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager){
 }
 #endif
 
+
 #endif /* SQLITE_OMIT_DISKIO */
 
 /************** End of pager.c ***********************************************/
@@ -49652,7 +50057,7 @@ static void walMergesort(
 ** Free an iterator allocated by walIteratorInit().
 */
 static void walIteratorFree(WalIterator *p){
-  sqlite3ScratchFree(p);
+  sqlite3_free(p);
 }
 
 /*
@@ -49687,7 +50092,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
   nByte = sizeof(WalIterator) 
         + (nSegment-1)*sizeof(struct WalSegment)
         + iLast*sizeof(ht_slot);
-  p = (WalIterator *)sqlite3ScratchMalloc(nByte);
+  p = (WalIterator *)sqlite3_malloc(nByte);
   if( !p ){
     return SQLITE_NOMEM;
   }
@@ -49697,7 +50102,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
   /* Allocate temporary space used by the merge-sort routine. This block
   ** of memory will be freed before this function returns.
   */
-  aTmp = (ht_slot *)sqlite3ScratchMalloc(
+  aTmp = (ht_slot *)sqlite3_malloc(
       sizeof(ht_slot) * (iLast>HASHTABLE_NPAGE?HASHTABLE_NPAGE:iLast)
   );
   if( !aTmp ){
@@ -49734,7 +50139,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
       p->aSegment[i].aPgno = (u32 *)aPgno;
     }
   }
-  sqlite3ScratchFree(aTmp);
+  sqlite3_free(aTmp);
 
   if( rc!=SQLITE_OK ){
     walIteratorFree(p);
@@ -49772,6 +50177,38 @@ static int walPagesize(Wal *pWal){
 }
 
 /*
+** The following is guaranteed when this function is called:
+**
+**   a) the WRITER lock is held,
+**   b) the entire log file has been checkpointed, and
+**   c) any existing readers are reading exclusively from the database
+**      file - there are no readers that may attempt to read a frame from
+**      the log file.
+**
+** This function updates the shared-memory structures so that the next
+** client to write to the database (which may be this one) does so by
+** writing frames into the start of the log file.
+**
+** The value of parameter salt1 is used as the aSalt[1] value in the 
+** new wal-index header. It should be passed a pseudo-random value (i.e. 
+** one obtained from sqlite3_randomness()).
+*/
+static void walRestartHdr(Wal *pWal, u32 salt1){
+  volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
+  int i;                          /* Loop counter */
+  u32 *aSalt = pWal->hdr.aSalt;   /* Big-endian salt values */
+  pWal->nCkpt++;
+  pWal->hdr.mxFrame = 0;
+  sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
+  memcpy(&pWal->hdr.aSalt[1], &salt1, 4);
+  walIndexWriteHdr(pWal);
+  pInfo->nBackfill = 0;
+  pInfo->aReadMark[1] = 0;
+  for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
+  assert( pInfo->aReadMark[0]==0 );
+}
+
+/*
 ** Copy as much content as we can from the WAL back into the database file
 ** in response to an sqlite3_wal_checkpoint() request or the equivalent.
 **
@@ -49805,12 +50242,12 @@ static int walPagesize(Wal *pWal){
 static int walCheckpoint(
   Wal *pWal,                      /* Wal connection */
   int eMode,                      /* One of PASSIVE, FULL or RESTART */
-  int (*xBusyCall)(void*),        /* Function to call when busy */
+  int (*xBusy)(void*),            /* Function to call when busy */
   void *pBusyArg,                 /* Context argument for xBusyHandler */
   int sync_flags,                 /* Flags for OsSync() (or 0) */
   u8 *zBuf                        /* Temporary buffer to use */
 ){
-  int rc;                         /* Return code */
+  int rc = SQLITE_OK;             /* Return code */
   int szPage;                     /* Database page-size */
   WalIterator *pIter = 0;         /* Wal iterator context */
   u32 iDbpage = 0;                /* Next database page to write */
@@ -49819,123 +50256,146 @@ static int walCheckpoint(
   u32 mxPage;                     /* Max database page to write */
   int i;                          /* Loop counter */
   volatile WalCkptInfo *pInfo;    /* The checkpoint status information */
-  int (*xBusy)(void*) = 0;        /* Function to call when waiting for locks */
 
   szPage = walPagesize(pWal);
   testcase( szPage<=32768 );
   testcase( szPage>=65536 );
   pInfo = walCkptInfo(pWal);
-  if( pInfo->nBackfill>=pWal->hdr.mxFrame ) return SQLITE_OK;
+  if( pInfo->nBackfill<pWal->hdr.mxFrame ){
 
-  /* Allocate the iterator */
-  rc = walIteratorInit(pWal, &pIter);
-  if( rc!=SQLITE_OK ){
-    return rc;
-  }
-  assert( pIter );
+    /* Allocate the iterator */
+    rc = walIteratorInit(pWal, &pIter);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    assert( pIter );
 
-  if( eMode!=SQLITE_CHECKPOINT_PASSIVE ) xBusy = xBusyCall;
+    /* EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked
+    ** in the SQLITE_CHECKPOINT_PASSIVE mode. */
+    assert( eMode!=SQLITE_CHECKPOINT_PASSIVE || xBusy==0 );
 
-  /* Compute in mxSafeFrame the index of the last frame of the WAL that is
-  ** safe to write into the database.  Frames beyond mxSafeFrame might
-  ** overwrite database pages that are in use by active readers and thus
-  ** cannot be backfilled from the WAL.
-  */
-  mxSafeFrame = pWal->hdr.mxFrame;
-  mxPage = pWal->hdr.nPage;
-  for(i=1; i<WAL_NREADER; i++){
-    u32 y = pInfo->aReadMark[i];
-    if( mxSafeFrame>y ){
-      assert( y<=pWal->hdr.mxFrame );
-      rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(i), 1);
-      if( rc==SQLITE_OK ){
-        pInfo->aReadMark[i] = (i==1 ? mxSafeFrame : READMARK_NOT_USED);
-        walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1);
-      }else if( rc==SQLITE_BUSY ){
-        mxSafeFrame = y;
-        xBusy = 0;
-      }else{
-        goto walcheckpoint_out;
+    /* Compute in mxSafeFrame the index of the last frame of the WAL that is
+    ** safe to write into the database.  Frames beyond mxSafeFrame might
+    ** overwrite database pages that are in use by active readers and thus
+    ** cannot be backfilled from the WAL.
+    */
+    mxSafeFrame = pWal->hdr.mxFrame;
+    mxPage = pWal->hdr.nPage;
+    for(i=1; i<WAL_NREADER; i++){
+      u32 y = pInfo->aReadMark[i];
+      if( mxSafeFrame>y ){
+        assert( y<=pWal->hdr.mxFrame );
+        rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(i), 1);
+        if( rc==SQLITE_OK ){
+          pInfo->aReadMark[i] = (i==1 ? mxSafeFrame : READMARK_NOT_USED);
+          walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1);
+        }else if( rc==SQLITE_BUSY ){
+          mxSafeFrame = y;
+          xBusy = 0;
+        }else{
+          goto walcheckpoint_out;
+        }
       }
     }
-  }
-
-  if( pInfo->nBackfill<mxSafeFrame
-   && (rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(0), 1))==SQLITE_OK
-  ){
-    i64 nSize;                    /* Current size of database file */
-    u32 nBackfill = pInfo->nBackfill;
 
-    /* Sync the WAL to disk */
-    if( sync_flags ){
-      rc = sqlite3OsSync(pWal->pWalFd, sync_flags);
-    }
+    if( pInfo->nBackfill<mxSafeFrame
+     && (rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(0),1))==SQLITE_OK
+    ){
+      i64 nSize;                    /* Current size of database file */
+      u32 nBackfill = pInfo->nBackfill;
 
-    /* If the database may grow as a result of this checkpoint, hint
-    ** about the eventual size of the db file to the VFS layer.
-    */
-    if( rc==SQLITE_OK ){
-      i64 nReq = ((i64)mxPage * szPage);
-      rc = sqlite3OsFileSize(pWal->pDbFd, &nSize);
-      if( rc==SQLITE_OK && nSize<nReq ){
-        sqlite3OsFileControlHint(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT, &nReq);
+      /* Sync the WAL to disk */
+      if( sync_flags ){
+        rc = sqlite3OsSync(pWal->pWalFd, sync_flags);
       }
-    }
 
+      /* If the database may grow as a result of this checkpoint, hint
+      ** about the eventual size of the db file to the VFS layer.
+      */
+      if( rc==SQLITE_OK ){
+        i64 nReq = ((i64)mxPage * szPage);
+        rc = sqlite3OsFileSize(pWal->pDbFd, &nSize);
+        if( rc==SQLITE_OK && nSize<nReq ){
+          sqlite3OsFileControlHint(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT, &nReq);
+        }
+      }
 
-    /* Iterate through the contents of the WAL, copying data to the db file. */
-    while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
-      i64 iOffset;
-      assert( walFramePgno(pWal, iFrame)==iDbpage );
-      if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ) continue;
-      iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
-      /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL file */
-      rc = sqlite3OsRead(pWal->pWalFd, zBuf, szPage, iOffset);
-      if( rc!=SQLITE_OK ) break;
-      iOffset = (iDbpage-1)*(i64)szPage;
-      testcase( IS_BIG_INT(iOffset) );
-      rc = sqlite3OsWrite(pWal->pDbFd, zBuf, szPage, iOffset);
-      if( rc!=SQLITE_OK ) break;
-    }
 
-    /* If work was actually accomplished... */
-    if( rc==SQLITE_OK ){
-      if( mxSafeFrame==walIndexHdr(pWal)->mxFrame ){
-        i64 szDb = pWal->hdr.nPage*(i64)szPage;
-        testcase( IS_BIG_INT(szDb) );
-        rc = sqlite3OsTruncate(pWal->pDbFd, szDb);
-        if( rc==SQLITE_OK && sync_flags ){
-          rc = sqlite3OsSync(pWal->pDbFd, sync_flags);
+      /* Iterate through the contents of the WAL, copying data to the db file */
+      while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
+        i64 iOffset;
+        assert( walFramePgno(pWal, iFrame)==iDbpage );
+        if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ){
+          continue;
         }
+        iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
+        /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL file */
+        rc = sqlite3OsRead(pWal->pWalFd, zBuf, szPage, iOffset);
+        if( rc!=SQLITE_OK ) break;
+        iOffset = (iDbpage-1)*(i64)szPage;
+        testcase( IS_BIG_INT(iOffset) );
+        rc = sqlite3OsWrite(pWal->pDbFd, zBuf, szPage, iOffset);
+        if( rc!=SQLITE_OK ) break;
       }
+
+      /* If work was actually accomplished... */
       if( rc==SQLITE_OK ){
-        pInfo->nBackfill = mxSafeFrame;
+        if( mxSafeFrame==walIndexHdr(pWal)->mxFrame ){
+          i64 szDb = pWal->hdr.nPage*(i64)szPage;
+          testcase( IS_BIG_INT(szDb) );
+          rc = sqlite3OsTruncate(pWal->pDbFd, szDb);
+          if( rc==SQLITE_OK && sync_flags ){
+            rc = sqlite3OsSync(pWal->pDbFd, sync_flags);
+          }
+        }
+        if( rc==SQLITE_OK ){
+          pInfo->nBackfill = mxSafeFrame;
+        }
       }
-    }
 
-    /* Release the reader lock held while backfilling */
-    walUnlockExclusive(pWal, WAL_READ_LOCK(0), 1);
-  }
+      /* Release the reader lock held while backfilling */
+      walUnlockExclusive(pWal, WAL_READ_LOCK(0), 1);
+    }
 
-  if( rc==SQLITE_BUSY ){
-    /* Reset the return code so as not to report a checkpoint failure
-    ** just because there are active readers.  */
-    rc = SQLITE_OK;
+    if( rc==SQLITE_BUSY ){
+      /* Reset the return code so as not to report a checkpoint failure
+      ** just because there are active readers.  */
+      rc = SQLITE_OK;
+    }
   }
 
-  /* If this is an SQLITE_CHECKPOINT_RESTART operation, and the entire wal
-  ** file has been copied into the database file, then block until all
-  ** readers have finished using the wal file. This ensures that the next
-  ** process to write to the database restarts the wal file.
+  /* If this is an SQLITE_CHECKPOINT_RESTART or TRUNCATE operation, and the
+  ** entire wal file has been copied into the database file, then block 
+  ** until all readers have finished using the wal file. This ensures that 
+  ** the next process to write to the database restarts the wal file.
   */
   if( rc==SQLITE_OK && eMode!=SQLITE_CHECKPOINT_PASSIVE ){
     assert( pWal->writeLock );
     if( pInfo->nBackfill<pWal->hdr.mxFrame ){
       rc = SQLITE_BUSY;
-    }else if( eMode==SQLITE_CHECKPOINT_RESTART ){
-      assert( mxSafeFrame==pWal->hdr.mxFrame );
+    }else if( eMode>=SQLITE_CHECKPOINT_RESTART ){
+      u32 salt1;
+      sqlite3_randomness(4, &salt1);
+      assert( pInfo->nBackfill==pWal->hdr.mxFrame );
       rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(1), WAL_NREADER-1);
       if( rc==SQLITE_OK ){
+        if( eMode==SQLITE_CHECKPOINT_TRUNCATE ){
+          /* IMPLEMENTATION-OF: R-44699-57140 This mode works the same way as
+          ** SQLITE_CHECKPOINT_RESTART with the addition that it also
+          ** truncates the log file to zero bytes just prior to a
+          ** successful return.
+          **
+          ** In theory, it might be safe to do this without updating the
+          ** wal-index header in shared memory, as all subsequent reader or
+          ** writer clients should see that the entire log file has been
+          ** checkpointed and behave accordingly. This seems unsafe though,
+          ** as it would leave the system in a state where the contents of
+          ** the wal-index header do not match the contents of the 
+          ** file-system. To avoid this, update the wal-index header to
+          ** indicate that the log file contains zero valid frames.  */
+          walRestartHdr(pWal, salt1);
+          rc = sqlite3OsTruncate(pWal->pWalFd, 0);
+        }
         walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
       }
     }
@@ -50508,7 +50968,7 @@ SQLITE_PRIVATE int sqlite3WalFindFrame(
     for(iKey=walHash(pgno); aHash[iKey]; iKey=walNextHash(iKey)){
       u32 iFrame = aHash[iKey] + iZero;
       if( iFrame<=iLast && aPgno[aHash[iKey]]==pgno ){
-        /* assert( iFrame>iRead ); -- not true if there is corruption */
+        assert( iFrame>iRead || CORRUPT_DB );
         iRead = iFrame;
       }
       if( (nCollide--)==0 ){
@@ -50673,7 +51133,6 @@ SQLITE_PRIVATE int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *p
     }
     if( iMax!=pWal->hdr.mxFrame ) walCleanupHash(pWal);
   }
-  assert( rc==SQLITE_OK );
   return rc;
 }
 
@@ -50722,7 +51181,6 @@ SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){
   return rc;
 }
 
-
 /*
 ** This function is called just before writing a set of frames to the log
 ** file (see sqlite3WalFrames()). It checks to see if, instead of appending
@@ -50755,20 +51213,8 @@ static int walRestartLog(Wal *pWal){
         ** In theory it would be Ok to update the cache of the header only
         ** at this point. But updating the actual wal-index header is also
         ** safe and means there is no special case for sqlite3WalUndo()
-        ** to handle if this transaction is rolled back.
-        */
-        int i;                    /* Loop counter */
-        u32 *aSalt = pWal->hdr.aSalt;       /* Big-endian salt values */
-
-        pWal->nCkpt++;
-        pWal->hdr.mxFrame = 0;
-        sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
-        aSalt[1] = salt1;
-        walIndexWriteHdr(pWal);
-        pInfo->nBackfill = 0;
-        pInfo->aReadMark[1] = 0;
-        for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
-        assert( pInfo->aReadMark[0]==0 );
+        ** to handle if this transaction is rolled back.  */
+        walRestartHdr(pWal, salt1);
         walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
       }else if( rc!=SQLITE_BUSY ){
         return rc;
@@ -51056,7 +51502,7 @@ SQLITE_PRIVATE int sqlite3WalFrames(
 */
 SQLITE_PRIVATE int sqlite3WalCheckpoint(
   Wal *pWal,                      /* Wal connection */
-  int eMode,                      /* PASSIVE, FULL or RESTART */
+  int eMode,                      /* PASSIVE, FULL, RESTART, or TRUNCATE */
   int (*xBusy)(void*),            /* Function to call when busy */
   void *pBusyArg,                 /* Context argument for xBusyHandler */
   int sync_flags,                 /* Flags to sync db file with (or 0) */
@@ -51068,29 +51514,42 @@ SQLITE_PRIVATE int sqlite3WalCheckpoint(
   int rc;                         /* Return code */
   int isChanged = 0;              /* True if a new wal-index header is loaded */
   int eMode2 = eMode;             /* Mode to pass to walCheckpoint() */
+  int (*xBusy2)(void*) = xBusy;   /* Busy handler for eMode2 */
 
   assert( pWal->ckptLock==0 );
   assert( pWal->writeLock==0 );
 
+  /* EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked
+  ** in the SQLITE_CHECKPOINT_PASSIVE mode. */
+  assert( eMode!=SQLITE_CHECKPOINT_PASSIVE || xBusy==0 );
+
   if( pWal->readOnly ) return SQLITE_READONLY;
   WALTRACE(("WAL%p: checkpoint begins\n", pWal));
+
+  /* IMPLEMENTATION-OF: R-62028-47212 All calls obtain an exclusive 
+  ** "checkpoint" lock on the database file. */
   rc = walLockExclusive(pWal, WAL_CKPT_LOCK, 1);
   if( rc ){
-    /* Usually this is SQLITE_BUSY meaning that another thread or process
-    ** is already running a checkpoint, or maybe a recovery.  But it might
-    ** also be SQLITE_IOERR. */
+    /* EVIDENCE-OF: R-10421-19736 If any other process is running a
+    ** checkpoint operation at the same time, the lock cannot be obtained and
+    ** SQLITE_BUSY is returned.
+    ** EVIDENCE-OF: R-53820-33897 Even if there is a busy-handler configured,
+    ** it will not be invoked in this case.
+    */
+    testcase( rc==SQLITE_BUSY );
+    testcase( xBusy!=0 );
     return rc;
   }
   pWal->ckptLock = 1;
 
-  /* If this is a blocking-checkpoint, then obtain the write-lock as well
-  ** to prevent any writers from running while the checkpoint is underway.
-  ** This has to be done before the call to walIndexReadHdr() below.
+  /* IMPLEMENTATION-OF: R-59782-36818 The SQLITE_CHECKPOINT_FULL, RESTART and
+  ** TRUNCATE modes also obtain the exclusive "writer" lock on the database
+  ** file.
   **
-  ** If the writer lock cannot be obtained, then a passive checkpoint is
-  ** run instead. Since the checkpointer is not holding the writer lock,
-  ** there is no point in blocking waiting for any readers. Assuming no 
-  ** other error occurs, this function will return SQLITE_BUSY to the caller.
+  ** EVIDENCE-OF: R-60642-04082 If the writer lock cannot be obtained
+  ** immediately, and a busy-handler is configured, it is invoked and the
+  ** writer lock retried until either the busy-handler returns 0 or the
+  ** lock is successfully obtained.
   */
   if( eMode!=SQLITE_CHECKPOINT_PASSIVE ){
     rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_WRITE_LOCK, 1);
@@ -51098,6 +51557,7 @@ SQLITE_PRIVATE int sqlite3WalCheckpoint(
       pWal->writeLock = 1;
     }else if( rc==SQLITE_BUSY ){
       eMode2 = SQLITE_CHECKPOINT_PASSIVE;
+      xBusy2 = 0;
       rc = SQLITE_OK;
     }
   }
@@ -51115,7 +51575,7 @@ SQLITE_PRIVATE int sqlite3WalCheckpoint(
     if( pWal->hdr.mxFrame && walPagesize(pWal)!=nBuf ){
       rc = SQLITE_CORRUPT_BKPT;
     }else{
-      rc = walCheckpoint(pWal, eMode2, xBusy, pBusyArg, sync_flags, zBuf);
+      rc = walCheckpoint(pWal, eMode2, xBusy2, pBusyArg, sync_flags, zBuf);
     }
 
     /* If no error occurred, set the output variables. */
@@ -51614,6 +52074,7 @@ struct Btree {
   u8 locked;         /* True if db currently has pBt locked */
   int wantToLock;    /* Number of nested calls to sqlite3BtreeEnter() */
   int nBackup;       /* Number of backup operations reading this btree */
+  u32 iDataVersion;  /* Combines with pBt->pPager->iDataVersion */
   Btree *pNext;      /* List of other sharable Btrees from the same db */
   Btree *pPrev;      /* Back pointer of the same list */
 #ifndef SQLITE_OMIT_SHARED_CACHE
@@ -51752,6 +52213,11 @@ struct CellInfo {
 **
 ** Fields in this structure are accessed under the BtShared.mutex
 ** found at self->pBt->mutex. 
+**
+** skipNext meaning:
+**    eState==SKIPNEXT && skipNext>0:  Next sqlite3BtreeNext() is no-op.
+**    eState==SKIPNEXT && skipNext<0:  Next sqlite3BtreePrevious() is no-op.
+**    eState==FAULT:                   Cursor fault with skipNext as error code.
 */
 struct BtCursor {
   Btree *pBtree;            /* The Btree to which this cursor belongs */
@@ -51764,7 +52230,8 @@ struct BtCursor {
   void *pKey;               /* Saved key that was cursor last known position */
   Pgno pgnoRoot;            /* The root page of this tree */
   int nOvflAlloc;           /* Allocated size of aOverflow[] array */
-  int skipNext;    /* Prev() is noop if negative. Next() is noop if positive */
+  int skipNext;    /* Prev() is noop if negative. Next() is noop if positive.
+                   ** Error code if eState==CURSOR_FAULT */
   u8 curFlags;              /* zero or more BTCF_* flags defined below */
   u8 eState;                /* One of the CURSOR_XXX constants (see below) */
   u8 hints;                             /* As configured by CursorSetHints() */
@@ -51810,7 +52277,7 @@ struct BtCursor {
 **   on a different connection that shares the BtShared cache with this
 **   cursor.  The error has left the cache in an inconsistent state.
 **   Do nothing else with this cursor.  Any attempt to use the cursor
-**   should return the error code stored in BtCursor.skip
+**   should return the error code stored in BtCursor.skipNext
 */
 #define CURSOR_INVALID           0
 #define CURSOR_VALID             1
@@ -53360,6 +53827,11 @@ static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){
 ** end of the page and all free space is collected into one
 ** big FreeBlk that occurs in between the header and cell
 ** pointer array and the cell content area.
+**
+** EVIDENCE-OF: R-44582-60138 SQLite may from time to time reorganize a
+** b-tree page so that there are no freeblocks or fragment bytes, all
+** unused bytes are contained in the unallocated space region, and all
+** cells are packed tightly at the end of the page.
 */
 static int defragmentPage(MemPage *pPage){
   int i;                     /* Loop counter */
@@ -53372,6 +53844,7 @@ static int defragmentPage(MemPage *pPage){
   int nCell;                 /* Number of cells on the page */
   unsigned char *data;       /* The page data */
   unsigned char *temp;       /* Temp area for cell content */
+  unsigned char *src;        /* Source of content */
   int iCellFirst;            /* First allowable cell index */
   int iCellLast;             /* Last possible cell index */
 
@@ -53381,15 +53854,13 @@ static int defragmentPage(MemPage *pPage){
   assert( pPage->pBt->usableSize <= SQLITE_MAX_PAGE_SIZE );
   assert( pPage->nOverflow==0 );
   assert( sqlite3_mutex_held(pPage->pBt->mutex) );
-  temp = sqlite3PagerTempSpace(pPage->pBt->pPager);
-  data = pPage->aData;
+  temp = 0;
+  src = data = pPage->aData;
   hdr = pPage->hdrOffset;
   cellOffset = pPage->cellOffset;
   nCell = pPage->nCell;
   assert( nCell==get2byte(&data[hdr+3]) );
   usableSize = pPage->pBt->usableSize;
-  cbrk = get2byte(&data[hdr+5]);
-  memcpy(&temp[cbrk], &data[cbrk], usableSize - cbrk);
   cbrk = usableSize;
   iCellFirst = cellOffset + 2*nCell;
   iCellLast = usableSize - 4;
@@ -53408,7 +53879,7 @@ static int defragmentPage(MemPage *pPage){
     }
 #endif
     assert( pc>=iCellFirst && pc<=iCellLast );
-    size = cellSizePtr(pPage, &temp[pc]);
+    size = cellSizePtr(pPage, &src[pc]);
     cbrk -= size;
 #if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
     if( cbrk<iCellFirst ){
@@ -53422,8 +53893,16 @@ static int defragmentPage(MemPage *pPage){
     assert( cbrk+size<=usableSize && cbrk>=iCellFirst );
     testcase( cbrk+size==usableSize );
     testcase( pc+size==usableSize );
-    memcpy(&data[cbrk], &temp[pc], size);
     put2byte(pAddr, cbrk);
+    if( temp==0 ){
+      int x;
+      if( cbrk==pc ) continue;
+      temp = sqlite3PagerTempSpace(pPage->pBt->pPager);
+      x = get2byte(&data[hdr+5]);
+      memcpy(&temp[x], &data[x], (cbrk+size) - x);
+      src = temp;
+    }
+    memcpy(&data[cbrk], &src[pc], size);
   }
   assert( cbrk>=iCellFirst );
   put2byte(&data[hdr+5], cbrk);
@@ -53439,6 +53918,69 @@ static int defragmentPage(MemPage *pPage){
 }
 
 /*
+** Search the free-list on page pPg for space to store a cell nByte bytes in
+** size. If one can be found, return a pointer to the space and remove it
+** from the free-list.
+**
+** If no suitable space can be found on the free-list, return NULL.
+**
+** This function may detect corruption within pPg.  If corruption is
+** detected then *pRc is set to SQLITE_CORRUPT and NULL is returned.
+**
+** If a slot of at least nByte bytes is found but cannot be used because 
+** there are already at least 60 fragmented bytes on the page, return NULL.
+** In this case, if pbDefrag parameter is not NULL, set *pbDefrag to true.
+*/
+static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc, int *pbDefrag){
+  const int hdr = pPg->hdrOffset;
+  u8 * const aData = pPg->aData;
+  int iAddr;
+  int pc;
+  int usableSize = pPg->pBt->usableSize;
+
+  for(iAddr=hdr+1; (pc = get2byte(&aData[iAddr]))>0; iAddr=pc){
+    int size;            /* Size of the free slot */
+    /* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of
+    ** increasing offset. */
+    if( pc>usableSize-4 || pc<iAddr+4 ){
+      *pRc = SQLITE_CORRUPT_BKPT;
+      return 0;
+    }
+    /* EVIDENCE-OF: R-22710-53328 The third and fourth bytes of each
+    ** freeblock form a big-endian integer which is the size of the freeblock
+    ** in bytes, including the 4-byte header. */
+    size = get2byte(&aData[pc+2]);
+    if( size>=nByte ){
+      int x = size - nByte;
+      testcase( x==4 );
+      testcase( x==3 );
+      if( x<4 ){
+        /* EVIDENCE-OF: R-11498-58022 In a well-formed b-tree page, the total
+        ** number of bytes in fragments may not exceed 60. */
+        if( aData[hdr+7]>=60 ){
+          if( pbDefrag ) *pbDefrag = 1;
+          return 0;
+        }
+        /* Remove the slot from the free-list. Update the number of
+        ** fragmented bytes within the page. */
+        memcpy(&aData[iAddr], &aData[pc], 2);
+        aData[hdr+7] += (u8)x;
+      }else if( size+pc > usableSize ){
+        *pRc = SQLITE_CORRUPT_BKPT;
+        return 0;
+      }else{
+        /* The slot remains on the free-list. Reduce its size to account
+         ** for the portion used by the new allocation. */
+        put2byte(&aData[pc+2], x);
+      }
+      return &aData[pc + x];
+    }
+  }
+
+  return 0;
+}
+
+/*
 ** Allocate nByte bytes of space from within the B-Tree page passed
 ** as the first argument. Write into *pIdx the index into pPage->aData[]
 ** of the first byte of allocated space. Return either SQLITE_OK or
@@ -53455,9 +53997,8 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
   const int hdr = pPage->hdrOffset;    /* Local cache of pPage->hdrOffset */
   u8 * const data = pPage->aData;      /* Local cache of pPage->aData */
   int top;                             /* First byte of cell content area */
+  int rc = SQLITE_OK;                  /* Integer return code */
   int gap;        /* First byte of gap between cell pointers and cell content */
-  int rc;         /* Integer return code */
-  int usableSize; /* Usable size of the page */
   
   assert( sqlite3PagerIswriteable(pPage->pDbPage) );
   assert( pPage->pBt );
@@ -53465,20 +54006,18 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
   assert( nByte>=0 );  /* Minimum cell size is 4 */
   assert( pPage->nFree>=nByte );
   assert( pPage->nOverflow==0 );
-  usableSize = pPage->pBt->usableSize;
-  assert( nByte < usableSize-8 );
+  assert( nByte < (int)(pPage->pBt->usableSize-8) );
 
   assert( pPage->cellOffset == hdr + 12 - 4*pPage->leaf );
   gap = pPage->cellOffset + 2*pPage->nCell;
   assert( gap<=65536 );
-  top = get2byte(&data[hdr+5]);
-  if( gap>top ){
-    if( top==0 ){
-      top = 65536;
-    }else{
-      return SQLITE_CORRUPT_BKPT;
-    }
-  }
+  /* EVIDENCE-OF: R-29356-02391 If the database uses a 65536-byte page size
+  ** and the reserved space is zero (the usual value for reserved space)
+  ** then the cell content offset of an empty page wants to be 65536.
+  ** However, that integer is too large to be stored in a 2-byte unsigned
+  ** integer, so a value of 0 is used in its place. */
+  top = get2byteNotZero(&data[hdr+5]);
+  if( gap>top ) return SQLITE_CORRUPT_BKPT;
 
   /* If there is enough space between gap and top for one more cell pointer
   ** array entry offset, and if the freelist is not empty, then search the
@@ -53488,33 +54027,14 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
   testcase( gap+1==top );
   testcase( gap==top );
   if( gap+2<=top && (data[hdr+1] || data[hdr+2]) ){
-    int pc, addr;
-    for(addr=hdr+1; (pc = get2byte(&data[addr]))>0; addr=pc){
-      int size;            /* Size of the free slot */
-      if( pc>usableSize-4 || pc<addr+4 ){
-        return SQLITE_CORRUPT_BKPT;
-      }
-      size = get2byte(&data[pc+2]);
-      if( size>=nByte ){
-        int x = size - nByte;
-        testcase( x==4 );
-        testcase( x==3 );
-        if( x<4 ){
-          if( data[hdr+7]>=60 ) goto defragment_page;
-          /* Remove the slot from the free-list. Update the number of
-          ** fragmented bytes within the page. */
-          memcpy(&data[addr], &data[pc], 2);
-          data[hdr+7] += (u8)x;
-        }else if( size+pc > usableSize ){
-          return SQLITE_CORRUPT_BKPT;
-        }else{
-          /* The slot remains on the free-list. Reduce its size to account
-          ** for the portion used by the new allocation. */
-          put2byte(&data[pc+2], x);
-        }
-        *pIdx = pc + x;
-        return SQLITE_OK;
-      }
+    int bDefrag = 0;
+    u8 *pSpace = pageFindSlot(pPage, nByte, &rc, &bDefrag);
+    if( rc ) return rc;
+    if( bDefrag ) goto defragment_page;
+    if( pSpace ){
+      assert( pSpace>=data && (pSpace - data)<65536 );
+      *pIdx = (int)(pSpace - data);
+      return SQLITE_OK;
     }
   }
 
@@ -53523,8 +54043,8 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
   */
   testcase( gap+2+nByte==top );
   if( gap+2+nByte>top ){
-defragment_page:
-    testcase( pPage->nCell==0 );
+ defragment_page:
+    assert( pPage->nCell>0 || CORRUPT_DB );
     rc = defragmentPage(pPage);
     if( rc ) return rc;
     top = get2byteNotZero(&data[hdr+5]);
@@ -53571,7 +54091,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
   assert( pPage->pBt!=0 );
   assert( sqlite3PagerIswriteable(pPage->pDbPage) );
   assert( iStart>=pPage->hdrOffset+6+pPage->childPtrSize );
-  assert( iEnd <= pPage->pBt->usableSize );
+  assert( CORRUPT_DB || iEnd <= pPage->pBt->usableSize );
   assert( sqlite3_mutex_held(pPage->pBt->mutex) );
   assert( iSize>=4 );   /* Minimum cell size is 4 */
   assert( iStart<=iLast );
@@ -53666,18 +54186,32 @@ static int decodeFlags(MemPage *pPage, int flagByte){
   pPage->childPtrSize = 4-4*pPage->leaf;
   pBt = pPage->pBt;
   if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){
+    /* EVIDENCE-OF: R-03640-13415 A value of 5 means the page is an interior
+    ** table b-tree page. */
+    assert( (PTF_LEAFDATA|PTF_INTKEY)==5 );
+    /* EVIDENCE-OF: R-20501-61796 A value of 13 means the page is a leaf
+    ** table b-tree page. */
+    assert( (PTF_LEAFDATA|PTF_INTKEY|PTF_LEAF)==13 );
     pPage->intKey = 1;
     pPage->intKeyLeaf = pPage->leaf;
     pPage->noPayload = !pPage->leaf;
     pPage->maxLocal = pBt->maxLeaf;
     pPage->minLocal = pBt->minLeaf;
   }else if( flagByte==PTF_ZERODATA ){
+    /* EVIDENCE-OF: R-27225-53936 A value of 2 means the page is an interior
+    ** index b-tree page. */
+    assert( (PTF_ZERODATA)==2 );
+    /* EVIDENCE-OF: R-16571-11615 A value of 10 means the page is a leaf
+    ** index b-tree page. */
+    assert( (PTF_ZERODATA|PTF_LEAF)==10 );
     pPage->intKey = 0;
     pPage->intKeyLeaf = 0;
     pPage->noPayload = 0;
     pPage->maxLocal = pBt->maxLocal;
     pPage->minLocal = pBt->minLocal;
   }else{
+    /* EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is
+    ** an error. */
     return SQLITE_CORRUPT_BKPT;
   }
   pPage->max1bytePayload = pBt->max1bytePayload;
@@ -53717,21 +54251,33 @@ static int btreeInitPage(MemPage *pPage){
 
     hdr = pPage->hdrOffset;
     data = pPage->aData;
+    /* EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating
+    ** the b-tree page type. */
     if( decodeFlags(pPage, data[hdr]) ) return SQLITE_CORRUPT_BKPT;
     assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );
     pPage->maskPage = (u16)(pBt->pageSize - 1);
     pPage->nOverflow = 0;
     usableSize = pBt->usableSize;
-    pPage->cellOffset = cellOffset = hdr + 12 - 4*pPage->leaf;
+    pPage->cellOffset = cellOffset = hdr + 8 + pPage->childPtrSize;
     pPage->aDataEnd = &data[usableSize];
     pPage->aCellIdx = &data[cellOffset];
+    /* EVIDENCE-OF: R-58015-48175 The two-byte integer at offset 5 designates
+    ** the start of the cell content area. A zero value for this integer is
+    ** interpreted as 65536. */
     top = get2byteNotZero(&data[hdr+5]);
+    /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
+    ** number of cells on the page. */
     pPage->nCell = get2byte(&data[hdr+3]);
     if( pPage->nCell>MX_CELL(pBt) ){
       /* To many cells for a single page.  The page must be corrupt */
       return SQLITE_CORRUPT_BKPT;
     }
     testcase( pPage->nCell==MX_CELL(pBt) );
+    /* EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only
+    ** possible for a root page of a table that contains no rows) then the
+    ** offset to the cell content area will equal the page size minus the
+    ** bytes of reserved space. */
+    assert( pPage->nCell>0 || top==usableSize || CORRUPT_DB );
 
     /* A malformed database page might cause us to read past the end
     ** of page when parsing a cell.  
@@ -53765,13 +54311,20 @@ static int btreeInitPage(MemPage *pPage){
     }  
 #endif
 
-    /* Compute the total free space on the page */
+    /* Compute the total free space on the page
+    ** EVIDENCE-OF: R-23588-34450 The two-byte integer at offset 1 gives the
+    ** start of the first freeblock on the page, or is zero if there are no
+    ** freeblocks. */
     pc = get2byte(&data[hdr+1]);
-    nFree = data[hdr+7] + top;
+    nFree = data[hdr+7] + top;  /* Init nFree to non-freeblock free space */
     while( pc>0 ){
       u16 next, size;
       if( pc<iCellFirst || pc>iCellLast ){
-        /* Start of free block is off the page */
+        /* EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will
+        ** always be at least one cell before the first freeblock.
+        **
+        ** Or, the freeblock is off the end of the page
+        */
         return SQLITE_CORRUPT_BKPT; 
       }
       next = get2byte(&data[pc]);
@@ -54177,6 +54730,9 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
 #ifdef SQLITE_SECURE_DELETE
     pBt->btsFlags |= BTS_SECURE_DELETE;
 #endif
+    /* EVIDENCE-OF: R-51873-39618 The page size for a database file is
+    ** determined by the 2-byte integer located at an offset of 16 bytes from
+    ** the beginning of the database file. */
     pBt->pageSize = (zDbHeader[16]<<8) | (zDbHeader[17]<<16);
     if( pBt->pageSize<512 || pBt->pageSize>SQLITE_MAX_PAGE_SIZE
          || ((pBt->pageSize-1)&pBt->pageSize)!=0 ){
@@ -54195,6 +54751,9 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
 #endif
       nReserve = 0;
     }else{
+      /* EVIDENCE-OF: R-37497-42412 The size of the reserved region is
+      ** determined by the one-byte unsigned integer found at an offset of 20
+      ** into the database file header. */
       nReserve = zDbHeader[20];
       pBt->btsFlags |= BTS_PAGESIZE_FIXED;
 #ifndef SQLITE_OMIT_AUTOVACUUM
@@ -54392,7 +54951,7 @@ SQLITE_PRIVATE int sqlite3BtreeClose(Btree *p){
   ** The call to sqlite3BtreeRollback() drops any table-locks held by
   ** this handle.
   */
-  sqlite3BtreeRollback(p, SQLITE_OK);
+  sqlite3BtreeRollback(p, SQLITE_OK, 0);
   sqlite3BtreeLeave(p);
 
   /* If there are still other outstanding references to the shared-btree
@@ -54704,6 +55263,9 @@ static int lockBtree(BtShared *pBt){
     u32 usableSize;
     u8 *page1 = pPage1->aData;
     rc = SQLITE_NOTADB;
+    /* EVIDENCE-OF: R-43737-39999 Every valid SQLite database file begins
+    ** with the following 16 bytes (in hex): 53 51 4c 69 74 65 20 66 6f 72 6d
+    ** 61 74 20 33 00. */
     if( memcmp(page1, zMagicHeader, 16)!=0 ){
       goto page1_init_failed;
     }
@@ -54744,15 +55306,21 @@ static int lockBtree(BtShared *pBt){
     }
 #endif
 
-    /* The maximum embedded fraction must be exactly 25%.  And the minimum
-    ** embedded fraction must be 12.5% for both leaf-data and non-leaf-data.
+    /* EVIDENCE-OF: R-15465-20813 The maximum and minimum embedded payload
+    ** fractions and the leaf payload fraction values must be 64, 32, and 32.
+    **
     ** The original design allowed these amounts to vary, but as of
     ** version 3.6.0, we require them to be fixed.
     */
     if( memcmp(&page1[21], "\100\040\040",3)!=0 ){
       goto page1_init_failed;
     }
+    /* EVIDENCE-OF: R-51873-39618 The page size for a database file is
+    ** determined by the 2-byte integer located at an offset of 16 bytes from
+    ** the beginning of the database file. */
     pageSize = (page1[16]<<8) | (page1[17]<<16);
+    /* EVIDENCE-OF: R-25008-21688 The size of a page is a power of two
+    ** between 512 and 65536 inclusive. */
     if( ((pageSize-1)&pageSize)!=0
      || pageSize>SQLITE_MAX_PAGE_SIZE 
      || pageSize<=256 
@@ -54760,6 +55328,13 @@ static int lockBtree(BtShared *pBt){
       goto page1_init_failed;
     }
     assert( (pageSize & 7)==0 );
+    /* EVIDENCE-OF: R-59310-51205 The "reserved space" size in the 1-byte
+    ** integer at offset 20 is the number of bytes of space at the end of
+    ** each page to reserve for extensions. 
+    **
+    ** EVIDENCE-OF: R-37497-42412 The size of the reserved region is
+    ** determined by the one-byte unsigned integer found at an offset of 20
+    ** into the database file header. */
     usableSize = pageSize - page1[20];
     if( (u32)pageSize!=pBt->pageSize ){
       /* After reading the first page of the database assuming a page size
@@ -54780,6 +55355,9 @@ static int lockBtree(BtShared *pBt){
       rc = SQLITE_CORRUPT_BKPT;
       goto page1_init_failed;
     }
+    /* EVIDENCE-OF: R-28312-64704 However, the usable size is not allowed to
+    ** be less than 480. In other words, if the page size is 512, then the
+    ** reserved space size cannot exceed 32. */
     if( usableSize<480 ){
       goto page1_init_failed;
     }
@@ -55660,6 +56238,7 @@ SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){
       sqlite3BtreeLeave(p);
       return rc;
     }
+    p->iDataVersion--;  /* Compensate for pPager->iDataVersion++; */
     pBt->inTransaction = TRANS_READ;
     btreeClearHasContent(pBt);
   }
@@ -55685,60 +56264,91 @@ SQLITE_PRIVATE int sqlite3BtreeCommit(Btree *p){
 
 /*
 ** This routine sets the state to CURSOR_FAULT and the error
-** code to errCode for every cursor on BtShared that pBtree
-** references.
-**
-** Every cursor is tripped, including cursors that belong
-** to other database connections that happen to be sharing
-** the cache with pBtree.
-**
-** This routine gets called when a rollback occurs.
-** All cursors using the same cache must be tripped
-** to prevent them from trying to use the btree after
-** the rollback.  The rollback may have deleted tables
-** or moved root pages, so it is not sufficient to
-** save the state of the cursor.  The cursor must be
-** invalidated.
-*/
-SQLITE_PRIVATE void sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode){
+** code to errCode for every cursor on any BtShared that pBtree
+** references.  Or if the writeOnly flag is set to 1, then only
+** trip write cursors and leave read cursors unchanged.
+**
+** Every cursor is a candidate to be tripped, including cursors
+** that belong to other database connections that happen to be
+** sharing the cache with pBtree.
+**
+** This routine gets called when a rollback occurs. If the writeOnly
+** flag is true, then only write-cursors need be tripped - read-only
+** cursors save their current positions so that they may continue 
+** following the rollback. Or, if writeOnly is false, all cursors are 
+** tripped. In general, writeOnly is false if the transaction being
+** rolled back modified the database schema. In this case b-tree root
+** pages may be moved or deleted from the database altogether, making
+** it unsafe for read cursors to continue.
+**
+** If the writeOnly flag is true and an error is encountered while 
+** saving the current position of a read-only cursor, all cursors, 
+** including all read-cursors are tripped.
+**
+** SQLITE_OK is returned if successful, or if an error occurs while
+** saving a cursor position, an SQLite error code.
+*/
+SQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode, int writeOnly){
   BtCursor *p;
-  if( pBtree==0 ) return;
-  sqlite3BtreeEnter(pBtree);
-  for(p=pBtree->pBt->pCursor; p; p=p->pNext){
-    int i;
-    sqlite3BtreeClearCursor(p);
-    p->eState = CURSOR_FAULT;
-    p->skipNext = errCode;
-    for(i=0; i<=p->iPage; i++){
-      releasePage(p->apPage[i]);
-      p->apPage[i] = 0;
+  int rc = SQLITE_OK;
+
+  assert( (writeOnly==0 || writeOnly==1) && BTCF_WriteFlag==1 );
+  if( pBtree ){
+    sqlite3BtreeEnter(pBtree);
+    for(p=pBtree->pBt->pCursor; p; p=p->pNext){
+      int i;
+      if( writeOnly && (p->curFlags & BTCF_WriteFlag)==0 ){
+        if( p->eState==CURSOR_VALID ){
+          rc = saveCursorPosition(p);
+          if( rc!=SQLITE_OK ){
+            (void)sqlite3BtreeTripAllCursors(pBtree, rc, 0);
+            break;
+          }
+        }
+      }else{
+        sqlite3BtreeClearCursor(p);
+        p->eState = CURSOR_FAULT;
+        p->skipNext = errCode;
+      }
+      for(i=0; i<=p->iPage; i++){
+        releasePage(p->apPage[i]);
+        p->apPage[i] = 0;
+      }
     }
+    sqlite3BtreeLeave(pBtree);
   }
-  sqlite3BtreeLeave(pBtree);
+  return rc;
 }
 
 /*
-** Rollback the transaction in progress.  All cursors will be
-** invalided by this operation.  Any attempt to use a cursor
-** that was open at the beginning of this operation will result
-** in an error.
+** Rollback the transaction in progress.
+**
+** If tripCode is not SQLITE_OK then cursors will be invalidated (tripped).
+** Only write cursors are tripped if writeOnly is true but all cursors are
+** tripped if writeOnly is false.  Any attempt to use
+** a tripped cursor will result in an error.
 **
 ** This will release the write lock on the database file.  If there
 ** are no active cursors, it also releases the read lock.
 */
-SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p, int tripCode){
+SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p, int tripCode, int writeOnly){
   int rc;
   BtShared *pBt = p->pBt;
   MemPage *pPage1;
 
+  assert( writeOnly==1 || writeOnly==0 );
+  assert( tripCode==SQLITE_ABORT_ROLLBACK || tripCode==SQLITE_OK );
   sqlite3BtreeEnter(p);
   if( tripCode==SQLITE_OK ){
     rc = tripCode = saveAllCursors(pBt, 0, 0);
+    if( rc ) writeOnly = 0;
   }else{
     rc = SQLITE_OK;
   }
   if( tripCode ){
-    sqlite3BtreeTripAllCursors(p, tripCode);
+    int rc2 = sqlite3BtreeTripAllCursors(p, tripCode, writeOnly);
+    assert( rc==SQLITE_OK || (writeOnly==0 && rc2==SQLITE_OK) );
+    if( rc2!=SQLITE_OK ) rc = rc2;
   }
   btreeIntegrity(p);
 
@@ -55992,7 +56602,7 @@ SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
       releasePage(pCur->apPage[i]);
     }
     unlockBtreeIfUnused(pBt);
-    sqlite3DbFree(pBtree->db, pCur->aOverflow);
+    sqlite3_free(pCur->aOverflow);
     /* sqlite3_free(pCur); */
     sqlite3BtreeLeave(pBtree);
   }
@@ -56073,13 +56683,9 @@ SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor *pCur){
 */
 SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor *pCur, i64 *pSize){
   assert( cursorHoldsMutex(pCur) );
-  assert( pCur->eState==CURSOR_INVALID || pCur->eState==CURSOR_VALID );
-  if( pCur->eState!=CURSOR_VALID ){
-    *pSize = 0;
-  }else{
-    getCellInfo(pCur);
-    *pSize = pCur->info.nKey;
-  }
+  assert( pCur->eState==CURSOR_VALID );
+  getCellInfo(pCur);
+  *pSize = pCur->info.nKey;
   return SQLITE_OK;
 }
 
@@ -56291,6 +56897,7 @@ static int accessPayload(
     offset -= pCur->info.nLocal;
   }
 
+
   if( rc==SQLITE_OK && amt>0 ){
     const u32 ovflSize = pBt->usableSize - 4;  /* Bytes content per ovfl page */
     Pgno nextPage;
@@ -56308,8 +56915,8 @@ static int accessPayload(
     if( eOp!=2 && (pCur->curFlags & BTCF_ValidOvfl)==0 ){
       int nOvfl = (pCur->info.nPayload-pCur->info.nLocal+ovflSize-1)/ovflSize;
       if( nOvfl>pCur->nOvflAlloc ){
-        Pgno *aNew = (Pgno*)sqlite3DbRealloc(
-            pCur->pBtree->db, pCur->aOverflow, nOvfl*2*sizeof(Pgno)
+        Pgno *aNew = (Pgno*)sqlite3Realloc(
+            pCur->aOverflow, nOvfl*2*sizeof(Pgno)
         );
         if( aNew==0 ){
           rc = SQLITE_NOMEM;
@@ -56356,6 +56963,7 @@ static int accessPayload(
         */
         assert( eOp!=2 );
         assert( pCur->curFlags & BTCF_ValidOvfl );
+        assert( pCur->pBtree->db==pBt->db );
         if( pCur->aOverflow[iIdx+1] ){
           nextPage = pCur->aOverflow[iIdx+1];
         }else{
@@ -57330,6 +57938,8 @@ static int allocateBtreePage(
   assert( eMode==BTALLOC_ANY || (nearby>0 && IfNotOmitAV(pBt->autoVacuum)) );
   pPage1 = pBt->pPage1;
   mxPage = btreePagecount(pBt);
+  /* EVIDENCE-OF: R-05119-02637 The 4-byte big-endian integer at offset 36
+  ** stores stores the total number of pages on the freelist. */
   n = get4byte(&pPage1->aData[36]);
   testcase( n==mxPage-1 );
   if( n>=mxPage ){
@@ -57376,8 +57986,14 @@ static int allocateBtreePage(
     do {
       pPrevTrunk = pTrunk;
       if( pPrevTrunk ){
+        /* EVIDENCE-OF: R-01506-11053 The first integer on a freelist trunk page
+        ** is the page number of the next freelist trunk page in the list or
+        ** zero if this is the last freelist trunk page. */
         iTrunk = get4byte(&pPrevTrunk->aData[0]);
       }else{
+        /* EVIDENCE-OF: R-59841-13798 The 4-byte big-endian integer at offset 32
+        ** stores the page number of the first page of the freelist, or zero if
+        ** the freelist is empty. */
         iTrunk = get4byte(&pPage1->aData[32]);
       }
       testcase( iTrunk==mxPage );
@@ -57392,8 +58008,9 @@ static int allocateBtreePage(
       }
       assert( pTrunk!=0 );
       assert( pTrunk->aData!=0 );
-
-      k = get4byte(&pTrunk->aData[4]); /* # of leaves on this trunk page */
+      /* EVIDENCE-OF: R-13523-04394 The second integer on a freelist trunk page
+      ** is the number of leaf page pointers to follow. */
+      k = get4byte(&pTrunk->aData[4]);
       if( k==0 && !searchList ){
         /* The trunk has no leaves and the list is not being searched. 
         ** So extract the trunk page itself and use it as the newly 
@@ -57711,6 +58328,11 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
       ** for now.  At some point in the future (once everyone has upgraded
       ** to 3.6.0 or later) we should consider fixing the conditional above
       ** to read "usableSize/4-2" instead of "usableSize/4-8".
+      **
+      ** EVIDENCE-OF: R-19920-11576 However, newer versions of SQLite still
+      ** avoid using the last six entries in the freelist trunk page array in
+      ** order that database files created by newer versions of SQLite can be
+      ** read by older versions of SQLite.
       */
       rc = sqlite3PagerWrite(pTrunk->pDbPage);
       if( rc==SQLITE_OK ){
@@ -58062,9 +58684,17 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
     return;
   }
   pPage->nCell--;
-  memmove(ptr, ptr+2, 2*(pPage->nCell - idx));
-  put2byte(&data[hdr+3], pPage->nCell);
-  pPage->nFree += 2;
+  if( pPage->nCell==0 ){
+    memset(&data[hdr+1], 0, 4);
+    data[hdr+7] = 0;
+    put2byte(&data[hdr+5], pPage->pBt->usableSize);
+    pPage->nFree = pPage->pBt->usableSize - pPage->hdrOffset
+                       - pPage->childPtrSize - 8;
+  }else{
+    memmove(ptr, ptr+2, 2*(pPage->nCell - idx));
+    put2byte(&data[hdr+3], pPage->nCell);
+    pPage->nFree += 2;
+  }
 }
 
 /*
@@ -58159,45 +58789,271 @@ static void insertCell(
 }
 
 /*
-** Add a list of cells to a page.  The page should be initially empty.
-** The cells are guaranteed to fit on the page.
+** Array apCell[] contains pointers to nCell b-tree page cells. The 
+** szCell[] array contains the size in bytes of each cell. This function
+** replaces the current contents of page pPg with the contents of the cell
+** array.
+**
+** Some of the cells in apCell[] may currently be stored in pPg. This
+** function works around problems caused by this by making a copy of any 
+** such cells before overwriting the page data.
+**
+** The MemPage.nFree field is invalidated by this function. It is the 
+** responsibility of the caller to set it correctly.
 */
-static void assemblePage(
-  MemPage *pPage,   /* The page to be assembled */
-  int nCell,        /* The number of cells to add to this page */
-  u8 **apCell,      /* Pointers to cell bodies */
-  u16 *aSize        /* Sizes of the cells */
+static void rebuildPage(
+  MemPage *pPg,                   /* Edit this page */
+  int nCell,                      /* Final number of cells on page */
+  u8 **apCell,                    /* Array of cells */
+  u16 *szCell                     /* Array of cell sizes */
 ){
-  int i;            /* Loop counter */
-  u8 *pCellptr;     /* Address of next cell pointer */
-  int cellbody;     /* Address of next cell body */
-  u8 * const data = pPage->aData;             /* Pointer to data for pPage */
-  const int hdr = pPage->hdrOffset;           /* Offset of header on pPage */
-  const int nUsable = pPage->pBt->usableSize; /* Usable size of page */
+  const int hdr = pPg->hdrOffset;          /* Offset of header on pPg */
+  u8 * const aData = pPg->aData;           /* Pointer to data for pPg */
+  const int usableSize = pPg->pBt->usableSize;
+  u8 * const pEnd = &aData[usableSize];
+  int i;
+  u8 *pCellptr = pPg->aCellIdx;
+  u8 *pTmp = sqlite3PagerTempSpace(pPg->pBt->pPager);
+  u8 *pData;
 
-  assert( pPage->nOverflow==0 );
-  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
-  assert( nCell>=0 && nCell<=(int)MX_CELL(pPage->pBt)
-            && (int)MX_CELL(pPage->pBt)<=10921);
-  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+  i = get2byte(&aData[hdr+5]);
+  memcpy(&pTmp[i], &aData[i], usableSize - i);
+
+  pData = pEnd;
+  for(i=0; i<nCell; i++){
+    u8 *pCell = apCell[i];
+    if( pCell>aData && pCell<pEnd ){
+      pCell = &pTmp[pCell - aData];
+    }
+    pData -= szCell[i];
+    memcpy(pData, pCell, szCell[i]);
+    put2byte(pCellptr, (pData - aData));
+    pCellptr += 2;
+    assert( szCell[i]==cellSizePtr(pPg, pCell) );
+  }
+
+  /* The pPg->nFree field is now set incorrectly. The caller will fix it. */
+  pPg->nCell = nCell;
+  pPg->nOverflow = 0;
+
+  put2byte(&aData[hdr+1], 0);
+  put2byte(&aData[hdr+3], pPg->nCell);
+  put2byte(&aData[hdr+5], pData - aData);
+  aData[hdr+7] = 0x00;
+}
+
+/*
+** Array apCell[] contains nCell pointers to b-tree cells. Array szCell
+** contains the size in bytes of each such cell. This function attempts to 
+** add the cells stored in the array to page pPg. If it cannot (because 
+** the page needs to be defragmented before the cells will fit), non-zero
+** is returned. Otherwise, if the cells are added successfully, zero is
+** returned.
+**
+** Argument pCellptr points to the first entry in the cell-pointer array
+** (part of page pPg) to populate. After cell apCell[0] is written to the
+** page body, a 16-bit offset is written to pCellptr. And so on, for each
+** cell in the array. It is the responsibility of the caller to ensure
+** that it is safe to overwrite this part of the cell-pointer array.
+**
+** When this function is called, *ppData points to the start of the 
+** content area on page pPg. If the size of the content area is extended,
+** *ppData is updated to point to the new start of the content area
+** before returning.
+**
+** Finally, argument pBegin points to the byte immediately following the
+** end of the space required by this page for the cell-pointer area (for
+** all cells - not just those inserted by the current call). If the content
+** area must be extended to before this point in order to accomodate all
+** cells in apCell[], then the cells do not fit and non-zero is returned.
+*/
+static int pageInsertArray(
+  MemPage *pPg,                   /* Page to add cells to */
+  u8 *pBegin,                     /* End of cell-pointer array */
+  u8 **ppData,                    /* IN/OUT: Page content -area pointer */
+  u8 *pCellptr,                   /* Pointer to cell-pointer area */
+  int nCell,                      /* Number of cells to add to pPg */
+  u8 **apCell,                    /* Array of cells */
+  u16 *szCell                     /* Array of cell sizes */
+){
+  int i;
+  u8 *aData = pPg->aData;
+  u8 *pData = *ppData;
+  const int bFreelist = aData[1] || aData[2];
+  assert( CORRUPT_DB || pPg->hdrOffset==0 );    /* Never called on page 1 */
+  for(i=0; i<nCell; i++){
+    int sz = szCell[i];
+    int rc;
+    u8 *pSlot;
+    if( bFreelist==0 || (pSlot = pageFindSlot(pPg, sz, &rc, 0))==0 ){
+      pData -= sz;
+      if( pData<pBegin ) return 1;
+      pSlot = pData;
+    }
+    memcpy(pSlot, apCell[i], sz);
+    put2byte(pCellptr, (pSlot - aData));
+    pCellptr += 2;
+  }
+  *ppData = pData;
+  return 0;
+}
+
+/*
+** Array apCell[] contains nCell pointers to b-tree cells. Array szCell 
+** contains the size in bytes of each such cell. This function adds the
+** space associated with each cell in the array that is currently stored 
+** within the body of pPg to the pPg free-list. The cell-pointers and other
+** fields of the page are not updated.
+**
+** This function returns the total number of cells added to the free-list.
+*/
+static int pageFreeArray(
+  MemPage *pPg,                   /* Page to edit */
+  int nCell,                      /* Cells to delete */
+  u8 **apCell,                    /* Array of cells */
+  u16 *szCell                     /* Array of cell sizes */
+){
+  u8 * const aData = pPg->aData;
+  u8 * const pEnd = &aData[pPg->pBt->usableSize];
+  u8 * const pStart = &aData[pPg->hdrOffset + 8 + pPg->childPtrSize];
+  int nRet = 0;
+  int i;
+  u8 *pFree = 0;
+  int szFree = 0;
+
+  for(i=0; i<nCell; i++){
+    u8 *pCell = apCell[i];
+    if( pCell>=pStart && pCell<pEnd ){
+      int sz = szCell[i];
+      if( pFree!=(pCell + sz) ){
+        if( pFree ){
+          assert( pFree>aData && (pFree - aData)<65536 );
+          freeSpace(pPg, (u16)(pFree - aData), szFree);
+        }
+        pFree = pCell;
+        szFree = sz;
+        if( pFree+sz>pEnd ) return 0;
+      }else{
+        pFree = pCell;
+        szFree += sz;
+      }
+      nRet++;
+    }
+  }
+  if( pFree ){
+    assert( pFree>aData && (pFree - aData)<65536 );
+    freeSpace(pPg, (u16)(pFree - aData), szFree);
+  }
+  return nRet;
+}
+
+/*
+** apCell[] and szCell[] contains pointers to and sizes of all cells in the
+** pages being balanced.  The current page, pPg, has pPg->nCell cells starting
+** with apCell[iOld].  After balancing, this page should hold nNew cells
+** starting at apCell[iNew].
+**
+** This routine makes the necessary adjustments to pPg so that it contains
+** the correct cells after being balanced.
+**
+** The pPg->nFree field is invalid when this function returns. It is the
+** responsibility of the caller to set it correctly.
+*/
+static void editPage(
+  MemPage *pPg,                   /* Edit this page */
+  int iOld,                       /* Index of first cell currently on page */
+  int iNew,                       /* Index of new first cell on page */
+  int nNew,                       /* Final number of cells on page */
+  u8 **apCell,                    /* Array of cells */
+  u16 *szCell                     /* Array of cell sizes */
+){
+  u8 * const aData = pPg->aData;
+  const int hdr = pPg->hdrOffset;
+  u8 *pBegin = &pPg->aCellIdx[nNew * 2];
+  int nCell = pPg->nCell;       /* Cells stored on pPg */
+  u8 *pData;
+  u8 *pCellptr;
+  int i;
+  int iOldEnd = iOld + pPg->nCell + pPg->nOverflow;
+  int iNewEnd = iNew + nNew;
+
+#ifdef SQLITE_DEBUG
+  u8 *pTmp = sqlite3PagerTempSpace(pPg->pBt->pPager);
+  memcpy(pTmp, aData, pPg->pBt->usableSize);
+#endif
+
+  /* Remove cells from the start and end of the page */
+  if( iOld<iNew ){
+    int nShift = pageFreeArray(
+        pPg, iNew-iOld, &apCell[iOld], &szCell[iOld]
+    );
+    memmove(pPg->aCellIdx, &pPg->aCellIdx[nShift*2], nCell*2);
+    nCell -= nShift;
+  }
+  if( iNewEnd < iOldEnd ){
+    nCell -= pageFreeArray(
+        pPg, iOldEnd-iNewEnd, &apCell[iNewEnd], &szCell[iNewEnd]
+    );
+  }
+
+  pData = &aData[get2byteNotZero(&aData[hdr+5])];
+  if( pData<pBegin ) goto editpage_fail;
+
+  /* Add cells to the start of the page */
+  if( iNew<iOld ){
+    int nAdd = MIN(nNew,iOld-iNew);
+    assert( (iOld-iNew)<nNew || nCell==0 || CORRUPT_DB );
+    pCellptr = pPg->aCellIdx;
+    memmove(&pCellptr[nAdd*2], pCellptr, nCell*2);
+    if( pageInsertArray(
+          pPg, pBegin, &pData, pCellptr,
+          nAdd, &apCell[iNew], &szCell[iNew]
+    ) ) goto editpage_fail;
+    nCell += nAdd;
+  }
+
+  /* Add any overflow cells */
+  for(i=0; i<pPg->nOverflow; i++){
+    int iCell = (iOld + pPg->aiOvfl[i]) - iNew;
+    if( iCell>=0 && iCell<nNew ){
+      pCellptr = &pPg->aCellIdx[iCell * 2];
+      memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
+      nCell++;
+      if( pageInsertArray(
+            pPg, pBegin, &pData, pCellptr,
+            1, &apCell[iCell + iNew], &szCell[iCell + iNew]
+      ) ) goto editpage_fail;
+    }
+  }
+
+  /* Append cells to the end of the page */
+  pCellptr = &pPg->aCellIdx[nCell*2];
+  if( pageInsertArray(
+        pPg, pBegin, &pData, pCellptr,
+        nNew-nCell, &apCell[iNew+nCell], &szCell[iNew+nCell]
+  ) ) goto editpage_fail;
 
-  /* Check that the page has just been zeroed by zeroPage() */
-  assert( pPage->nCell==0 );
-  assert( get2byteNotZero(&data[hdr+5])==nUsable );
+  pPg->nCell = nNew;
+  pPg->nOverflow = 0;
 
-  pCellptr = &pPage->aCellIdx[nCell*2];
-  cellbody = nUsable;
-  for(i=nCell-1; i>=0; i--){
-    u16 sz = aSize[i];
-    pCellptr -= 2;
-    cellbody -= sz;
-    put2byte(pCellptr, cellbody);
-    memcpy(&data[cellbody], apCell[i], sz);
+  put2byte(&aData[hdr+3], pPg->nCell);
+  put2byte(&aData[hdr+5], pData - aData);
+
+#ifdef SQLITE_DEBUG
+  for(i=0; i<nNew && !CORRUPT_DB; i++){
+    u8 *pCell = apCell[i+iNew];
+    int iOff = get2byte(&pPg->aCellIdx[i*2]);
+    if( pCell>=aData && pCell<&aData[pPg->pBt->usableSize] ){
+      pCell = &pTmp[pCell - aData];
+    }
+    assert( 0==memcmp(pCell, &aData[iOff], szCell[i+iNew]) );
   }
-  put2byte(&data[hdr+3], nCell);
-  put2byte(&data[hdr+5], cellbody);
-  pPage->nFree -= (nCell*2 + nUsable - cellbody);
-  pPage->nCell = (u16)nCell;
+#endif
+
+  return;
+ editpage_fail:
+  /* Unable to edit this page. Rebuild it from scratch instead. */
+  rebuildPage(pPg, nNew, &apCell[iNew], &szCell[iNew]);
 }
 
 /*
@@ -58251,7 +59107,7 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
   assert( pPage->nOverflow==1 );
 
   /* This error condition is now caught prior to reaching this function */
-  if( pPage->nCell==0 ) return SQLITE_CORRUPT_BKPT;
+  if( NEVER(pPage->nCell==0) ) return SQLITE_CORRUPT_BKPT;
 
   /* Allocate a new page. This page will become the right-sibling of 
   ** pPage. Make the parent page writable, so that the new divider cell
@@ -58269,7 +59125,8 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
     assert( sqlite3PagerIswriteable(pNew->pDbPage) );
     assert( pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) );
     zeroPage(pNew, PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF);
-    assemblePage(pNew, 1, &pCell, &szCell);
+    rebuildPage(pNew, 1, &pCell, &szCell);
+    pNew->nFree = pBt->usableSize - pNew->cellOffset - 2 - szCell;
 
     /* If this is an auto-vacuum database, update the pointer map
     ** with entries for the new page, and any pointer from the 
@@ -58488,17 +59345,22 @@ static int balance_nonroot(
   int iOvflSpace = 0;          /* First unused byte of aOvflSpace[] */
   int szScratch;               /* Size of scratch memory requested */
   MemPage *apOld[NB];          /* pPage and up to two siblings */
-  MemPage *apCopy[NB];         /* Private copies of apOld[] pages */
   MemPage *apNew[NB+2];        /* pPage and up to NB siblings after balancing */
   u8 *pRight;                  /* Location in parent of right-sibling pointer */
   u8 *apDiv[NB-1];             /* Divider cells in pParent */
   int cntNew[NB+2];            /* Index in aCell[] of cell after i-th page */
-  int szNew[NB+2];             /* Combined size of cells place on i-th page */
+  int cntOld[NB+2];            /* Old index in aCell[] after i-th page */
+  int szNew[NB+2];             /* Combined size of cells placed on i-th page */
   u8 **apCell = 0;             /* All cells begin balanced */
   u16 *szCell;                 /* Local size of all cells in apCell[] */
   u8 *aSpace1;                 /* Space for copies of dividers cells */
   Pgno pgno;                   /* Temp var to store a page number in */
+  u8 abDone[NB+2];             /* True after i'th new page is populated */
+  Pgno aPgno[NB+2];            /* Page numbers of new pages before shuffling */
+  Pgno aPgOrder[NB+2];         /* Copy of aPgno[] used for sorting pages */
+  u16 aPgFlags[NB+2];          /* flags field of new pages before shuffling */
 
+  memset(abDone, 0, sizeof(abDone));
   pBt = pParent->pBt;
   assert( sqlite3_mutex_held(pBt->mutex) );
   assert( sqlite3PagerIswriteable(pParent->pDbPage) );
@@ -58607,12 +59469,14 @@ static int balance_nonroot(
   /*
   ** Allocate space for memory structures
   */
-  k = pBt->pageSize + ROUND8(sizeof(MemPage));
   szScratch =
        nMaxCells*sizeof(u8*)                       /* apCell */
      + nMaxCells*sizeof(u16)                       /* szCell */
-     + pBt->pageSize                               /* aSpace1 */
-     + k*nOld;                                     /* Page copies (apCopy) */
+     + pBt->pageSize;                              /* aSpace1 */
+
+  /* EVIDENCE-OF: R-28375-38319 SQLite will never request a scratch buffer
+  ** that is more than 6 times the database page size. */
+  assert( szScratch<=6*(int)pBt->pageSize );
   apCell = sqlite3ScratchMalloc( szScratch ); 
   if( apCell==0 ){
     rc = SQLITE_NOMEM;
@@ -58625,8 +59489,8 @@ static int balance_nonroot(
   /*
   ** Load pointers to all cells on sibling pages and the divider cells
   ** into the local apCell[] array.  Make copies of the divider cells
-  ** into space obtained from aSpace1[] and remove the divider cells
-  ** from pParent.
+  ** into space obtained from aSpace1[]. The divider cells have already
+  ** been removed from pParent.
   **
   ** If the siblings are on leaf pages, then the child pointers of the
   ** divider cells are stripped from the cells before they are copied
@@ -58642,15 +59506,7 @@ static int balance_nonroot(
   leafData = apOld[0]->intKeyLeaf;
   for(i=0; i<nOld; i++){
     int limit;
-    
-    /* Before doing anything else, take a copy of the i'th original sibling
-    ** The rest of this function will use data from the copies rather
-    ** that the original pages since the original pages will be in the
-    ** process of being overwritten.  */
-    MemPage *pOld = apCopy[i] = (MemPage*)&aSpace1[pBt->pageSize + k*i];
-    memcpy(pOld, apOld[i], sizeof(MemPage));
-    pOld->aData = (void*)&pOld[1];
-    memcpy(pOld->aData, apOld[i]->aData, pBt->pageSize);
+    MemPage *pOld = apOld[i];
 
     limit = pOld->nCell+pOld->nOverflow;
     if( pOld->nOverflow>0 ){
@@ -58671,6 +59527,7 @@ static int balance_nonroot(
         nCell++;
       }
     }       
+    cntOld[i] = nCell;
     if( i<nOld-1 && !leafData){
       u16 sz = (u16)szNew[i];
       u8 *pTemp;
@@ -58693,7 +59550,11 @@ static int balance_nonroot(
       }else{
         assert( leafCorrection==4 );
         if( szCell[nCell]<4 ){
-          /* Do not allow any cells smaller than 4 bytes. */
+          /* Do not allow any cells smaller than 4 bytes. If a smaller cell
+          ** does exist, pad it with 0x00 bytes. */
+          assert( szCell[nCell]==3 );
+          assert( apCell[nCell]==&aSpace1[iSpace1-3] );
+          aSpace1[iSpace1++] = 0x00;
           szCell[nCell] = 4;
         }
       }
@@ -58722,7 +59583,7 @@ static int balance_nonroot(
     assert( i<nMaxCells );
     subtotal += szCell[i] + 2;
     if( subtotal > usableSpace ){
-      szNew[k] = subtotal - szCell[i];
+      szNew[k] = subtotal - szCell[i] - 2;
       cntNew[k] = i;
       if( leafData ){ i--; }
       subtotal = 0;
@@ -58736,9 +59597,10 @@ static int balance_nonroot(
 
   /*
   ** The packing computed by the previous block is biased toward the siblings
-  ** on the left side.  The left siblings are always nearly full, while the
-  ** right-most sibling might be nearly empty.  This block of code attempts
-  ** to adjust the packing of siblings to get a better balance.
+  ** on the left side (siblings with smaller keys). The left siblings are
+  ** always nearly full, while the right-most sibling might be nearly empty.
+  ** The next block of code attempts to adjust the packing of siblings to
+  ** get a better balance.
   **
   ** This adjustment is more than an optimization.  The packing above might
   ** be so out of balance as to be illegal.  For example, the right-most
@@ -58767,22 +59629,18 @@ static int balance_nonroot(
     szNew[i-1] = szLeft;
   }
 
-  /* Either we found one or more cells (cntnew[0])>0) or pPage is
-  ** a virtual root page.  A virtual root page is when the real root
-  ** page is page 1 and we are the only child of that page.
-  **
-  ** UPDATE:  The assert() below is not necessarily true if the database
-  ** file is corrupt.  The corruption will be detected and reported later
-  ** in this procedure so there is no need to act upon it now.
+  /* Sanity check:  For a non-corrupt database file one of the follwing
+  ** must be true:
+  **    (1) We found one or more cells (cntNew[0])>0), or
+  **    (2) pPage is a virtual root page.  A virtual root page is when
+  **        the real root page is page 1 and we are the only child of
+  **        that page.
   */
-#if 0
-  assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) );
-#endif
-
-  TRACE(("BALANCE: old: %d %d %d  ",
-    apOld[0]->pgno, 
-    nOld>=2 ? apOld[1]->pgno : 0,
-    nOld>=3 ? apOld[2]->pgno : 0
+  assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);
+  TRACE(("BALANCE: old: %d(nc=%d) %d(nc=%d) %d(nc=%d)\n",
+    apOld[0]->pgno, apOld[0]->nCell,
+    nOld>=2 ? apOld[1]->pgno : 0, nOld>=2 ? apOld[1]->nCell : 0,
+    nOld>=3 ? apOld[2]->pgno : 0, nOld>=3 ? apOld[2]->nCell : 0
   ));
 
   /*
@@ -58805,8 +59663,10 @@ static int balance_nonroot(
       assert( i>0 );
       rc = allocateBtreePage(pBt, &pNew, &pgno, (bBulk ? 1 : pgno), 0);
       if( rc ) goto balance_cleanup;
+      zeroPage(pNew, pageFlags);
       apNew[i] = pNew;
       nNew++;
+      cntOld[i] = nCell;
 
       /* Set the pointer-map entry for the new sibling page. */
       if( ISAUTOVACUUM ){
@@ -58818,135 +59678,247 @@ static int balance_nonroot(
     }
   }
 
-  /* Free any old pages that were not reused as new pages.
-  */
-  while( i<nOld ){
-    freePage(apOld[i], &rc);
-    if( rc ) goto balance_cleanup;
-    releasePage(apOld[i]);
-    apOld[i] = 0;
-    i++;
-  }
-
   /*
-  ** Put the new pages in ascending order.  This helps to
-  ** keep entries in the disk file in order so that a scan
-  ** of the table is a linear scan through the file.  That
-  ** in turn helps the operating system to deliver pages
-  ** from the disk more rapidly.
+  ** Reassign page numbers so that the new pages are in ascending order. 
+  ** This helps to keep entries in the disk file in order so that a scan
+  ** of the table is closer to a linear scan through the file. That in turn 
+  ** helps the operating system to deliver pages from the disk more rapidly.
   **
-  ** An O(n^2) insertion sort algorithm is used, but since
-  ** n is never more than NB (a small constant), that should
-  ** not be a problem.
+  ** An O(n^2) insertion sort algorithm is used, but since n is never more 
+  ** than (NB+2) (a small constant), that should not be a problem.
   **
-  ** When NB==3, this one optimization makes the database
-  ** about 25% faster for large insertions and deletions.
+  ** When NB==3, this one optimization makes the database about 25% faster 
+  ** for large insertions and deletions.
   */
-  for(i=0; i<k-1; i++){
-    int minV = apNew[i]->pgno;
-    int minI = i;
-    for(j=i+1; j<k; j++){
-      if( apNew[j]->pgno<(unsigned)minV ){
-        minI = j;
-        minV = apNew[j]->pgno;
+  for(i=0; i<nNew; i++){
+    aPgOrder[i] = aPgno[i] = apNew[i]->pgno;
+    aPgFlags[i] = apNew[i]->pDbPage->flags;
+    for(j=0; j<i; j++){
+      if( aPgno[j]==aPgno[i] ){
+        /* This branch is taken if the set of sibling pages somehow contains
+        ** duplicate entries. This can happen if the database is corrupt. 
+        ** It would be simpler to detect this as part of the loop below, but
+        ** we do the detection here in order to avoid populating the pager
+        ** cache with two separate objects associated with the same
+        ** page number.  */
+        assert( CORRUPT_DB );
+        rc = SQLITE_CORRUPT_BKPT;
+        goto balance_cleanup;
       }
     }
-    if( minI>i ){
-      MemPage *pT;
-      pT = apNew[i];
-      apNew[i] = apNew[minI];
-      apNew[minI] = pT;
+  }
+  for(i=0; i<nNew; i++){
+    int iBest = 0;                /* aPgno[] index of page number to use */
+    for(j=1; j<nNew; j++){
+      if( aPgOrder[j]<aPgOrder[iBest] ) iBest = j;
+    }
+    pgno = aPgOrder[iBest];
+    aPgOrder[iBest] = 0xffffffff;
+    if( iBest!=i ){
+      if( iBest>i ){
+        sqlite3PagerRekey(apNew[iBest]->pDbPage, pBt->nPage+iBest+1, 0);
+      }
+      sqlite3PagerRekey(apNew[i]->pDbPage, pgno, aPgFlags[iBest]);
+      apNew[i]->pgno = pgno;
     }
   }
-  TRACE(("new: %d(%d) %d(%d) %d(%d) %d(%d) %d(%d)\n",
-    apNew[0]->pgno, szNew[0],
+
+  TRACE(("BALANCE: new: %d(%d nc=%d) %d(%d nc=%d) %d(%d nc=%d) "
+         "%d(%d nc=%d) %d(%d nc=%d)\n",
+    apNew[0]->pgno, szNew[0], cntNew[0],
     nNew>=2 ? apNew[1]->pgno : 0, nNew>=2 ? szNew[1] : 0,
+    nNew>=2 ? cntNew[1] - cntNew[0] - !leafData : 0,
     nNew>=3 ? apNew[2]->pgno : 0, nNew>=3 ? szNew[2] : 0,
+    nNew>=3 ? cntNew[2] - cntNew[1] - !leafData : 0,
     nNew>=4 ? apNew[3]->pgno : 0, nNew>=4 ? szNew[3] : 0,
-    nNew>=5 ? apNew[4]->pgno : 0, nNew>=5 ? szNew[4] : 0));
+    nNew>=4 ? cntNew[3] - cntNew[2] - !leafData : 0,
+    nNew>=5 ? apNew[4]->pgno : 0, nNew>=5 ? szNew[4] : 0,
+    nNew>=5 ? cntNew[4] - cntNew[3] - !leafData : 0
+  ));
 
   assert( sqlite3PagerIswriteable(pParent->pDbPage) );
   put4byte(pRight, apNew[nNew-1]->pgno);
 
-  /*
-  ** Evenly distribute the data in apCell[] across the new pages.
-  ** Insert divider cells into pParent as necessary.
+  /* If the sibling pages are not leaves, ensure that the right-child pointer
+  ** of the right-most new sibling page is set to the value that was 
+  ** originally in the same field of the right-most old sibling page. */
+  if( (pageFlags & PTF_LEAF)==0 && nOld!=nNew ){
+    MemPage *pOld = (nNew>nOld ? apNew : apOld)[nOld-1];
+    memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);
+  }
+
+  /* Make any required updates to pointer map entries associated with 
+  ** cells stored on sibling pages following the balance operation. Pointer
+  ** map entries associated with divider cells are set by the insertCell()
+  ** routine. The associated pointer map entries are:
+  **
+  **   a) if the cell contains a reference to an overflow chain, the
+  **      entry associated with the first page in the overflow chain, and
+  **
+  **   b) if the sibling pages are not leaves, the child page associated
+  **      with the cell.
+  **
+  ** If the sibling pages are not leaves, then the pointer map entry 
+  ** associated with the right-child of each sibling may also need to be 
+  ** updated. This happens below, after the sibling pages have been 
+  ** populated, not here.
   */
-  j = 0;
-  for(i=0; i<nNew; i++){
-    /* Assemble the new sibling page. */
+  if( ISAUTOVACUUM ){
+    MemPage *pNew = apNew[0];
+    u8 *aOld = pNew->aData;
+    int cntOldNext = pNew->nCell + pNew->nOverflow;
+    int usableSize = pBt->usableSize;
+    int iNew = 0;
+    int iOld = 0;
+
+    for(i=0; i<nCell; i++){
+      u8 *pCell = apCell[i];
+      if( i==cntOldNext ){
+        MemPage *pOld = (++iOld)<nNew ? apNew[iOld] : apOld[iOld];
+        cntOldNext += pOld->nCell + pOld->nOverflow + !leafData;
+        aOld = pOld->aData;
+      }
+      if( i==cntNew[iNew] ){
+        pNew = apNew[++iNew];
+        if( !leafData ) continue;
+      }
+
+      /* Cell pCell is destined for new sibling page pNew. Originally, it
+      ** was either part of sibling page iOld (possibly an overflow cell), 
+      ** or else the divider cell to the left of sibling page iOld. So,
+      ** if sibling page iOld had the same page number as pNew, and if
+      ** pCell really was a part of sibling page iOld (not a divider or
+      ** overflow cell), we can skip updating the pointer map entries.  */
+      if( iOld>=nNew
+       || pNew->pgno!=aPgno[iOld]
+       || pCell<aOld
+       || pCell>=&aOld[usableSize]
+      ){
+        if( !leafCorrection ){
+          ptrmapPut(pBt, get4byte(pCell), PTRMAP_BTREE, pNew->pgno, &rc);
+        }
+        if( szCell[i]>pNew->minLocal ){
+          ptrmapPutOvflPtr(pNew, pCell, &rc);
+        }
+      }
+    }
+  }
+
+  /* Insert new divider cells into pParent. */
+  for(i=0; i<nNew-1; i++){
+    u8 *pCell;
+    u8 *pTemp;
+    int sz;
     MemPage *pNew = apNew[i];
+    j = cntNew[i];
+
     assert( j<nMaxCells );
-    zeroPage(pNew, pageFlags);
-    assemblePage(pNew, cntNew[i]-j, &apCell[j], &szCell[j]);
-    assert( pNew->nCell>0 || (nNew==1 && cntNew[0]==0) );
-    assert( pNew->nOverflow==0 );
+    pCell = apCell[j];
+    sz = szCell[j] + leafCorrection;
+    pTemp = &aOvflSpace[iOvflSpace];
+    if( !pNew->leaf ){
+      memcpy(&pNew->aData[8], pCell, 4);
+    }else if( leafData ){
+      /* If the tree is a leaf-data tree, and the siblings are leaves, 
+      ** then there is no divider cell in apCell[]. Instead, the divider 
+      ** cell consists of the integer key for the right-most cell of 
+      ** the sibling-page assembled above only.
+      */
+      CellInfo info;
+      j--;
+      btreeParseCellPtr(pNew, apCell[j], &info);
+      pCell = pTemp;
+      sz = 4 + putVarint(&pCell[4], info.nKey);
+      pTemp = 0;
+    }else{
+      pCell -= 4;
+      /* Obscure case for non-leaf-data trees: If the cell at pCell was
+      ** previously stored on a leaf node, and its reported size was 4
+      ** bytes, then it may actually be smaller than this 
+      ** (see btreeParseCellPtr(), 4 bytes is the minimum size of
+      ** any cell). But it is important to pass the correct size to 
+      ** insertCell(), so reparse the cell now.
+      **
+      ** Note that this can never happen in an SQLite data file, as all
+      ** cells are at least 4 bytes. It only happens in b-trees used
+      ** to evaluate "IN (SELECT ...)" and similar clauses.
+      */
+      if( szCell[j]==4 ){
+        assert(leafCorrection==4);
+        sz = cellSizePtr(pParent, pCell);
+      }
+    }
+    iOvflSpace += sz;
+    assert( sz<=pBt->maxLocal+23 );
+    assert( iOvflSpace <= (int)pBt->pageSize );
+    insertCell(pParent, nxDiv+i, pCell, sz, pTemp, pNew->pgno, &rc);
+    if( rc!=SQLITE_OK ) goto balance_cleanup;
+    assert( sqlite3PagerIswriteable(pParent->pDbPage) );
+  }
 
-    j = cntNew[i];
+  /* Now update the actual sibling pages. The order in which they are updated
+  ** is important, as this code needs to avoid disrupting any page from which
+  ** cells may still to be read. In practice, this means:
+  **
+  **  (1) If cells are moving left (from apNew[iPg] to apNew[iPg-1])
+  **      then it is not safe to update page apNew[iPg] until after
+  **      the left-hand sibling apNew[iPg-1] has been updated.
+  **
+  **  (2) If cells are moving right (from apNew[iPg] to apNew[iPg+1])
+  **      then it is not safe to update page apNew[iPg] until after
+  **      the right-hand sibling apNew[iPg+1] has been updated.
+  **
+  ** If neither of the above apply, the page is safe to update.
+  **
+  ** The iPg value in the following loop starts at nNew-1 goes down
+  ** to 0, then back up to nNew-1 again, thus making two passes over
+  ** the pages.  On the initial downward pass, only condition (1) above
+  ** needs to be tested because (2) will always be true from the previous
+  ** step.  On the upward pass, both conditions are always true, so the
+  ** upwards pass simply processes pages that were missed on the downward
+  ** pass.
+  */
+  for(i=1-nNew; i<nNew; i++){
+    int iPg = i<0 ? -i : i;
+    assert( iPg>=0 && iPg<nNew );
+    if( abDone[iPg] ) continue;         /* Skip pages already processed */
+    if( i>=0                            /* On the upwards pass, or... */
+     || cntOld[iPg-1]>=cntNew[iPg-1]    /* Condition (1) is true */
+    ){
+      int iNew;
+      int iOld;
+      int nNewCell;
 
-    /* If the sibling page assembled above was not the right-most sibling,
-    ** insert a divider cell into the parent page.
-    */
-    assert( i<nNew-1 || j==nCell );
-    if( j<nCell ){
-      u8 *pCell;
-      u8 *pTemp;
-      int sz;
+      /* Verify condition (1):  If cells are moving left, update iPg
+      ** only after iPg-1 has already been updated. */
+      assert( iPg==0 || cntOld[iPg-1]>=cntNew[iPg-1] || abDone[iPg-1] );
 
-      assert( j<nMaxCells );
-      pCell = apCell[j];
-      sz = szCell[j] + leafCorrection;
-      pTemp = &aOvflSpace[iOvflSpace];
-      if( !pNew->leaf ){
-        memcpy(&pNew->aData[8], pCell, 4);
-      }else if( leafData ){
-        /* If the tree is a leaf-data tree, and the siblings are leaves, 
-        ** then there is no divider cell in apCell[]. Instead, the divider 
-        ** cell consists of the integer key for the right-most cell of 
-        ** the sibling-page assembled above only.
-        */
-        CellInfo info;
-        j--;
-        btreeParseCellPtr(pNew, apCell[j], &info);
-        pCell = pTemp;
-        sz = 4 + putVarint(&pCell[4], info.nKey);
-        pTemp = 0;
+      /* Verify condition (2):  If cells are moving right, update iPg
+      ** only after iPg+1 has already been updated. */
+      assert( cntNew[iPg]>=cntOld[iPg] || abDone[iPg+1] );
+
+      if( iPg==0 ){
+        iNew = iOld = 0;
+        nNewCell = cntNew[0];
       }else{
-        pCell -= 4;
-        /* Obscure case for non-leaf-data trees: If the cell at pCell was
-        ** previously stored on a leaf node, and its reported size was 4
-        ** bytes, then it may actually be smaller than this 
-        ** (see btreeParseCellPtr(), 4 bytes is the minimum size of
-        ** any cell). But it is important to pass the correct size to 
-        ** insertCell(), so reparse the cell now.
-        **
-        ** Note that this can never happen in an SQLite data file, as all
-        ** cells are at least 4 bytes. It only happens in b-trees used
-        ** to evaluate "IN (SELECT ...)" and similar clauses.
-        */
-        if( szCell[j]==4 ){
-          assert(leafCorrection==4);
-          sz = cellSizePtr(pParent, pCell);
-        }
+        iOld = iPg<nOld ? (cntOld[iPg-1] + !leafData) : nCell;
+        iNew = cntNew[iPg-1] + !leafData;
+        nNewCell = cntNew[iPg] - iNew;
       }
-      iOvflSpace += sz;
-      assert( sz<=pBt->maxLocal+23 );
-      assert( iOvflSpace <= (int)pBt->pageSize );
-      insertCell(pParent, nxDiv, pCell, sz, pTemp, pNew->pgno, &rc);
-      if( rc!=SQLITE_OK ) goto balance_cleanup;
-      assert( sqlite3PagerIswriteable(pParent->pDbPage) );
 
-      j++;
-      nxDiv++;
+      editPage(apNew[iPg], iOld, iNew, nNewCell, apCell, szCell);
+      abDone[iPg]++;
+      apNew[iPg]->nFree = usableSpace-szNew[iPg];
+      assert( apNew[iPg]->nOverflow==0 );
+      assert( apNew[iPg]->nCell==nNewCell );
     }
   }
-  assert( j==nCell );
+
+  /* All pages have been processed exactly once */
+  assert( memcmp(abDone, "\01\01\01\01\01", nNew)==0 );
+
   assert( nOld>0 );
   assert( nNew>0 );
-  if( (pageFlags & PTF_LEAF)==0 ){
-    u8 *zChild = &apCopy[nOld-1]->aData[8];
-    memcpy(&apNew[nNew-1]->aData[8], zChild, 4);
-  }
 
   if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
     /* The root page of the b-tree now contains no cells. The only sibling
@@ -58959,126 +59931,50 @@ static int balance_nonroot(
     ** sets all pointer-map entries corresponding to database image pages 
     ** for which the pointer is stored within the content being copied.
     **
-    ** The second assert below verifies that the child page is defragmented
-    ** (it must be, as it was just reconstructed using assemblePage()). This
-    ** is important if the parent page happens to be page 1 of the database
-    ** image.  */
+    ** It is critical that the child page be defragmented before being
+    ** copied into the parent, because if the parent is page 1 then it will
+    ** by smaller than the child due to the database header, and so all the
+    ** free space needs to be up front.
+    */
     assert( nNew==1 );
+    rc = defragmentPage(apNew[0]);
+    testcase( rc!=SQLITE_OK );
     assert( apNew[0]->nFree == 
-        (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2) 
+        (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2)
+      || rc!=SQLITE_OK
     );
     copyNodeContent(apNew[0], pParent, &rc);
     freePage(apNew[0], &rc);
-  }else if( ISAUTOVACUUM ){
-    /* Fix the pointer-map entries for all the cells that were shifted around. 
-    ** There are several different types of pointer-map entries that need to
-    ** be dealt with by this routine. Some of these have been set already, but
-    ** many have not. The following is a summary:
-    **
-    **   1) The entries associated with new sibling pages that were not
-    **      siblings when this function was called. These have already
-    **      been set. We don't need to worry about old siblings that were
-    **      moved to the free-list - the freePage() code has taken care
-    **      of those.
-    **
-    **   2) The pointer-map entries associated with the first overflow
-    **      page in any overflow chains used by new divider cells. These 
-    **      have also already been taken care of by the insertCell() code.
-    **
-    **   3) If the sibling pages are not leaves, then the child pages of
-    **      cells stored on the sibling pages may need to be updated.
-    **
-    **   4) If the sibling pages are not internal intkey nodes, then any
-    **      overflow pages used by these cells may need to be updated
-    **      (internal intkey nodes never contain pointers to overflow pages).
-    **
-    **   5) If the sibling pages are not leaves, then the pointer-map
-    **      entries for the right-child pages of each sibling may need
-    **      to be updated.
-    **
-    ** Cases 1 and 2 are dealt with above by other code. The next
-    ** block deals with cases 3 and 4 and the one after that, case 5. Since
-    ** setting a pointer map entry is a relatively expensive operation, this
-    ** code only sets pointer map entries for child or overflow pages that have
-    ** actually moved between pages.  */
-    MemPage *pNew = apNew[0];
-    MemPage *pOld = apCopy[0];
-    int nOverflow = pOld->nOverflow;
-    int iNextOld = pOld->nCell + nOverflow;
-    int iOverflow = (nOverflow ? pOld->aiOvfl[0] : -1);
-    j = 0;                             /* Current 'old' sibling page */
-    k = 0;                             /* Current 'new' sibling page */
-    for(i=0; i<nCell; i++){
-      int isDivider = 0;
-      while( i==iNextOld ){
-        /* Cell i is the cell immediately following the last cell on old
-        ** sibling page j. If the siblings are not leaf pages of an
-        ** intkey b-tree, then cell i was a divider cell. */
-        assert( j+1 < ArraySize(apCopy) );
-        assert( j+1 < nOld );
-        pOld = apCopy[++j];
-        iNextOld = i + !leafData + pOld->nCell + pOld->nOverflow;
-        if( pOld->nOverflow ){
-          nOverflow = pOld->nOverflow;
-          iOverflow = i + !leafData + pOld->aiOvfl[0];
-        }
-        isDivider = !leafData;  
-      }
-
-      assert(nOverflow>0 || iOverflow<i );
-      assert(nOverflow<2 || pOld->aiOvfl[0]==pOld->aiOvfl[1]-1);
-      assert(nOverflow<3 || pOld->aiOvfl[1]==pOld->aiOvfl[2]-1);
-      if( i==iOverflow ){
-        isDivider = 1;
-        if( (--nOverflow)>0 ){
-          iOverflow++;
-        }
-      }
-
-      if( i==cntNew[k] ){
-        /* Cell i is the cell immediately following the last cell on new
-        ** sibling page k. If the siblings are not leaf pages of an
-        ** intkey b-tree, then cell i is a divider cell.  */
-        pNew = apNew[++k];
-        if( !leafData ) continue;
-      }
-      assert( j<nOld );
-      assert( k<nNew );
-
-      /* If the cell was originally divider cell (and is not now) or
-      ** an overflow cell, or if the cell was located on a different sibling
-      ** page before the balancing, then the pointer map entries associated
-      ** with any child or overflow pages need to be updated.  */
-      if( isDivider || pOld->pgno!=pNew->pgno ){
-        if( !leafCorrection ){
-          ptrmapPut(pBt, get4byte(apCell[i]), PTRMAP_BTREE, pNew->pgno, &rc);
-        }
-        if( szCell[i]>pNew->minLocal ){
-          ptrmapPutOvflPtr(pNew, apCell[i], &rc);
-        }
-      }
+  }else if( ISAUTOVACUUM && !leafCorrection ){
+    /* Fix the pointer map entries associated with the right-child of each
+    ** sibling page. All other pointer map entries have already been taken
+    ** care of.  */
+    for(i=0; i<nNew; i++){
+      u32 key = get4byte(&apNew[i]->aData[8]);
+      ptrmapPut(pBt, key, PTRMAP_BTREE, apNew[i]->pgno, &rc);
     }
+  }
 
-    if( !leafCorrection ){
-      for(i=0; i<nNew; i++){
-        u32 key = get4byte(&apNew[i]->aData[8]);
-        ptrmapPut(pBt, key, PTRMAP_BTREE, apNew[i]->pgno, &rc);
-      }
-    }
+  assert( pParent->isInit );
+  TRACE(("BALANCE: finished: old=%d new=%d cells=%d\n",
+          nOld, nNew, nCell));
+
+  /* Free any old pages that were not reused as new pages.
+  */
+  for(i=nNew; i<nOld; i++){
+    freePage(apOld[i], &rc);
+  }
 
 #if 0
+  if( ISAUTOVACUUM && rc==SQLITE_OK && apNew[0]->isInit ){
     /* The ptrmapCheckPages() contains assert() statements that verify that
     ** all pointer map pages are set correctly. This is helpful while 
     ** debugging. This is usually disabled because a corrupt database may
     ** cause an assert() statement to fail.  */
     ptrmapCheckPages(apNew, nNew);
     ptrmapCheckPages(&pParent, 1);
-#endif
   }
-
-  assert( pParent->isInit );
-  TRACE(("BALANCE: finished: old=%d new=%d cells=%d\n",
-          nOld, nNew, nCell));
+#endif
 
   /*
   ** Cleanup before returning.
@@ -59970,6 +60866,13 @@ SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
 ** The schema layer numbers meta values differently.  At the schema
 ** layer (and the SetCookie and ReadCookie opcodes) the number of
 ** free pages is not visible.  So Cookie[0] is the same as Meta[1].
+**
+** This routine treats Meta[BTREE_DATA_VERSION] as a special case.  Instead
+** of reading the value out of the header, it instead loads the "DataVersion"
+** from the pager.  The BTREE_DATA_VERSION value is not actually stored in the
+** database file.  It is a number computed by the pager.  But its access
+** pattern is the same as header meta values, and so it is convenient to
+** read it from this routine.
 */
 SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
   BtShared *pBt = p->pBt;
@@ -59980,7 +60883,11 @@ SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
   assert( pBt->pPage1 );
   assert( idx>=0 && idx<=15 );
 
-  *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
+  if( idx==BTREE_DATA_VERSION ){
+    *pMeta = sqlite3PagerDataVersion(pBt->pPager) + p->iDataVersion;
+  }else{
+    *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
+  }
 
   /* If auto-vacuum is disabled in this build and this is an auto-vacuum
   ** database, mark the database as read-only.  */
@@ -60071,7 +60978,7 @@ SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *pCur, i64 *pnEntry){
         if( pCur->iPage==0 ){
           /* All pages of the b-tree have been visited. Return successfully. */
           *pnEntry = nEntry;
-          return SQLITE_OK;
+          return moveToRoot(pCur);
         }
         moveToParent(pCur);
       }while ( pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell );
@@ -60463,8 +61370,14 @@ static int checkTreePage(
     assert( contentOffset<=usableSize );  /* Enforced by btreeInitPage() */
     memset(hit+contentOffset, 0, usableSize-contentOffset);
     memset(hit, 1, contentOffset);
+    /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
+    ** number of cells on the page. */
     nCell = get2byte(&data[hdr+3]);
+    /* EVIDENCE-OF: R-23882-45353 The cell pointer array of a b-tree page
+    ** immediately follows the b-tree page header. */
     cellStart = hdr + 12 - 4*pPage->leaf;
+    /* EVIDENCE-OF: R-02776-14802 The cell pointer array consists of K 2-byte
+    ** integer offsets to the cell contents. */
     for(i=0; i<nCell; i++){
       int pc = get2byte(&data[cellStart+i*2]);
       u32 size = 65536;
@@ -60480,6 +61393,9 @@ static int checkTreePage(
         for(j=pc+size-1; j>=pc; j--) hit[j]++;
       }
     }
+    /* EVIDENCE-OF: R-20690-50594 The second field of the b-tree page header
+    ** is the offset of the first freeblock, or zero if there are no
+    ** freeblocks on the page. */
     i = get2byte(&data[hdr+1]);
     while( i>0 ){
       int size, j;
@@ -60487,7 +61403,13 @@ static int checkTreePage(
       size = get2byte(&data[i+2]);
       assert( i+size<=usableSize );  /* Enforced by btreeInitPage() */
       for(j=i+size-1; j>=i; j--) hit[j]++;
+      /* EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a
+      ** big-endian integer which is the offset in the b-tree page of the next
+      ** freeblock in the chain, or zero if the freeblock is the last on the
+      ** chain. */
       j = get2byte(&data[i]);
+      /* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of
+      ** increasing offset. */
       assert( j==0 || j>i+size );  /* Enforced by btreeInitPage() */
       assert( j<=usableSize-4 );   /* Enforced by btreeInitPage() */
       i = j;
@@ -60501,6 +61423,11 @@ static int checkTreePage(
         break;
       }
     }
+    /* EVIDENCE-OF: R-43263-13491 The total number of bytes in all fragments
+    ** is stored in the fifth field of the b-tree page header.
+    ** EVIDENCE-OF: R-07161-27322 The one-byte integer at offset 7 gives the
+    ** number of fragmented free bytes within the cell content area.
+    */
     if( cnt!=data[hdr+7] ){
       checkAppendMsg(pCheck,
           "Fragmentation of %d bytes reported as %d on page %d",
@@ -60904,6 +61831,11 @@ SQLITE_PRIVATE int sqlite3BtreeIsReadonly(Btree *p){
   return (p->pBt->btsFlags & BTS_READ_ONLY)!=0;
 }
 
+/*
+** Return the size of the header added to each page by this module.
+*/
+SQLITE_PRIVATE int sqlite3HeaderSizeBtree(void){ return ROUND8(sizeof(MemPage)); }
+
 /************** End of btree.c ***********************************************/
 /************** Begin file backup.c ******************************************/
 /*
@@ -61029,6 +61961,20 @@ static int setDestPgsz(sqlite3_backup *p){
 }
 
 /*
+** Check that there is no open read-transaction on the b-tree passed as the
+** second argument. If there is not, return SQLITE_OK. Otherwise, if there
+** is an open read-transaction, return SQLITE_ERROR and leave an error 
+** message in database handle db.
+*/
+static int checkReadTransaction(sqlite3 *db, Btree *p){
+  if( sqlite3BtreeIsInReadTrans(p) ){
+    sqlite3ErrorWithMsg(db, SQLITE_ERROR, "destination database is in use");
+    return SQLITE_ERROR;
+  }
+  return SQLITE_OK;
+}
+
+/*
 ** Create an sqlite3_backup process to copy the contents of zSrcDb from
 ** connection handle pSrcDb to zDestDb in pDestDb. If successful, return
 ** a pointer to the new sqlite3_backup object.
@@ -61044,6 +61990,13 @@ SQLITE_API sqlite3_backup *sqlite3_backup_init(
 ){
   sqlite3_backup *p;                    /* Value to return */
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(pSrcDb)||!sqlite3SafetyCheckOk(pDestDb) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
+
   /* Lock the source database handle. The destination database
   ** handle is not locked in this routine, but it is locked in
   ** sqlite3_backup_step(). The user is required to ensure that no
@@ -61080,12 +62033,15 @@ SQLITE_API sqlite3_backup *sqlite3_backup_init(
     p->iNext = 1;
     p->isAttached = 0;
 
-    if( 0==p->pSrc || 0==p->pDest || setDestPgsz(p)==SQLITE_NOMEM ){
+    if( 0==p->pSrc || 0==p->pDest 
+     || setDestPgsz(p)==SQLITE_NOMEM 
+     || checkReadTransaction(pDestDb, p->pDest)!=SQLITE_OK 
+     ){
       /* One (or both) of the named databases did not exist or an OOM
-      ** error was hit.  The error has already been written into the
-      ** pDestDb handle.  All that is left to do here is free the
-      ** sqlite3_backup structure.
-      */
+      ** error was hit. Or there is a transaction open on the destination
+      ** database. The error has already been written into the pDestDb 
+      ** handle. All that is left to do here is free the sqlite3_backup 
+      ** structure.  */
       sqlite3_free(p);
       p = 0;
     }
@@ -61240,6 +62196,9 @@ SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
   int pgszSrc = 0;    /* Source page size */
   int pgszDest = 0;   /* Destination page size */
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( p==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(p->pSrcDb->mutex);
   sqlite3BtreeEnter(p->pSrc);
   if( p->pDestDb ){
@@ -61503,7 +62462,7 @@ SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){
   }
 
   /* If a transaction is still open on the Btree, roll it back. */
-  sqlite3BtreeRollback(p->pDest, SQLITE_OK);
+  sqlite3BtreeRollback(p->pDest, SQLITE_OK, 0);
 
   /* Set the error code of the destination database handle. */
   rc = (p->rc==SQLITE_DONE) ? SQLITE_OK : p->rc;
@@ -61529,6 +62488,12 @@ SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){
 ** call to sqlite3_backup_step().
 */
 SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( p==0 ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   return p->nRemaining;
 }
 
@@ -61537,6 +62502,12 @@ SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){
 ** recent call to sqlite3_backup_step().
 */
 SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( p==0 ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   return p->nPagecount;
 }
 
@@ -63627,6 +64598,7 @@ static Op *opIterNext(VdbeOpIter *p){
 */
 SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
   int hasAbort = 0;
+  int hasFkCounter = 0;
   Op *pOp;
   VdbeOpIter sIter;
   memset(&sIter, 0, sizeof(sIter));
@@ -63635,15 +64607,17 @@ SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
   while( (pOp = opIterNext(&sIter))!=0 ){
     int opcode = pOp->opcode;
     if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename 
-#ifndef SQLITE_OMIT_FOREIGN_KEY
-     || (opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1) 
-#endif
      || ((opcode==OP_Halt || opcode==OP_HaltIfNull) 
       && ((pOp->p1&0xff)==SQLITE_CONSTRAINT && pOp->p2==OE_Abort))
     ){
       hasAbort = 1;
       break;
     }
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+    if( opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1 ){
+      hasFkCounter = 1;
+    }
+#endif
   }
   sqlite3DbFree(v->db, sIter.apSub);
 
@@ -63652,7 +64626,7 @@ SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
   ** through all opcodes and hasAbort may be set incorrectly. Return
   ** true for this case to prevent the assert() in the callers frame
   ** from failing.  */
-  return ( v->db->mallocFailed || hasAbort==mayAbort );
+  return ( v->db->mallocFailed || hasAbort==mayAbort || hasFkCounter );
 }
 #endif /* SQLITE_DEBUG - the sqlite3AssertMayAbort() function */
 
@@ -63828,6 +64802,34 @@ SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe *p, int nOp, VdbeOpList const *aOp,
   return addr;
 }
 
+#if defined(SQLITE_ENABLE_STMT_SCANSTATUS)
+/*
+** Add an entry to the array of counters managed by sqlite3_stmt_scanstatus().
+*/
+SQLITE_PRIVATE void sqlite3VdbeScanStatus(
+  Vdbe *p,                        /* VM to add scanstatus() to */
+  int addrExplain,                /* Address of OP_Explain (or 0) */
+  int addrLoop,                   /* Address of loop counter */ 
+  int addrVisit,                  /* Address of rows visited counter */
+  LogEst nEst,                    /* Estimated number of output rows */
+  const char *zName               /* Name of table or index being scanned */
+){
+  int nByte = (p->nScan+1) * sizeof(ScanStatus);
+  ScanStatus *aNew;
+  aNew = (ScanStatus*)sqlite3DbRealloc(p->db, p->aScan, nByte);
+  if( aNew ){
+    ScanStatus *pNew = &aNew[p->nScan++];
+    pNew->addrExplain = addrExplain;
+    pNew->addrLoop = addrLoop;
+    pNew->addrVisit = addrVisit;
+    pNew->nEst = nEst;
+    pNew->zName = sqlite3DbStrDup(p->db, zName);
+    p->aScan = aNew;
+  }
+}
+#endif
+
+
 /*
 ** Change the value of the P1 operand for a specific instruction.
 ** This routine is useful when a large program is loaded from a
@@ -64926,6 +65928,9 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady(
     p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*),
                           &zCsr, zEnd, &nByte);
     p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, &zCsr, zEnd, &nByte);
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+    p->anExec = allocSpace(p->anExec, p->nOp*sizeof(i64), &zCsr, zEnd, &nByte);
+#endif
     if( nByte ){
       p->pFree = sqlite3DbMallocZero(db, nByte);
     }
@@ -64942,7 +65947,7 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady(
       p->aVar[n].db = db;
     }
   }
-  if( p->azVar ){
+  if( p->azVar && pParse->nzVar>0 ){
     p->nzVar = pParse->nzVar;
     memcpy(p->azVar, pParse->azVar, p->nzVar*sizeof(p->azVar[0]));
     memset(pParse->azVar, 0, pParse->nzVar*sizeof(pParse->azVar[0]));
@@ -64993,6 +65998,9 @@ SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
 */
 SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){
   Vdbe *v = pFrame->v;
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+  v->anExec = pFrame->anExec;
+#endif
   v->aOnceFlag = pFrame->aOnceFlag;
   v->nOnceFlag = pFrame->nOnceFlag;
   v->aOp = pFrame->aOp;
@@ -65003,6 +66011,7 @@ SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){
   v->nCursor = pFrame->nCursor;
   v->db->lastRowid = pFrame->lastRowid;
   v->nChange = pFrame->nChange;
+  v->db->nChange = pFrame->nDbChange;
   return pFrame->pc;
 }
 
@@ -65570,6 +66579,7 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
           sqlite3RollbackAll(db, SQLITE_ABORT_ROLLBACK);
           sqlite3CloseSavepoints(db);
           db->autoCommit = 1;
+          p->nChange = 0;
         }
       }
     }
@@ -65610,6 +66620,7 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
         }else if( rc!=SQLITE_OK ){
           p->rc = rc;
           sqlite3RollbackAll(db, SQLITE_OK);
+          p->nChange = 0;
         }else{
           db->nDeferredCons = 0;
           db->nDeferredImmCons = 0;
@@ -65618,6 +66629,7 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
         }
       }else{
         sqlite3RollbackAll(db, SQLITE_OK);
+        p->nChange = 0;
       }
       db->nStatement = 0;
     }else if( eStatementOp==0 ){
@@ -65629,6 +66641,7 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
         sqlite3RollbackAll(db, SQLITE_ABORT_ROLLBACK);
         sqlite3CloseSavepoints(db);
         db->autoCommit = 1;
+        p->nChange = 0;
       }
     }
   
@@ -65649,6 +66662,7 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
         sqlite3RollbackAll(db, SQLITE_ABORT_ROLLBACK);
         sqlite3CloseSavepoints(db);
         db->autoCommit = 1;
+        p->nChange = 0;
       }
     }
   
@@ -65910,6 +66924,12 @@ SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3 *db, Vdbe *p){
   sqlite3DbFree(db, p->aColName);
   sqlite3DbFree(db, p->zSql);
   sqlite3DbFree(db, p->pFree);
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+  for(i=0; i<p->nScan; i++){
+    sqlite3DbFree(db, p->aScan[i].zName);
+  }
+  sqlite3DbFree(db, p->aScan);
+#endif
 }
 
 /*
@@ -66068,9 +67088,7 @@ SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format){
     i64 i = pMem->u.i;
     u64 u;
     if( i<0 ){
-      if( i<(-MAX_6BYTE) ) return 6;
-      /* Previous test prevents:  u = -(-9223372036854775808) */
-      u = -i;
+      u = ~i;
     }else{
       u = i;
     }
@@ -66236,10 +67254,14 @@ static u32 SQLITE_NOINLINE serialGet(
   u32 y = FOUR_BYTE_UINT(buf+4);
   x = (x<<32) + y;
   if( serial_type==6 ){
+    /* EVIDENCE-OF: R-29851-52272 Value is a big-endian 64-bit
+    ** twos-complement integer. */
     pMem->u.i = *(i64*)&x;
     pMem->flags = MEM_Int;
     testcase( pMem->u.i<0 );
   }else{
+    /* EVIDENCE-OF: R-57343-49114 Value is a big-endian IEEE 754-2008 64-bit
+    ** floating point number. */
 #if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT)
     /* Verify that integers and floating point values use the same
     ** byte order.  Or, that if SQLITE_MIXED_ENDIAN_64BIT_FLOAT is
@@ -66267,35 +67289,46 @@ SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(
   switch( serial_type ){
     case 10:   /* Reserved for future use */
     case 11:   /* Reserved for future use */
-    case 0: {  /* NULL */
+    case 0: {  /* Null */
+      /* EVIDENCE-OF: R-24078-09375 Value is a NULL. */
       pMem->flags = MEM_Null;
       break;
     }
-    case 1: { /* 1-byte signed integer */
+    case 1: {
+      /* EVIDENCE-OF: R-44885-25196 Value is an 8-bit twos-complement
+      ** integer. */
       pMem->u.i = ONE_BYTE_INT(buf);
       pMem->flags = MEM_Int;
       testcase( pMem->u.i<0 );
       return 1;
     }
     case 2: { /* 2-byte signed integer */
+      /* EVIDENCE-OF: R-49794-35026 Value is a big-endian 16-bit
+      ** twos-complement integer. */
       pMem->u.i = TWO_BYTE_INT(buf);
       pMem->flags = MEM_Int;
       testcase( pMem->u.i<0 );
       return 2;
     }
     case 3: { /* 3-byte signed integer */
+      /* EVIDENCE-OF: R-37839-54301 Value is a big-endian 24-bit
+      ** twos-complement integer. */
       pMem->u.i = THREE_BYTE_INT(buf);
       pMem->flags = MEM_Int;
       testcase( pMem->u.i<0 );
       return 3;
     }
     case 4: { /* 4-byte signed integer */
+      /* EVIDENCE-OF: R-01849-26079 Value is a big-endian 32-bit
+      ** twos-complement integer. */
       pMem->u.i = FOUR_BYTE_INT(buf);
       pMem->flags = MEM_Int;
       testcase( pMem->u.i<0 );
       return 4;
     }
     case 5: { /* 6-byte signed integer */
+      /* EVIDENCE-OF: R-50385-09674 Value is a big-endian 48-bit
+      ** twos-complement integer. */
       pMem->u.i = FOUR_BYTE_UINT(buf+2) + (((i64)1)<<32)*TWO_BYTE_INT(buf);
       pMem->flags = MEM_Int;
       testcase( pMem->u.i<0 );
@@ -66309,11 +67342,17 @@ SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(
     }
     case 8:    /* Integer 0 */
     case 9: {  /* Integer 1 */
+      /* EVIDENCE-OF: R-12976-22893 Value is the integer 0. */
+      /* EVIDENCE-OF: R-18143-12121 Value is the integer 1. */
       pMem->u.i = serial_type-8;
       pMem->flags = MEM_Int;
       return 0;
     }
     default: {
+      /* EVIDENCE-OF: R-14606-31564 Value is a BLOB that is (N-12)/2 bytes in
+      ** length.
+      ** EVIDENCE-OF: R-28401-00140 Value is a string in the text encoding and
+      ** (N-13)/2 bytes in length. */
       static const u16 aFlag[] = { MEM_Blob|MEM_Ephem, MEM_Str|MEM_Ephem };
       pMem->z = (char *)buf;
       pMem->n = (serial_type-12)/2;
@@ -66512,6 +67551,41 @@ debugCompareEnd:
 }
 #endif
 
+#if SQLITE_DEBUG
+/*
+** Count the number of fields (a.k.a. columns) in the record given by
+** pKey,nKey.  The verify that this count is less than or equal to the
+** limit given by pKeyInfo->nField + pKeyInfo->nXField.
+**
+** If this constraint is not satisfied, it means that the high-speed
+** vdbeRecordCompareInt() and vdbeRecordCompareString() routines will
+** not work correctly.  If this assert() ever fires, it probably means
+** that the KeyInfo.nField or KeyInfo.nXField values were computed
+** incorrectly.
+*/
+static void vdbeAssertFieldCountWithinLimits(
+  int nKey, const void *pKey,   /* The record to verify */ 
+  const KeyInfo *pKeyInfo       /* Compare size with this KeyInfo */
+){
+  int nField = 0;
+  u32 szHdr;
+  u32 idx;
+  u32 notUsed;
+  const unsigned char *aKey = (const unsigned char*)pKey;
+
+  if( CORRUPT_DB ) return;
+  idx = getVarint32(aKey, szHdr);
+  assert( szHdr<=nKey );
+  while( idx<szHdr ){
+    idx += getVarint32(aKey+idx, notUsed);
+    nField++;
+  }
+  assert( nField <= pKeyInfo->nField+pKeyInfo->nXField );
+}
+#else
+# define vdbeAssertFieldCountWithinLimits(A,B,C)
+#endif
+
 /*
 ** Both *pMem1 and *pMem2 contain string values. Compare the two values
 ** using the collation sequence pColl. As usual, return a negative , zero
@@ -66923,6 +67997,7 @@ static int vdbeRecordCompareInt(
   i64 v = pPKey2->aMem[0].u.i;
   i64 lhs;
 
+  vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo);
   assert( (*(u8*)pKey1)<=0x3F || CORRUPT_DB );
   switch( serial_type ){
     case 1: { /* 1-byte signed integer */
@@ -67010,6 +68085,7 @@ static int vdbeRecordCompareString(
   int serial_type;
   int res;
 
+  vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo);
   getVarint32(&aKey1[1], serial_type);
   if( serial_type<12 ){
     res = pPKey2->r1;      /* (pKey1/nKey1) is a number or a null */
@@ -67711,7 +68787,10 @@ static int doWalCallbacks(sqlite3 *db){
   for(i=0; i<db->nDb; i++){
     Btree *pBt = db->aDb[i].pBt;
     if( pBt ){
-      int nEntry = sqlite3PagerWalCallback(sqlite3BtreePager(pBt));
+      int nEntry;
+      sqlite3BtreeEnter(pBt);
+      nEntry = sqlite3PagerWalCallback(sqlite3BtreePager(pBt));
+      sqlite3BtreeLeave(pBt);
       if( db->xWalCallback && nEntry>0 && rc==SQLITE_OK ){
         rc = db->xWalCallback(db->pWalArg, db, db->aDb[i].zName, nEntry);
       }
@@ -67891,7 +68970,6 @@ SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
     ** sqlite3_errmsg() and sqlite3_errcode().
     */
     const char *zErr = (const char *)sqlite3_value_text(db->pErr); 
-    assert( zErr!=0 || db->mallocFailed );
     sqlite3DbFree(db, v->zErrMsg);
     if( !db->mallocFailed ){
       v->zErrMsg = sqlite3DbStrDup(db, zErr);
@@ -68277,11 +69355,19 @@ static const void *columnName(
   const void *(*xFunc)(Mem*),
   int useType
 ){
-  const void *ret = 0;
-  Vdbe *p = (Vdbe *)pStmt;
+  const void *ret;
+  Vdbe *p;
   int n;
-  sqlite3 *db = p->db;
-  
+  sqlite3 *db;
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( pStmt==0 ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
+  ret = 0;
+  p = (Vdbe *)pStmt;
+  db = p->db;
   assert( db!=0 );
   n = sqlite3_column_count(pStmt);
   if( N<n && N>=0 ){
@@ -68746,6 +69832,12 @@ SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt *pStmt){
 */
 SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
   sqlite3_stmt *pNext;
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(pDb) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   sqlite3_mutex_enter(pDb->mutex);
   if( pStmt==0 ){
     pNext = (sqlite3_stmt*)pDb->pVdbe;
@@ -68761,11 +69853,87 @@ SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
 */
 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
   Vdbe *pVdbe = (Vdbe*)pStmt;
-  u32 v = pVdbe->aCounter[op];
+  u32 v;
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !pStmt ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
+  v = pVdbe->aCounter[op];
   if( resetFlag ) pVdbe->aCounter[op] = 0;
   return (int)v;
 }
 
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+/*
+** Return status data for a single loop within query pStmt.
+*/
+SQLITE_API int sqlite3_stmt_scanstatus(
+  sqlite3_stmt *pStmt,            /* Prepared statement being queried */
+  int idx,                        /* Index of loop to report on */
+  int iScanStatusOp,              /* Which metric to return */
+  void *pOut                      /* OUT: Write the answer here */
+){
+  Vdbe *p = (Vdbe*)pStmt;
+  ScanStatus *pScan;
+  if( idx<0 || idx>=p->nScan ) return 1;
+  pScan = &p->aScan[idx];
+  switch( iScanStatusOp ){
+    case SQLITE_SCANSTAT_NLOOP: {
+      *(sqlite3_int64*)pOut = p->anExec[pScan->addrLoop];
+      break;
+    }
+    case SQLITE_SCANSTAT_NVISIT: {
+      *(sqlite3_int64*)pOut = p->anExec[pScan->addrVisit];
+      break;
+    }
+    case SQLITE_SCANSTAT_EST: {
+      double r = 1.0;
+      LogEst x = pScan->nEst;
+      while( x<100 ){
+        x += 10;
+        r *= 0.5;
+      }
+      *(double*)pOut = r*sqlite3LogEstToInt(x);
+      break;
+    }
+    case SQLITE_SCANSTAT_NAME: {
+      *(const char**)pOut = pScan->zName;
+      break;
+    }
+    case SQLITE_SCANSTAT_EXPLAIN: {
+      if( pScan->addrExplain ){
+        *(const char**)pOut = p->aOp[ pScan->addrExplain ].p4.z;
+      }else{
+        *(const char**)pOut = 0;
+      }
+      break;
+    }
+    case SQLITE_SCANSTAT_SELECTID: {
+      if( pScan->addrExplain ){
+        *(int*)pOut = p->aOp[ pScan->addrExplain ].p1;
+      }else{
+        *(int*)pOut = -1;
+      }
+      break;
+    }
+    default: {
+      return 1;
+    }
+  }
+  return 0;
+}
+
+/*
+** Zero all counters associated with the sqlite3_stmt_scanstatus() data.
+*/
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){
+  Vdbe *p = (Vdbe*)pStmt;
+  memset(p->anExec, 0, p->nOp * sizeof(i64));
+}
+#endif /* SQLITE_ENABLE_STMT_SCANSTATUS */
+
 /************** End of vdbeapi.c *********************************************/
 /************** Begin file vdbetrace.c ***************************************/
 /*
@@ -69651,6 +70819,9 @@ SQLITE_PRIVATE int sqlite3VdbeExec(
 #endif
     nVmStep++;
     pOp = &aOp[pc];
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+    if( p->anExec ) p->anExec[pc]++;
+#endif
 
     /* Only allow tracing if SQLITE_DEBUG is defined.
     */
@@ -71341,7 +72512,7 @@ case OP_Column: {
         pC->payloadSize = pC->szRow = avail = pReg->n;
         pC->aRow = (u8*)pReg->z;
       }else{
-        MemSetTypeFlag(pDest, MEM_Null);
+        sqlite3VdbeMemSetNull(pDest);
         goto op_column_out;
       }
     }else{
@@ -71676,7 +72847,10 @@ case OP_MakeRecord: {
     nHdr += serial_type<=127 ? 1 : sqlite3VarintLen(serial_type);
   }while( (--pRec)>=pData0 );
 
-  /* Add the initial header varint and total the size */
+  /* EVIDENCE-OF: R-22564-11647 The header begins with a single varint
+  ** which determines the total number of bytes in the header. The varint
+  ** value is the size of the header in bytes including the size varint
+  ** itself. */
   testcase( nHdr==126 );
   testcase( nHdr==127 );
   if( nHdr<=126 ){
@@ -71710,7 +72884,11 @@ case OP_MakeRecord: {
   pRec = pData0;
   do{
     serial_type = pRec->uTemp;
+    /* EVIDENCE-OF: R-06529-47362 Following the size varint are one or more
+    ** additional varints, one per column. */
     i += putVarint32(&zNewRecord[i], serial_type);            /* serial type */
+    /* EVIDENCE-OF: R-64536-51728 The values for each column in the record
+    ** immediately follow the header. */
     j += sqlite3VdbeSerialPut(&zNewRecord[j], pRec, serial_type); /* content */
   }while( (++pRec)<=pLast );
   assert( i==nHdr );
@@ -71865,11 +73043,18 @@ case OP_Savepoint: {
         db->isTransactionSavepoint = 0;
         rc = p->rc;
       }else{
+        int isSchemaChange;
         iSavepoint = db->nSavepoint - iSavepoint - 1;
         if( p1==SAVEPOINT_ROLLBACK ){
+          isSchemaChange = (db->flags & SQLITE_InternChanges)!=0;
           for(ii=0; ii<db->nDb; ii++){
-            sqlite3BtreeTripAllCursors(db->aDb[ii].pBt, SQLITE_ABORT);
+            rc = sqlite3BtreeTripAllCursors(db->aDb[ii].pBt,
+                                       SQLITE_ABORT_ROLLBACK,
+                                       isSchemaChange==0);
+            if( rc!=SQLITE_OK ) goto abort_due_to_error;
           }
+        }else{
+          isSchemaChange = 0;
         }
         for(ii=0; ii<db->nDb; ii++){
           rc = sqlite3BtreeSavepoint(db->aDb[ii].pBt, p1, iSavepoint);
@@ -71877,7 +73062,7 @@ case OP_Savepoint: {
             goto abort_due_to_error;
           }
         }
-        if( p1==SAVEPOINT_ROLLBACK && (db->flags&SQLITE_InternChanges)!=0 ){
+        if( isSchemaChange ){
           sqlite3ExpirePreparedStatements(db);
           sqlite3ResetAllSchemasOfConnection(db);
           db->flags = (db->flags | SQLITE_InternChanges);
@@ -72274,7 +73459,7 @@ case OP_OpenWrite: {
           || p->readOnly==0 );
 
   if( p->expired ){
-    rc = SQLITE_ABORT;
+    rc = SQLITE_ABORT_ROLLBACK;
     break;
   }
 
@@ -72838,10 +74023,10 @@ case OP_Found: {        /* jump, in3 */
   }else{
     pIdxKey = sqlite3VdbeAllocUnpackedRecord(
         pC->pKeyInfo, aTempRec, sizeof(aTempRec), &pFree
-    ); 
+    );
     if( pIdxKey==0 ) goto no_mem;
     assert( pIn3->flags & MEM_Blob );
-    assert( (pIn3->flags & MEM_Zero)==0 );  /* zeroblobs already expanded */
+    ExpandBlob(pIn3);
     sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z, pIdxKey);
   }
   pIdxKey->default_rc = 0;
@@ -72849,8 +74034,8 @@ case OP_Found: {        /* jump, in3 */
     /* For the OP_NoConflict opcode, take the jump if any of the
     ** input fields are NULL, since any key with a NULL will not
     ** conflict */
-    for(ii=0; ii<r.nField; ii++){
-      if( r.aMem[ii].flags & MEM_Null ){
+    for(ii=0; ii<pIdxKey->nField; ii++){
+      if( pIdxKey->aMem[ii].flags & MEM_Null ){
         pc = pOp->p2 - 1; VdbeBranchTaken(1,2);
         break;
       }
@@ -73441,6 +74626,10 @@ case OP_Rowid: {                 /* out2-prerelease */
     assert( pC->pCursor!=0 );
     rc = sqlite3VdbeCursorRestore(pC);
     if( rc ) goto abort_due_to_error;
+    if( pC->nullRow ){
+      pOut->flags = MEM_Null;
+      break;
+    }
     rc = sqlite3BtreeKeySize(pC->pCursor, &v);
     assert( rc==SQLITE_OK );  /* Always so because of CursorRestore() above */
   }
@@ -73531,9 +74720,9 @@ case OP_Sort: {        /* jump */
 **
 ** The next use of the Rowid or Column or Next instruction for P1 
 ** will refer to the first entry in the database table or index.
-** If the table or index is empty and P2>0, then jump immediately to P2.
-** If P2 is 0 or if the table or index is not empty, fall through
-** to the following instruction.
+** If the table or index is empty, jump immediately to P2.
+** If the table or index is not empty, fall through to the following 
+** instruction.
 **
 ** This opcode leaves the cursor configured to move in forward order,
 ** from the beginning toward the end.  In other words, the cursor is
@@ -74449,6 +75638,9 @@ case OP_Program: {        /* jump */
     pFrame->token = pProgram->token;
     pFrame->aOnceFlag = p->aOnceFlag;
     pFrame->nOnceFlag = p->nOnceFlag;
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+    pFrame->anExec = p->anExec;
+#endif
 
     pEnd = &VdbeFrameMem(pFrame)[pFrame->nChildMem];
     for(pMem=VdbeFrameMem(pFrame); pMem!=pEnd; pMem++){
@@ -74466,6 +75658,7 @@ case OP_Program: {        /* jump */
   pFrame->pParent = p->pFrame;
   pFrame->lastRowid = lastRowid;
   pFrame->nChange = p->nChange;
+  pFrame->nDbChange = p->db->nChange;
   p->nChange = 0;
   p->pFrame = pFrame;
   p->aMem = aMem = &VdbeFrameMem(pFrame)[-1];
@@ -74476,6 +75669,9 @@ case OP_Program: {        /* jump */
   p->nOp = pProgram->nOp;
   p->aOnceFlag = (u8 *)&p->apCsr[p->nCursor];
   p->nOnceFlag = pProgram->nOnce;
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+  p->anExec = 0;
+#endif
   pc = -1;
   memset(p->aOnceFlag, 0, p->nOnceFlag);
 
@@ -74720,8 +75916,8 @@ case OP_AggFinal: {
 /* Opcode: Checkpoint P1 P2 P3 * *
 **
 ** Checkpoint database P1. This is a no-op if P1 is not currently in
-** WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL
-** or RESTART.  Write 1 or 0 into mem[P3] if the checkpoint returns
+** WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL,
+** RESTART, or TRUNCATE.  Write 1 or 0 into mem[P3] if the checkpoint returns
 ** SQLITE_BUSY or not, respectively.  Write the number of pages in the
 ** WAL after the checkpoint into mem[P3+1] and the number of pages
 ** in the WAL that have been checkpointed after the checkpoint
@@ -74739,6 +75935,7 @@ case OP_Checkpoint: {
   assert( pOp->p2==SQLITE_CHECKPOINT_PASSIVE
        || pOp->p2==SQLITE_CHECKPOINT_FULL
        || pOp->p2==SQLITE_CHECKPOINT_RESTART
+       || pOp->p2==SQLITE_CHECKPOINT_TRUNCATE
   );
   rc = sqlite3Checkpoint(db, pOp->p1, pOp->p2, &aRes[1], &aRes[2]);
   if( rc==SQLITE_BUSY ){
@@ -75664,6 +76861,11 @@ SQLITE_API int sqlite3_blob_open(
   Parse *pParse = 0;
   Incrblob *pBlob = 0;
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || ppBlob==0 || zTable==0 ){
+    return SQLITE_MISUSE_BKPT;
+  }
+#endif
   flags = !!flags;                /* flags = (flags ? 1 : 0); */
   *ppBlob = 0;
 
@@ -75882,7 +77084,6 @@ static int blobReadWrite(
   if( n<0 || iOffset<0 || (iOffset+n)>p->nByte ){
     /* Request is out of range. Return a transient error. */
     rc = SQLITE_ERROR;
-    sqlite3Error(db, SQLITE_ERROR);
   }else if( v==0 ){
     /* If there is no statement handle, then the blob-handle has
     ** already been invalidated. Return SQLITE_ABORT in this case.
@@ -75900,10 +77101,10 @@ static int blobReadWrite(
       sqlite3VdbeFinalize(v);
       p->pStmt = 0;
     }else{
-      db->errCode = rc;
       v->rc = rc;
     }
   }
+  sqlite3Error(db, rc);
   rc = sqlite3ApiExit(db, rc);
   sqlite3_mutex_leave(db->mutex);
   return rc;
@@ -76080,7 +77281,7 @@ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
 ** The sorter is running in multi-threaded mode if (a) the library was built
 ** with pre-processor symbol SQLITE_MAX_WORKER_THREADS set to a value greater
 ** than zero, and (b) worker threads have been enabled at runtime by calling
-** sqlite3_config(SQLITE_CONFIG_WORKER_THREADS, ...).
+** "PRAGMA threads=N" with some value of N greater than 0.
 **
 ** When Rewind() is called, any data remaining in memory is flushed to a 
 ** final PMA. So at this point the data is stored in some number of sorted
@@ -76126,6 +77327,13 @@ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
 #endif
 
 /*
+** Hard-coded maximum amount of data to accumulate in memory before flushing
+** to a level 0 PMA. The purpose of this limit is to prevent various integer
+** overflows. 512MiB.
+*/
+#define SQLITE_MAX_PMASZ    (1<<29)
+
+/*
 ** Private objects used by the sorter
 */
 typedef struct MergeEngine MergeEngine;     /* Merge PMAs together */
@@ -76419,9 +77627,6 @@ struct SorterRecord {
 */
 #define SRVAL(p) ((void*)((SorterRecord*)(p) + 1))
 
-/* The minimum PMA size is set to this value multiplied by the database
-** page size in bytes.  */
-#define SORTER_MIN_WORKING 10
 
 /* Maximum number of PMAs that a single MergeEngine can merge */
 #define SORTER_MAX_MERGE_COUNT 16
@@ -76820,16 +78025,15 @@ SQLITE_PRIVATE int sqlite3VdbeSorterInit(
     }
 
     if( !sqlite3TempInMemory(db) ){
-      pSorter->mnPmaSize = SORTER_MIN_WORKING * pgsz;
+      u32 szPma = sqlite3GlobalConfig.szPma;
+      pSorter->mnPmaSize = szPma * pgsz;
       mxCache = db->aDb[0].pSchema->cache_size;
-      if( mxCache<SORTER_MIN_WORKING ) mxCache = SORTER_MIN_WORKING;
-      pSorter->mxPmaSize = mxCache * pgsz;
-
-      /* If the application has not configure scratch memory using
-      ** SQLITE_CONFIG_SCRATCH then we assume it is OK to do large memory
-      ** allocations.  If scratch memory has been configured, then assume
-      ** large memory allocations should be avoided to prevent heap
-      ** fragmentation.
+      if( mxCache<(int)szPma ) mxCache = (int)szPma;
+      pSorter->mxPmaSize = MIN((i64)mxCache*pgsz, SQLITE_MAX_PMASZ);
+
+      /* EVIDENCE-OF: R-26747-61719 When the application provides any amount of
+      ** scratch memory using SQLITE_CONFIG_SCRATCH, SQLite avoids unnecessary
+      ** large heap allocations.
       */
       if( sqlite3GlobalConfig.pScratch==0 ){
         assert( pSorter->iMemory==0 );
@@ -77103,12 +78307,12 @@ SQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *db, VdbeCursor *pCsr){
 */
 static void vdbeSorterExtendFile(sqlite3 *db, sqlite3_file *pFd, i64 nByte){
   if( nByte<=(i64)(db->nMaxSorterMmap) && pFd->pMethods->iVersion>=3 ){
-    int rc = sqlite3OsTruncate(pFd, nByte);
-    if( rc==SQLITE_OK ){
-      void *p = 0;
-      sqlite3OsFetch(pFd, 0, (int)nByte, &p);
-      sqlite3OsUnfetch(pFd, 0, p);
-    }
+    void *p = 0;
+    int chunksize = 4*1024;
+    sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_CHUNK_SIZE, &chunksize);
+    sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_SIZE_HINT, &nByte);
+    sqlite3OsFetch(pFd, 0, (int)nByte, &p);
+    sqlite3OsUnfetch(pFd, 0, p);
   }
 }
 #else
@@ -78389,6 +79593,7 @@ SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *db, const VdbeCursor *pCsr, in
     }else
 #endif
     /*if( !pSorter->bUseThreads )*/ {
+      assert( pSorter->pMerger!=0 );
       assert( pSorter->pMerger->pTask==(&pSorter->aTask[0]) );
       rc = vdbeMergeEngineStep(pSorter->pMerger, pbEof);
     }
@@ -79201,7 +80406,7 @@ SQLITE_PRIVATE int sqlite3WalkSelect(Walker *pWalker, Select *p){
 ** is a helper function - a callback for the tree walker.
 */
 static int incrAggDepth(Walker *pWalker, Expr *pExpr){
-  if( pExpr->op==TK_AGG_FUNCTION ) pExpr->op2 += pWalker->u.i;
+  if( pExpr->op==TK_AGG_FUNCTION ) pExpr->op2 += pWalker->u.n;
   return WRC_Continue;
 }
 static void incrAggFunctionDepth(Expr *pExpr, int N){
@@ -79209,7 +80414,7 @@ static void incrAggFunctionDepth(Expr *pExpr, int N){
     Walker w;
     memset(&w, 0, sizeof(w));
     w.xExprCallback = incrAggDepth;
-    w.u.i = N;
+    w.u.n = N;
     sqlite3WalkExpr(&w, pExpr);
   }
 }
@@ -79493,6 +80698,10 @@ static int lookupName(
       if( pMatch ){
         pExpr->iTable = pMatch->iCursor;
         pExpr->pTab = pMatch->pTab;
+        assert( (pMatch->jointype & JT_RIGHT)==0 ); /* RIGHT JOIN not (yet) supported */
+        if( (pMatch->jointype & JT_LEFT)!=0 ){
+          ExprSetProperty(pExpr, EP_CanBeNull);
+        }
         pSchema = pExpr->pTab->pSchema;
       }
     } /* if( pSrcList ) */
@@ -79757,7 +80966,7 @@ static int exprProbability(Expr *p){
   sqlite3AtoF(p->u.zToken, &r, sqlite3Strlen30(p->u.zToken), SQLITE_UTF8);
   assert( r>=0.0 );
   if( r>1.0 ) return -1;
-  return (int)(r*1000.0);
+  return (int)(r*134217728.0);
 }
 
 /*
@@ -79889,7 +81098,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
             ** EVIDENCE-OF: R-53436-40973 The likely(X) function is equivalent to
             ** likelihood(X,0.9375). */
             /* TUNING: unlikely() probability is 0.0625.  likely() is 0.9375 */
-            pExpr->iTable = pDef->zName[0]=='u' ? 62 : 938;
+            pExpr->iTable = pDef->zName[0]=='u' ? 8388608 : 125829120;
           }             
         }
 #ifndef SQLITE_OMIT_AUTHORIZATION
@@ -81151,7 +82360,7 @@ SQLITE_PRIVATE Expr *sqlite3PExpr(
   const Token *pToken     /* Argument token */
 ){
   Expr *p;
-  if( op==TK_AND && pLeft && pRight ){
+  if( op==TK_AND && pLeft && pRight && pParse->nErr==0 ){
     /* Take advantage of short-circuit false optimization for AND */
     p = sqlite3ExprAnd(pParse->db, pLeft, pRight);
   }else{
@@ -81846,20 +83055,24 @@ SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
 }
 
 /*
-** These routines are Walker callbacks.  Walker.u.pi is a pointer
-** to an integer.  These routines are checking an expression to see
-** if it is a constant.  Set *Walker.u.i to 0 if the expression is
-** not constant.
+** These routines are Walker callbacks used to check expressions to
+** see if they are "constant" for some definition of constant.  The
+** Walker.eCode value determines the type of "constant" we are looking
+** for.
 **
 ** These callback routines are used to implement the following:
 **
-**     sqlite3ExprIsConstant()                  pWalker->u.i==1
-**     sqlite3ExprIsConstantNotJoin()           pWalker->u.i==2
-**     sqlite3ExprIsConstantOrFunction()        pWalker->u.i==3 or 4
+**     sqlite3ExprIsConstant()                  pWalker->eCode==1
+**     sqlite3ExprIsConstantNotJoin()           pWalker->eCode==2
+**     sqlite3ExprRefOneTableOnly()             pWalker->eCode==3
+**     sqlite3ExprIsConstantOrFunction()        pWalker->eCode==4 or 5
+**
+** In all cases, the callbacks set Walker.eCode=0 and abort if the expression
+** is found to not be a constant.
 **
 ** The sqlite3ExprIsConstantOrFunction() is used for evaluating expressions
-** in a CREATE TABLE statement.  The Walker.u.i value is 4 when parsing
-** an existing schema and 3 when processing a new statement.  A bound
+** in a CREATE TABLE statement.  The Walker.eCode value is 5 when parsing
+** an existing schema and 4 when processing a new statement.  A bound
 ** parameter raises an error for new statements, but is silently converted
 ** to NULL for existing schemas.  This allows sqlite_master tables that 
 ** contain a bound parameter because they were generated by older versions
@@ -81868,23 +83081,25 @@ SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
 */
 static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){
 
-  /* If pWalker->u.i is 2 then any term of the expression that comes from
-  ** the ON or USING clauses of a join disqualifies the expression
+  /* If pWalker->eCode is 2 then any term of the expression that comes from
+  ** the ON or USING clauses of a left join disqualifies the expression
   ** from being considered constant. */
-  if( pWalker->u.i==2 && ExprHasProperty(pExpr, EP_FromJoin) ){
-    pWalker->u.i = 0;
+  if( pWalker->eCode==2 && ExprHasProperty(pExpr, EP_FromJoin) ){
+    pWalker->eCode = 0;
     return WRC_Abort;
   }
 
   switch( pExpr->op ){
     /* Consider functions to be constant if all their arguments are constant
-    ** and either pWalker->u.i==3 or 4 or the function as the SQLITE_FUNC_CONST
-    ** flag. */
+    ** and either pWalker->eCode==4 or 5 or the function has the
+    ** SQLITE_FUNC_CONST flag. */
     case TK_FUNCTION:
-      if( pWalker->u.i>=3 || ExprHasProperty(pExpr,EP_Constant) ){
+      if( pWalker->eCode>=4 || ExprHasProperty(pExpr,EP_Constant) ){
         return WRC_Continue;
+      }else{
+        pWalker->eCode = 0;
+        return WRC_Abort;
       }
-      /* Fall through */
     case TK_ID:
     case TK_COLUMN:
     case TK_AGG_FUNCTION:
@@ -81893,18 +83108,22 @@ static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){
       testcase( pExpr->op==TK_COLUMN );
       testcase( pExpr->op==TK_AGG_FUNCTION );
       testcase( pExpr->op==TK_AGG_COLUMN );
-      pWalker->u.i = 0;
-      return WRC_Abort;
+      if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){
+        return WRC_Continue;
+      }else{
+        pWalker->eCode = 0;
+        return WRC_Abort;
+      }
     case TK_VARIABLE:
-      if( pWalker->u.i==4 ){
+      if( pWalker->eCode==5 ){
         /* Silently convert bound parameters that appear inside of CREATE
         ** statements into a NULL when parsing the CREATE statement text out
         ** of the sqlite_master table */
         pExpr->op = TK_NULL;
-      }else if( pWalker->u.i==3 ){
+      }else if( pWalker->eCode==4 ){
         /* A bound parameter in a CREATE statement that originates from
         ** sqlite3_prepare() causes an error */
-        pWalker->u.i = 0;
+        pWalker->eCode = 0;
         return WRC_Abort;
       }
       /* Fall through */
@@ -81916,21 +83135,22 @@ static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){
 }
 static int selectNodeIsConstant(Walker *pWalker, Select *NotUsed){
   UNUSED_PARAMETER(NotUsed);
-  pWalker->u.i = 0;
+  pWalker->eCode = 0;
   return WRC_Abort;
 }
-static int exprIsConst(Expr *p, int initFlag){
+static int exprIsConst(Expr *p, int initFlag, int iCur){
   Walker w;
   memset(&w, 0, sizeof(w));
-  w.u.i = initFlag;
+  w.eCode = initFlag;
   w.xExprCallback = exprNodeIsConstant;
   w.xSelectCallback = selectNodeIsConstant;
+  w.u.iCur = iCur;
   sqlite3WalkExpr(&w, p);
-  return w.u.i;
+  return w.eCode;
 }
 
 /*
-** Walk an expression tree.  Return 1 if the expression is constant
+** Walk an expression tree.  Return non-zero if the expression is constant
 ** and 0 if it involves variables or function calls.
 **
 ** For the purposes of this function, a double-quoted string (ex: "abc")
@@ -81938,21 +83158,31 @@ static int exprIsConst(Expr *p, int initFlag){
 ** a constant.
 */
 SQLITE_PRIVATE int sqlite3ExprIsConstant(Expr *p){
-  return exprIsConst(p, 1);
+  return exprIsConst(p, 1, 0);
 }
 
 /*
-** Walk an expression tree.  Return 1 if the expression is constant
+** Walk an expression tree.  Return non-zero if the expression is constant
 ** that does no originate from the ON or USING clauses of a join.
 ** Return 0 if it involves variables or function calls or terms from
 ** an ON or USING clause.
 */
 SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr *p){
-  return exprIsConst(p, 2);
+  return exprIsConst(p, 2, 0);
 }
 
 /*
-** Walk an expression tree.  Return 1 if the expression is constant
+** Walk an expression tree.  Return non-zero if the expression constant
+** for any single row of the table with cursor iCur.  In other words, the
+** expression must not refer to any non-deterministic function nor any
+** table other than iCur.
+*/
+SQLITE_PRIVATE int sqlite3ExprIsTableConstant(Expr *p, int iCur){
+  return exprIsConst(p, 3, iCur);
+}
+
+/*
+** Walk an expression tree.  Return non-zero if the expression is constant
 ** or a function call with constant arguments.  Return and 0 if there
 ** are any variables.
 **
@@ -81962,7 +83192,7 @@ SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr *p){
 */
 SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr *p, u8 isInit){
   assert( isInit==0 || isInit==1 );
-  return exprIsConst(p, 3+isInit);
+  return exprIsConst(p, 4+isInit, 0);
 }
 
 /*
@@ -82029,7 +83259,8 @@ SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr *p){
       return 0;
     case TK_COLUMN:
       assert( p->pTab!=0 );
-      return p->iColumn>=0 && p->pTab->aCol[p->iColumn].notNull==0;
+      return ExprHasProperty(p, EP_CanBeNull) ||
+             (p->iColumn>=0 && p->pTab->aCol[p->iColumn].notNull==0);
     default:
       return 1;
   }
@@ -82472,7 +83703,6 @@ SQLITE_PRIVATE int sqlite3CodeSubselect(
         assert( (pExpr->iTable&0x0000FFFF)==pExpr->iTable );
         pSelect->iLimit = 0;
         testcase( pSelect->selFlags & SF_Distinct );
-        pSelect->selFlags &= ~SF_Distinct;
         testcase( pKeyInfo==0 ); /* Caused by OOM in sqlite3KeyInfoAlloc() */
         if( sqlite3Select(pParse, pSelect, &dest) ){
           sqlite3KeyInfoUnref(pKeyInfo);
@@ -82871,7 +84101,8 @@ SQLITE_PRIVATE void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int
   int idxLru;
   struct yColCache *p;
 
-  assert( iReg>0 );  /* Register numbers are always positive */
+  /* Unless an error has occurred, register numbers are always positive. */
+  assert( iReg>0 || pParse->nErr || pParse->db->mallocFailed );
   assert( iCol>=-1 && iCol<32768 );  /* Finite column numbers */
 
   /* The SQLITE_ColumnCache flag disables the column cache.  This is used
@@ -83619,7 +84850,10 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)
 
 #ifndef SQLITE_OMIT_FLOATING_POINT
       /* If the column has REAL affinity, it may currently be stored as an
-      ** integer. Use OP_RealAffinity to make sure it is really real.  */
+      ** integer. Use OP_RealAffinity to make sure it is really real.
+      **
+      ** EVIDENCE-OF: R-60985-57662 SQLite will convert the value back to
+      ** floating point when extracting it from the record.  */
       if( pExpr->iColumn>=0 
        && pTab->aCol[pExpr->iColumn].affinity==SQLITE_AFF_REAL
       ){
@@ -84681,10 +85915,11 @@ static int exprSrcCount(Walker *pWalker, Expr *pExpr){
     int i;
     struct SrcCount *p = pWalker->u.pSrcCount;
     SrcList *pSrc = p->pSrc;
-    for(i=0; i<pSrc->nSrc; i++){
+    int nSrc = pSrc ? pSrc->nSrc : 0;
+    for(i=0; i<nSrc; i++){
       if( pExpr->iTable==pSrc->a[i].iCursor ) break;
     }
-    if( i<pSrc->nSrc ){
+    if( i<nSrc ){
       p->nThis++;
     }else{
       p->nOther++;
@@ -86262,7 +87497,7 @@ static void statInit(
     p->mxSample = mxSample;
     p->nPSample = (tRowcnt)(sqlite3_value_int64(argv[2])/(mxSample/3+1) + 1);
     p->current.anLt = &p->current.anEq[nColUp];
-    p->iPrn = nCol*0x689e962d ^ sqlite3_value_int(argv[2])*0xd0944565;
+    p->iPrn = 0x689e962d*(u32)nCol ^ 0xd0944565*(u32)sqlite3_value_int(argv[2]);
   
     /* Set up the Stat4Accum.a[] and aBest[] arrays */
     p->a = (struct Stat4Sample*)&p->current.anLt[nColUp];
@@ -87271,23 +88506,28 @@ static void decodeIntArray(
     if( *z==' ' ) z++;
   }
 #ifndef SQLITE_ENABLE_STAT3_OR_STAT4
-  assert( pIndex!=0 );
+  assert( pIndex!=0 ); {
 #else
-  if( pIndex )
+  if( pIndex ){
 #endif
-  while( z[0] ){
-    if( sqlite3_strglob("unordered*", z)==0 ){
-      pIndex->bUnordered = 1;
-    }else if( sqlite3_strglob("sz=[0-9]*", z)==0 ){
-      pIndex->szIdxRow = sqlite3LogEst(sqlite3Atoi(z+3));
-    }
+    pIndex->bUnordered = 0;
+    pIndex->noSkipScan = 0;
+    while( z[0] ){
+      if( sqlite3_strglob("unordered*", z)==0 ){
+        pIndex->bUnordered = 1;
+      }else if( sqlite3_strglob("sz=[0-9]*", z)==0 ){
+        pIndex->szIdxRow = sqlite3LogEst(sqlite3Atoi(z+3));
+      }else if( sqlite3_strglob("noskipscan*", z)==0 ){
+        pIndex->noSkipScan = 1;
+      }
 #ifdef SQLITE_ENABLE_COSTMULT
-    else if( sqlite3_strglob("costmult=[0-9]*",z)==0 ){
-      pIndex->pTable->costMult = sqlite3LogEst(sqlite3Atoi(z+9));
-    }
+      else if( sqlite3_strglob("costmult=[0-9]*",z)==0 ){
+        pIndex->pTable->costMult = sqlite3LogEst(sqlite3Atoi(z+9));
+      }
 #endif
-    while( z[0]!=0 && z[0]!=' ' ) z++;
-    while( z[0]==' ' ) z++;
+      while( z[0]!=0 && z[0]!=' ' ) z++;
+      while( z[0]==' ' ) z++;
+    }
   }
 }
 
@@ -87405,7 +88645,7 @@ static void initAvgEq(Index *pIdx){
       i64 nSum100 = 0;          /* Number of terms contributing to sumEq */
       i64 nDist100;             /* Number of distinct values in index */
 
-      if( pIdx->aiRowEst==0 || pIdx->aiRowEst[iCol+1]==0 ){
+      if( !pIdx->aiRowEst || iCol>=pIdx->nKeyCol || pIdx->aiRowEst[iCol+1]==0 ){
         nRow = pFinal->anLt[iCol];
         nDist100 = (i64)100 * pFinal->anDLt[iCol];
         nSample--;
@@ -87413,6 +88653,7 @@ static void initAvgEq(Index *pIdx){
         nRow = pIdx->aiRowEst[0];
         nDist100 = ((i64)100 * pIdx->aiRowEst[0]) / pIdx->aiRowEst[iCol+1];
       }
+      pIdx->nRowEst0 = nRow;
 
       /* Set nSum to the number of distinct (iCol+1) field prefixes that
       ** occur in the stat4 table for this index. Set sumEq to the sum of 
@@ -87674,7 +88915,7 @@ SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){
 
   /* Load the statistics from the sqlite_stat4 table. */
 #ifdef SQLITE_ENABLE_STAT3_OR_STAT4
-  if( rc==SQLITE_OK ){
+  if( rc==SQLITE_OK && OptimizationEnabled(db, SQLITE_Stat34) ){
     int lookasideEnabled = db->lookaside.bEnabled;
     db->lookaside.bEnabled = 0;
     rc = loadStat4(db, sInfo.zDatabase);
@@ -87849,6 +89090,7 @@ static void attachFunc(
         "attached databases must use the same text encoding as main database");
       rc = SQLITE_ERROR;
     }
+    sqlite3BtreeEnter(aNew->pBt);
     pPager = sqlite3BtreePager(aNew->pBt);
     sqlite3PagerLockingMode(pPager, db->dfltLockMode);
     sqlite3BtreeSecureDelete(aNew->pBt,
@@ -87856,6 +89098,7 @@ static void attachFunc(
 #ifndef SQLITE_OMIT_PAGER_PRAGMAS
     sqlite3BtreeSetPagerFlags(aNew->pBt, 3 | (db->flags & PAGER_FLAGS_MASK));
 #endif
+    sqlite3BtreeLeave(aNew->pBt);
   }
   aNew->safety_level = 3;
   aNew->zName = sqlite3DbStrDup(db, zName);
@@ -88356,6 +89599,9 @@ SQLITE_API int sqlite3_set_authorizer(
   int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
   void *pArg
 ){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   db->xAuth = (sqlite3_xauth)xAuth;
   db->pAuthArg = pArg;
@@ -88850,7 +90096,11 @@ SQLITE_PRIVATE int sqlite3UserAuthTable(const char *zTable){
 SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
   Table *p = 0;
   int i;
-  assert( zName!=0 );
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || zName==0 ) return 0;
+#endif
+
   /* All mutexes are required for schema access.  Make sure we hold them. */
   assert( zDatabase!=0 || sqlite3BtreeHoldsAllMutexes(db) );
 #if SQLITE_USER_AUTHENTICATION
@@ -88974,7 +90224,6 @@ static void freeIndex(sqlite3 *db, Index *p){
 #ifndef SQLITE_OMIT_ANALYZE
   sqlite3DeleteIndexSamples(db, p);
 #endif
-  if( db==0 || db->pnBytesFreed==0 ) sqlite3KeyInfoUnref(p->pKeyInfo);
   sqlite3ExprDelete(db, p->pPartIdxWhere);
   sqlite3DbFree(db, p->zColAff);
   if( p->isResized ) sqlite3DbFree(db, p->azColl);
@@ -90253,6 +91502,19 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){
     pTab->iPKey = -1;
   }else{
     pPk = sqlite3PrimaryKeyIndex(pTab);
+    /*
+    ** Remove all redundant columns from the PRIMARY KEY.  For example, change
+    ** "PRIMARY KEY(a,b,a,b,c,b,c,d)" into just "PRIMARY KEY(a,b,c,d)".  Later
+    ** code assumes the PRIMARY KEY contains no repeated columns.
+    */
+    for(i=j=1; i<pPk->nKeyCol; i++){
+      if( hasColumn(pPk->aiColumn, j, pPk->aiColumn[i]) ){
+        pPk->nColumn--;
+      }else{
+        pPk->aiColumn[j++] = pPk->aiColumn[i];
+      }
+    }
+    pPk->nKeyCol = j;
   }
   pPk->isCovering = 1;
   assert( pPk!=0 );
@@ -92729,40 +93991,31 @@ SQLITE_PRIVATE void sqlite3Reindex(Parse *pParse, Token *pName1, Token *pName2){
 ** when it has finished using it.
 */
 SQLITE_PRIVATE KeyInfo *sqlite3KeyInfoOfIndex(Parse *pParse, Index *pIdx){
+  int i;
+  int nCol = pIdx->nColumn;
+  int nKey = pIdx->nKeyCol;
+  KeyInfo *pKey;
   if( pParse->nErr ) return 0;
-#ifndef SQLITE_OMIT_SHARED_CACHE
-  if( pIdx->pKeyInfo && pIdx->pKeyInfo->db!=pParse->db ){
-    sqlite3KeyInfoUnref(pIdx->pKeyInfo);
-    pIdx->pKeyInfo = 0;
+  if( pIdx->uniqNotNull ){
+    pKey = sqlite3KeyInfoAlloc(pParse->db, nKey, nCol-nKey);
+  }else{
+    pKey = sqlite3KeyInfoAlloc(pParse->db, nCol, 0);
   }
-#endif
-  if( pIdx->pKeyInfo==0 ){
-    int i;
-    int nCol = pIdx->nColumn;
-    int nKey = pIdx->nKeyCol;
-    KeyInfo *pKey;
-    if( pIdx->uniqNotNull ){
-      pKey = sqlite3KeyInfoAlloc(pParse->db, nKey, nCol-nKey);
-    }else{
-      pKey = sqlite3KeyInfoAlloc(pParse->db, nCol, 0);
+  if( pKey ){
+    assert( sqlite3KeyInfoIsWriteable(pKey) );
+    for(i=0; i<nCol; i++){
+      char *zColl = pIdx->azColl[i];
+      assert( zColl!=0 );
+      pKey->aColl[i] = strcmp(zColl,"BINARY")==0 ? 0 :
+                        sqlite3LocateCollSeq(pParse, zColl);
+      pKey->aSortOrder[i] = pIdx->aSortOrder[i];
     }
-    if( pKey ){
-      assert( sqlite3KeyInfoIsWriteable(pKey) );
-      for(i=0; i<nCol; i++){
-        char *zColl = pIdx->azColl[i];
-        assert( zColl!=0 );
-        pKey->aColl[i] = strcmp(zColl,"BINARY")==0 ? 0 :
-                          sqlite3LocateCollSeq(pParse, zColl);
-        pKey->aSortOrder[i] = pIdx->aSortOrder[i];
-      }
-      if( pParse->nErr ){
-        sqlite3KeyInfoUnref(pKey);
-      }else{
-        pIdx->pKeyInfo = pKey;
-      }
+    if( pParse->nErr ){
+      sqlite3KeyInfoUnref(pKey);
+      pKey = 0;
     }
   }
-  return sqlite3KeyInfoRef(pIdx->pKeyInfo);
+  return pKey;
 }
 
 #ifndef SQLITE_OMIT_CTE
@@ -93543,8 +94796,8 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
   WhereInfo *pWInfo;     /* Information about the WHERE clause */
   Index *pIdx;           /* For looping over indices of the table */
   int iTabCur;           /* Cursor number for the table */
-  int iDataCur;          /* VDBE cursor for the canonical data source */
-  int iIdxCur;           /* Cursor number of the first index */
+  int iDataCur = 0;      /* VDBE cursor for the canonical data source */
+  int iIdxCur = 0;       /* Cursor number of the first index */
   int nIdx;              /* Number of indices */
   sqlite3 *db;           /* Main database structure */
   AuthContext sContext;  /* Authorization context */
@@ -94314,8 +95567,8 @@ static void absFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
     default: {
       /* Because sqlite3_value_double() returns 0.0 if the argument is not
       ** something that can be converted into a number, we have:
-      ** IMP: R-57326-31541 Abs(X) return 0.0 if X is a string or blob that
-      ** cannot be converted to a numeric value. 
+      ** IMP: R-01992-00519 Abs(X) returns 0.0 if X is a string or blob
+      ** that cannot be converted to a numeric value.
       */
       double rVal = sqlite3_value_double(argv[0]);
       if( rVal<0 ) rVal = -rVal;
@@ -96383,7 +97636,7 @@ static void fkLookupParent(
         OE_Abort, 0, P4_STATIC, P5_ConstraintFK);
   }else{
     if( nIncr>0 && pFKey->isDeferred==0 ){
-      sqlite3ParseToplevel(pParse)->mayAbort = 1;
+      sqlite3MayAbort(pParse);
     }
     sqlite3VdbeAddOp2(v, OP_FkCounter, pFKey->isDeferred, nIncr);
   }
@@ -96455,6 +97708,10 @@ static Expr *exprTableColumn(
 ** code for an SQL UPDATE operation, this function may be called twice -
 ** once to "delete" the old row and once to "insert" the new row.
 **
+** Parameter nIncr is passed -1 when inserting a row (as this may decrease
+** the number of FK violations in the db) or +1 when deleting one (as this
+** may increase the number of FK constraint problems).
+**
 ** The code generated by this function scans through the rows in the child
 ** table that correspond to the parent table row being deleted or inserted.
 ** For each child row found, one of the following actions is taken:
@@ -96571,13 +97828,9 @@ static void fkScanChildren(
   sqlite3ResolveExprNames(&sNameContext, pWhere);
 
   /* Create VDBE to loop through the entries in pSrc that match the WHERE
-  ** clause. If the constraint is not deferred, throw an exception for
-  ** each row found. Otherwise, for deferred constraints, increment the
-  ** deferred constraint counter by nIncr for each row selected.  */
+  ** clause. For each row found, increment either the deferred or immediate
+  ** foreign key constraint counter. */
   pWInfo = sqlite3WhereBegin(pParse, pSrc, pWhere, 0, 0, 0, 0);
-  if( nIncr>0 && pFKey->isDeferred==0 ){
-    sqlite3ParseToplevel(pParse)->mayAbort = 1;
-  }
   sqlite3VdbeAddOp2(v, OP_FkCounter, pFKey->isDeferred, nIncr);
   if( pWInfo ){
     sqlite3WhereEnd(pWInfo);
@@ -96757,6 +98010,24 @@ static int fkParentIsModified(
 }
 
 /*
+** Return true if the parser passed as the first argument is being
+** used to code a trigger that is really a "SET NULL" action belonging
+** to trigger pFKey.
+*/
+static int isSetNullAction(Parse *pParse, FKey *pFKey){
+  Parse *pTop = sqlite3ParseToplevel(pParse);
+  if( pTop->pTriggerPrg ){
+    Trigger *p = pTop->pTriggerPrg->pTrigger;
+    if( (p==pFKey->apTrigger[0] && pFKey->aAction[0]==OE_SetNull)
+     || (p==pFKey->apTrigger[1] && pFKey->aAction[1]==OE_SetNull)
+    ){
+      return 1;
+    }
+  }
+  return 0;
+}
+
+/*
 ** This function is called when inserting, deleting or updating a row of
 ** table pTab to generate VDBE code to perform foreign key constraint 
 ** processing for the operation.
@@ -96808,7 +98079,7 @@ SQLITE_PRIVATE void sqlite3FkCheck(
     int *aiCol;
     int iCol;
     int i;
-    int isIgnore = 0;
+    int bIgnore = 0;
 
     if( aChange 
      && sqlite3_stricmp(pTab->zName, pFKey->zTo)!=0
@@ -96867,7 +98138,7 @@ SQLITE_PRIVATE void sqlite3FkCheck(
         int rcauth;
         char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
         rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);
-        isIgnore = (rcauth==SQLITE_IGNORE);
+        bIgnore = (rcauth==SQLITE_IGNORE);
       }
 #endif
     }
@@ -96882,12 +98153,18 @@ SQLITE_PRIVATE void sqlite3FkCheck(
       /* A row is being removed from the child table. Search for the parent.
       ** If the parent does not exist, removing the child row resolves an 
       ** outstanding foreign key constraint violation. */
-      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1,isIgnore);
+      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1, bIgnore);
     }
-    if( regNew!=0 ){
+    if( regNew!=0 && !isSetNullAction(pParse, pFKey) ){
       /* A row is being added to the child table. If a parent row cannot
-      ** be found, adding the child row has violated the FK constraint. */ 
-      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regNew, +1,isIgnore);
+      ** be found, adding the child row has violated the FK constraint. 
+      **
+      ** If this operation is being performed as part of a trigger program
+      ** that is actually a "SET NULL" action belonging to this very 
+      ** foreign key, then omit this scan altogether. As all child key
+      ** values are guaranteed to be NULL, it is not possible for adding
+      ** this row to cause an FK violation.  */
+      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regNew, +1, bIgnore);
     }
 
     sqlite3DbFree(db, aiFree);
@@ -96908,8 +98185,8 @@ SQLITE_PRIVATE void sqlite3FkCheck(
      && !pParse->pToplevel && !pParse->isMultiWrite 
     ){
       assert( regOld==0 && regNew!=0 );
-      /* Inserting a single row into a parent table cannot cause an immediate
-      ** foreign key violation. So do nothing in this case.  */
+      /* Inserting a single row into a parent table cannot cause (or fix)
+      ** an immediate foreign key violation. So do nothing in this case.  */
       continue;
     }
 
@@ -96933,13 +98210,28 @@ SQLITE_PRIVATE void sqlite3FkCheck(
         fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regNew, -1);
       }
       if( regOld!=0 ){
-        /* If there is a RESTRICT action configured for the current operation
-        ** on the parent table of this FK, then throw an exception 
-        ** immediately if the FK constraint is violated, even if this is a
-        ** deferred trigger. That's what RESTRICT means. To defer checking
-        ** the constraint, the FK should specify NO ACTION (represented
-        ** using OE_None). NO ACTION is the default.  */
+        int eAction = pFKey->aAction[aChange!=0];
         fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regOld, 1);
+        /* If this is a deferred FK constraint, or a CASCADE or SET NULL
+        ** action applies, then any foreign key violations caused by
+        ** removing the parent key will be rectified by the action trigger.
+        ** So do not set the "may-abort" flag in this case.
+        **
+        ** Note 1: If the FK is declared "ON UPDATE CASCADE", then the
+        ** may-abort flag will eventually be set on this statement anyway
+        ** (when this function is called as part of processing the UPDATE
+        ** within the action trigger).
+        **
+        ** Note 2: At first glance it may seem like SQLite could simply omit
+        ** all OP_FkCounter related scans when either CASCADE or SET NULL
+        ** applies. The trouble starts if the CASCADE or SET NULL action 
+        ** trigger causes other triggers or action rules attached to the 
+        ** child table to fire. In these cases the fk constraint counters
+        ** might be set incorrectly if any OP_FkCounter related scans are 
+        ** omitted.  */
+        if( !pFKey->isDeferred && eAction!=OE_Cascade && eAction!=OE_SetNull ){
+          sqlite3MayAbort(pParse);
+        }
       }
       pItem->zName = 0;
       sqlite3SrcListDelete(db, pSrc);
@@ -100033,7 +101325,6 @@ struct sqlite3_api_routines {
 # define sqlite3_column_table_name16    0
 # define sqlite3_column_origin_name     0
 # define sqlite3_column_origin_name16   0
-# define sqlite3_table_column_metadata  0
 #endif
 
 #ifdef SQLITE_OMIT_AUTHORIZATION
@@ -100434,8 +101725,8 @@ static int sqlite3LoadExtension(
   int ii;
 
   /* Shared library endings to try if zFile cannot be loaded as written */
-  static const char *azEndings[] = {
-#if SQLITE_OS_WIN
+  static const char *const azEndings[] = {
+#if defined(_WIN32) || defined(__CYGWIN__)
      "dll"   
 #elif defined(__APPLE__)
      "dylib"
@@ -100463,14 +101754,12 @@ static int sqlite3LoadExtension(
   zEntry = zProc ? zProc : "sqlite3_extension_init";
 
   handle = sqlite3OsDlOpen(pVfs, zFile);
-#if SQLITE_OS_UNIX || SQLITE_OS_WIN
   for(ii=0; ii<ArraySize(azEndings) && handle==0; ii++){
     char *zAltFile = sqlite3_mprintf("%s.%s", zFile, azEndings[ii]);
     if( zAltFile==0 ) return SQLITE_NOMEM;
     handle = sqlite3OsDlOpen(pVfs, zAltFile);
     sqlite3_free(zAltFile);
   }
-#endif
   if( handle==0 ){
     if( pzErrMsg ){
       *pzErrMsg = zErrmsg = sqlite3_malloc(nMsg);
@@ -100843,6 +102132,7 @@ SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){
 #define PragTyp_LOCK_STATUS                   40
 #define PragTyp_PARSER_TRACE                  41
 #define PragFlag_NeedSchema           0x01
+#define PragFlag_ReadOnly             0x02
 static const struct sPragmaNames {
   const char *const zName;  /* Name of pragma */
   u8 ePragTyp;              /* PragTyp_XXX value */
@@ -100859,7 +102149,7 @@ static const struct sPragmaNames {
   { /* zName:     */ "application_id",
     /* ePragTyp:  */ PragTyp_HEADER_VALUE,
     /* ePragFlag: */ 0,
-    /* iArg:      */ 0 },
+    /* iArg:      */ BTREE_APPLICATION_ID },
 #endif
 #if !defined(SQLITE_OMIT_AUTOVACUUM)
   { /* zName:     */ "auto_vacuum",
@@ -100925,6 +102215,12 @@ static const struct sPragmaNames {
     /* ePragFlag: */ 0,
     /* iArg:      */ 0 },
 #endif
+#if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)
+  { /* zName:     */ "data_version",
+    /* ePragTyp:  */ PragTyp_HEADER_VALUE,
+    /* ePragFlag: */ PragFlag_ReadOnly,
+    /* iArg:      */ BTREE_DATA_VERSION },
+#endif
 #if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS)
   { /* zName:     */ "database_list",
     /* ePragTyp:  */ PragTyp_DATABASE_LIST,
@@ -100980,8 +102276,8 @@ static const struct sPragmaNames {
 #if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)
   { /* zName:     */ "freelist_count",
     /* ePragTyp:  */ PragTyp_HEADER_VALUE,
-    /* ePragFlag: */ 0,
-    /* iArg:      */ 0 },
+    /* ePragFlag: */ PragFlag_ReadOnly,
+    /* iArg:      */ BTREE_FREE_PAGE_COUNT },
 #endif
 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
   { /* zName:     */ "full_column_names",
@@ -101133,7 +102429,7 @@ static const struct sPragmaNames {
   { /* zName:     */ "schema_version",
     /* ePragTyp:  */ PragTyp_HEADER_VALUE,
     /* ePragFlag: */ 0,
-    /* iArg:      */ 0 },
+    /* iArg:      */ BTREE_SCHEMA_VERSION },
 #endif
 #if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
   { /* zName:     */ "secure_delete",
@@ -101199,7 +102495,7 @@ static const struct sPragmaNames {
   { /* zName:     */ "user_version",
     /* ePragTyp:  */ PragTyp_HEADER_VALUE,
     /* ePragFlag: */ 0,
-    /* iArg:      */ 0 },
+    /* iArg:      */ BTREE_USER_VERSION },
 #endif
 #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
 #if defined(SQLITE_DEBUG)
@@ -101242,7 +102538,7 @@ static const struct sPragmaNames {
     /* iArg:      */ SQLITE_WriteSchema|SQLITE_RecoveryMode },
 #endif
 };
-/* Number of pragmas: 57 on by default, 70 total. */
+/* Number of pragmas: 58 on by default, 71 total. */
 /* End of the automatically generated pragma table.
 ***************************************************************************/
 
@@ -101492,7 +102788,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
   Token *pId;            /* Pointer to <id> token */
   char *aFcntl[4];       /* Argument to SQLITE_FCNTL_PRAGMA */
   int iDb;               /* Database index for <database> */
-  int lwr, upr, mid;           /* Binary search bounds */
+  int lwr, upr, mid = 0;       /* Binary search bounds */
   int rc;                      /* return value form SQLITE_FCNTL_PRAGMA */
   sqlite3 *db = pParse->db;    /* The database connection */
   Db *pDb;                     /* The specific database being pragmaed */
@@ -102852,7 +104148,8 @@ SQLITE_PRIVATE void sqlite3Pragma(
       ){
         for(pEnc=&encnames[0]; pEnc->zName; pEnc++){
           if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){
-            ENC(pParse->db) = pEnc->enc ? pEnc->enc : SQLITE_UTF16NATIVE;
+            SCHEMA_ENC(db) = ENC(db) =
+                pEnc->enc ? pEnc->enc : SQLITE_UTF16NATIVE;
             break;
           }
         }
@@ -102897,24 +104194,9 @@ SQLITE_PRIVATE void sqlite3Pragma(
   ** applications for any purpose.
   */
   case PragTyp_HEADER_VALUE: {
-    int iCookie;   /* Cookie index. 1 for schema-cookie, 6 for user-cookie. */
+    int iCookie = aPragmaNames[mid].iArg;  /* Which cookie to read or write */
     sqlite3VdbeUsesBtree(v, iDb);
-    switch( zLeft[0] ){
-      case 'a': case 'A':
-        iCookie = BTREE_APPLICATION_ID;
-        break;
-      case 'f': case 'F':
-        iCookie = BTREE_FREE_PAGE_COUNT;
-        break;
-      case 's': case 'S':
-        iCookie = BTREE_SCHEMA_VERSION;
-        break;
-      default:
-        iCookie = BTREE_USER_VERSION;
-        break;
-    }
-
-    if( zRight && iCookie!=BTREE_FREE_PAGE_COUNT ){
+    if( zRight && (aPragmaNames[mid].mPragFlag & PragFlag_ReadOnly)==0 ){
       /* Write the specified cookie value */
       static const VdbeOpList setCookie[] = {
         { OP_Transaction,    0,  1,  0},    /* 0 */
@@ -102967,7 +104249,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
 
 #ifndef SQLITE_OMIT_WAL
   /*
-  **   PRAGMA [database.]wal_checkpoint = passive|full|restart
+  **   PRAGMA [database.]wal_checkpoint = passive|full|restart|truncate
   **
   ** Checkpoint the database.
   */
@@ -102979,6 +104261,8 @@ SQLITE_PRIVATE void sqlite3Pragma(
         eMode = SQLITE_CHECKPOINT_FULL;
       }else if( sqlite3StrICmp(zRight, "restart")==0 ){
         eMode = SQLITE_CHECKPOINT_RESTART;
+      }else if( sqlite3StrICmp(zRight, "truncate")==0 ){
+        eMode = SQLITE_CHECKPOINT_TRUNCATE;
       }
     }
     sqlite3VdbeSetNumCols(v, 3);
@@ -103558,9 +104842,11 @@ SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
   int commit_internal = !(db->flags&SQLITE_InternChanges);
   
   assert( sqlite3_mutex_held(db->mutex) );
+  assert( sqlite3BtreeHoldsMutex(db->aDb[0].pBt) );
   assert( db->init.busy==0 );
   rc = SQLITE_OK;
   db->init.busy = 1;
+  ENC(db) = SCHEMA_ENC(db);
   for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
     if( DbHasProperty(db, i, DB_SchemaLoaded) || i==1 ) continue;
     rc = sqlite3InitOne(db, i, pzErrMsg);
@@ -103873,9 +105159,12 @@ static int sqlite3LockAndPrepare(
   const char **pzTail       /* OUT: End of parsed string */
 ){
   int rc;
-  assert( ppStmt!=0 );
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( ppStmt==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   *ppStmt = 0;
-  if( !sqlite3SafetyCheckOk(db) ){
+  if( !sqlite3SafetyCheckOk(db)||zSql==0 ){
     return SQLITE_MISUSE_BKPT;
   }
   sqlite3_mutex_enter(db->mutex);
@@ -103982,9 +105271,11 @@ static int sqlite3Prepare16(
   const char *zTail8 = 0;
   int rc = SQLITE_OK;
 
-  assert( ppStmt );
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( ppStmt==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   *ppStmt = 0;
-  if( !sqlite3SafetyCheckOk(db) ){
+  if( !sqlite3SafetyCheckOk(db)||zSql==0 ){
     return SQLITE_MISUSE_BKPT;
   }
   if( nBytes>=0 ){
@@ -104110,20 +105401,25 @@ struct SortCtx {
 #define SORTFLAG_UseSorter  0x01   /* Use SorterOpen instead of OpenEphemeral */
 
 /*
-** Delete all the content of a Select structure but do not deallocate
-** the select structure itself.
+** Delete all the content of a Select structure.  Deallocate the structure
+** itself only if bFree is true.
 */
-static void clearSelect(sqlite3 *db, Select *p){
-  sqlite3ExprListDelete(db, p->pEList);
-  sqlite3SrcListDelete(db, p->pSrc);
-  sqlite3ExprDelete(db, p->pWhere);
-  sqlite3ExprListDelete(db, p->pGroupBy);
-  sqlite3ExprDelete(db, p->pHaving);
-  sqlite3ExprListDelete(db, p->pOrderBy);
-  sqlite3SelectDelete(db, p->pPrior);
-  sqlite3ExprDelete(db, p->pLimit);
-  sqlite3ExprDelete(db, p->pOffset);
-  sqlite3WithDelete(db, p->pWith);
+static void clearSelect(sqlite3 *db, Select *p, int bFree){
+  while( p ){
+    Select *pPrior = p->pPrior;
+    sqlite3ExprListDelete(db, p->pEList);
+    sqlite3SrcListDelete(db, p->pSrc);
+    sqlite3ExprDelete(db, p->pWhere);
+    sqlite3ExprListDelete(db, p->pGroupBy);
+    sqlite3ExprDelete(db, p->pHaving);
+    sqlite3ExprListDelete(db, p->pOrderBy);
+    sqlite3ExprDelete(db, p->pLimit);
+    sqlite3ExprDelete(db, p->pOffset);
+    sqlite3WithDelete(db, p->pWith);
+    if( bFree ) sqlite3DbFree(db, p);
+    p = pPrior;
+    bFree = 1;
+  }
 }
 
 /*
@@ -104182,8 +105478,7 @@ SQLITE_PRIVATE Select *sqlite3SelectNew(
   pNew->addrOpenEphm[0] = -1;
   pNew->addrOpenEphm[1] = -1;
   if( db->mallocFailed ) {
-    clearSelect(db, pNew);
-    if( pNew!=&standin ) sqlite3DbFree(db, pNew);
+    clearSelect(db, pNew, pNew!=&standin);
     pNew = 0;
   }else{
     assert( pNew->pSrc!=0 || pParse->nErr>0 );
@@ -104208,10 +105503,7 @@ SQLITE_PRIVATE void sqlite3SelectSetName(Select *p, const char *zName){
 ** Delete the given Select structure and all of its substructures.
 */
 SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3 *db, Select *p){
-  if( p ){
-    clearSelect(db, p);
-    sqlite3DbFree(db, p);
-  }
+  clearSelect(db, p, 1);
 }
 
 /*
@@ -104594,7 +105886,9 @@ static void pushOntoSorter(
     pKI = pOp->p4.pKeyInfo;
     memset(pKI->aSortOrder, 0, pKI->nField); /* Makes OP_Jump below testable */
     sqlite3VdbeChangeP4(v, -1, (char*)pKI, P4_KEYINFO);
-    pOp->p4.pKeyInfo = keyInfoFromExprList(pParse, pSort->pOrderBy, nOBSat, 1);
+    testcase( pKI->nXField>2 );
+    pOp->p4.pKeyInfo = keyInfoFromExprList(pParse, pSort->pOrderBy, nOBSat,
+                                           pKI->nXField-1);
     addrJmp = sqlite3VdbeCurrentAddr(v);
     sqlite3VdbeAddOp3(v, OP_Jump, addrJmp+1, 0, addrJmp+1); VdbeCoverage(v);
     pSort->labelBkOut = sqlite3VdbeMakeLabel(v);
@@ -105105,7 +106399,7 @@ static KeyInfo *keyInfoFromExprList(
   int i;
 
   nExpr = pList->nExpr;
-  pInfo = sqlite3KeyInfoAlloc(db, nExpr+nExtra-iStart, 1);
+  pInfo = sqlite3KeyInfoAlloc(db, nExpr-iStart, nExtra+1);
   if( pInfo ){
     assert( sqlite3KeyInfoIsWriteable(pInfo) );
     for(i=iStart, pItem=pList->a+iStart; i<nExpr; i++, pItem++){
@@ -106127,6 +107421,66 @@ static int multiSelectOrderBy(
   SelectDest *pDest     /* What to do with query results */
 );
 
+/*
+** Error message for when two or more terms of a compound select have different
+** size result sets.
+*/
+static void selectWrongNumTermsError(Parse *pParse, Select *p){
+  if( p->selFlags & SF_Values ){
+    sqlite3ErrorMsg(pParse, "all VALUES must have the same number of terms");
+  }else{
+    sqlite3ErrorMsg(pParse, "SELECTs to the left and right of %s"
+      " do not have the same number of result columns", selectOpName(p->op));
+  }
+}
+
+/*
+** Handle the special case of a compound-select that originates from a
+** VALUES clause.  By handling this as a special case, we avoid deep
+** recursion, and thus do not need to enforce the SQLITE_LIMIT_COMPOUND_SELECT
+** on a VALUES clause.
+**
+** Because the Select object originates from a VALUES clause:
+**   (1) It has no LIMIT or OFFSET
+**   (2) All terms are UNION ALL
+**   (3) There is no ORDER BY clause
+*/
+static int multiSelectValues(
+  Parse *pParse,        /* Parsing context */
+  Select *p,            /* The right-most of SELECTs to be coded */
+  SelectDest *pDest     /* What to do with query results */
+){
+  Select *pPrior;
+  int nExpr = p->pEList->nExpr;
+  int nRow = 1;
+  int rc = 0;
+  assert( p->pNext==0 );
+  assert( p->selFlags & SF_AllValues );
+  do{
+    assert( p->selFlags & SF_Values );
+    assert( p->op==TK_ALL || (p->op==TK_SELECT && p->pPrior==0) );
+    assert( p->pLimit==0 );
+    assert( p->pOffset==0 );
+    if( p->pEList->nExpr!=nExpr ){
+      selectWrongNumTermsError(pParse, p);
+      return 1;
+    }
+    if( p->pPrior==0 ) break;
+    assert( p->pPrior->pNext==p );
+    p = p->pPrior;
+    nRow++;
+  }while(1);
+  while( p ){
+    pPrior = p->pPrior;
+    p->pPrior = 0;
+    rc = sqlite3Select(pParse, p, pDest);
+    p->pPrior = pPrior;
+    if( rc ) break;
+    p->nSelectRow = nRow;
+    p = p->pNext;
+  }
+  return rc;
+}
 
 /*
 ** This routine is called to process a compound query form from
@@ -106208,17 +107562,19 @@ static int multiSelect(
     dest.eDest = SRT_Table;
   }
 
+  /* Special handling for a compound-select that originates as a VALUES clause.
+  */
+  if( p->selFlags & SF_AllValues ){
+    rc = multiSelectValues(pParse, p, &dest);
+    goto multi_select_end;
+  }
+
   /* Make sure all SELECTs in the statement have the same number of elements
   ** in their result sets.
   */
   assert( p->pEList && pPrior->pEList );
   if( p->pEList->nExpr!=pPrior->pEList->nExpr ){
-    if( p->selFlags & SF_Values ){
-      sqlite3ErrorMsg(pParse, "all VALUES must have the same number of terms");
-    }else{
-      sqlite3ErrorMsg(pParse, "SELECTs to the left and right of %s"
-        " do not have the same number of result columns", selectOpName(p->op));
-    }
+    selectWrongNumTermsError(pParse, p);
     rc = 1;
     goto multi_select_end;
   }
@@ -108104,7 +109460,9 @@ static int selectExpander(Walker *pWalker, Select *p){
   }
   pTabList = p->pSrc;
   pEList = p->pEList;
-  sqlite3WithPush(pParse, findRightmost(p)->pWith, 0);
+  if( pWalker->xSelectCallback2==selectPopWith ){
+    sqlite3WithPush(pParse, findRightmost(p)->pWith, 0);
+  }
 
   /* Make sure cursor numbers have been assigned to all entries in
   ** the FROM clause of the SELECT statement.
@@ -108138,7 +109496,7 @@ static int selectExpander(Walker *pWalker, Select *p){
       /* A sub-query in the FROM clause of a SELECT */
       assert( pSel!=0 );
       assert( pFrom->pTab==0 );
-      sqlite3WalkSelect(pWalker, pSel);
+      if( sqlite3WalkSelect(pWalker, pSel) ) return WRC_Abort;
       pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
       if( pTab==0 ) return WRC_Abort;
       pTab->nRef = 1;
@@ -108395,7 +109753,9 @@ static void sqlite3SelectExpand(Parse *pParse, Select *pSelect){
     sqlite3WalkSelect(&w, pSelect);
   }
   w.xSelectCallback = selectExpander;
-  w.xSelectCallback2 = selectPopWith;
+  if( (pSelect->selFlags & SF_AllValues)==0 ){
+    w.xSelectCallback2 = selectPopWith;
+  }
   sqlite3WalkSelect(&w, pSelect);
 }
 
@@ -108881,7 +110241,7 @@ SQLITE_PRIVATE int sqlite3Select(
   **
   ** is transformed to:
   **
-  **     SELECT xyz FROM ... GROUP BY xyz
+  **     SELECT xyz FROM ... GROUP BY xyz ORDER BY xyz
   **
   ** The second form is preferred as a single index (or temp-table) may be 
   ** used for both the ORDER BY and DISTINCT processing. As originally 
@@ -108894,7 +110254,6 @@ SQLITE_PRIVATE int sqlite3Select(
     p->selFlags &= ~SF_Distinct;
     p->pGroupBy = sqlite3ExprListDup(db, p->pEList, 0);
     pGroupBy = p->pGroupBy;
-    sSort.pOrderBy = 0;
     /* Notice that even thought SF_Distinct has been cleared from p->selFlags,
     ** the sDistinct.isTnct is still set.  Hence, isTnct represents the
     ** original setting of the SF_Distinct flag, not the current setting */
@@ -108910,7 +110269,7 @@ SQLITE_PRIVATE int sqlite3Select(
   */
   if( sSort.pOrderBy ){
     KeyInfo *pKeyInfo;
-    pKeyInfo = keyInfoFromExprList(pParse, sSort.pOrderBy, 0, 0);
+    pKeyInfo = keyInfoFromExprList(pParse, sSort.pOrderBy, 0, pEList->nExpr);
     sSort.iECursor = pParse->nTab++;
     sSort.addrSortIndex =
       sqlite3VdbeAddOp4(v, OP_OpenEphemeral,
@@ -109084,7 +110443,7 @@ SQLITE_PRIVATE int sqlite3Select(
       ** will be converted into a Noop.  
       */
       sAggInfo.sortingIdx = pParse->nTab++;
-      pKeyInfo = keyInfoFromExprList(pParse, pGroupBy, 0, 0);
+      pKeyInfo = keyInfoFromExprList(pParse, pGroupBy, 0, sAggInfo.nColumn);
       addrSortingIdx = sqlite3VdbeAddOp4(v, OP_SorterOpen, 
           sAggInfo.sortingIdx, sAggInfo.nSortingColumn, 
           0, (char*)pKeyInfo, P4_KEYINFO);
@@ -109697,6 +111056,9 @@ SQLITE_API int sqlite3_get_table(
   int rc;
   TabResult res;
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || pazResult==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   *pazResult = 0;
   if( pnColumn ) *pnColumn = 0;
   if( pnRow ) *pnRow = 0;
@@ -111760,7 +113122,7 @@ static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
 ** overwriting the database with the vacuumed content.
 **
 ** Only 1x temporary space and only 1x writes would be required if
-** the copy of step (3) were replace by deleting the original database
+** the copy of step (3) were replaced by deleting the original database
 ** and renaming the transient database as the original.  But that will
 ** not work if other processes are attached to the original database.
 ** And a power loss in between deleting the original and renaming the
@@ -112118,6 +113480,9 @@ SQLITE_API int sqlite3_create_module(
   const sqlite3_module *pModule,  /* The definition of the module */
   void *pAux                      /* Context pointer for xCreate/xConnect */
 ){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   return createModule(db, zName, pModule, pAux, 0);
 }
 
@@ -112131,6 +113496,9 @@ SQLITE_API int sqlite3_create_module_v2(
   void *pAux,                     /* Context pointer for xCreate/xConnect */
   void (*xDestroy)(void *)        /* Module destructor function */
 ){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   return createModule(db, zName, pModule, pAux, xDestroy);
 }
 
@@ -112363,7 +113731,12 @@ SQLITE_PRIVATE void sqlite3VtabBeginParse(
   addModuleArgument(db, pTable, sqlite3NameFromToken(db, pModuleName));
   addModuleArgument(db, pTable, 0);
   addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
-  pParse->sNameToken.n = (int)(&pModuleName->z[pModuleName->n] - pName1->z);
+  assert( (pParse->sNameToken.z==pName2->z && pName2->z!=0)
+       || (pParse->sNameToken.z==pName1->z && pName2->z==0)
+  );
+  pParse->sNameToken.n = (int)(
+      &pModuleName->z[pModuleName->n] - pParse->sNameToken.z
+  );
 
 #ifndef SQLITE_OMIT_AUTHORIZATION
   /* Creating a virtual table invokes the authorization callback twice.
@@ -112735,6 +114108,9 @@ SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
   Table *pTab;
   char *zErr = 0;
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   if( !db->pVtabCtx || !(pTab = db->pVtabCtx->pTab) ){
     sqlite3Error(db, SQLITE_MISUSE);
@@ -113091,6 +114467,9 @@ SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *db){
   static const unsigned char aMap[] = { 
     SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE 
   };
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   assert( OE_Rollback==1 && OE_Abort==2 && OE_Fail==3 );
   assert( OE_Ignore==4 && OE_Replace==5 );
   assert( db->vtabOnConflict>=1 && db->vtabOnConflict<=5 );
@@ -113106,8 +114485,10 @@ SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){
   va_list ap;
   int rc = SQLITE_OK;
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
-
   va_start(ap, op);
   switch( op ){
     case SQLITE_VTAB_CONSTRAINT_SUPPORT: {
@@ -113242,6 +114623,9 @@ struct WhereLevel {
   } u;
   struct WhereLoop *pWLoop;  /* The selected WhereLoop object */
   Bitmask notReady;          /* FROM entries not usable at this level */
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+  int addrVisit;        /* Address at which row is visited */
+#endif
 };
 
 /*
@@ -113272,7 +114656,6 @@ struct WhereLoop {
   union {
     struct {               /* Information for internal btree tables */
       u16 nEq;               /* Number of equality constraints */
-      u16 nSkip;             /* Number of initial index columns to skip */
       Index *pIndex;         /* Index used, or NULL */
     } btree;
     struct {               /* Information for virtual tables */
@@ -113285,12 +114668,13 @@ struct WhereLoop {
   } u;
   u32 wsFlags;          /* WHERE_* flags describing the plan */
   u16 nLTerm;           /* Number of entries in aLTerm[] */
+  u16 nSkip;            /* Number of NULL aLTerm[] entries */
   /**** whereLoopXfer() copies fields above ***********************/
 # define WHERE_LOOP_XFER_SZ offsetof(WhereLoop,nLSlot)
   u16 nLSlot;           /* Number of slots allocated for aLTerm[] */
   WhereTerm **aLTerm;   /* WhereTerms used */
   WhereLoop *pNextLoop; /* Next WhereLoop object in the WhereClause */
-  WhereTerm *aLTermSpace[4];  /* Initial aLTerm[] space */
+  WhereTerm *aLTermSpace[3];  /* Initial aLTerm[] space */
 };
 
 /* This object holds the prerequisites and the cost of running a
@@ -113616,6 +115000,7 @@ struct WhereInfo {
 #define WHERE_AUTO_INDEX   0x00004000  /* Uses an ephemeral index */
 #define WHERE_SKIPSCAN     0x00008000  /* Uses the skip-scan algorithm */
 #define WHERE_UNQ_WANTED   0x00010000  /* WHERE_ONEROW would have been helpful*/
+#define WHERE_PARTIALIDX   0x00020000  /* The automatic index is partial */
 
 /************** End of whereInt.h ********************************************/
 /************** Continuing where we left off in where.c **********************/
@@ -113823,10 +115208,11 @@ static int whereClauseInsert(WhereClause *pWC, Expr *p, u8 wtFlags){
       sqlite3DbFree(db, pOld);
     }
     pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
+    memset(&pWC->a[pWC->nTerm], 0, sizeof(pWC->a[0])*(pWC->nSlot-pWC->nTerm));
   }
   pTerm = &pWC->a[idx = pWC->nTerm++];
   if( p && ExprHasProperty(p, EP_Unlikely) ){
-    pTerm->truthProb = sqlite3LogEst(p->iTable) - 99;
+    pTerm->truthProb = sqlite3LogEst(p->iTable) - 270;
   }else{
     pTerm->truthProb = 1;
   }
@@ -114357,6 +115743,15 @@ static void transferJoinMarkings(Expr *pDerived, Expr *pBase){
   }
 }
 
+/*
+** Mark term iChild as being a child of term iParent
+*/
+static void markTermAsChild(WhereClause *pWC, int iChild, int iParent){
+  pWC->a[iChild].iParent = iParent;
+  pWC->a[iChild].truthProb = pWC->a[iParent].truthProb;
+  pWC->a[iParent].nChild++;
+}
+
 #if !defined(SQLITE_OMIT_OR_OPTIMIZATION) && !defined(SQLITE_OMIT_SUBQUERY)
 /*
 ** Analyze a term that consists of two or more OR-connected
@@ -114654,8 +116049,7 @@ static void exprAnalyzeOrTerm(
         testcase( idxNew==0 );
         exprAnalyze(pSrc, pWC, idxNew);
         pTerm = &pWC->a[idxTerm];
-        pWC->a[idxNew].iParent = idxTerm;
-        pTerm->nChild = 1;
+        markTermAsChild(pWC, idxNew, idxTerm);
       }else{
         sqlite3ExprListDelete(db, pList);
       }
@@ -114757,9 +116151,8 @@ static void exprAnalyze(
         idxNew = whereClauseInsert(pWC, pDup, TERM_VIRTUAL|TERM_DYNAMIC);
         if( idxNew==0 ) return;
         pNew = &pWC->a[idxNew];
-        pNew->iParent = idxTerm;
+        markTermAsChild(pWC, idxNew, idxTerm);
         pTerm = &pWC->a[idxTerm];
-        pTerm->nChild = 1;
         pTerm->wtFlags |= TERM_COPIED;
         if( pExpr->op==TK_EQ
          && !ExprHasProperty(pExpr, EP_FromJoin)
@@ -114816,9 +116209,8 @@ static void exprAnalyze(
       testcase( idxNew==0 );
       exprAnalyze(pSrc, pWC, idxNew);
       pTerm = &pWC->a[idxTerm];
-      pWC->a[idxNew].iParent = idxTerm;
+      markTermAsChild(pWC, idxNew, idxTerm);
     }
-    pTerm->nChild = 2;
   }
 #endif /* SQLITE_OMIT_BETWEEN_OPTIMIZATION */
 
@@ -114893,9 +116285,8 @@ static void exprAnalyze(
     exprAnalyze(pSrc, pWC, idxNew2);
     pTerm = &pWC->a[idxTerm];
     if( isComplete ){
-      pWC->a[idxNew1].iParent = idxTerm;
-      pWC->a[idxNew2].iParent = idxTerm;
-      pTerm->nChild = 2;
+      markTermAsChild(pWC, idxNew1, idxTerm);
+      markTermAsChild(pWC, idxNew2, idxTerm);
     }
   }
 #endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */
@@ -114928,9 +116319,8 @@ static void exprAnalyze(
       pNewTerm->leftCursor = pLeft->iTable;
       pNewTerm->u.leftColumn = pLeft->iColumn;
       pNewTerm->eOperator = WO_MATCH;
-      pNewTerm->iParent = idxTerm;
+      markTermAsChild(pWC, idxNew, idxTerm);
       pTerm = &pWC->a[idxTerm];
-      pTerm->nChild = 1;
       pTerm->wtFlags |= TERM_COPIED;
       pNewTerm->prereqAll = pTerm->prereqAll;
     }
@@ -114951,7 +116341,7 @@ static void exprAnalyze(
   if( pExpr->op==TK_NOTNULL
    && pExpr->pLeft->op==TK_COLUMN
    && pExpr->pLeft->iColumn>=0
-   && OptimizationEnabled(db, SQLITE_Stat3)
+   && OptimizationEnabled(db, SQLITE_Stat34)
   ){
     Expr *pNewExpr;
     Expr *pLeft = pExpr->pLeft;
@@ -114970,9 +116360,8 @@ static void exprAnalyze(
       pNewTerm->leftCursor = pLeft->iTable;
       pNewTerm->u.leftColumn = pLeft->iColumn;
       pNewTerm->eOperator = WO_GT;
-      pNewTerm->iParent = idxTerm;
+      markTermAsChild(pWC, idxNew, idxTerm);
       pTerm = &pWC->a[idxTerm];
-      pTerm->nChild = 1;
       pTerm->wtFlags |= TERM_COPIED;
       pNewTerm->prereqAll = pTerm->prereqAll;
     }
@@ -115192,6 +116581,8 @@ static void constructAutomaticIndex(
   Bitmask idxCols;            /* Bitmap of columns used for indexing */
   Bitmask extraCols;          /* Bitmap of additional columns */
   u8 sentWarning = 0;         /* True if a warnning has been issued */
+  Expr *pPartial = 0;         /* Partial Index Expression */
+  int iContinue = 0;          /* Jump here to skip excluded rows */
 
   /* Generate code to skip over the creation and initialization of the
   ** transient index on 2nd and subsequent iterations of the loop. */
@@ -115207,6 +116598,13 @@ static void constructAutomaticIndex(
   pLoop = pLevel->pWLoop;
   idxCols = 0;
   for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
+    if( pLoop->prereq==0
+     && (pTerm->wtFlags & TERM_VIRTUAL)==0
+     && !ExprHasProperty(pTerm->pExpr, EP_FromJoin)
+     && sqlite3ExprIsTableConstant(pTerm->pExpr, pSrc->iCursor) ){
+      pPartial = sqlite3ExprAnd(pParse->db, pPartial,
+                                sqlite3ExprDup(pParse->db, pTerm->pExpr, 0));
+    }
     if( termCanDriveIndex(pTerm, pSrc, notReady) ){
       int iCol = pTerm->u.leftColumn;
       Bitmask cMask = iCol>=BMS ? MASKBIT(BMS-1) : MASKBIT(iCol);
@@ -115219,7 +116617,9 @@ static void constructAutomaticIndex(
         sentWarning = 1;
       }
       if( (idxCols & cMask)==0 ){
-        if( whereLoopResize(pParse->db, pLoop, nKeyCol+1) ) return;
+        if( whereLoopResize(pParse->db, pLoop, nKeyCol+1) ){
+          goto end_auto_index_create;
+        }
         pLoop->aLTerm[nKeyCol++] = pTerm;
         idxCols |= cMask;
       }
@@ -115239,7 +116639,7 @@ static void constructAutomaticIndex(
   ** if they go out of sync.
   */
   extraCols = pSrc->colUsed & (~idxCols | MASKBIT(BMS-1));
-  mxBitCol = (pTable->nCol >= BMS-1) ? BMS-1 : pTable->nCol;
+  mxBitCol = MIN(BMS-1,pTable->nCol);
   testcase( pTable->nCol==BMS-1 );
   testcase( pTable->nCol==BMS-2 );
   for(i=0; i<mxBitCol; i++){
@@ -115248,11 +116648,10 @@ static void constructAutomaticIndex(
   if( pSrc->colUsed & MASKBIT(BMS-1) ){
     nKeyCol += pTable->nCol - BMS + 1;
   }
-  pLoop->wsFlags |= WHERE_COLUMN_EQ | WHERE_IDX_ONLY;
 
   /* Construct the Index object to describe this index */
   pIdx = sqlite3AllocateIndexObject(pParse->db, nKeyCol+1, 0, &zNotUsed);
-  if( pIdx==0 ) return;
+  if( pIdx==0 ) goto end_auto_index_create;
   pLoop->u.btree.pIndex = pIdx;
   pIdx->zName = "auto-index";
   pIdx->pTable = pTable;
@@ -115304,18 +116703,29 @@ static void constructAutomaticIndex(
   VdbeComment((v, "for %s", pTable->zName));
 
   /* Fill the automatic index with content */
+  sqlite3ExprCachePush(pParse);
   addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, pLevel->iTabCur); VdbeCoverage(v);
+  if( pPartial ){
+    iContinue = sqlite3VdbeMakeLabel(v);
+    sqlite3ExprIfFalse(pParse, pPartial, iContinue, SQLITE_JUMPIFNULL);
+    pLoop->wsFlags |= WHERE_PARTIALIDX;
+  }
   regRecord = sqlite3GetTempReg(pParse);
   sqlite3GenerateIndexKey(pParse, pIdx, pLevel->iTabCur, regRecord, 0, 0, 0, 0);
   sqlite3VdbeAddOp2(v, OP_IdxInsert, pLevel->iIdxCur, regRecord);
   sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
+  if( pPartial ) sqlite3VdbeResolveLabel(v, iContinue);
   sqlite3VdbeAddOp2(v, OP_Next, pLevel->iTabCur, addrTop+1); VdbeCoverage(v);
   sqlite3VdbeChangeP5(v, SQLITE_STMTSTATUS_AUTOINDEX);
   sqlite3VdbeJumpHere(v, addrTop);
   sqlite3ReleaseTempReg(pParse, regRecord);
+  sqlite3ExprCachePop(pParse);
   
   /* Jump here when skipping the initialization */
   sqlite3VdbeJumpHere(v, addrInit);
+
+end_auto_index_create:
+  sqlite3ExprDelete(pParse->db, pPartial);
 }
 #endif /* SQLITE_OMIT_AUTOMATIC_INDEX */
 
@@ -115475,7 +116885,6 @@ static int vtabBestIndex(Parse *pParse, Table *pTab, sqlite3_index_info *p){
 }
 #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
 
-
 #ifdef SQLITE_ENABLE_STAT3_OR_STAT4
 /*
 ** Estimate the location of a particular key among all keys in an
@@ -115484,9 +116893,10 @@ static int vtabBestIndex(Parse *pParse, Table *pTab, sqlite3_index_info *p){
 **    aStat[0]      Est. number of rows less than pVal
 **    aStat[1]      Est. number of rows equal to pVal
 **
-** Return SQLITE_OK on success.
+** Return the index of the sample that is the smallest sample that
+** is greater than or equal to pRec.
 */
-static void whereKeyStats(
+static int whereKeyStats(
   Parse *pParse,              /* Database connection */
   Index *pIdx,                /* Index to consider domain of */
   UnpackedRecord *pRec,       /* Vector of values to consider */
@@ -115568,6 +116978,7 @@ static void whereKeyStats(
     }
     aStat[0] = iLower + iGap;
   }
+  return i;
 }
 #endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */
 
@@ -115718,7 +117129,7 @@ static int whereRangeSkipScanEst(
 ** If either of the upper or lower bound is not present, then NULL is passed in
 ** place of the corresponding WhereTerm.
 **
-** The value in (pBuilder->pNew->u.btree.nEq) is the index of the index
+** The value in (pBuilder->pNew->u.btree.nEq) is the number of the index
 ** column subject to the range constraint. Or, equivalently, the number of
 ** equality constraints optimized by the proposed index scan. For example,
 ** assuming index p is on t1(a, b), and the SQL query is:
@@ -115734,7 +117145,7 @@ static int whereRangeSkipScanEst(
 **
 ** When this function is called, *pnOut is set to the sqlite3LogEst() of the
 ** number of rows that the index scan is expected to visit without 
-** considering the range constraints. If nEq is 0, this is the number of 
+** considering the range constraints. If nEq is 0, then *pnOut is the number of 
 ** rows in the index. Assuming no error occurs, *pnOut is adjusted (reduced)
 ** to account for the range constraints pLower and pUpper.
 ** 
@@ -115758,10 +117169,7 @@ static int whereRangeScanEst(
   Index *p = pLoop->u.btree.pIndex;
   int nEq = pLoop->u.btree.nEq;
 
-  if( p->nSample>0
-   && nEq<p->nSampleCol
-   && OptimizationEnabled(pParse->db, SQLITE_Stat3) 
-  ){
+  if( p->nSample>0 && nEq<p->nSampleCol ){
     if( nEq==pBuilder->nRecValid ){
       UnpackedRecord *pRec = pBuilder->pRec;
       tRowcnt a[2];
@@ -115777,15 +117185,19 @@ static int whereRangeScanEst(
       ** is not a simple variable or literal value), the lower bound of the
       ** range is $P. Due to a quirk in the way whereKeyStats() works, even
       ** if $L is available, whereKeyStats() is called for both ($P) and 
-      ** ($P:$L) and the larger of the two returned values used.
+      ** ($P:$L) and the larger of the two returned values is used.
       **
       ** Similarly, iUpper is to be set to the estimate of the number of rows
       ** less than the upper bound of the range query. Where the upper bound
       ** is either ($P) or ($P:$U). Again, even if $U is available, both values
       ** of iUpper are requested of whereKeyStats() and the smaller used.
+      **
+      ** The number of rows between the two bounds is then just iUpper-iLower.
       */
-      tRowcnt iLower;
-      tRowcnt iUpper;
+      tRowcnt iLower;     /* Rows less than the lower bound */
+      tRowcnt iUpper;     /* Rows less than the upper bound */
+      int iLwrIdx = -2;   /* aSample[] for the lower bound */
+      int iUprIdx = -1;   /* aSample[] for the upper bound */
 
       if( pRec ){
         testcase( pRec->nField!=pBuilder->nRecValid );
@@ -115799,7 +117211,7 @@ static int whereRangeScanEst(
       /* Determine iLower and iUpper using ($P) only. */
       if( nEq==0 ){
         iLower = 0;
-        iUpper = sqlite3LogEstToInt(p->aiRowLogEst[0]);
+        iUpper = p->nRowEst0;
       }else{
         /* Note: this call could be optimized away - since the same values must 
         ** have been requested when testing key $P in whereEqualScanEst().  */
@@ -115823,7 +117235,7 @@ static int whereRangeScanEst(
         rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq, &bOk);
         if( rc==SQLITE_OK && bOk ){
           tRowcnt iNew;
-          whereKeyStats(pParse, p, pRec, 0, a);
+          iLwrIdx = whereKeyStats(pParse, p, pRec, 0, a);
           iNew = a[0] + ((pLower->eOperator & (WO_GT|WO_LE)) ? a[1] : 0);
           if( iNew>iLower ) iLower = iNew;
           nOut--;
@@ -115838,7 +117250,7 @@ static int whereRangeScanEst(
         rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq, &bOk);
         if( rc==SQLITE_OK && bOk ){
           tRowcnt iNew;
-          whereKeyStats(pParse, p, pRec, 1, a);
+          iUprIdx = whereKeyStats(pParse, p, pRec, 1, a);
           iNew = a[0] + ((pUpper->eOperator & (WO_GT|WO_LE)) ? a[1] : 0);
           if( iNew<iUpper ) iUpper = iNew;
           nOut--;
@@ -115850,6 +117262,11 @@ static int whereRangeScanEst(
       if( rc==SQLITE_OK ){
         if( iUpper>iLower ){
           nNew = sqlite3LogEst(iUpper - iLower);
+          /* TUNING:  If both iUpper and iLower are derived from the same
+          ** sample, then assume they are 4x more selective.  This brings
+          ** the estimated selectivity more in line with what it would be
+          ** if estimated without the use of STAT3/4 tables. */
+          if( iLwrIdx==iUprIdx ) nNew -= 20;  assert( 20==sqlite3LogEst(4) );
         }else{
           nNew = 10;        assert( 10==sqlite3LogEst(2) );
         }
@@ -115874,12 +117291,15 @@ static int whereRangeScanEst(
   nNew = whereRangeAdjust(pLower, nOut);
   nNew = whereRangeAdjust(pUpper, nNew);
 
-  /* TUNING: If there is both an upper and lower limit, assume the range is
+  /* TUNING: If there is both an upper and lower limit and neither limit
+  ** has an application-defined likelihood(), assume the range is
   ** reduced by an additional 75%. This means that, by default, an open-ended
   ** range query (e.g. col > ?) is assumed to match 1/4 of the rows in the
   ** index. While a closed range (e.g. col BETWEEN ? AND ?) is estimated to
   ** match 1/64 of the index. */ 
-  if( pLower && pUpper ) nNew -= 20;
+  if( pLower && pLower->truthProb>0 && pUpper && pUpper->truthProb>0 ){
+    nNew -= 20;
+  }
 
   nOut -= (pLower!=0) + (pUpper!=0);
   if( nNew<10 ) nNew = 10;
@@ -116239,7 +117659,7 @@ static int codeAllEqualityTerms(
   pLoop = pLevel->pWLoop;
   assert( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 );
   nEq = pLoop->u.btree.nEq;
-  nSkip = pLoop->u.btree.nSkip;
+  nSkip = pLoop->nSkip;
   pIdx = pLoop->u.btree.pIndex;
   assert( pIdx!=0 );
 
@@ -116353,7 +117773,7 @@ static void explainAppendTerm(
 static void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop, Table *pTab){
   Index *pIndex = pLoop->u.btree.pIndex;
   u16 nEq = pLoop->u.btree.nEq;
-  u16 nSkip = pLoop->u.btree.nSkip;
+  u16 nSkip = pLoop->nSkip;
   int i, j;
   Column *aCol = pTab->aCol;
   i16 *aiColumn = pIndex->aiColumn;
@@ -116384,11 +117804,14 @@ static void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop, Table *pTab){
 
 /*
 ** This function is a no-op unless currently processing an EXPLAIN QUERY PLAN
-** command. If the query being compiled is an EXPLAIN QUERY PLAN, a single
-** record is added to the output to describe the table scan strategy in 
-** pLevel.
+** command, or if either SQLITE_DEBUG or SQLITE_ENABLE_STMT_SCANSTATUS was
+** defined at compile-time. If it is not a no-op, a single OP_Explain opcode 
+** is added to the output to describe the table scan strategy in pLevel.
+**
+** If an OP_Explain opcode is added to the VM, its address is returned.
+** Otherwise, if no OP_Explain is coded, zero is returned.
 */
-static void explainOneScan(
+static int explainOneScan(
   Parse *pParse,                  /* Parse context */
   SrcList *pTabList,              /* Table list this loop refers to */
   WhereLevel *pLevel,             /* Scan to write OP_Explain opcode for */
@@ -116396,7 +117819,8 @@ static void explainOneScan(
   int iFrom,                      /* Value for "from" column of output */
   u16 wctrlFlags                  /* Flags passed to sqlite3WhereBegin() */
 ){
-#ifndef SQLITE_DEBUG
+  int ret = 0;
+#if !defined(SQLITE_DEBUG) && !defined(SQLITE_ENABLE_STMT_SCANSTATUS)
   if( pParse->explain==2 )
 #endif
   {
@@ -116413,7 +117837,7 @@ static void explainOneScan(
 
     pLoop = pLevel->pWLoop;
     flags = pLoop->wsFlags;
-    if( (flags&WHERE_MULTI_OR) || (wctrlFlags&WHERE_ONETABLE_ONLY) ) return;
+    if( (flags&WHERE_MULTI_OR) || (wctrlFlags&WHERE_ONETABLE_ONLY) ) return 0;
 
     isSearch = (flags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))!=0
             || ((flags&WHERE_VIRTUALTABLE)==0 && (pLoop->u.btree.nEq>0))
@@ -116442,6 +117866,8 @@ static void explainOneScan(
         if( isSearch ){
           zFmt = "PRIMARY KEY";
         }
+      }else if( flags & WHERE_PARTIALIDX ){
+        zFmt = "AUTOMATIC PARTIAL COVERING INDEX";
       }else if( flags & WHERE_AUTO_INDEX ){
         zFmt = "AUTOMATIC COVERING INDEX";
       }else if( flags & WHERE_IDX_ONLY ){
@@ -116483,13 +117909,46 @@ static void explainOneScan(
     }
 #endif
     zMsg = sqlite3StrAccumFinish(&str);
-    sqlite3VdbeAddOp4(v, OP_Explain, iId, iLevel, iFrom, zMsg, P4_DYNAMIC);
+    ret = sqlite3VdbeAddOp4(v, OP_Explain, iId, iLevel, iFrom, zMsg,P4_DYNAMIC);
   }
+  return ret;
 }
 #else
-# define explainOneScan(u,v,w,x,y,z)
+# define explainOneScan(u,v,w,x,y,z) 0
 #endif /* SQLITE_OMIT_EXPLAIN */
 
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+/*
+** Configure the VM passed as the first argument with an
+** sqlite3_stmt_scanstatus() entry corresponding to the scan used to 
+** implement level pLvl. Argument pSrclist is a pointer to the FROM 
+** clause that the scan reads data from.
+**
+** If argument addrExplain is not 0, it must be the address of an 
+** OP_Explain instruction that describes the same loop.
+*/
+static void addScanStatus(
+  Vdbe *v,                        /* Vdbe to add scanstatus entry to */
+  SrcList *pSrclist,              /* FROM clause pLvl reads data from */
+  WhereLevel *pLvl,               /* Level to add scanstatus() entry for */
+  int addrExplain                 /* Address of OP_Explain (or 0) */
+){
+  const char *zObj = 0;
+  WhereLoop *pLoop = pLvl->pWLoop;
+  if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0  &&  pLoop->u.btree.pIndex!=0 ){
+    zObj = pLoop->u.btree.pIndex->zName;
+  }else{
+    zObj = pSrclist->a[pLvl->iFrom].zName;
+  }
+  sqlite3VdbeScanStatus(
+      v, addrExplain, pLvl->addrBody, pLvl->addrVisit, pLoop->nOut, zObj
+  );
+}
+#else
+# define addScanStatus(a, b, c, d) ((void)d)
+#endif
+
+
 
 /*
 ** Generate code for the start of the iLevel-th loop in the WHERE clause
@@ -116790,7 +118249,7 @@ static Bitmask codeOneLoopStart(
 
     pIdx = pLoop->u.btree.pIndex;
     iIdxCur = pLevel->iIdxCur;
-    assert( nEq>=pLoop->u.btree.nSkip );
+    assert( nEq>=pLoop->nSkip );
 
     /* If this loop satisfies a sort order (pOrderBy) request that 
     ** was passed to this function to implement a "SELECT min(x) ..." 
@@ -116807,7 +118266,7 @@ static Bitmask codeOneLoopStart(
      && pWInfo->nOBSat>0
      && (pIdx->nKeyCol>nEq)
     ){
-      assert( pLoop->u.btree.nSkip==0 );
+      assert( pLoop->nSkip==0 );
       bSeekPastNull = 1;
       nExtraReg = 1;
     }
@@ -117120,10 +118579,9 @@ static Bitmask codeOneLoopStart(
         Expr *pExpr = pWC->a[iTerm].pExpr;
         if( &pWC->a[iTerm] == pTerm ) continue;
         if( ExprHasProperty(pExpr, EP_FromJoin) ) continue;
-        testcase( pWC->a[iTerm].wtFlags & TERM_ORINFO );
-        testcase( pWC->a[iTerm].wtFlags & TERM_VIRTUAL );
-        if( pWC->a[iTerm].wtFlags & (TERM_ORINFO|TERM_VIRTUAL) ) continue;
+        if( (pWC->a[iTerm].wtFlags & TERM_VIRTUAL)!=0 ) continue;
         if( (pWC->a[iTerm].eOperator & WO_ALL)==0 ) continue;
+        testcase( pWC->a[iTerm].wtFlags & TERM_ORINFO );
         pExpr = sqlite3ExprDup(db, pExpr, 0);
         pAndExpr = sqlite3ExprAnd(db, pAndExpr, pExpr);
       }
@@ -117156,9 +118614,11 @@ static Bitmask codeOneLoopStart(
         assert( pSubWInfo || pParse->nErr || db->mallocFailed );
         if( pSubWInfo ){
           WhereLoop *pSubLoop;
-          explainOneScan(
+          int addrExplain = explainOneScan(
               pParse, pOrTab, &pSubWInfo->a[0], iLevel, pLevel->iFrom, 0
           );
+          addScanStatus(v, pOrTab, &pSubWInfo->a[0], addrExplain);
+
           /* This is the sub-WHERE clause body.  First skip over
           ** duplicate rows from prior sub-WHERE clauses, and record the
           ** rowid (or PRIMARY KEY) for the current row so that the same
@@ -117289,6 +118749,10 @@ static Bitmask codeOneLoopStart(
     }
   }
 
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+  pLevel->addrVisit = sqlite3VdbeCurrentAddr(v);
+#endif
+
   /* Insert code to test every subexpression that can be completely
   ** computed using the current set of tables.
   */
@@ -117428,7 +118892,7 @@ static void whereLoopPrint(WhereLoop *p, WhereClause *pWC){
     sqlite3_free(z);
   }
   if( p->wsFlags & WHERE_SKIPSCAN ){
-    sqlite3DebugPrintf(" f %05x %d-%d", p->wsFlags, p->nLTerm,p->u.btree.nSkip);
+    sqlite3DebugPrintf(" f %05x %d-%d", p->wsFlags, p->nLTerm,p->nSkip);
   }else{
     sqlite3DebugPrintf(" f %05x N %d", p->wsFlags, p->nLTerm);
   }
@@ -117464,7 +118928,6 @@ static void whereLoopClearUnion(sqlite3 *db, WhereLoop *p){
       p->u.vtab.idxStr = 0;
     }else if( (p->wsFlags & WHERE_AUTO_INDEX)!=0 && p->u.btree.pIndex!=0 ){
       sqlite3DbFree(db, p->u.btree.pIndex->zColAff);
-      sqlite3KeyInfoUnref(p->u.btree.pIndex->pKeyInfo);
       sqlite3DbFree(db, p->u.btree.pIndex);
       p->u.btree.pIndex = 0;
     }
@@ -117539,10 +119002,11 @@ static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
 }
 
 /*
-** Return TRUE if both of the following are true:
+** Return TRUE if all of the following are true:
 **
 **   (1)  X has the same or lower cost that Y
 **   (2)  X is a proper subset of Y
+**   (3)  X skips at least as many columns as Y
 **
 ** By "proper subset" we mean that X uses fewer WHERE clause terms
 ** than Y and that every WHERE clause term used by X is also used
@@ -117550,19 +119014,25 @@ static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
 **
 ** If X is a proper subset of Y then Y is a better choice and ought
 ** to have a lower cost.  This routine returns TRUE when that cost 
-** relationship is inverted and needs to be adjusted.
+** relationship is inverted and needs to be adjusted.  The third rule
+** was added because if X uses skip-scan less than Y it still might
+** deserve a lower cost even if it is a proper subset of Y.
 */
 static int whereLoopCheaperProperSubset(
   const WhereLoop *pX,       /* First WhereLoop to compare */
   const WhereLoop *pY        /* Compare against this WhereLoop */
 ){
   int i, j;
-  if( pX->nLTerm >= pY->nLTerm ) return 0; /* X is not a subset of Y */
+  if( pX->nLTerm-pX->nSkip >= pY->nLTerm-pY->nSkip ){
+    return 0; /* X is not a subset of Y */
+  }
+  if( pY->nSkip > pX->nSkip ) return 0;
   if( pX->rRun >= pY->rRun ){
     if( pX->rRun > pY->rRun ) return 0;    /* X costs more than Y */
     if( pX->nOut > pY->nOut ) return 0;    /* X costs more than Y */
   }
   for(i=pX->nLTerm-1; i>=0; i--){
+    if( pX->aLTerm[i]==0 ) continue;
     for(j=pY->nLTerm-1; j>=0; j--){
       if( pY->aLTerm[j]==pX->aLTerm[i] ) break;
     }
@@ -117584,33 +119054,24 @@ static int whereLoopCheaperProperSubset(
 ** To say "WhereLoop X is a proper subset of Y" means that X uses fewer
 ** WHERE clause terms than Y and that every WHERE clause term used by X is
 ** also used by Y.
-**
-** This adjustment is omitted for SKIPSCAN loops.  In a SKIPSCAN loop, the
-** WhereLoop.nLTerm field is not an accurate measure of the number of WHERE
-** clause terms covered, since some of the first nLTerm entries in aLTerm[]
-** will be NULL (because they are skipped).  That makes it more difficult
-** to compare the loops.  We could add extra code to do the comparison, and
-** perhaps we will someday.  But SKIPSCAN is sufficiently uncommon, and this
-** adjustment is sufficient minor, that it is very difficult to construct
-** a test case where the extra code would improve the query plan.  Better
-** to avoid the added complexity and just omit cost adjustments to SKIPSCAN
-** loops.
 */
 static void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){
   if( (pTemplate->wsFlags & WHERE_INDEXED)==0 ) return;
-  if( (pTemplate->wsFlags & WHERE_SKIPSCAN)!=0 ) return;
   for(; p; p=p->pNextLoop){
     if( p->iTab!=pTemplate->iTab ) continue;
     if( (p->wsFlags & WHERE_INDEXED)==0 ) continue;
-    if( (p->wsFlags & WHERE_SKIPSCAN)!=0 ) continue;
     if( whereLoopCheaperProperSubset(p, pTemplate) ){
       /* Adjust pTemplate cost downward so that it is cheaper than its 
-      ** subset p */
+      ** subset p. */
+      WHERETRACE(0x80,("subset cost adjustment %d,%d to %d,%d\n",
+                       pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut-1));
       pTemplate->rRun = p->rRun;
       pTemplate->nOut = p->nOut - 1;
     }else if( whereLoopCheaperProperSubset(pTemplate, p) ){
       /* Adjust pTemplate cost upward so that it is costlier than p since
       ** pTemplate is a proper subset of p */
+      WHERETRACE(0x80,("subset cost adjustment %d,%d to %d,%d\n",
+                       pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut+1));
       pTemplate->rRun = p->rRun;
       pTemplate->nOut = p->nOut + 1;
     }
@@ -117655,8 +119116,9 @@ static WhereLoop **whereLoopFindLesser(
 
     /* Any loop using an appliation-defined index (or PRIMARY KEY or
     ** UNIQUE constraint) with one or more == constraints is better
-    ** than an automatic index. */
+    ** than an automatic index. Unless it is a skip-scan. */
     if( (p->wsFlags & WHERE_AUTO_INDEX)!=0
+     && (pTemplate->nSkip)==0
      && (pTemplate->wsFlags & WHERE_INDEXED)!=0
      && (pTemplate->wsFlags & WHERE_COLUMN_EQ)!=0
      && (p->prereq & pTemplate->prereq)==pTemplate->prereq
@@ -117815,10 +119277,30 @@ static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){
 ** Adjust the WhereLoop.nOut value downward to account for terms of the
 ** WHERE clause that reference the loop but which are not used by an
 ** index.
-**
-** In the current implementation, the first extra WHERE clause term reduces
-** the number of output rows by a factor of 10 and each additional term
-** reduces the number of output rows by sqrt(2).
+*
+** For every WHERE clause term that is not used by the index
+** and which has a truth probability assigned by one of the likelihood(),
+** likely(), or unlikely() SQL functions, reduce the estimated number
+** of output rows by the probability specified.
+**
+** TUNING:  For every WHERE clause term that is not used by the index
+** and which does not have an assigned truth probability, heuristics
+** described below are used to try to estimate the truth probability.
+** TODO --> Perhaps this is something that could be improved by better
+** table statistics.
+**
+** Heuristic 1:  Estimate the truth probability as 93.75%.  The 93.75%
+** value corresponds to -1 in LogEst notation, so this means decrement
+** the WhereLoop.nOut field for every such WHERE clause term.
+**
+** Heuristic 2:  If there exists one or more WHERE clause terms of the
+** form "x==EXPR" and EXPR is not a constant 0 or 1, then make sure the
+** final output row estimate is no greater than 1/4 of the total number
+** of rows in the table.  In other words, assume that x==EXPR will filter
+** out at least 3 out of 4 rows.  If EXPR is -1 or 0 or 1, then maybe the
+** "x" column is boolean or else -1 or 0 or 1 is a common default value
+** on the "x" column and so in that case only cap the output row estimate
+** at 1/2 instead of 1/4.
 */
 static void whereLoopOutputAdjust(
   WhereClause *pWC,      /* The WHERE clause */
@@ -117827,9 +119309,10 @@ static void whereLoopOutputAdjust(
 ){
   WhereTerm *pTerm, *pX;
   Bitmask notAllowed = ~(pLoop->prereq|pLoop->maskSelf);
-  int i, j;
-  int nEq = 0;    /* Number of = constraints not within likely()/unlikely() */
+  int i, j, k;
+  LogEst iReduce = 0;    /* pLoop->nOut should not exceed nRow-iReduce */
 
+  assert( (pLoop->wsFlags & WHERE_AUTO_INDEX)==0 );
   for(i=pWC->nTerm, pTerm=pWC->a; i>0; i--, pTerm++){
     if( (pTerm->wtFlags & TERM_VIRTUAL)!=0 ) break;
     if( (pTerm->prereqAll & pLoop->maskSelf)==0 ) continue;
@@ -117842,20 +119325,26 @@ static void whereLoopOutputAdjust(
     }
     if( j<0 ){
       if( pTerm->truthProb<=0 ){
+        /* If a truth probability is specified using the likelihood() hints,
+        ** then use the probability provided by the application. */
         pLoop->nOut += pTerm->truthProb;
       }else{
+        /* In the absence of explicit truth probabilities, use heuristics to
+        ** guess a reasonable truth probability. */
         pLoop->nOut--;
-        if( pTerm->eOperator&WO_EQ ) nEq++;
+        if( pTerm->eOperator&WO_EQ ){
+          Expr *pRight = pTerm->pExpr->pRight;
+          if( sqlite3ExprIsInteger(pRight, &k) && k>=(-1) && k<=1 ){
+            k = 10;
+          }else{
+            k = 20;
+          }
+          if( iReduce<k ) iReduce = k;
+        }
       }
     }
   }
-  /* TUNING:  If there is at least one equality constraint in the WHERE
-  ** clause that does not have a likelihood() explicitly assigned to it
-  ** then do not let the estimated number of output rows exceed half 
-  ** the number of rows in the table. */
-  if( nEq && pLoop->nOut>nRow-10 ){
-    pLoop->nOut = nRow - 10;
-  }
+  if( pLoop->nOut > nRow-iReduce )  pLoop->nOut = nRow - iReduce;
 }
 
 /*
@@ -117896,7 +119385,7 @@ static int whereLoopAddBtreeIndex(
   Bitmask saved_prereq;           /* Original value of pNew->prereq */
   u16 saved_nLTerm;               /* Original value of pNew->nLTerm */
   u16 saved_nEq;                  /* Original value of pNew->u.btree.nEq */
-  u16 saved_nSkip;                /* Original value of pNew->u.btree.nSkip */
+  u16 saved_nSkip;                /* Original value of pNew->nSkip */
   u32 saved_wsFlags;              /* Original value of pNew->wsFlags */
   LogEst saved_nOut;              /* Original value of pNew->nOut */
   int iCol;                       /* Index of the column in the table */
@@ -117925,7 +119414,7 @@ static int whereLoopAddBtreeIndex(
   pTerm = whereScanInit(&scan, pBuilder->pWC, pSrc->iCursor, iCol,
                         opMask, pProbe);
   saved_nEq = pNew->u.btree.nEq;
-  saved_nSkip = pNew->u.btree.nSkip;
+  saved_nSkip = pNew->nSkip;
   saved_nLTerm = pNew->nLTerm;
   saved_wsFlags = pNew->wsFlags;
   saved_prereq = pNew->prereq;
@@ -117933,44 +119422,6 @@ static int whereLoopAddBtreeIndex(
   pNew->rSetup = 0;
   rSize = pProbe->aiRowLogEst[0];
   rLogSize = estLog(rSize);
-
-  /* Consider using a skip-scan if there are no WHERE clause constraints
-  ** available for the left-most terms of the index, and if the average
-  ** number of repeats in the left-most terms is at least 18. 
-  **
-  ** The magic number 18 is selected on the basis that scanning 17 rows
-  ** is almost always quicker than an index seek (even though if the index
-  ** contains fewer than 2^17 rows we assume otherwise in other parts of
-  ** the code). And, even if it is not, it should not be too much slower. 
-  ** On the other hand, the extra seeks could end up being significantly
-  ** more expensive.  */
-  assert( 42==sqlite3LogEst(18) );
-  if( saved_nEq==saved_nSkip
-   && saved_nEq+1<pProbe->nKeyCol
-   && pProbe->aiRowLogEst[saved_nEq+1]>=42  /* TUNING: Minimum for skip-scan */
-   && (rc = whereLoopResize(db, pNew, pNew->nLTerm+1))==SQLITE_OK
-  ){
-    LogEst nIter;
-    pNew->u.btree.nEq++;
-    pNew->u.btree.nSkip++;
-    pNew->aLTerm[pNew->nLTerm++] = 0;
-    pNew->wsFlags |= WHERE_SKIPSCAN;
-    nIter = pProbe->aiRowLogEst[saved_nEq] - pProbe->aiRowLogEst[saved_nEq+1];
-    if( pTerm ){
-      /* TUNING:  When estimating skip-scan for a term that is also indexable,
-      ** multiply the cost of the skip-scan by 2.0, to make it a little less
-      ** desirable than the regular index lookup. */
-      nIter += 10;  assert( 10==sqlite3LogEst(2) );
-    }
-    pNew->nOut -= nIter;
-    /* TUNING:  Because uncertainties in the estimates for skip-scan queries,
-    ** add a 1.375 fudge factor to make skip-scan slightly less likely. */
-    nIter += 5;
-    whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter + nInMul);
-    pNew->nOut = saved_nOut;
-    pNew->u.btree.nEq = saved_nEq;
-    pNew->u.btree.nSkip = saved_nSkip;
-  }
   for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){
     u16 eOp = pTerm->eOperator;   /* Shorthand for pTerm->eOperator */
     LogEst rCostIdx;
@@ -118065,7 +119516,6 @@ static int whereLoopAddBtreeIndex(
         if( nInMul==0 
          && pProbe->nSample 
          && pNew->u.btree.nEq<=pProbe->nSampleCol
-         && OptimizationEnabled(db, SQLITE_Stat3) 
          && ((eOp & WO_IN)==0 || !ExprHasProperty(pTerm->pExpr, EP_xIsSelect))
         ){
           Expr *pExpr = pTerm->pExpr;
@@ -118133,10 +119583,45 @@ static int whereLoopAddBtreeIndex(
   }
   pNew->prereq = saved_prereq;
   pNew->u.btree.nEq = saved_nEq;
-  pNew->u.btree.nSkip = saved_nSkip;
+  pNew->nSkip = saved_nSkip;
   pNew->wsFlags = saved_wsFlags;
   pNew->nOut = saved_nOut;
   pNew->nLTerm = saved_nLTerm;
+
+  /* Consider using a skip-scan if there are no WHERE clause constraints
+  ** available for the left-most terms of the index, and if the average
+  ** number of repeats in the left-most terms is at least 18. 
+  **
+  ** The magic number 18 is selected on the basis that scanning 17 rows
+  ** is almost always quicker than an index seek (even though if the index
+  ** contains fewer than 2^17 rows we assume otherwise in other parts of
+  ** the code). And, even if it is not, it should not be too much slower. 
+  ** On the other hand, the extra seeks could end up being significantly
+  ** more expensive.  */
+  assert( 42==sqlite3LogEst(18) );
+  if( saved_nEq==saved_nSkip
+   && saved_nEq+1<pProbe->nKeyCol
+   && pProbe->noSkipScan==0
+   && pProbe->aiRowLogEst[saved_nEq+1]>=42  /* TUNING: Minimum for skip-scan */
+   && (rc = whereLoopResize(db, pNew, pNew->nLTerm+1))==SQLITE_OK
+  ){
+    LogEst nIter;
+    pNew->u.btree.nEq++;
+    pNew->nSkip++;
+    pNew->aLTerm[pNew->nLTerm++] = 0;
+    pNew->wsFlags |= WHERE_SKIPSCAN;
+    nIter = pProbe->aiRowLogEst[saved_nEq] - pProbe->aiRowLogEst[saved_nEq+1];
+    pNew->nOut -= nIter;
+    /* TUNING:  Because uncertainties in the estimates for skip-scan queries,
+    ** add a 1.375 fudge factor to make skip-scan slightly less likely. */
+    nIter += 5;
+    whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter + nInMul);
+    pNew->nOut = saved_nOut;
+    pNew->u.btree.nEq = saved_nEq;
+    pNew->nSkip = saved_nSkip;
+    pNew->wsFlags = saved_wsFlags;
+  }
+
   return rc;
 }
 
@@ -118196,7 +119681,11 @@ static int whereUsablePartialIndex(int iTab, WhereClause *pWC, Expr *pWhere){
   int i;
   WhereTerm *pTerm;
   for(i=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
-    if( sqlite3ExprImpliesExpr(pTerm->pExpr, pWhere, iTab) ) return 1;
+    if( sqlite3ExprImpliesExpr(pTerm->pExpr, pWhere, iTab)
+     && !ExprHasProperty(pTerm->pExpr, EP_FromJoin)
+    ){
+      return 1;
+    }
   }
   return 0;
 }
@@ -118315,7 +119804,7 @@ static int whereLoopAddBtree(
       if( pTerm->prereqRight & pNew->maskSelf ) continue;
       if( termCanDriveIndex(pTerm, pSrc, 0) ){
         pNew->u.btree.nEq = 1;
-        pNew->u.btree.nSkip = 0;
+        pNew->nSkip = 0;
         pNew->u.btree.pIndex = 0;
         pNew->nLTerm = 1;
         pNew->aLTerm[0] = pTerm;
@@ -118356,7 +119845,7 @@ static int whereLoopAddBtree(
     }
     rSize = pProbe->aiRowLogEst[0];
     pNew->u.btree.nEq = 0;
-    pNew->u.btree.nSkip = 0;
+    pNew->nSkip = 0;
     pNew->nLTerm = 0;
     pNew->iSortIdx = 0;
     pNew->rSetup = 0;
@@ -118906,7 +120395,7 @@ static i8 wherePathSatisfiesOrderBy(
 
         /* Skip over == and IS NULL terms */
         if( j<pLoop->u.btree.nEq
-         && pLoop->u.btree.nSkip==0
+         && pLoop->nSkip==0
          && ((i = pLoop->aLTerm[j]->eOperator) & (WO_EQ|WO_ISNULL))!=0
         ){
           if( i & WO_ISNULL ){
@@ -119360,7 +120849,7 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
     }
 
 #ifdef WHERETRACE_ENABLED  /* >=2 */
-    if( sqlite3WhereTrace>=2 ){
+    if( sqlite3WhereTrace & 0x02 ){
       sqlite3DebugPrintf("---- after round %d ----\n", iLoop);
       for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){
         sqlite3DebugPrintf(" %s cost=%-3d nrow=%-3d order=%c",
@@ -119479,7 +120968,7 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){
   pWC = &pWInfo->sWC;
   pLoop = pBuilder->pNew;
   pLoop->wsFlags = 0;
-  pLoop->u.btree.nSkip = 0;
+  pLoop->nSkip = 0;
   pTerm = findTerm(pWC, iCur, -1, 0, WO_EQ, 0);
   if( pTerm ){
     pLoop->wsFlags = WHERE_COLUMN_EQ|WHERE_IPK|WHERE_ONEROW;
@@ -119491,7 +120980,6 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){
   }else{
     for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
       assert( pLoop->aLTermSpace==pLoop->aLTerm );
-      assert( ArraySize(pLoop->aLTermSpace)==4 );
       if( !IsUniqueIndex(pIdx)
        || pIdx->pPartIdxWhere!=0 
        || pIdx->nKeyCol>ArraySize(pLoop->aLTermSpace) 
@@ -120000,7 +121488,10 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
   */
   notReady = ~(Bitmask)0;
   for(ii=0; ii<nTabList; ii++){
+    int addrExplain;
+    int wsFlags;
     pLevel = &pWInfo->a[ii];
+    wsFlags = pLevel->pWLoop->wsFlags;
 #ifndef SQLITE_OMIT_AUTOMATIC_INDEX
     if( (pLevel->pWLoop->wsFlags & WHERE_AUTO_INDEX)!=0 ){
       constructAutomaticIndex(pParse, &pWInfo->sWC,
@@ -120008,10 +121499,15 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
       if( db->mallocFailed ) goto whereBeginError;
     }
 #endif
-    explainOneScan(pParse, pTabList, pLevel, ii, pLevel->iFrom, wctrlFlags);
+    addrExplain = explainOneScan(
+        pParse, pTabList, pLevel, ii, pLevel->iFrom, wctrlFlags
+    );
     pLevel->addrBody = sqlite3VdbeCurrentAddr(v);
     notReady = codeOneLoopStart(pWInfo, ii, notReady);
     pWInfo->iContinue = pLevel->addrCont;
+    if( (wsFlags&WHERE_MULTI_OR)==0 && (wctrlFlags&WHERE_ONETABLE_ONLY)==0 ){
+      addScanStatus(v, pTabList, pLevel, addrExplain);
+    }
   }
 
   /* Done. */
@@ -122592,13 +124088,19 @@ static void yy_reduce(
     int cnt = 0, mxSelect;
     p->pWith = yymsp[-1].minor.yy59;
     if( p->pPrior ){
+      u16 allValues = SF_Values;
       pNext = 0;
       for(pLoop=p; pLoop; pNext=pLoop, pLoop=pLoop->pPrior, cnt++){
         pLoop->pNext = pNext;
         pLoop->selFlags |= SF_Compound;
+        allValues &= pLoop->selFlags;
       }
-      mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT];
-      if( mxSelect && cnt>mxSelect ){
+      if( allValues ){
+        p->selFlags |= SF_AllValues;
+      }else if(
+        (mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0
+        && cnt>mxSelect
+      ){
         sqlite3ErrorMsg(pParse, "too many terms in compound SELECT");
       }
     }
@@ -124442,6 +125944,9 @@ SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzEr
   int mxSqlLen;                   /* Max length of an SQL string */
 
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( zSql==0 || pzErrMsg==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   mxSqlLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];
   if( db->nVdbeActive==0 ){
     db->u1.isInterrupted = 0;
@@ -124709,6 +126214,13 @@ SQLITE_API int sqlite3_complete(const char *zSql){
   };
 #endif /* SQLITE_OMIT_TRIGGER */
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( zSql==0 ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
+
   while( *zSql ){
     switch( *zSql ){
       case ';': {  /* A semicolon */
@@ -125010,7 +126522,7 @@ SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
 ** I/O active are written using this function.  These messages
 ** are intended for debugging activity only.
 */
-SQLITE_PRIVATE void (*sqlite3IoTrace)(const char*, ...) = 0;
+/* not-private */ void (*sqlite3IoTrace)(const char*, ...) = 0;
 #endif
 
 /*
@@ -125219,6 +126731,13 @@ SQLITE_API int sqlite3_initialize(void){
 ** when this routine is invoked, then this routine is a harmless no-op.
 */
 SQLITE_API int sqlite3_shutdown(void){
+#ifdef SQLITE_OMIT_WSD
+  int rc = sqlite3_wsd_init(4096, 24);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+#endif
+
   if( sqlite3GlobalConfig.isInit ){
 #ifdef SQLITE_EXTRA_SHUTDOWN
     void SQLITE_EXTRA_SHUTDOWN(void);
@@ -125277,15 +126796,17 @@ SQLITE_API int sqlite3_config(int op, ...){
   switch( op ){
 
     /* Mutex configuration options are only available in a threadsafe
-    ** compile. 
+    ** compile.
     */
-#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0
+#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0  /* IMP: R-54466-46756 */
     case SQLITE_CONFIG_SINGLETHREAD: {
       /* Disable all mutexing */
       sqlite3GlobalConfig.bCoreMutex = 0;
       sqlite3GlobalConfig.bFullMutex = 0;
       break;
     }
+#endif
+#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-20520-54086 */
     case SQLITE_CONFIG_MULTITHREAD: {
       /* Disable mutexing of database connections */
       /* Enable mutexing of core data structures */
@@ -125293,17 +126814,23 @@ SQLITE_API int sqlite3_config(int op, ...){
       sqlite3GlobalConfig.bFullMutex = 0;
       break;
     }
+#endif
+#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-59593-21810 */
     case SQLITE_CONFIG_SERIALIZED: {
       /* Enable all mutexing */
       sqlite3GlobalConfig.bCoreMutex = 1;
       sqlite3GlobalConfig.bFullMutex = 1;
       break;
     }
+#endif
+#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-63666-48755 */
     case SQLITE_CONFIG_MUTEX: {
       /* Specify an alternative mutex implementation */
       sqlite3GlobalConfig.mutex = *va_arg(ap, sqlite3_mutex_methods*);
       break;
     }
+#endif
+#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0 /* IMP: R-14450-37597 */
     case SQLITE_CONFIG_GETMUTEX: {
       /* Retrieve the current mutex implementation */
       *va_arg(ap, sqlite3_mutex_methods*) = sqlite3GlobalConfig.mutex;
@@ -125311,37 +126838,61 @@ SQLITE_API int sqlite3_config(int op, ...){
     }
 #endif
 
-
     case SQLITE_CONFIG_MALLOC: {
-      /* Specify an alternative malloc implementation */
+      /* EVIDENCE-OF: R-55594-21030 The SQLITE_CONFIG_MALLOC option takes a
+      ** single argument which is a pointer to an instance of the
+      ** sqlite3_mem_methods structure. The argument specifies alternative
+      ** low-level memory allocation routines to be used in place of the memory
+      ** allocation routines built into SQLite. */
       sqlite3GlobalConfig.m = *va_arg(ap, sqlite3_mem_methods*);
       break;
     }
     case SQLITE_CONFIG_GETMALLOC: {
-      /* Retrieve the current malloc() implementation */
+      /* EVIDENCE-OF: R-51213-46414 The SQLITE_CONFIG_GETMALLOC option takes a
+      ** single argument which is a pointer to an instance of the
+      ** sqlite3_mem_methods structure. The sqlite3_mem_methods structure is
+      ** filled with the currently defined memory allocation routines. */
       if( sqlite3GlobalConfig.m.xMalloc==0 ) sqlite3MemSetDefault();
       *va_arg(ap, sqlite3_mem_methods*) = sqlite3GlobalConfig.m;
       break;
     }
     case SQLITE_CONFIG_MEMSTATUS: {
-      /* Enable or disable the malloc status collection */
+      /* EVIDENCE-OF: R-61275-35157 The SQLITE_CONFIG_MEMSTATUS option takes
+      ** single argument of type int, interpreted as a boolean, which enables
+      ** or disables the collection of memory allocation statistics. */
       sqlite3GlobalConfig.bMemstat = va_arg(ap, int);
       break;
     }
     case SQLITE_CONFIG_SCRATCH: {
-      /* Designate a buffer for scratch memory space */
+      /* EVIDENCE-OF: R-08404-60887 There are three arguments to
+      ** SQLITE_CONFIG_SCRATCH: A pointer an 8-byte aligned memory buffer from
+      ** which the scratch allocations will be drawn, the size of each scratch
+      ** allocation (sz), and the maximum number of scratch allocations (N). */
       sqlite3GlobalConfig.pScratch = va_arg(ap, void*);
       sqlite3GlobalConfig.szScratch = va_arg(ap, int);
       sqlite3GlobalConfig.nScratch = va_arg(ap, int);
       break;
     }
     case SQLITE_CONFIG_PAGECACHE: {
-      /* Designate a buffer for page cache memory space */
+      /* EVIDENCE-OF: R-31408-40510 There are three arguments to
+      ** SQLITE_CONFIG_PAGECACHE: A pointer to 8-byte aligned memory, the size
+      ** of each page buffer (sz), and the number of pages (N). */
       sqlite3GlobalConfig.pPage = va_arg(ap, void*);
       sqlite3GlobalConfig.szPage = va_arg(ap, int);
       sqlite3GlobalConfig.nPage = va_arg(ap, int);
       break;
     }
+    case SQLITE_CONFIG_PCACHE_HDRSZ: {
+      /* EVIDENCE-OF: R-39100-27317 The SQLITE_CONFIG_PCACHE_HDRSZ option takes
+      ** a single parameter which is a pointer to an integer and writes into
+      ** that integer the number of extra bytes per page required for each page
+      ** in SQLITE_CONFIG_PAGECACHE. */
+      *va_arg(ap, int*) = 
+          sqlite3HeaderSizeBtree() +
+          sqlite3HeaderSizePcache() +
+          sqlite3HeaderSizePcache1();
+      break;
+    }
 
     case SQLITE_CONFIG_PCACHE: {
       /* no-op */
@@ -125354,11 +126905,18 @@ SQLITE_API int sqlite3_config(int op, ...){
     }
 
     case SQLITE_CONFIG_PCACHE2: {
-      /* Specify an alternative page cache implementation */
+      /* EVIDENCE-OF: R-63325-48378 The SQLITE_CONFIG_PCACHE2 option takes a
+      ** single argument which is a pointer to an sqlite3_pcache_methods2
+      ** object. This object specifies the interface to a custom page cache
+      ** implementation. */
       sqlite3GlobalConfig.pcache2 = *va_arg(ap, sqlite3_pcache_methods2*);
       break;
     }
     case SQLITE_CONFIG_GETPCACHE2: {
+      /* EVIDENCE-OF: R-22035-46182 The SQLITE_CONFIG_GETPCACHE2 option takes a
+      ** single argument which is a pointer to an sqlite3_pcache_methods2
+      ** object. SQLite copies of the current page cache implementation into
+      ** that object. */
       if( sqlite3GlobalConfig.pcache2.xInit==0 ){
         sqlite3PCacheSetDefault();
       }
@@ -125366,9 +126924,14 @@ SQLITE_API int sqlite3_config(int op, ...){
       break;
     }
 
+/* EVIDENCE-OF: R-06626-12911 The SQLITE_CONFIG_HEAP option is only
+** available if SQLite is compiled with either SQLITE_ENABLE_MEMSYS3 or
+** SQLITE_ENABLE_MEMSYS5 and returns SQLITE_ERROR if invoked otherwise. */
 #if defined(SQLITE_ENABLE_MEMSYS3) || defined(SQLITE_ENABLE_MEMSYS5)
     case SQLITE_CONFIG_HEAP: {
-      /* Designate a buffer for heap memory space */
+      /* EVIDENCE-OF: R-19854-42126 There are three arguments to
+      ** SQLITE_CONFIG_HEAP: An 8-byte aligned pointer to the memory, the
+      ** number of bytes in the memory buffer, and the minimum allocation size. */
       sqlite3GlobalConfig.pHeap = va_arg(ap, void*);
       sqlite3GlobalConfig.nHeap = va_arg(ap, int);
       sqlite3GlobalConfig.mnReq = va_arg(ap, int);
@@ -125381,17 +126944,19 @@ SQLITE_API int sqlite3_config(int op, ...){
       }
 
       if( sqlite3GlobalConfig.pHeap==0 ){
-        /* If the heap pointer is NULL, then restore the malloc implementation
-        ** back to NULL pointers too.  This will cause the malloc to go
-        ** back to its default implementation when sqlite3_initialize() is
-        ** run.
+        /* EVIDENCE-OF: R-49920-60189 If the first pointer (the memory pointer)
+        ** is NULL, then SQLite reverts to using its default memory allocator
+        ** (the system malloc() implementation), undoing any prior invocation of
+        ** SQLITE_CONFIG_MALLOC.
+        **
+        ** Setting sqlite3GlobalConfig.m to all zeros will cause malloc to
+        ** revert to its default implementation when sqlite3_initialize() is run
         */
         memset(&sqlite3GlobalConfig.m, 0, sizeof(sqlite3GlobalConfig.m));
       }else{
-        /* The heap pointer is not NULL, then install one of the
-        ** mem5.c/mem3.c methods.  The enclosing #if guarantees at
-        ** least one of these methods is currently enabled.
-        */
+        /* EVIDENCE-OF: R-61006-08918 If the memory pointer is not NULL then the
+        ** alternative memory allocator is engaged to handle all of SQLites
+        ** memory allocation needs. */
 #ifdef SQLITE_ENABLE_MEMSYS3
         sqlite3GlobalConfig.m = *sqlite3MemGetMemsys3();
 #endif
@@ -125430,11 +126995,19 @@ SQLITE_API int sqlite3_config(int op, ...){
     ** sqlite3_config(SQLITE_CONFIG_URI,0) configuration calls.
     */
     case SQLITE_CONFIG_URI: {
+      /* EVIDENCE-OF: R-25451-61125 The SQLITE_CONFIG_URI option takes a single
+      ** argument of type int. If non-zero, then URI handling is globally
+      ** enabled. If the parameter is zero, then URI handling is globally
+      ** disabled. */
       sqlite3GlobalConfig.bOpenUri = va_arg(ap, int);
       break;
     }
 
     case SQLITE_CONFIG_COVERING_INDEX_SCAN: {
+      /* EVIDENCE-OF: R-36592-02772 The SQLITE_CONFIG_COVERING_INDEX_SCAN
+      ** option takes a single integer argument which is interpreted as a
+      ** boolean in order to enable or disable the use of covering indices for
+      ** full table scans in the query optimizer. */
       sqlite3GlobalConfig.bUseCis = va_arg(ap, int);
       break;
     }
@@ -125449,25 +127022,43 @@ SQLITE_API int sqlite3_config(int op, ...){
 #endif
 
     case SQLITE_CONFIG_MMAP_SIZE: {
+      /* EVIDENCE-OF: R-58063-38258 SQLITE_CONFIG_MMAP_SIZE takes two 64-bit
+      ** integer (sqlite3_int64) values that are the default mmap size limit
+      ** (the default setting for PRAGMA mmap_size) and the maximum allowed
+      ** mmap size limit. */
       sqlite3_int64 szMmap = va_arg(ap, sqlite3_int64);
       sqlite3_int64 mxMmap = va_arg(ap, sqlite3_int64);
-      if( mxMmap<0 || mxMmap>SQLITE_MAX_MMAP_SIZE ){
-        mxMmap = SQLITE_MAX_MMAP_SIZE;
-      }
-      sqlite3GlobalConfig.mxMmap = mxMmap;
+      /* EVIDENCE-OF: R-53367-43190 If either argument to this option is
+      ** negative, then that argument is changed to its compile-time default.
+      **
+      ** EVIDENCE-OF: R-34993-45031 The maximum allowed mmap size will be
+      ** silently truncated if necessary so that it does not exceed the
+      ** compile-time maximum mmap size set by the SQLITE_MAX_MMAP_SIZE
+      ** compile-time option.
+      */
+      if( mxMmap<0 || mxMmap>SQLITE_MAX_MMAP_SIZE ) mxMmap = SQLITE_MAX_MMAP_SIZE;
       if( szMmap<0 ) szMmap = SQLITE_DEFAULT_MMAP_SIZE;
       if( szMmap>mxMmap) szMmap = mxMmap;
+      sqlite3GlobalConfig.mxMmap = mxMmap;
       sqlite3GlobalConfig.szMmap = szMmap;
       break;
     }
 
-#if SQLITE_OS_WIN && defined(SQLITE_WIN32_MALLOC)
+#if SQLITE_OS_WIN && defined(SQLITE_WIN32_MALLOC) /* IMP: R-04780-55815 */
     case SQLITE_CONFIG_WIN32_HEAPSIZE: {
+      /* EVIDENCE-OF: R-34926-03360 SQLITE_CONFIG_WIN32_HEAPSIZE takes a 32-bit
+      ** unsigned integer value that specifies the maximum size of the created
+      ** heap. */
       sqlite3GlobalConfig.nHeap = va_arg(ap, int);
       break;
     }
 #endif
 
+    case SQLITE_CONFIG_PMASZ: {
+      sqlite3GlobalConfig.szPma = va_arg(ap, unsigned int);
+      break;
+    }
+
     default: {
       rc = SQLITE_ERROR;
       break;
@@ -125546,6 +127137,12 @@ static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
 ** Return the mutex associated with a database connection.
 */
 SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   return db->mutex;
 }
 
@@ -125555,6 +127152,10 @@ SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
 */
 SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){
   int i;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   sqlite3BtreeEnterAll(db);
   for(i=0; i<db->nDb; i++){
@@ -125644,13 +127245,20 @@ static int binCollFunc(
 ){
   int rc, n;
   n = nKey1<nKey2 ? nKey1 : nKey2;
+  /* EVIDENCE-OF: R-65033-28449 The built-in BINARY collation compares
+  ** strings byte by byte using the memcmp() function from the standard C
+  ** library. */
   rc = memcmp(pKey1, pKey2, n);
   if( rc==0 ){
     if( padFlag
      && allSpaces(((char*)pKey1)+n, nKey1-n)
      && allSpaces(((char*)pKey2)+n, nKey2-n)
     ){
-      /* Leave rc unchanged at 0 */
+      /* EVIDENCE-OF: R-31624-24737 RTRIM is like BINARY except that extra
+      ** spaces at the end of either string do not change the result. In other
+      ** words, strings will compare equal to one another as long as they
+      ** differ only in the number of spaces at the end.
+      */
     }else{
       rc = nKey1 - nKey2;
     }
@@ -125685,6 +127293,12 @@ static int nocaseCollatingFunc(
 ** Return the ROWID of the most recent insert
 */
 SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   return db->lastRowid;
 }
 
@@ -125692,6 +127306,12 @@ SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
 ** Return the number of changes in the most recent call to sqlite3_exec().
 */
 SQLITE_API int sqlite3_changes(sqlite3 *db){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   return db->nChange;
 }
 
@@ -125699,6 +127319,12 @@ SQLITE_API int sqlite3_changes(sqlite3 *db){
 ** Return the number of changes since the database handle was opened.
 */
 SQLITE_API int sqlite3_total_changes(sqlite3 *db){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   return db->nTotalChange;
 }
 
@@ -125964,13 +127590,15 @@ SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
 
 /*
 ** Rollback all database files.  If tripCode is not SQLITE_OK, then
-** any open cursors are invalidated ("tripped" - as in "tripping a circuit
+** any write cursors are invalidated ("tripped" - as in "tripping a circuit
 ** breaker") and made to return tripCode if there are any further
-** attempts to use that cursor.
+** attempts to use that cursor.  Read cursors remain open and valid
+** but are "saved" in case the table pages are moved around.
 */
 SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
   int i;
   int inTrans = 0;
+  int schemaChange;
   assert( sqlite3_mutex_held(db->mutex) );
   sqlite3BeginBenignMalloc();
 
@@ -125981,6 +127609,7 @@ SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
   ** the database rollback and schema reset, which can cause false
   ** corruption reports in some cases.  */
   sqlite3BtreeEnterAll(db);
+  schemaChange = (db->flags & SQLITE_InternChanges)!=0 && db->init.busy==0;
 
   for(i=0; i<db->nDb; i++){
     Btree *p = db->aDb[i].pBt;
@@ -125988,7 +127617,7 @@ SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
       if( sqlite3BtreeIsInTrans(p) ){
         inTrans = 1;
       }
-      sqlite3BtreeRollback(p, tripCode);
+      sqlite3BtreeRollback(p, tripCode, !schemaChange);
     }
   }
   sqlite3VtabRollback(db);
@@ -126181,7 +127810,7 @@ static int sqliteDefaultBusyCallback(
  void *ptr,               /* Database connection */
  int count                /* Number of times table has been busy */
 ){
-#if SQLITE_OS_WIN || (defined(HAVE_USLEEP) && HAVE_USLEEP)
+#if SQLITE_OS_WIN || HAVE_USLEEP
   static const u8 delays[] =
      { 1, 2, 5, 10, 15, 20, 25, 25,  25,  50,  50, 100 };
   static const u8 totals[] =
@@ -126244,6 +127873,9 @@ SQLITE_API int sqlite3_busy_handler(
   int (*xBusy)(void*,int),
   void *pArg
 ){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE;
+#endif
   sqlite3_mutex_enter(db->mutex);
   db->busyHandler.xFunc = xBusy;
   db->busyHandler.pArg = pArg;
@@ -126265,6 +127897,12 @@ SQLITE_API void sqlite3_progress_handler(
   int (*xProgress)(void*), 
   void *pArg
 ){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   if( nOps>0 ){
     db->xProgress = xProgress;
@@ -126285,6 +127923,9 @@ SQLITE_API void sqlite3_progress_handler(
 ** specified number of milliseconds before returning 0.
 */
 SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   if( ms>0 ){
     sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
     db->busyTimeout = ms;
@@ -126298,6 +127939,12 @@ SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
 ** Cause any pending operation to stop at its earliest opportunity.
 */
 SQLITE_API void sqlite3_interrupt(sqlite3 *db){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return;
+  }
+#endif
   db->u1.isInterrupted = 1;
 }
 
@@ -126435,6 +128082,12 @@ SQLITE_API int sqlite3_create_function_v2(
 ){
   int rc = SQLITE_ERROR;
   FuncDestructor *pArg = 0;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   if( xDestroy ){
     pArg = (FuncDestructor *)sqlite3DbMallocZero(db, sizeof(FuncDestructor));
@@ -126471,6 +128124,10 @@ SQLITE_API int sqlite3_create_function16(
 ){
   int rc;
   char *zFunc8;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || zFunctionName==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   assert( !db->mallocFailed );
   zFunc8 = sqlite3Utf16to8(db, zFunctionName, -1, SQLITE_UTF16NATIVE);
@@ -126502,6 +128159,12 @@ SQLITE_API int sqlite3_overload_function(
 ){
   int nName = sqlite3Strlen30(zName);
   int rc = SQLITE_OK;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || zName==0 || nArg<-2 ){
+    return SQLITE_MISUSE_BKPT;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   if( sqlite3FindFunction(db, zName, nName, nArg, SQLITE_UTF8, 0)==0 ){
     rc = sqlite3CreateFunc(db, zName, nArg, SQLITE_UTF8,
@@ -126523,6 +128186,13 @@ SQLITE_API int sqlite3_overload_function(
 */
 SQLITE_API void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
   void *pOld;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   pOld = db->pTraceArg;
   db->xTrace = xTrace;
@@ -126544,6 +128214,13 @@ SQLITE_API void *sqlite3_profile(
   void *pArg
 ){
   void *pOld;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   pOld = db->pProfileArg;
   db->xProfile = xProfile;
@@ -126564,6 +128241,13 @@ SQLITE_API void *sqlite3_commit_hook(
   void *pArg                /* Argument to the function */
 ){
   void *pOld;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   pOld = db->pCommitArg;
   db->xCommitCallback = xCallback;
@@ -126582,6 +128266,13 @@ SQLITE_API void *sqlite3_update_hook(
   void *pArg                /* Argument to the function */
 ){
   void *pRet;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   pRet = db->pUpdateArg;
   db->xUpdateCallback = xCallback;
@@ -126600,6 +128291,13 @@ SQLITE_API void *sqlite3_rollback_hook(
   void *pArg                /* Argument to the function */
 ){
   void *pRet;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   pRet = db->pRollbackArg;
   db->xRollbackCallback = xCallback;
@@ -126646,6 +128344,9 @@ SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
   UNUSED_PARAMETER(db);
   UNUSED_PARAMETER(nFrame);
 #else
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   if( nFrame>0 ){
     sqlite3_wal_hook(db, sqlite3WalDefaultHook, SQLITE_INT_TO_PTR(nFrame));
   }else{
@@ -126666,6 +128367,12 @@ SQLITE_API void *sqlite3_wal_hook(
 ){
 #ifndef SQLITE_OMIT_WAL
   void *pRet;
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   sqlite3_mutex_enter(db->mutex);
   pRet = db->pWalArg;
   db->xWalCallback = xCallback;
@@ -126693,14 +128400,21 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
   int rc;                         /* Return code */
   int iDb = SQLITE_MAX_ATTACHED;  /* sqlite3.aDb[] index of db to checkpoint */
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
+
   /* Initialize the output variables to -1 in case an error occurs. */
   if( pnLog ) *pnLog = -1;
   if( pnCkpt ) *pnCkpt = -1;
 
-  assert( SQLITE_CHECKPOINT_FULL>SQLITE_CHECKPOINT_PASSIVE );
-  assert( SQLITE_CHECKPOINT_FULL<SQLITE_CHECKPOINT_RESTART );
-  assert( SQLITE_CHECKPOINT_PASSIVE+2==SQLITE_CHECKPOINT_RESTART );
-  if( eMode<SQLITE_CHECKPOINT_PASSIVE || eMode>SQLITE_CHECKPOINT_RESTART ){
+  assert( SQLITE_CHECKPOINT_PASSIVE==0 );
+  assert( SQLITE_CHECKPOINT_FULL==1 );
+  assert( SQLITE_CHECKPOINT_RESTART==2 );
+  assert( SQLITE_CHECKPOINT_TRUNCATE==3 );
+  if( eMode<SQLITE_CHECKPOINT_PASSIVE || eMode>SQLITE_CHECKPOINT_TRUNCATE ){
+    /* EVIDENCE-OF: R-03996-12088 The M parameter must be a valid checkpoint
+    ** mode: */
     return SQLITE_MISUSE;
   }
 
@@ -126712,6 +128426,7 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
     rc = SQLITE_ERROR;
     sqlite3ErrorWithMsg(db, SQLITE_ERROR, "unknown database: %s", zDb);
   }else{
+    db->busyHandler.nBusy = 0;
     rc = sqlite3Checkpoint(db, iDb, eMode, pnLog, pnCkpt);
     sqlite3Error(db, rc);
   }
@@ -126728,7 +128443,9 @@ SQLITE_API int sqlite3_wal_checkpoint_v2(
 ** checkpointed.
 */
 SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
-  return sqlite3_wal_checkpoint_v2(db, zDb, SQLITE_CHECKPOINT_PASSIVE, 0, 0);
+  /* EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to
+  ** sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). */
+  return sqlite3_wal_checkpoint_v2(db,zDb,SQLITE_CHECKPOINT_PASSIVE,0,0);
 }
 
 #ifndef SQLITE_OMIT_WAL
@@ -126916,32 +128633,6 @@ SQLITE_API const char *sqlite3_errstr(int rc){
 }
 
 /*
-** Invalidate all cached KeyInfo objects for database connection "db"
-*/
-static void invalidateCachedKeyInfo(sqlite3 *db){
-  Db *pDb;                    /* A single database */
-  int iDb;                    /* The database index number */
-  HashElem *k;                /* For looping over tables in pDb */
-  Table *pTab;                /* A table in the database */
-  Index *pIdx;                /* Each index */
-
-  for(iDb=0, pDb=db->aDb; iDb<db->nDb; iDb++, pDb++){
-    if( pDb->pBt==0 ) continue;
-    sqlite3BtreeEnter(pDb->pBt);
-    for(k=sqliteHashFirst(&pDb->pSchema->tblHash);  k; k=sqliteHashNext(k)){
-      pTab = (Table*)sqliteHashData(k);
-      for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
-        if( pIdx->pKeyInfo && pIdx->pKeyInfo->db==db ){
-          sqlite3KeyInfoUnref(pIdx->pKeyInfo);
-          pIdx->pKeyInfo = 0;
-        }
-      }
-    }
-    sqlite3BtreeLeave(pDb->pBt);
-  }
-}
-
-/*
 ** Create a new collating function for database "db".  The name is zName
 ** and the encoding is enc.
 */
@@ -126984,7 +128675,6 @@ static int createCollation(
       return SQLITE_BUSY;
     }
     sqlite3ExpirePreparedStatements(db);
-    invalidateCachedKeyInfo(db);
 
     /* If collation sequence pColl was created directly by a call to
     ** sqlite3_create_collation, and not generated by synthCollSeq(),
@@ -127089,6 +128779,12 @@ static const int aHardLimit[] = {
 SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
   int oldLimit;
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return -1;
+  }
+#endif
 
   /* EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME
   ** there is a hard upper bound set at compile-time by a C preprocessor
@@ -127165,7 +128861,8 @@ SQLITE_PRIVATE int sqlite3ParseUri(
 
   assert( *pzErrMsg==0 );
 
-  if( ((flags & SQLITE_OPEN_URI) || sqlite3GlobalConfig.bOpenUri) 
+  if( ((flags & SQLITE_OPEN_URI)             /* IMP: R-48725-32206 */
+            || sqlite3GlobalConfig.bOpenUri) /* IMP: R-51689-46548 */
    && nUri>=5 && memcmp(zUri, "file:", 5)==0 /* IMP: R-57884-37496 */
   ){
     char *zOpt;
@@ -127374,6 +129071,9 @@ static int openDatabase(
   char *zOpen = 0;                /* Filename argument to pass to BtreeOpen() */
   char *zErrMsg = 0;              /* Error message from sqlite3ParseUri() */
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( ppDb==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   *ppDb = 0;
 #ifndef SQLITE_OMIT_AUTOINIT
   rc = sqlite3_initialize();
@@ -127479,6 +129179,9 @@ static int openDatabase(
 #if defined(SQLITE_DEFAULT_FOREIGN_KEYS) && SQLITE_DEFAULT_FOREIGN_KEYS
                  | SQLITE_ForeignKeys
 #endif
+#if defined(SQLITE_REVERSE_UNORDERED_SELECTS)
+                 | SQLITE_ReverseOrder
+#endif
       ;
   sqlite3HashInit(&db->aCollSeq);
 #ifndef SQLITE_OMIT_VIRTUALTABLE
@@ -127488,20 +129191,24 @@ static int openDatabase(
   /* Add the default collation sequence BINARY. BINARY works for both UTF-8
   ** and UTF-16, so add a version for each to avoid any unnecessary
   ** conversions. The only error that can occur here is a malloc() failure.
+  **
+  ** EVIDENCE-OF: R-52786-44878 SQLite defines three built-in collating
+  ** functions:
   */
   createCollation(db, "BINARY", SQLITE_UTF8, 0, binCollFunc, 0);
   createCollation(db, "BINARY", SQLITE_UTF16BE, 0, binCollFunc, 0);
   createCollation(db, "BINARY", SQLITE_UTF16LE, 0, binCollFunc, 0);
+  createCollation(db, "NOCASE", SQLITE_UTF8, 0, nocaseCollatingFunc, 0);
   createCollation(db, "RTRIM", SQLITE_UTF8, (void*)1, binCollFunc, 0);
   if( db->mallocFailed ){
     goto opendb_out;
   }
+  /* EVIDENCE-OF: R-08308-17224 The default collating function for all
+  ** strings is BINARY. 
+  */
   db->pDfltColl = sqlite3FindCollSeq(db, SQLITE_UTF8, "BINARY", 0);
   assert( db->pDfltColl!=0 );
 
-  /* Also add a UTF-8 case-insensitive collation sequence. */
-  createCollation(db, "NOCASE", SQLITE_UTF8, 0, nocaseCollatingFunc, 0);
-
   /* Parse the filename/URI argument. */
   db->openFlags = flags;
   rc = sqlite3ParseUri(zVfs, zFilename, &flags, &db->pVfs, &zOpen, &zErrMsg);
@@ -127522,7 +129229,10 @@ static int openDatabase(
     sqlite3Error(db, rc);
     goto opendb_out;
   }
+  sqlite3BtreeEnter(db->aDb[0].pBt);
   db->aDb[0].pSchema = sqlite3SchemaGet(db, db->aDb[0].pBt);
+  if( !db->mallocFailed ) ENC(db) = SCHEMA_ENC(db);
+  sqlite3BtreeLeave(db->aDb[0].pBt);
   db->aDb[1].pSchema = sqlite3SchemaGet(db, 0);
 
   /* The default safety_level for the main database is 'full'; for the temp
@@ -127663,13 +129373,15 @@ SQLITE_API int sqlite3_open16(
   sqlite3_value *pVal;
   int rc;
 
-  assert( zFilename );
-  assert( ppDb );
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( ppDb==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   *ppDb = 0;
 #ifndef SQLITE_OMIT_AUTOINIT
   rc = sqlite3_initialize();
   if( rc ) return rc;
 #endif
+  if( zFilename==0 ) zFilename = "\000\000";
   pVal = sqlite3ValueNew(0);
   sqlite3ValueSetStr(pVal, -1, zFilename, SQLITE_UTF16NATIVE, SQLITE_STATIC);
   zFilename8 = sqlite3ValueText(pVal, SQLITE_UTF8);
@@ -127678,7 +129390,7 @@ SQLITE_API int sqlite3_open16(
                       SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
     assert( *ppDb || rc==SQLITE_NOMEM );
     if( rc==SQLITE_OK && !DbHasProperty(*ppDb, 0, DB_SchemaLoaded) ){
-      ENC(*ppDb) = SQLITE_UTF16NATIVE;
+      SCHEMA_ENC(*ppDb) = ENC(*ppDb) = SQLITE_UTF16NATIVE;
     }
   }else{
     rc = SQLITE_NOMEM;
@@ -127699,13 +129411,7 @@ SQLITE_API int sqlite3_create_collation(
   void* pCtx,
   int(*xCompare)(void*,int,const void*,int,const void*)
 ){
-  int rc;
-  sqlite3_mutex_enter(db->mutex);
-  assert( !db->mallocFailed );
-  rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, 0);
-  rc = sqlite3ApiExit(db, rc);
-  sqlite3_mutex_leave(db->mutex);
-  return rc;
+  return sqlite3_create_collation_v2(db, zName, enc, pCtx, xCompare, 0);
 }
 
 /*
@@ -127720,6 +129426,10 @@ SQLITE_API int sqlite3_create_collation_v2(
   void(*xDel)(void*)
 ){
   int rc;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   assert( !db->mallocFailed );
   rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, xDel);
@@ -127741,6 +129451,10 @@ SQLITE_API int sqlite3_create_collation16(
 ){
   int rc = SQLITE_OK;
   char *zName8;
+
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) || zName==0 ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   assert( !db->mallocFailed );
   zName8 = sqlite3Utf16to8(db, zName, -1, SQLITE_UTF16NATIVE);
@@ -127763,6 +129477,9 @@ SQLITE_API int sqlite3_collation_needed(
   void *pCollNeededArg, 
   void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
 ){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   db->xCollNeeded = xCollNeeded;
   db->xCollNeeded16 = 0;
@@ -127781,6 +129498,9 @@ SQLITE_API int sqlite3_collation_needed16(
   void *pCollNeededArg, 
   void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
 ){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   db->xCollNeeded = 0;
   db->xCollNeeded16 = xCollNeeded16;
@@ -127807,6 +129527,12 @@ SQLITE_API int sqlite3_global_recover(void){
 ** by the next COMMIT or ROLLBACK.
 */
 SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
   return db->autoCommit;
 }
 
@@ -127860,7 +129586,6 @@ SQLITE_API void sqlite3_thread_cleanup(void){
 ** Return meta information about a specific column of a database table.
 ** See comment in sqlite3.h (sqlite.h.in) for details.
 */
-#ifdef SQLITE_ENABLE_COLUMN_METADATA
 SQLITE_API int sqlite3_table_column_metadata(
   sqlite3 *db,                /* Connection handle */
   const char *zDbName,        /* Database name or NULL */
@@ -127876,7 +129601,7 @@ SQLITE_API int sqlite3_table_column_metadata(
   char *zErrMsg = 0;
   Table *pTab = 0;
   Column *pCol = 0;
-  int iCol;
+  int iCol = 0;
 
   char const *zDataType = 0;
   char const *zCollSeq = 0;
@@ -127900,11 +129625,8 @@ SQLITE_API int sqlite3_table_column_metadata(
   }
 
   /* Find the column for which info is requested */
-  if( sqlite3IsRowid(zColumnName) ){
-    iCol = pTab->iPKey;
-    if( iCol>=0 ){
-      pCol = &pTab->aCol[iCol];
-    }
+  if( zColumnName==0 ){
+    /* Query for existance of table only */
   }else{
     for(iCol=0; iCol<pTab->nCol; iCol++){
       pCol = &pTab->aCol[iCol];
@@ -127913,8 +129635,13 @@ SQLITE_API int sqlite3_table_column_metadata(
       }
     }
     if( iCol==pTab->nCol ){
-      pTab = 0;
-      goto error_out;
+      if( HasRowid(pTab) && sqlite3IsRowid(zColumnName) ){
+        iCol = pTab->iPKey;
+        pCol = iCol>=0 ? &pTab->aCol[iCol] : 0;
+      }else{
+        pTab = 0;
+        goto error_out;
+      }
     }
   }
 
@@ -127967,7 +129694,6 @@ error_out:
   sqlite3_mutex_leave(db->mutex);
   return rc;
 }
-#endif
 
 /*
 ** Sleep for a little while.  Return the amount of time slept.
@@ -127989,6 +129715,9 @@ SQLITE_API int sqlite3_sleep(int ms){
 ** Enable or disable the extended result codes.
 */
 SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   db->errMask = onoff ? 0xffffffff : 0xff;
   sqlite3_mutex_leave(db->mutex);
@@ -128002,6 +129731,9 @@ SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, vo
   int rc = SQLITE_ERROR;
   Btree *pBtree;
 
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+#endif
   sqlite3_mutex_enter(db->mutex);
   pBtree = sqlite3DbNameToBtree(db, zDbName);
   if( pBtree ){
@@ -128344,7 +130076,7 @@ SQLITE_API int sqlite3_test_control(int op, ...){
 ** returns a NULL pointer.
 */
 SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){
-  if( zFilename==0 ) return 0;
+  if( zFilename==0 || zParam==0 ) return 0;
   zFilename += sqlite3Strlen30(zFilename) + 1;
   while( zFilename[0] ){
     int x = strcmp(zFilename, zParam);
@@ -128400,7 +130132,14 @@ SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3 *db, const char *zDbName){
 ** connection.
 */
 SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
-  Btree *pBt = sqlite3DbNameToBtree(db, zDbName);
+  Btree *pBt;
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return 0;
+  }
+#endif
+  pBt = sqlite3DbNameToBtree(db, zDbName);
   return pBt ? sqlite3BtreeGetFilename(pBt) : 0;
 }
 
@@ -128409,7 +130148,14 @@ SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName){
 ** no such database exists.
 */
 SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName){
-  Btree *pBt = sqlite3DbNameToBtree(db, zDbName);
+  Btree *pBt;
+#ifdef SQLITE_ENABLE_API_ARMOR
+  if( !sqlite3SafetyCheckOk(db) ){
+    (void)SQLITE_MISUSE_BKPT;
+    return -1;
+  }
+#endif
+  pBt = sqlite3DbNameToBtree(db, zDbName);
   return pBt ? sqlite3BtreeIsReadonly(pBt) : -1;
 }
 
@@ -129695,6 +131441,11 @@ struct Fts3Phrase {
   int bIncr;                 /* True if doclist is loaded incrementally */
   int iDoclistToken;
 
+  /* Used by sqlite3Fts3EvalPhrasePoslist() if this is a descendent of an
+  ** OR condition.  */
+  char *pOrPoslist;
+  i64 iOrDocid;
+
   /* Variables below this point are populated by fts3_expr.c when parsing 
   ** a MATCH expression. Everything above is part of the evaluation phase. 
   */
@@ -131102,11 +132853,7 @@ static int fts3CreateMethod(
 ** support estimatedRows. In that case this function is a no-op.
 */
 static void fts3SetEstimatedRows(sqlite3_index_info *pIdxInfo, i64 nRow){
-#if SQLITE_VERSION_NUMBER>=3008002
-  if( sqlite3_libversion_number()>=3008002 ){
-    pIdxInfo->estimatedRows = nRow;
-  }
-#endif
+  pIdxInfo->estimatedRows = nRow;
 }
 
 /* 
@@ -131478,7 +133225,7 @@ static int fts3SelectLeaf(
   sqlite3_int64 *piLeaf,          /* Selected leaf node */
   sqlite3_int64 *piLeaf2          /* Selected leaf node */
 ){
-  int rc;                         /* Return code */
+  int rc = SQLITE_OK;             /* Return code */
   int iHeight;                    /* Height of this node in tree */
 
   assert( piLeaf || piLeaf2 );
@@ -131489,7 +133236,7 @@ static int fts3SelectLeaf(
 
   if( rc==SQLITE_OK && iHeight>1 ){
     char *zBlob = 0;              /* Blob read from %_segments table */
-    int nBlob;                    /* Size of zBlob in bytes */
+    int nBlob = 0;                /* Size of zBlob in bytes */
 
     if( piLeaf && piLeaf2 && (*piLeaf!=*piLeaf2) ){
       rc = sqlite3Fts3ReadBlock(p, *piLeaf, &zBlob, &nBlob, 0);
@@ -132711,7 +134458,7 @@ static int fts3FilterMethod(
   int nVal,                       /* Number of elements in apVal */
   sqlite3_value **apVal           /* Arguments for the indexing scheme */
 ){
-  int rc;
+  int rc = SQLITE_OK;
   char *zSql;                     /* SQL statement used to access %_content */
   int eSearch;
   Fts3Table *p = (Fts3Table *)pCursor->pVtab;
@@ -132789,10 +134536,17 @@ static int fts3FilterMethod(
   ** row by docid.
   */
   if( eSearch==FTS3_FULLSCAN_SEARCH ){
-    zSql = sqlite3_mprintf(
-        "SELECT %s ORDER BY rowid %s",
-        p->zReadExprlist, (pCsr->bDesc ? "DESC" : "ASC")
-    );
+    if( pDocidGe || pDocidLe ){
+      zSql = sqlite3_mprintf(
+          "SELECT %s WHERE rowid BETWEEN %lld AND %lld ORDER BY rowid %s",
+          p->zReadExprlist, pCsr->iMinDocid, pCsr->iMaxDocid,
+          (pCsr->bDesc ? "DESC" : "ASC")
+      );
+    }else{
+      zSql = sqlite3_mprintf("SELECT %s ORDER BY rowid %s", 
+          p->zReadExprlist, (pCsr->bDesc ? "DESC" : "ASC")
+      );
+    }
     if( zSql ){
       rc = sqlite3_prepare_v2(p->db, zSql, -1, &pCsr->pStmt, 0);
       sqlite3_free(zSql);
@@ -134646,6 +136400,22 @@ static void fts3EvalNextRow(
           }
           pExpr->iDocid = pLeft->iDocid;
           pExpr->bEof = (pLeft->bEof || pRight->bEof);
+          if( pExpr->eType==FTSQUERY_NEAR && pExpr->bEof ){
+            if( pRight->pPhrase && pRight->pPhrase->doclist.aAll ){
+              Fts3Doclist *pDl = &pRight->pPhrase->doclist;
+              while( *pRc==SQLITE_OK && pRight->bEof==0 ){
+                memset(pDl->pList, 0, pDl->nList);
+                fts3EvalNextRow(pCsr, pRight, pRc);
+              }
+            }
+            if( pLeft->pPhrase && pLeft->pPhrase->doclist.aAll ){
+              Fts3Doclist *pDl = &pLeft->pPhrase->doclist;
+              while( *pRc==SQLITE_OK && pLeft->bEof==0 ){
+                memset(pDl->pList, 0, pDl->nList);
+                fts3EvalNextRow(pCsr, pLeft, pRc);
+              }
+            }
+          }
         }
         break;
       }
@@ -135018,6 +136788,7 @@ static void fts3EvalRestart(
       }
       pPhrase->doclist.pNextDocid = 0;
       pPhrase->doclist.iDocid = 0;
+      pPhrase->pOrPoslist = 0;
     }
 
     pExpr->iDocid = 0;
@@ -135263,8 +137034,8 @@ SQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist(
   iDocid = pExpr->iDocid;
   pIter = pPhrase->doclist.pList;
   if( iDocid!=pCsr->iPrevId || pExpr->bEof ){
+    int rc = SQLITE_OK;
     int bDescDoclist = pTab->bDescIdx;      /* For DOCID_CMP macro */
-    int iMul;                     /* +1 if csr dir matches index dir, else -1 */
     int bOr = 0;
     u8 bEof = 0;
     u8 bTreeEof = 0;
@@ -135288,72 +137059,43 @@ SQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist(
     ** an incremental phrase. Load the entire doclist for the phrase
     ** into memory in this case.  */
     if( pPhrase->bIncr ){
-      int rc = SQLITE_OK;
-      int bEofSave = pExpr->bEof;
-      fts3EvalRestart(pCsr, pExpr, &rc);
-      while( rc==SQLITE_OK && !pExpr->bEof ){
-        fts3EvalNextRow(pCsr, pExpr, &rc);
-        if( bEofSave==0 && pExpr->iDocid==iDocid ) break;
+      int bEofSave = pNear->bEof;
+      fts3EvalRestart(pCsr, pNear, &rc);
+      while( rc==SQLITE_OK && !pNear->bEof ){
+        fts3EvalNextRow(pCsr, pNear, &rc);
+        if( bEofSave==0 && pNear->iDocid==iDocid ) break;
       }
-      pIter = pPhrase->doclist.pList;
       assert( rc!=SQLITE_OK || pPhrase->bIncr==0 );
-      if( rc!=SQLITE_OK ) return rc;
     }
-    
-    iMul = ((pCsr->bDesc==bDescDoclist) ? 1 : -1);
-    while( bTreeEof==1 
-        && pNear->bEof==0
-        && (DOCID_CMP(pNear->iDocid, pCsr->iPrevId) * iMul)<0
-    ){
-      int rc = SQLITE_OK;
-      fts3EvalNextRow(pCsr, pExpr, &rc);
-      if( rc!=SQLITE_OK ) return rc;
-      iDocid = pExpr->iDocid;
-      pIter = pPhrase->doclist.pList;
+    if( bTreeEof ){
+      while( rc==SQLITE_OK && !pNear->bEof ){
+        fts3EvalNextRow(pCsr, pNear, &rc);
+      }
     }
+    if( rc!=SQLITE_OK ) return rc;
 
-    bEof = (pPhrase->doclist.nAll==0);
-    assert( bDescDoclist==0 || bDescDoclist==1 );
-    assert( pCsr->bDesc==0 || pCsr->bDesc==1 );
-
-    if( bEof==0 ){
-      if( pCsr->bDesc==bDescDoclist ){
+    pIter = pPhrase->pOrPoslist;
+    iDocid = pPhrase->iOrDocid;
+    if( pCsr->bDesc==bDescDoclist ){
+      bEof = (pIter >= (pPhrase->doclist.aAll + pPhrase->doclist.nAll));
+      while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)<0 ) && bEof==0 ){
+        sqlite3Fts3DoclistNext(
+            bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll, 
+            &pIter, &iDocid, &bEof
+        );
+      }
+    }else{
+      bEof = !pPhrase->doclist.nAll || (pIter && pIter<=pPhrase->doclist.aAll);
+      while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)>0 ) && bEof==0 ){
         int dummy;
-        if( pNear->bEof ){
-          /* This expression is already at EOF. So position it to point to the
-          ** last entry in the doclist at pPhrase->doclist.aAll[]. Variable
-          ** iDocid is already set for this entry, so all that is required is
-          ** to set pIter to point to the first byte of the last position-list
-          ** in the doclist. 
-          **
-          ** It would also be correct to set pIter and iDocid to zero. In
-          ** this case, the first call to sqltie3Fts4DoclistPrev() below
-          ** would also move the iterator to point to the last entry in the 
-          ** doclist. However, this is expensive, as to do so it has to 
-          ** iterate through the entire doclist from start to finish (since
-          ** it does not know the docid for the last entry).  */
-          pIter = &pPhrase->doclist.aAll[pPhrase->doclist.nAll-1];
-          fts3ReversePoslist(pPhrase->doclist.aAll, &pIter);
-        }
-        while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)>0 ) && bEof==0 ){
-          sqlite3Fts3DoclistPrev(
-              bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll, 
-              &pIter, &iDocid, &dummy, &bEof
-          );
-        }
-      }else{
-        if( pNear->bEof ){
-          pIter = 0;
-          iDocid = 0;
-        }
-        while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)<0 ) && bEof==0 ){
-          sqlite3Fts3DoclistNext(
-              bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll, 
-              &pIter, &iDocid, &bEof
-          );
-        }
+        sqlite3Fts3DoclistPrev(
+            bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll, 
+            &pIter, &iDocid, &dummy, &bEof
+        );
       }
     }
+    pPhrase->pOrPoslist = pIter;
+    pPhrase->iOrDocid = iDocid;
 
     if( bEof || iDocid!=pCsr->iPrevId ) pIter = 0;
   }
@@ -135367,10 +137109,13 @@ SQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist(
   }
   while( iThis<iCol ){
     fts3ColumnlistCopy(0, &pIter);
-    if( *pIter==0x00 ) return 0;
+    if( *pIter==0x00 ) return SQLITE_OK;
     pIter++;
     pIter += fts3GetVarint32(pIter, &iThis);
   }
+  if( *pIter==0x00 ){
+    pIter = 0;
+  }
 
   *ppOut = ((iCol==iThis)?pIter:0);
   return SQLITE_OK;
@@ -137831,7 +139576,7 @@ static int isVowel(const char *z){
 ** by a consonant.
 **
 ** In this routine z[] is in reverse order.  So we are really looking
-** for an instance of of a consonant followed by a vowel.
+** for an instance of a consonant followed by a vowel.
 */
 static int m_gt_0(const char *z){
   while( isVowel(z) ){ z++; }
@@ -139200,7 +140945,7 @@ static int fts3tokConnectMethod(
   sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */
   char **pzErr                    /* OUT: sqlite3_malloc'd error message */
 ){
-  Fts3tokTable *pTab;
+  Fts3tokTable *pTab = 0;
   const sqlite3_tokenizer_module *pMod = 0;
   sqlite3_tokenizer *pTok = 0;
   int rc;
@@ -142575,8 +144320,8 @@ static int fts3PromoteSegments(
 
     if( bOk ){
       int iIdx = 0;
-      sqlite3_stmt *pUpdate1;
-      sqlite3_stmt *pUpdate2;
+      sqlite3_stmt *pUpdate1 = 0;
+      sqlite3_stmt *pUpdate2 = 0;
 
       if( rc==SQLITE_OK ){
         rc = fts3SqlStmt(p, SQL_UPDATE_LEVEL_IDX, &pUpdate1, 0);
@@ -145597,37 +147342,39 @@ static int fts3BestSnippet(
   sIter.nSnippet = nSnippet;
   sIter.nPhrase = nList;
   sIter.iCurrent = -1;
-  (void)fts3ExprIterate(pCsr->pExpr, fts3SnippetFindPositions, (void *)&sIter);
+  rc = fts3ExprIterate(pCsr->pExpr, fts3SnippetFindPositions, (void *)&sIter);
+  if( rc==SQLITE_OK ){
 
-  /* Set the *pmSeen output variable. */
-  for(i=0; i<nList; i++){
-    if( sIter.aPhrase[i].pHead ){
-      *pmSeen |= (u64)1 << i;
+    /* Set the *pmSeen output variable. */
+    for(i=0; i<nList; i++){
+      if( sIter.aPhrase[i].pHead ){
+        *pmSeen |= (u64)1 << i;
+      }
     }
-  }
 
-  /* Loop through all candidate snippets. Store the best snippet in 
-  ** *pFragment. Store its associated 'score' in iBestScore.
-  */
-  pFragment->iCol = iCol;
-  while( !fts3SnippetNextCandidate(&sIter) ){
-    int iPos;
-    int iScore;
-    u64 mCover;
-    u64 mHighlight;
-    fts3SnippetDetails(&sIter, mCovered, &iPos, &iScore, &mCover, &mHighlight);
-    assert( iScore>=0 );
-    if( iScore>iBestScore ){
-      pFragment->iPos = iPos;
-      pFragment->hlmask = mHighlight;
-      pFragment->covered = mCover;
-      iBestScore = iScore;
+    /* Loop through all candidate snippets. Store the best snippet in 
+     ** *pFragment. Store its associated 'score' in iBestScore.
+     */
+    pFragment->iCol = iCol;
+    while( !fts3SnippetNextCandidate(&sIter) ){
+      int iPos;
+      int iScore;
+      u64 mCover;
+      u64 mHighlite;
+      fts3SnippetDetails(&sIter, mCovered, &iPos, &iScore, &mCover,&mHighlite);
+      assert( iScore>=0 );
+      if( iScore>iBestScore ){
+        pFragment->iPos = iPos;
+        pFragment->hlmask = mHighlite;
+        pFragment->covered = mCover;
+        iBestScore = iScore;
+      }
     }
-  }
 
+    *piScore = iBestScore;
+  }
   sqlite3_free(sIter.aPhrase);
-  *piScore = iBestScore;
-  return SQLITE_OK;
+  return rc;
 }
 
 
@@ -145835,8 +147582,12 @@ static int fts3SnippetText(
       ** required. They are required if (a) this is not the first fragment,
       ** or (b) this fragment does not begin at position 0 of its column. 
       */
-      if( rc==SQLITE_OK && (iPos>0 || iFragment>0) ){
-        rc = fts3StringAppend(pOut, zEllipsis, -1);
+      if( rc==SQLITE_OK ){
+        if( iPos>0 || iFragment>0 ){
+          rc = fts3StringAppend(pOut, zEllipsis, -1);
+        }else if( iBegin ){
+          rc = fts3StringAppend(pOut, zDoc, iBegin);
+        }
       }
       if( rc!=SQLITE_OK || iCurrent<iPos ) continue;
     }
@@ -146402,7 +148153,7 @@ SQLITE_PRIVATE void sqlite3Fts3Snippet(
       */
       for(iRead=0; iRead<pTab->nColumn; iRead++){
         SnippetFragment sF = {0, 0, 0, 0};
-        int iS;
+        int iS = 0;
         if( iCol>=0 && iRead!=iCol ) continue;
 
         /* Find the best snippet of nFToken tokens in column iRead. */
@@ -147821,13 +149572,12 @@ static int readInt16(u8 *p){
   return (p[0]<<8) + p[1];
 }
 static void readCoord(u8 *p, RtreeCoord *pCoord){
-  u32 i = (
+  pCoord->u = (
     (((u32)p[0]) << 24) + 
     (((u32)p[1]) << 16) + 
     (((u32)p[2]) <<  8) + 
     (((u32)p[3]) <<  0)
   );
-  *(u32 *)pCoord = i;
 }
 static i64 readInt64(u8 *p){
   return (
@@ -147856,7 +149606,7 @@ static int writeCoord(u8 *p, RtreeCoord *pCoord){
   u32 i;
   assert( sizeof(RtreeCoord)==4 );
   assert( sizeof(u32)==4 );
-  i = *(u32 *)pCoord;
+  i = pCoord->u;
   p[0] = (i>>24)&0xFF;
   p[1] = (i>>16)&0xFF;
   p[2] = (i>> 8)&0xFF;
@@ -148187,14 +149937,13 @@ static void nodeGetCell(
   RtreeCell *pCell             /* OUT: Write the cell contents here */
 ){
   u8 *pData;
-  u8 *pEnd;
   RtreeCoord *pCoord;
+  int ii;
   pCell->iRowid = nodeGetRowid(pRtree, pNode, iCell);
   pData = pNode->zData + (12 + pRtree->nBytesPerCell*iCell);
-  pEnd = pData + pRtree->nDim*8;
   pCoord = pCell->aCoord;
-  for(; pData<pEnd; pData+=4, pCoord++){
-    readCoord(pData, pCoord);
+  for(ii=0; ii<pRtree->nDim*2; ii++){
+    readCoord(&pData[ii*4], &pCoord[ii]);
   }
 }
 
@@ -148634,7 +150383,7 @@ static RtreeSearchPoint *rtreeEnqueue(
   pNew = pCur->aPoint + i;
   pNew->rScore = rScore;
   pNew->iLevel = iLevel;
-  assert( iLevel>=0 && iLevel<=RTREE_MAX_DEPTH );
+  assert( iLevel<=RTREE_MAX_DEPTH );
   while( i>0 ){
     RtreeSearchPoint *pParent;
     j = (i-1)/2;
@@ -149078,11 +150827,7 @@ static int rtreeFilter(
 ** support estimatedRows. In that case this function is a no-op.
 */
 static void setEstimatedRows(sqlite3_index_info *pIdxInfo, i64 nRow){
-#if SQLITE_VERSION_NUMBER>=3008002
-  if( sqlite3_libversion_number()>=3008002 ){
-    pIdxInfo->estimatedRows = nRow;
-  }
-#endif
+  pIdxInfo->estimatedRows = nRow;
 }
 
 /*
@@ -150258,6 +152003,8 @@ static int rtreeUpdate(
   rtreeReference(pRtree);
   assert(nData>=1);
 
+  cell.iRowid = 0;  /* Used only to suppress a compiler warning */
+
   /* Constraint handling. A write operation on an r-tree table may return
   ** SQLITE_CONSTRAINT for two reasons:
   **
@@ -151400,8 +153147,8 @@ SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db){
 
   for(i=0; rc==SQLITE_OK && i<(int)(sizeof(scalars)/sizeof(scalars[0])); i++){
     struct IcuScalar *p = &scalars[i];
-    rc = sqlite3_create_function(
-        db, p->zName, p->nArg, p->enc, p->pContext, p->xFunc, 0, 0
+    rc = sqlite3_create_function_v2(
+        db, p->zName, p->nArg, p->enc, p->pContext, p->xFunc, 0, 0, 0
     );
   }
 
similarity index 97%
rename from pkgs/sqlite3.8.7.1/generic/tclsqlite3.c
rename to pkgs/sqlite3.8.8.3/generic/tclsqlite3.c
index 74d9aa2..b323ec1 100644 (file)
 **                        hundreds of new commands used for testing
 **                        SQLite.  This option implies -DSQLITE_TCLMD5.
 */
+
+/*
+** If requested, include the SQLite compiler options file for MSVC.
+*/
+#if defined(INCLUDE_MSVC_H)
+#include "msvc.h"
+#endif
+
 #include "tcl.h"
 #include <errno.h>
 
@@ -261,7 +269,7 @@ static int incrblobInput(
 */
 static int incrblobOutput(
   ClientData instanceData, 
-  CONST char *buf, 
+  const char *buf, 
   int toWrite,
   int *errorCodePtr
 ){
@@ -640,6 +648,7 @@ static int DbWalHandler(
   Tcl_Interp *interp = pDb->interp;
   assert(pDb->pWalHook);
 
+  assert( db==pDb->db );
   p = Tcl_DuplicateObj(pDb->pWalHook);
   Tcl_IncrRefCount(p);
   Tcl_ListObjAppendElement(interp, p, Tcl_NewStringObj(zDb, -1));
@@ -657,9 +666,9 @@ static int DbWalHandler(
 #if defined(SQLITE_TEST) && defined(SQLITE_ENABLE_UNLOCK_NOTIFY)
 static void setTestUnlockNotifyVars(Tcl_Interp *interp, int iArg, int nArg){
   char zBuf[64];
-  sprintf(zBuf, "%d", iArg);
+  sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", iArg);
   Tcl_SetVar(interp, "sqlite_unlock_notify_arg", zBuf, TCL_GLOBAL_ONLY);
-  sprintf(zBuf, "%d", nArg);
+  sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", nArg);
   Tcl_SetVar(interp, "sqlite_unlock_notify_argcount", zBuf, TCL_GLOBAL_ONLY);
 }
 #else
@@ -1089,10 +1098,10 @@ static int dbPrepareAndBind(
   SqlPreparedStmt **ppPreStmt     /* OUT: Object used to cache statement */
 ){
   const char *zSql = zIn;         /* Pointer to first SQL statement in zIn */
-  sqlite3_stmt *pStmt;            /* Prepared statement object */
+  sqlite3_stmt *pStmt = 0;        /* Prepared statement object */
   SqlPreparedStmt *pPreStmt;      /* Pointer to cached statement */
   int nSql;                       /* Length of zSql in bytes */
-  int nVar;                       /* Number of variables in statement */
+  int nVar = 0;                   /* Number of variables in statement */
   int iParm = 0;                  /* Next free entry in apParm */
   char c;
   int i;
@@ -1909,8 +1918,8 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
     pCollate->zScript = (char*)&pCollate[1];
     pDb->pCollate = pCollate;
     memcpy(pCollate->zScript, zScript, nScript+1);
-    if( sqlite3_create_collation(pDb->db, zName, SQLITE_UTF8, 
-        pCollate, tclSqlCollate) ){
+    if( sqlite3_create_collation_v2(pDb->db, zName, SQLITE_UTF8, 
+        pCollate, tclSqlCollate, 0) ){
       Tcl_SetResult(interp, (char *)sqlite3_errmsg(pDb->db), TCL_VOLATILE);
       return TCL_ERROR;
     }
@@ -3103,10 +3112,10 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
 ** used to open a new SQLite database.  See the DbMain() routine above
 ** for additional information.
 **
-** The EXTERN macros are required by TCL in order to work on windows.
+** The DLLEXPORT macros are required by TCL in order to work on windows.
 */
-EXTERN int Sqlite3_Init(Tcl_Interp *interp){
-  int rc = Tcl_InitStubs(interp, "8.4", 0)==0 ? TCL_ERROR : TCL_OK;
+DLLEXPORT int Sqlite3_Init(Tcl_Interp *interp){
+  int rc = Tcl_InitStubs(interp, "8.4", 0) ? TCL_OK : TCL_ERROR;
   if( rc==TCL_OK ){
     Tcl_CreateObjCommand(interp, "sqlite3", (Tcl_ObjCmdProc*)DbMain, 0, 0);
 #ifndef SQLITE_3_SUFFIX_ONLY
@@ -3119,9 +3128,9 @@ EXTERN int Sqlite3_Init(Tcl_Interp *interp){
   }
   return rc;
 }
-EXTERN int Tclsqlite3_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp); }
-EXTERN int Sqlite3_Unload(Tcl_Interp *interp, int flags){ return TCL_OK; }
-EXTERN int Tclsqlite3_Unload(Tcl_Interp *interp, int flags){ return TCL_OK; }
+DLLEXPORT int Tclsqlite3_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp); }
+DLLEXPORT int Sqlite3_Unload(Tcl_Interp *interp, int flags){ return TCL_OK; }
+DLLEXPORT int Tclsqlite3_Unload(Tcl_Interp *interp, int flags){ return TCL_OK; }
 
 /* Because it accesses the file-system and uses persistent state, SQLite
 ** is not considered appropriate for safe interpreters.  Hence, we deliberately
@@ -3425,7 +3434,7 @@ static void MD5DigestToBase10x8(unsigned char digest[16], char zDigest[50]){
   for(i=j=0; i<16; i+=2){
     x = digest[i]*256 + digest[i+1];
     if( i>0 ) zDigest[j++] = '-';
-    sprintf(&zDigest[j], "%05u", x);
+    sqlite3_snprintf(50-j, &zDigest[j], "%05u", x);
     j += 5;
   }
   zDigest[j] = 0;
@@ -3591,7 +3600,7 @@ static int init_all_cmd(
   ClientData cd,
   Tcl_Interp *interp,
   int objc,
-  Tcl_Obj *CONST objv[]
+  Tcl_Obj *const objv[]
 ){
 
   Tcl_Interp *slave;
@@ -3621,7 +3630,7 @@ static int db_use_legacy_prepare_cmd(
   ClientData cd,
   Tcl_Interp *interp,
   int objc,
-  Tcl_Obj *CONST objv[]
+  Tcl_Obj *const objv[]
 ){
   Tcl_CmdInfo cmdInfo;
   SqliteDb *pDb;
@@ -3646,6 +3655,45 @@ static int db_use_legacy_prepare_cmd(
   Tcl_ResetResult(interp);
   return TCL_OK;
 }
+
+/*
+** Tclcmd: db_last_stmt_ptr DB
+**
+**   If the statement cache associated with database DB is not empty,
+**   return the text representation of the most recently used statement
+**   handle.
+*/
+static int db_last_stmt_ptr(
+  ClientData cd,
+  Tcl_Interp *interp,
+  int objc,
+  Tcl_Obj *const objv[]
+){
+  extern int sqlite3TestMakePointerStr(Tcl_Interp*, char*, void*);
+  Tcl_CmdInfo cmdInfo;
+  SqliteDb *pDb;
+  sqlite3_stmt *pStmt = 0;
+  char zBuf[100];
+
+  if( objc!=2 ){
+    Tcl_WrongNumArgs(interp, 1, objv, "DB");
+    return TCL_ERROR;
+  }
+
+  if( !Tcl_GetCommandInfo(interp, Tcl_GetString(objv[1]), &cmdInfo) ){
+    Tcl_AppendResult(interp, "no such db: ", Tcl_GetString(objv[1]), (char*)0);
+    return TCL_ERROR;
+  }
+  pDb = (SqliteDb*)cmdInfo.objClientData;
+
+  if( pDb->stmtList ) pStmt = pDb->stmtList->pStmt;
+  if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ){
+    return TCL_ERROR;
+  }
+  Tcl_SetResult(interp, zBuf, TCL_VOLATILE);
+
+  return TCL_OK;
+}
 #endif
 
 /*
@@ -3691,6 +3739,7 @@ static void init_all(Tcl_Interp *interp){
     extern int Sqlitetest9_Init(Tcl_Interp*);
     extern int Sqlitetestasync_Init(Tcl_Interp*);
     extern int Sqlitetest_autoext_Init(Tcl_Interp*);
+    extern int Sqlitetest_blob_Init(Tcl_Interp*);
     extern int Sqlitetest_demovfs_Init(Tcl_Interp *);
     extern int Sqlitetest_func_Init(Tcl_Interp*);
     extern int Sqlitetest_hexio_Init(Tcl_Interp*);
@@ -3734,6 +3783,7 @@ static void init_all(Tcl_Interp *interp){
     Sqlitetest9_Init(interp);
     Sqlitetestasync_Init(interp);
     Sqlitetest_autoext_Init(interp);
+    Sqlitetest_blob_Init(interp);
     Sqlitetest_demovfs_Init(interp);
     Sqlitetest_func_Init(interp);
     Sqlitetest_hexio_Init(interp);
@@ -3765,6 +3815,9 @@ static void init_all(Tcl_Interp *interp){
     Tcl_CreateObjCommand(
         interp, "db_use_legacy_prepare", db_use_legacy_prepare_cmd, 0, 0
     );
+    Tcl_CreateObjCommand(
+        interp, "db_last_stmt_ptr", db_last_stmt_ptr, 0, 0
+    );
 
 #ifdef SQLITE_SSE
     Sqlitetestsse_Init(interp);
@@ -3773,6 +3826,11 @@ static void init_all(Tcl_Interp *interp){
 #endif
 }
 
+/* Needed for the setrlimit() system call on unix */
+#if defined(unix)
+#include <sys/resource.h>
+#endif
+
 #define TCLSH_MAIN main   /* Needed to fake out mktclapp */
 int TCLSH_MAIN(int argc, char **argv){
   Tcl_Interp *interp;
@@ -3786,6 +3844,17 @@ int TCLSH_MAIN(int argc, char **argv){
   }
 #endif
 
+  /* Since the primary use case for this binary is testing of SQLite,
+  ** be sure to generate core files if we crash */
+#if defined(SQLITE_TEST) && defined(unix)
+  { struct rlimit x;
+    getrlimit(RLIMIT_CORE, &x);
+    x.rlim_cur = x.rlim_max;
+    setrlimit(RLIMIT_CORE, &x);
+  }
+#endif /* SQLITE_TEST && unix */
+
+
   /* Call sqlite3_shutdown() once before doing anything else. This is to
   ** test that sqlite3_shutdown() can be safely called by a process before
   ** sqlite3_initialize() is. */
similarity index 99%
rename from pkgs/tdbcmysql1.0.2/tclconfig/tcl.m4
rename to pkgs/sqlite3.8.8.3/tclconfig/tcl.m4
index e7b1113..b0ae59f 100644 (file)
@@ -3369,15 +3369,15 @@ print("manifest needed")
            if test "$GCC" = "yes"; then
                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
            fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
        else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
            if test "$GCC" = "yes"; then
                PKG_LIB_FILE=lib${PKG_LIB_FILE}
            fi
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
        if test "$GCC" = "yes"; then
            PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
        fi
@@ -3391,13 +3391,13 @@ print("manifest needed")
            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}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
            RANLIB=:
        else
-           eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     fi
 
     # These are escaped so that only CFLAGS is picked up at configure time.
similarity index 92%
rename from pkgs/sqlite3.8.7.1/tests/all.tcl
rename to pkgs/sqlite3.8.8.3/tests/all.tcl
index 0a6f57f..3ed02eb 100644 (file)
@@ -10,8 +10,6 @@
 # See the file "license.terms" for information on usage and redistribution
 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
-package prefer latest
-package require Tcl 8.5
 package require tcltest 2.2
 namespace import tcltest::*
 configure {*}$argv -testdir [file dir [info script]]
similarity index 99%
rename from pkgs/sqlite3.8.7.1/win/makefile.vc
rename to pkgs/sqlite3.8.8.3/win/makefile.vc
index 44efb3d..f09ba1f 100644 (file)
@@ -164,7 +164,7 @@ PROJECT = sqlite3
 !endif
 # get project version from row "AC_INIT([sqlite], [3.7.14])"
 !if [echo DOTVERSION = \>> versions.vc] \
-   && [nmakehlp -V ..\configure.in AC_INIT >> versions.vc]
+   && [nmakehlp -V ..\configure.ac AC_INIT >> versions.vc]
 !endif
 !include "versions.vc"
 
@@ -243,8 +243,8 @@ INCLUDES    = $(TCL_INCLUDES) -I"$(WINDIR)" -I"$(GENERICDIR)" \
                   -I"$(ROOT)\.."
 BASE_CLFAGS    = $(cflags) $(cdebug) $(crt) $(INCLUDES) \
                   -DSQLITE_3_SUFFIX_ONLY=1 -DSQLITE_ENABLE_RTREE=1 \
-                  -DSQLITE_ENABLE_FTS3=1 -DSQLITE_OMIT_DEPRECATED=1
-CON_CFLAGS     = $(cflags) $(cdebug) $(crt) -DCONSOLE -DSQLITE_ENABLE_FTS3=1
+                  -DSQLITE_ENABLE_FTS4=1 -DSQLITE_OMIT_DEPRECATED=1
+CON_CFLAGS     = $(cflags) $(cdebug) $(crt) -DCONSOLE -DSQLITE_ENABLE_FTS4=1
 TCL_CFLAGS     = -DBUILD_sqlite -DUSE_TCL_STUBS \
                   -DPACKAGE_VERSION="\"$(DOTVERSION)\"" $(BASE_CLFAGS) \
                   $(OPTDEFINES)
diff --git a/pkgs/tdbc1.0.2/configure b/pkgs/tdbc1.0.2/configure
deleted file mode 100755 (executable)
index aef02a2..0000000
+++ /dev/null
@@ -1,12797 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for tdbc 1.0.2.
-#
-# 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'"
-
-# 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
-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='tdbc'
-PACKAGE_TARNAME='tdbc'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='tdbc 1.0.2'
-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 TCL_VERSION TCL_PATCH_LEVEL 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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CLEANFILES TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS tcloo_VERSION tcloo_BIN_DIR tcloo_SRC_DIR tcloo_LIB_FILE tcloo_LIB_SPEC tcloo_STUB_LIB_FILE tcloo_STUB_LIB_SPEC tcloo_STUB_LIB_PATH TCL_VERSION_REQ TCL_VERSION_DESIRED TCLOO_VERSION_REQ CPP INSTALL INSTALL_DATA_DIR INSTALL_DATA INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_LIBRARY SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS TCL_INCLUDES TCL_THREADS SHARED_BUILD AR ac_ct_AR CELIB_DIR RC ac_ct_RC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_DBGX MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB VC_MANIFEST_EMBED_DLL VC_MANIFEST_EMBED_EXE MT ADD_MANIFEST TCLSH_PROG tdbc_SRC_DIR tdbc_INCLUDE_SPEC tdbc_BUILD_INCLUDE_SPEC tdbc_LIB_DIR CONFIGURE_OUTPUTS tdbc_BUILD_LIB_SPEC tdbc_LIB_SPEC tdbc_BUILD_STUB_LIB_SPEC tdbc_STUB_LIB_SPEC tdbc_BUILD_STUB_LIB_PATH tdbc_STUB_LIB_PATH MAJOR_VERSION MINOR_VERSION PATCHLEVEL LIBOBJS 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.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-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'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-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"
-    ac_prev=
-    continue
-  fi
-
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_option in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    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 ;;
-
-  --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 ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    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=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    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'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -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_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    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 ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    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 ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    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 | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    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-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-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    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 ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    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
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_$ac_package='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    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.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    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-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 ;;
-
-  -*) { 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 ;;
-
-  *)
-    # 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
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
-fi
-
-# 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
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-             localstatedir libdir includedir oldincludedir infodir mandir
-do
-  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
-
-# 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
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# 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_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=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
-   { (exit 1); exit 1; }; }
-  else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-  fi
-fi
-(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 tdbc 1.0.2 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 tdbc 1.0.2:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-threads        build with threads
-  --enable-shared         build and link with shared libraries (default: on)
-  --enable-64bit          enable 64bit support (default: off)
-  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
-  --disable-rpath         disable rpath support (default: on)
-  --enable-wince          enable Win/CE support (where applicable)
-  --enable-symbols        build with debugging symbols (default: off)
-
-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-tcloo              directory containing tcloo configuration (tclooConfig.sh)
-  --with-tclinclude       directory containing the public Tcl header files
-  --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
-tdbc configure 1.0.2
-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 tdbc $as_me 1.0.2, 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
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    { 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
-  # 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 "$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
-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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#--------------------------------------------------------------------
-# 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.
-#--------------------------------------------------------------------
-
-ac_aux_dir=
-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"
-    break
-  elif 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/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 "$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="$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.
-
-
-    # TEA extensions pass this us the version of TEA they think they
-    # are compatible with.
-    TEA_VERSION="3.9"
-
-    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.9" = 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.9" != "${TEA_VERSION}" ; then
-       echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
-echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6
-    else
-       echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
-echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
-    fi
-
-    # If the user did not set CFLAGS, set it now to keep macros
-    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-       CFLAGS=""
-    fi
-
-    case "`uname -s`" in
-       *win32*|*WIN32*|*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"
-           ;;
-       *CYGWIN_*)
-           CYGPATH=echo
-           EXEEXT=".exe"
-           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
-           ;;
-       *)
-           CYGPATH=echo
-           # Maybe we are cross-compiling....
-           case ${host_alias} in
-               *mingw32*)
-               EXEEXT=".exe"
-               TEA_PLATFORM="windows"
-               ;;
-           *)
-               EXEEXT=""
-               TEA_PLATFORM="unix"
-               ;;
-           esac
-           ;;
-    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
-
-    { echo "$as_me:$LINENO: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
-echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
-
-
-
-
-    # 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_...
-
-
-
-
-
-
-
-
-
-#--------------------------------------------------------------------
-# Load the tclConfig.sh file
-#--------------------------------------------------------------------
-
-
-
-    #
-    # 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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 common install locations
-           if test x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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: error: Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" >&5
-echo "$as_me: error: Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" >&2;}
-   { (exit 1); exit 1; }; }
-       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
-
-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
-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
-
-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
-
-  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
-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
-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
-
-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 "$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
-  ac_prog_rejected=no
-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 $# != 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
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-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
-
-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
-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
-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
-
-    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
-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
-
-  test -n "$ac_ct_CC" && break
-done
-
-  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
-    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
-fi
-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
-  { { 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
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-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
-  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
-
-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
-  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
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-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
-
-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
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  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
-
-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
-
-
-
-    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: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tcl was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tcl.framework installed in an arbitrary location.
-       case ${TCL_DEFS} in
-           *TCL_FRAMEWORK*)
-               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
-                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
-                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
-                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
-                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
-                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
-    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    echo "$as_me:$LINENO: checking platform" >&5
-echo $ECHO_N "checking platform... $ECHO_C" >&6
-    hold_cc=$CC; CC="$TCL_CC"
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-           #ifdef _WIN32
-               #error win32
-           #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
-  TEA_PLATFORM="unix"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-TEA_PLATFORM="windows"
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-    CC=$hold_cc
-    echo "$as_me:$LINENO: result: $TEA_PLATFORM" >&5
-echo "${ECHO_T}$TEA_PLATFORM" >&6
-
-    # The BUILD_$pkg is to define the correct extern storage class
-    # handling when making this package
-
-cat >>confdefs.h <<_ACEOF
-#define BUILD_${PACKAGE_NAME}
-_ACEOF
-
-    # Do this here as we have fully defined TEA_PLATFORM now
-    if test "${TEA_PLATFORM}" = "windows" ; then
-       EXEEXT=".exe"
-       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
-    fi
-
-    # TEA specific:
-
-
-
-
-
-
-
-
-#--------------------------------------------------------------------
-# Load the tkConfig.sh file if necessary (Tk extension)
-#--------------------------------------------------------------------
-
-#TEA_PATH_TKCONFIG
-#TEA_LOAD_TKCONFIG
-
-#--------------------------------------------------------------------
-# Load the tclooConfig.sh file on Tcl versions where oo is an
-# extension.
-#--------------------------------------------------------------------
-
-if test "${TCL_MAJOR_VERSION}" -lt 8 ; then
-    { { echo "$as_me:$LINENO: error: ${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.5 or newer.
-Found configuration for Tcl ${TCL_VERSION}." >&5
-echo "$as_me: error: ${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.5 or newer.
-Found configuration for Tcl ${TCL_VERSION}." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test "${TCL_MAJOR_VERSION}" -eq 8 ; then
-  if test "${TCL_MINOR_VERSION}" -lt 5 ; then
-    { { echo "$as_me:$LINENO: error: ${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.5 or newer.
-Found configuration for Tcl ${TCL_VERSION}." >&5
-echo "$as_me: error: ${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.5 or newer.
-Found configuration for Tcl ${TCL_VERSION}." >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-  if test "${TCL_MINOR_VERSION}" -eq 5 ; then
-
-    #
-    # Ok, lets find the tcloo configuration
-    # First, look for one uninstalled.
-    # the alternative search directory is invoked by --with-tcloo
-    #
-
-    if test x"${no_tcloo}" = x ; then
-       # we reset no_tcloo in case something fails here
-       no_tcloo=true
-
-# Check whether --with-tcloo or --without-tcloo was given.
-if test "${with_tcloo+set}" = set; then
-  withval="$with_tcloo"
-  with_tclooconfig=${withval}
-fi;
-       echo "$as_me:$LINENO: checking for tcloo configuration" >&5
-echo $ECHO_N "checking for tcloo configuration... $ECHO_C" >&6
-       if test "${ac_cv_c_tclooconfig+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
-           # First check to see if --with-tcloo was specified.
-           if test x"${with_tclooconfig}" != x ; then
-               case ${with_tclooconfig} in
-                   */tclooConfig.sh )
-                       if test -f ${with_tclooconfig}; then
-                           { echo "$as_me:$LINENO: WARNING: --with-tcloo argument should refer to directory containing tclooConfig.sh, not to tclooConfig.sh itself" >&5
-echo "$as_me: WARNING: --with-tcloo argument should refer to directory containing tclooConfig.sh, not to tclooConfig.sh itself" >&2;}
-                           with_tclooconfig=`echo ${with_tclooconfig} | sed 's!/tclooConfig\.sh$!!'`
-                       fi;;
-               esac
-               if test -f "${with_tclooconfig}/tclooConfig.sh" ; then
-                   ac_cv_c_tclooconfig=`(cd ${with_tclooconfig}; pwd)`
-               else
-                   { { echo "$as_me:$LINENO: error: ${with_tclooconfig} directory doesn't contain tclooConfig.sh" >&5
-echo "$as_me: error: ${with_tclooconfig} directory doesn't contain tclooConfig.sh" >&2;}
-   { (exit 1); exit 1; }; }
-               fi
-           fi
-
-           # then check for a private tcloo installation
-           if test x"${ac_cv_c_tclooconfig}" = x ; then
-               for i in \
-                       ../tcloo \
-                       `ls -dr ../tcloo*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
-                       `ls -dr ../tcloo*[0-9].[0-9][0-9] 2>/dev/null` \
-                       `ls -dr ../tcloo*[0-9].[0-9] 2>/dev/null` \
-                       `ls -dr ../tcloo*[0-9].[0-9]* 2>/dev/null` \
-                       ../../tcloo \
-                       `ls -dr ../../tcloo*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
-                       `ls -dr ../../tcloo*[0-9].[0-9][0-9] 2>/dev/null` \
-                       `ls -dr ../../tcloo*[0-9].[0-9] 2>/dev/null` \
-                       `ls -dr ../../tcloo*[0-9].[0-9]* 2>/dev/null` \
-                       ../../../tcloo \
-                       `ls -dr ../../../tcloo*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
-                       `ls -dr ../../../tcloo*[0-9].[0-9][0-9] 2>/dev/null` \
-                       `ls -dr ../../../tcloo*[0-9].[0-9] 2>/dev/null` \
-                       `ls -dr ../../../tcloo*[0-9].[0-9]* 2>/dev/null` \
-                       ${srcdir}/../tcloo \
-                       `ls -dr ${srcdir}/../tcloo*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
-                       `ls -dr ${srcdir}/../tcloo*[0-9].[0-9][0-9] 2>/dev/null` \
-                       `ls -dr ${srcdir}/../tcloo*[0-9].[0-9] 2>/dev/null` \
-                       `ls -dr ${srcdir}/../tcloo*[0-9].[0-9]* 2>/dev/null` \
-                       ; do
-                   if test -f "$i/tclooConfig.sh" ; then
-                       ac_cv_c_tclooconfig=`(cd $i; pwd)`
-                       break
-                   fi
-                   if test -f "$i/unix/tclooConfig.sh" ; then
-                       ac_cv_c_tclooconfig=`(cd $i/unix; pwd)`
-                       break
-                   fi
-               done
-           fi
-
-           # check in a few common install locations
-           if test x"${ac_cv_c_tclooconfig}" = x ; then
-               for i in `ls -d ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       ; do
-                   if test -f "$i/tclooConfig.sh" ; then
-                       ac_cv_c_tclooconfig=`(cd $i; pwd)`
-                       break
-                   fi
-               done
-           fi
-
-fi
-
-
-       if test x"${ac_cv_c_tclooconfig}" = x ; then
-           tcloo_BIN_DIR="# no tcloo configs found"
-           { echo "$as_me:$LINENO: WARNING: Cannot find tcloo configuration definitions" >&5
-echo "$as_me: WARNING: Cannot find tcloo configuration definitions" >&2;}
-           exit 0
-       else
-           no_tcloo=
-           tcloo_BIN_DIR=${ac_cv_c_tclooconfig}
-           echo "$as_me:$LINENO: result: found $tcloo_BIN_DIR/tclooConfig.sh" >&5
-echo "${ECHO_T}found $tcloo_BIN_DIR/tclooConfig.sh" >&6
-       fi
-    fi
-
-
-    echo "$as_me:$LINENO: checking for existence of ${tcloo_BIN_DIR}/tclooConfig.sh" >&5
-echo $ECHO_N "checking for existence of ${tcloo_BIN_DIR}/tclooConfig.sh... $ECHO_C" >&6
-
-    if test -f "${tcloo_BIN_DIR}/tclooConfig.sh" ; then
-        echo "$as_me:$LINENO: result: loading" >&5
-echo "${ECHO_T}loading" >&6
-       . "${tcloo_BIN_DIR}/tclooConfig.sh"
-    else
-        echo "$as_me:$LINENO: result: file not found" >&5
-echo "${ECHO_T}file not found" >&6
-    fi
-
-    #
-    # If the tcloo_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 tcloo_LIB_SPEC will be set to the value
-    # of tcloo_BUILD_LIB_SPEC. An extension should make use of tcloo_LIB_SPEC
-    # instead of tcloo_BUILD_LIB_SPEC since it will work with both an
-    # installed and uninstalled version of Tcl.
-    #
-
-    if test -f "${tcloo_BIN_DIR}/Makefile" ; then
-       { echo "$as_me:$LINENO: WARNING: Found Makefile - using build library specs for tcloo" >&5
-echo "$as_me: WARNING: Found Makefile - using build library specs for tcloo" >&2;}
-        tcloo_LIB_SPEC=${tcloo_BUILD_LIB_SPEC}
-        tcloo_STUB_LIB_SPEC=${tcloo_BUILD_STUB_LIB_SPEC}
-        tcloo_STUB_LIB_PATH=${tcloo_BUILD_STUB_LIB_PATH}
-        tcloo_INCLUDE_SPEC=${tcloo_BUILD_INCLUDE_SPEC}
-        tcloo_LIBRARY_PATH=${tcloo_LIBRARY_PATH}
-    fi
-
-
-
-
-
-
-
-
-
-
-
-
-    # Allow the caller to prevent this auto-check by specifying any 2nd arg
-    if test "x" = x; then
-
-       # Check both upper and lower-case variants
-       # If a dev wanted non-stubs libs, this function could take an option
-       # to not use _STUB in the paths below
-       if test "x${tcloo_STUB_LIB_SPEC}" = x; then
-
-    echo "$as_me:$LINENO: checking For TCLOO_STUB library for LIBS" >&5
-echo $ECHO_N "checking For TCLOO_STUB library for LIBS... $ECHO_C" >&6
-    # This simplifies the use of stub libraries by automatically adding
-    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
-    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
-    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
-    if test "x${TCLOO_STUB_LIB_SPEC}" != "x" ; then
-       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-
-    vars="\"`${CYGPATH} ${TCLOO_STUB_LIB_PATH}`\""
-    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
-
-
-           echo "$as_me:$LINENO: result: using TCLOO_STUB_LIB_PATH ${TCLOO_STUB_LIB_PATH}" >&5
-echo "${ECHO_T}using TCLOO_STUB_LIB_PATH ${TCLOO_STUB_LIB_PATH}" >&6
-       else
-
-    vars="${TCLOO_STUB_LIB_SPEC}"
-    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
-
-
-           echo "$as_me:$LINENO: result: using TCLOO_STUB_LIB_SPEC ${TCLOO_STUB_LIB_SPEC}" >&5
-echo "${ECHO_T}using TCLOO_STUB_LIB_SPEC ${TCLOO_STUB_LIB_SPEC}" >&6
-       fi
-    else
-       echo "$as_me:$LINENO: result: file not found" >&5
-echo "${ECHO_T}file not found" >&6
-    fi
-
-else
-
-    echo "$as_me:$LINENO: checking For tcloo_STUB library for LIBS" >&5
-echo $ECHO_N "checking For tcloo_STUB library for LIBS... $ECHO_C" >&6
-    # This simplifies the use of stub libraries by automatically adding
-    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
-    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
-    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
-    if test "x${tcloo_STUB_LIB_SPEC}" != "x" ; then
-       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-
-    vars="\"`${CYGPATH} ${tcloo_STUB_LIB_PATH}`\""
-    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
-
-
-           echo "$as_me:$LINENO: result: using tcloo_STUB_LIB_PATH ${tcloo_STUB_LIB_PATH}" >&5
-echo "${ECHO_T}using tcloo_STUB_LIB_PATH ${tcloo_STUB_LIB_PATH}" >&6
-       else
-
-    vars="${tcloo_STUB_LIB_SPEC}"
-    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
-
-
-           echo "$as_me:$LINENO: result: using tcloo_STUB_LIB_SPEC ${tcloo_STUB_LIB_SPEC}" >&5
-echo "${ECHO_T}using tcloo_STUB_LIB_SPEC ${tcloo_STUB_LIB_SPEC}" >&6
-       fi
-    else
-       echo "$as_me:$LINENO: result: file not found" >&5
-echo "${ECHO_T}file not found" >&6
-    fi
-
-fi
-
-
-fi
-
-
-  else
-    TCLOO_CFLAGS=""
-  fi
-fi
-# Announce what versions of Tcl (and TclOO) are needed
-TCL_VERSION_REQ=8.5;
-TCL_VERSION_DESIRED=8.6;
-TCLOO_VERSION_REQ=0.6;
-
-#-----------------------------------------------------------------------
-# 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 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.
-
-    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
-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
-
-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
-
-  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
-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
-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
-
-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 "$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
-  ac_prog_rejected=no
-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 $# != 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
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-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
-
-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
-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
-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
-
-    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
-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
-
-  test -n "$ac_ct_CC" && break
-done
-
-  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); }
-
-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
-  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
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-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
-
-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
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  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
-
-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
-
-
-    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
-    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
-    INSTALL_DATA='${INSTALL} -m 644'
-    INSTALL_PROGRAM='${INSTALL}'
-    INSTALL_SCRIPT='${INSTALL}'
-    INSTALL_LIBRARY='${INSTALL_DATA}'
-
-
-
-
-
-
-
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    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 >conftest.make <<\_ACEOF
-all:
-       @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-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 conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-  SET_MAKE=
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    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
-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
-if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
-  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
-
-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
-
-  RANLIB=$ac_ct_RANLIB
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-    #--------------------------------------------------------------------
-    # 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
-
-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
-
-#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
-
-( 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 "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-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
-
-fi
-
-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
-if test "${tcl_cv_cc_pipe+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -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
-  tcl_cv_cc_pipe=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_pipe=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-           CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
-echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
-       if test $tcl_cv_cc_pipe = yes; then
-           CFLAGS="$CFLAGS -pipe"
-       fi
-    fi
-
-    #--------------------------------------------------------------------
-    # 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
-
-  ;
-  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
-  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
-  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
-    # finding both strings is unlikely to happen, but who knows?
-    ac_cv_c_bigendian=unknown
-  fi
-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
-
-( 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
-
-
-    #--------------------------------------------------------------------
-    # 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
-    ;;
-  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 tdbc 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
-
-
-    # TEA specific: 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}'
-
-
-
-
-    echo "$as_me:$LINENO: checking dirent.h" >&5
-echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
-if test "${tcl_cv_dirent_h+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 <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_cv_dirent_h=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_dirent_h=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
-echo "${ECHO_T}$tcl_cv_dirent_h" >&6
-
-    if test $tcl_cv_dirent_h = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_DIRENT_H 1
-_ACEOF
-
-    fi
-
-    # TEA specific:
-    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 tdbc 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
-
-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 tdbc 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
-
-fi
-if test $ac_cv_header_float_h = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_FLOAT_H 1
-_ACEOF
-
-fi
-
-
-    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
-
-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
-
-  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 tdbc 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
-
-fi
-if test $ac_cv_header_values_h = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_VALUES_H 1
-_ACEOF
-
-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 tdbc 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 tdbc 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
-
-    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 tdbc 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
-
-    fi
-
-    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
-
-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 tdbc 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 tdbc 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 tdbc 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
-
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#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
-  ac_cv_c_inline=$ac_kw; 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
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
-
-case $ac_cv_c_inline in
-  inline | yes) ;;
-  *)
-    case $ac_cv_c_inline in
-      no) ac_val=;;
-      *) ac_val=$ac_cv_c_inline;;
-    esac
-    cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
-    ;;
-esac
-
-
-#-----------------------------------------------------------------------
-# 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="tdbc.c tdbcStubInit.c tdbcTokenize.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
-               # To add more dirs here (like 'src'), you have to update VPATH
-               # in Makefile.in as well
-               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
-                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-                   -a ! -f "${srcdir}/macosx/$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
-
-
-
-
-    vars="generic/tdbc.h generic/tdbcInt.h generic/tdbcDecls.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
-
-
-if test "${TCL_MAJOR_VERSION}" -eq 8 ; then
-  if test "${TCL_MINOR_VERSION}" -eq 5 ; then
-
-    vars="${TCLOO_INCLUDE_SPEC}"
-    for i in $vars; do
-       PKG_INCLUDES="$PKG_INCLUDES $i"
-    done
-
-
-
-    vars="${TCLOO_STUB_LIB_SPEC}"
-    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
-
-
-  fi
-fi
-
-    PKG_CFLAGS="$PKG_CFLAGS ${TCLOO_CFLAGS}"
-
-
-
-    vars="tdbcStubLib.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" \
-           -a ! -f "${srcdir}/macosx/$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/tdbc.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
-
-
-
-#--------------------------------------------------------------------
-# A few miscellaneous platform-specific items:
-#
-# Define a special symbol for Windows (BUILD_sample in this case) so
-# that we create the export library with the dll.
-#
-# 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.
-#
-# TEA_ADD_* any platform specific compiler/build info here.
-#--------------------------------------------------------------------
-
-# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
-# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
-#CLEANFILES="$CLEANFILES pkgIndex.tcl"
-
-#--------------------------------------------------------------------
-# 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 called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
-#--------------------------------------------------------------------
-
-
-    echo "$as_me:$LINENO: checking for Tcl public headers" >&5
-echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6
-
-
-# Check whether --with-tclinclude or --without-tclinclude was given.
-if test "${with_tclinclude+set}" = set; then
-  withval="$with_tclinclude"
-  with_tclinclude=${withval}
-fi;
-
-    if test "${ac_cv_c_tclh+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       # 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
-               { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
-echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
-   { (exit 1); exit 1; }; }
-           fi
-       else
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tcl was built as a framework, attempt to use
-               # the framework's Headers directory
-               case ${TCL_DEFS} in
-                   *TCL_FRAMEWORK*)
-                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tcl is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TCL_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$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`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TCL_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           fi
-           for i in $list ; do
-               if test -f "$i/tcl.h" ; then
-                   ac_cv_c_tclh=$i
-                   break
-               fi
-           done
-       fi
-
-fi
-
-
-    # Print a message based on how we determined the include path
-
-    if test x"${ac_cv_c_tclh}" = x ; then
-       { { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
-echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
-   { (exit 1); exit 1; }; }
-    else
-       echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
-echo "${ECHO_T}${ac_cv_c_tclh}" >&6
-    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}\"
-
-
-
-
-#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-# This auto-enables if Tcl was compiled threaded.
-#--------------------------------------------------------------------
-
-
-    # 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=yes
-fi;
-
-    if test "${enable_threads+set}" = set; then
-       enableval="$enable_threads"
-       tcl_ok=$enableval
-    else
-       tcl_ok=yes
-    fi
-
-    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:
-
-           # USE_THREAD_ALLOC tells us to try the special thread-based
-           # allocator that significantly reduces lock contention
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_THREAD_ALLOC 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
-
-           if test "`uname -s`" = "SunOS" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-_ACEOF
-
-           fi
-
-cat >>confdefs.h <<\_ACEOF
-#define _THREAD_SAFE 1
-_ACEOF
-
-           echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_pthread_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthread_pthread_mutex_init=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_pthread_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
-if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-           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]
-               echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
-echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $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 __pthread_mutex_init ();
-int
-main ()
-{
-__pthread_mutex_init ();
-  ;
-  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_pthread___pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthread___pthread_mutex_init=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_pthread___pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
-if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-           fi
-
-           if test "$tcl_ok" = "yes"; then
-               # The space is needed
-               THREADS_LIBS=" -lpthread"
-           else
-               echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
-if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthreads  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_pthreads_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthreads_pthread_mutex_init=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_pthreads_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
-if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-               if test "$tcl_ok" = "yes"; then
-                   # The space is needed
-                   THREADS_LIBS=" -lpthreads"
-               else
-                   echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
-if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_c_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_pthread_mutex_init=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_c_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
-if test $ac_cv_lib_c_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-                   if test "$tcl_ok" = "no"; then
-                       echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
-if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r  $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 pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
-  ;
-  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_c_r_pthread_mutex_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_r_pthread_mutex_init=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_c_r_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
-if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
-  tcl_ok=yes
-else
-  tcl_ok=no
-fi
-
-                       if test "$tcl_ok" = "yes"; then
-                           # The space is needed
-                           THREADS_LIBS=" -pthread"
-                       else
-                           TCL_THREADS=0
-                           { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
-echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
-                       fi
-                   fi
-               fi
-           fi
-       fi
-    else
-       TCL_THREADS=0
-    fi
-    # Do checking message here to not mess up interleaved configure output
-    echo "$as_me:$LINENO: checking for building with threads" >&5
-echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
-    if test "${TCL_THREADS}" = 1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_THREADS 1
-_ACEOF
-
-       echo "$as_me:$LINENO: result: yes (default)" >&5
-echo "${ECHO_T}yes (default)" >&6
-    else
-       echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-    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
-               { echo "$as_me:$LINENO: WARNING:
-    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
-    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
-echo "$as_me: WARNING:
-    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
-    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
-           fi
-           ;;
-       *)
-           if test "${TCL_THREADS}" = "1"; then
-               { echo "$as_me:$LINENO: WARNING:
-    --enable-threads requested, but building against a Tcl that is NOT
-    thread-enabled.  This is an OK configuration that will also run in
-    a thread-enabled core." >&5
-echo "$as_me: WARNING:
-    --enable-threads requested, but building against a Tcl that is NOT
-    thread-enabled.  This is an OK configuration that will also run in
-    a thread-enabled core." >&2;}
-           fi
-           ;;
-    esac
-
-
-
-#--------------------------------------------------------------------
-# The statement below defines a collection of symbols related to
-# building as a shared library instead of a static library.
-#--------------------------------------------------------------------
-
-
-    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;
-
-    if test "${enable_shared+set}" = set; then
-       enableval="$enable_shared"
-       tcl_ok=$enableval
-    else
-       tcl_ok=yes
-    fi
-
-    if test "$tcl_ok" = "yes" ; then
-       echo "$as_me:$LINENO: result: shared" >&5
-echo "${ECHO_T}shared" >&6
-       SHARED_BUILD=1
-    else
-       echo "$as_me:$LINENO: result: static" >&5
-echo "${ECHO_T}static" >&6
-       SHARED_BUILD=0
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_BUILD 1
-_ACEOF
-
-    fi
-
-
-
-#--------------------------------------------------------------------
-# This macro figures out what flags to use with the compiler/linker
-# when building shared/static debug/optimized objects.  This information
-# can be taken from the tclConfig.sh file, but this figures it all out.
-#--------------------------------------------------------------------
-
-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
-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
-if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
-  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
-
-  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
-
-  RANLIB=$ac_ct_RANLIB
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-
-
-    # Step 0.a: Enable 64 bit support?
-
-    echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
-echo $ECHO_N "checking if 64bit support is requested... $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
-    # Force 64bit on with VIS
-    if test "$do64bitVIS" = "yes"; then
-  do64bit=yes
-fi
-
-
-    # Step 0.c: Check if visibility support is available. Do this here so
-    # that platform specific alternatives can be used below if this fails.
-
-    echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
-echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6
-if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-           extern __attribute__((__visibility__("hidden"))) void f(void);
-           void f(void) {}
-int
-main ()
-{
-f();
-  ;
-  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_cv_cc_visibility_hidden=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_visibility_hidden=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-       CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
-echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6
-    if test $tcl_cv_cc_visibility_hidden = yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HIDDEN 1
-_ACEOF
-
-
-fi
-
-
-    # Step 0.d: Disable -rpath support?
-
-    echo "$as_me:$LINENO: checking if rpath support is requested" >&5
-echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6
-    # Check whether --enable-rpath or --disable-rpath was given.
-if test "${enable_rpath+set}" = set; then
-  enableval="$enable_rpath"
-  doRpath=$enableval
-else
-  doRpath=yes
-fi;
-    echo "$as_me:$LINENO: result: $doRpath" >&5
-echo "${ECHO_T}$doRpath" >&6
-
-    # TEA specific: 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
-
-
-    # Set the variable "system" to hold the name and version number
-    # for the system.
-
-
-    echo "$as_me:$LINENO: checking system version" >&5
-echo $ECHO_N "checking system version... $ECHO_C" >&6
-if test "${tcl_cv_sys_version+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       # TEA specific:
-       if test "${TEA_PLATFORM}" = "windows" ; then
-           tcl_cv_sys_version=windows
-       else
-           tcl_cv_sys_version=`uname -s`-`uname -r`
-           if test "$?" -ne 0 ; then
-               { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
-echo "$as_me: WARNING: can't find uname command" >&2;}
-               tcl_cv_sys_version=unknown
-           else
-               if test "`uname -s`" = "AIX" ; then
-                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
-               fi
-           fi
-       fi
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
-echo "${ECHO_T}$tcl_cv_sys_version" >&6
-    system=$tcl_cv_sys_version
-
-
-    # Require ranlib early so we can override it in special cases below.
-
-
-
-    # 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 removed some core-only vars.
-
-    do64bit_ok=no
-    # default to '{$LIBS}' and set to "" on per-platform necessary basis
-    SHLIB_LD_LIBS='${LIBS}'
-    # When ld needs options to work in 64-bit mode, put them in
-    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
-    # is disabled by the user. [Bug 1016796]
-    LDFLAGS_ARCH=""
-    UNSHARED_LIB_SUFFIX=""
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    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"
-
-else
-
-       CFLAGS_OPTIMIZE=-O
-       CFLAGS_WARNING=""
-
-fi
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}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="${ac_tool_prefix}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
-
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # 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_ac_ct_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_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_ac_ct_AR="ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  AR=$ac_ct_AR
-else
-  AR="$ac_cv_prog_AR"
-fi
-
-    STLIB_LD='${AR} cr'
-    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
-    if test "x$SHLIB_VERSION" = x; then
-  SHLIB_VERSION=""
-else
-  SHLIB_VERSION=".$SHLIB_VERSION"
-fi
-
-    case $system in
-       # TEA specific:
-       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.
-           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
-           # MACHINE is IX86 for LINK, but this is used by the manifest,
-           # which requires x86|amd64|ia64.
-           MACHINE="X86"
-           if test "$do64bit" != "no" ; then
-               if test "x${MSSDK}x" = "xx" ; then
-                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
-               fi
-               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
-               PATH64=""
-               case "$do64bit" in
-                   amd64|x64|yes)
-                       MACHINE="AMD64" ; # default to AMD64 64-bit build
-                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
-                       ;;
-                   ia64)
-                       MACHINE="IA64"
-                       PATH64="${MSSDK}/Bin/Win64"
-                       ;;
-               esac
-               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
-                   { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
-echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
-                   { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
-echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
-                   do64bit="no"
-               else
-                   echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
-echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6
-                   do64bit_ok="yes"
-               fi
-           fi
-
-           if test "$doWince" != "no" ; then
-               if test "$do64bit" != "no" ; 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}
-           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
-           echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
-echo "${ECHO_T}found $CELIB_DIR" >&6
-       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
-               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
-               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
-               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" != "no" ; then
-                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
-                   CC="\"${PATH64}/cl.exe\""
-                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
-                   RC="\"${MSSDK}/bin/rc.exe\""
-                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
-                   LINKBIN="\"${PATH64}/link.exe\""
-                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
-                   # Avoid 'unresolved external symbol __security_cookie'
-                   # errors, c.f. http://support.microsoft.com/?id=894573
-
-    vars="bufferoverflowU.lib"
-    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
-
-
-               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
-               if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; 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_RC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$RC"; then
-  ac_cv_prog_RC="$RC" # 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_RC="${ac_tool_prefix}windres"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-RC=$ac_cv_prog_RC
-if test -n "$RC"; then
-  echo "$as_me:$LINENO: result: $RC" >&5
-echo "${ECHO_T}$RC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RC"; then
-  ac_ct_RC=$RC
-  # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; 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_RC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_RC"; then
-  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # 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_RC="windres"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_RC=$ac_cv_prog_ac_ct_RC
-if test -n "$ac_ct_RC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_RC" >&5
-echo "${ECHO_T}$ac_ct_RC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  RC=$ac_ct_RC
-else
-  RC="$ac_cv_prog_RC"
-fi
-
-               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}"
-
-               echo "$as_me:$LINENO: checking for cross-compile version of gcc" >&5
-echo $ECHO_N "checking for cross-compile version of gcc... $ECHO_C" >&6
-if test "${ac_cv_cross+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.  */
-
-                           #ifdef _WIN32
-                               #error cross-compiler
-                           #endif
-
-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_cross=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_cross=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_cross" >&5
-echo "${ECHO_T}$ac_cv_cross" >&6
-                     if test "$ac_cv_cross" = "yes"; then
-                       case "$do64bit" in
-                           amd64|x64|yes)
-                               CC="x86_64-w64-mingw32-gcc"
-                               LD="x86_64-w64-mingw32-ld"
-                               AR="x86_64-w64-mingw32-ar"
-                               RANLIB="x86_64-w64-mingw32-ranlib"
-                               RC="x86_64-w64-mingw32-windres"
-                           ;;
-                           *)
-                               CC="i686-w64-mingw32-gcc"
-                               LD="i686-w64-mingw32-ld"
-                               AR="i686-w64-mingw32-ar"
-                               RANLIB="i686-w64-mingw32-ranlib"
-                               RC="i686-w64-mingw32-windres"
-                           ;;
-                       esac
-               fi
-
-           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
-               # and also
-               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
-               # This essentially turns it all on.
-               LDFLAGS_DEBUG="-debug -debugtype:cv"
-               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_SUFFIX=".dll"
-           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
-
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       AIX-*)
-           if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
-
-               # AIX requires the _r compiler when gcc isn't being used
-               case "${CC}" in
-                   *_r|*_r\ *)
-                       # ok ...
-                       ;;
-                   *)
-                       # Make sure only first arg gets _r
-                       CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
-                       ;;
-               esac
-               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"
-
-           LD_LIBRARY_PATH_VAR="LIBPATH"
-
-           # 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 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_ARCH="-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"
-               if test "$GCC" = yes; then
-
-                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-
-else
-
-                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-
-fi
-
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-
-else
-
-               if test "$GCC" = yes; then
-
-                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
-
-else
-
-                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
-                   LDFLAGS="$LDFLAGS -brtl"
-
-fi
-
-               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
-               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-fi
-
-           ;;
-       BeOS*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -nostart'
-           SHLIB_SUFFIX=".so"
-
-           #-----------------------------------------------------------
-           # Check for inet_ntoa in -lbind, for BeOS (which also needs
-           # -lsocket, even if the network functions are in -lnet which
-           # is always linked to, for compatibility.
-           #-----------------------------------------------------------
-           echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
-echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
-if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $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 inet_ntoa ();
-int
-main ()
-{
-inet_ntoa ();
-  ;
-  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_bind_inet_ntoa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_bind_inet_ntoa=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_bind_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
-if test $ac_cv_lib_bind_inet_ntoa = yes; then
-  LIBS="$LIBS -lbind -lsocket"
-fi
-
-           ;;
-       BSD/OS-4.*)
-           SHLIB_CFLAGS="-export-dynamic -fPIC"
-           SHLIB_LD='${CC} -shared'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       CYGWIN_*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD='${CC} -shared'
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
-           SHLIB_SUFFIX=".dll"
-           EXEEXT=".exe"
-           do64bit_ok=yes
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       Haiku*)
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
-           echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
-echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6
-if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnetwork  $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 inet_ntoa ();
-int
-main ()
-{
-inet_ntoa ();
-  ;
-  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_network_inet_ntoa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_network_inet_ntoa=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_network_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6
-if test $ac_cv_lib_network_inet_ntoa = yes; then
-  LIBS="$LIBS -lnetwork"
-fi
-
-           ;;
-       HP-UX-*.11.*)
-           # Use updated header definitions where possible
-
-cat >>confdefs.h <<\_ACEOF
-#define _XOPEN_SOURCE_EXTENDED 1
-_ACEOF
-
-           # TEA specific: Needed by Tcl, but not most extensions
-           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
-           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
-
-           if test "`uname -m`" = ia64; then
-
-               SHLIB_SUFFIX=".so"
-               # Use newer C++ library for C++ extensions
-               #if test "$GCC" != "yes" ; then
-               #   CPPFLAGS="-AA"
-               #fi
-
-else
-
-               SHLIB_SUFFIX=".sl"
-
-fi
-
-           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
-
-               LDFLAGS="$LDFLAGS -Wl,-E"
-               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
-               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
-
-fi
-
-           if test "$GCC" = yes; then
-
-               SHLIB_LD='${CC} -shared'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-else
-
-               CFLAGS="$CFLAGS -z"
-               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-               #CFLAGS="$CFLAGS +DAportable"
-               SHLIB_CFLAGS="+z"
-               SHLIB_LD="ld -b"
-
-fi
-
-
-           # Check to enable 64-bit flags for compiler/linker
-           if test "$do64bit" = "yes"; then
-
-               if test "$GCC" = yes; then
-
-                   case `${CC} -dumpmachine` in
-                       hppa64*)
-                           # 64-bit gcc in use.  Fix flags for GNU ld.
-                           do64bit_ok=yes
-                           SHLIB_LD='${CC} -shared'
-                           if test $doRpath = yes; then
-
-                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-                           ;;
-                       *)
-                           { 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_ARCH="+DD64"
-
-fi
-
-
-fi
- ;;
-       IRIX-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-fi
-
-           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_SUFFIX=".so"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-fi
-
-
-           # 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_ARCH="-64"
-
-fi
-
-
-fi
-
-           ;;
-       Linux*|GNU*|NetBSD-Debian)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-
-           # TEA specific:
-           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
-
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           if test "`uname -m`" = "alpha"; then
-  CFLAGS="$CFLAGS -mieee"
-fi
-
-           if test $do64bit = yes; then
-
-               echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_m64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                   hold_cflags=$CFLAGS
-                   CFLAGS="$CFLAGS -m64"
-                   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 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_cv_cc_m64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_m64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                   CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
-echo "${ECHO_T}$tcl_cv_cc_m64" >&6
-               if test $tcl_cv_cc_m64 = yes; then
-
-                   CFLAGS="$CFLAGS -m64"
-                   do64bit_ok=yes
-
-fi
-
-
-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
-
-           ;;
-       Lynx*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           CFLAGS_OPTIMIZE=-02
-           SHLIB_LD='${CC} -shared'
-           LD_FLAGS="-Wl,--export-dynamic"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-           ;;
-       OpenBSD-*)
-           arch=`arch -s`
-           case "$arch" in
-           vax)
-               SHLIB_SUFFIX=""
-               SHARED_LIB_SUFFIX=""
-               LDFLAGS=""
-               ;;
-           *)
-               case "$arch" in
-               alpha|sparc64)
-                   SHLIB_CFLAGS="-fPIC"
-                   ;;
-               *)
-                   SHLIB_CFLAGS="-fpic"
-                   ;;
-               esac
-               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-               SHLIB_SUFFIX=".so"
-               if test $doRpath = yes; then
-
-                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
-               LDFLAGS="-Wl,-export-dynamic"
-               ;;
-           esac
-           case "$arch" in
-           vax)
-               CFLAGS_OPTIMIZE="-O1"
-               ;;
-           *)
-               CFLAGS_OPTIMIZE="-O2"
-               ;;
-           esac
-           if test "${TCL_THREADS}" = "1"; then
-
-               # On OpenBSD:   Compile with -pthread
-               #               Don't link with -lpthread
-               LIBS=`echo $LIBS | sed s/-lpthread//`
-               CFLAGS="$CFLAGS -pthread"
-
-fi
-
-           # OpenBSD doesn't do version numbers with dots.
-           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       NetBSD-*)
-           # NetBSD has ELF and can use 'cc -shared' to build shared libs
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           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
-
-           ;;
-       FreeBSD-*)
-           # This configuration from FreeBSD Ports.
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD="${CC} -shared"
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
-           SHLIB_SUFFIX=".so"
-           LDFLAGS=""
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-fi
-
-           if test "${TCL_THREADS}" = "1"; then
-
-               # The -pthread needs to go in the LDFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
-fi
-
-           case $system in
-           FreeBSD-3.*)
-               # Version numbers are dot-stripped by system policy.
-               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
-               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
-               TCL_LIB_VERSIONS_OK=nodots
-               ;;
-           esac
-           ;;
-       Darwin-*)
-           CFLAGS_OPTIMIZE="-Os"
-           SHLIB_CFLAGS="-fno-common"
-           # To avoid discrepancies between what headers configure sees during
-           # preprocessing tests and compiling tests, move any -isysroot and
-           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
-           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
-           CFLAGS="`echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
-           if test $do64bit = yes; then
-
-               case `arch` in
-                   ppc)
-                       echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           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 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_cv_cc_arch_ppc64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_arch_ppc64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                           CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
-echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
-                       if test $tcl_cv_cc_arch_ppc64 = yes; then
-
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           do64bit_ok=yes
-
-fi
-;;
-                   i386)
-                       echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           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 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_cv_cc_arch_x86_64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_arch_x86_64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                           CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
-echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
-                       if test $tcl_cv_cc_arch_x86_64 = yes; then
-
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           do64bit_ok=yes
-
-fi
-;;
-                   *)
-                       { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
-echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
-               esac
-
-else
-
-               # Check for combined 32-bit and 64-bit fat build
-               if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
-                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
-
-                   fat_32_64=yes
-fi
-
-
-fi
-
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
-echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_single_module+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
-               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
-  tcl_cv_ld_single_module=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_single_module=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-               LDFLAGS=$hold_ldflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
-echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
-           if test $tcl_cv_ld_single_module = yes; then
-
-               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
-
-fi
-
-           # TEA specific: link shlib with current and compatibility version flags
-           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
-           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
-           SHLIB_SUFFIX=".dylib"
-           # Don't use -prebind when building for Mac OS X 10.4 or later only:
-           if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
-               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
-
-               LDFLAGS="$LDFLAGS -prebind"
-fi
-
-           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
-           echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
-echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_search_paths_first+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-               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
-  tcl_cv_ld_search_paths_first=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_search_paths_first=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-               LDFLAGS=$hold_ldflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
-echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
-           if test $tcl_cv_ld_search_paths_first = yes; then
-
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-
-fi
-
-           if test "$tcl_cv_cc_visibility_hidden" != yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE __private_extern__
-_ACEOF
-
-               tcl_cv_cc_visibility_hidden=yes
-
-fi
-
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-           # TEA specific: for combined 32 & 64 bit fat builds of Tk
-           # extensions, verify that 64-bit build is possible.
-           if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
-
-               if test "${TEA_WINDOWINGSYSTEM}" = x11; then
-
-                   echo "$as_me:$LINENO: checking for 64-bit X11" >&5
-echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6
-if test "${tcl_cv_lib_x11_64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
-                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <X11/Xlib.h>
-int
-main ()
-{
-XrmInitialize();
-  ;
-  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_cv_lib_x11_64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_lib_x11_64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
-echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6
-
-fi
-
-               if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
-
-                   echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
-echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6
-if test "${tcl_cv_lib_tk_64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
-                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <tk.h>
-int
-main ()
-{
-Tk_InitStubs(NULL, "", 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
-  tcl_cv_lib_tk_64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_lib_tk_64=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
-echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6
-
-fi
-
-               # remove 64-bit arch flags from CFLAGS et al. if configuration
-               # does not support 64-bit.
-               if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
-
-                   { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
-echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
-                   for v in CFLAGS CPPFLAGS LDFLAGS; do
-                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
-                   done
-fi
-
-
-fi
-
-           ;;
-       OS/390-*)
-           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
-
-cat >>confdefs.h <<\_ACEOF
-#define _OE_SOCKETS 1
-_ACEOF
-
-           ;;
-       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_SUFFIX=".so"
-           if test $doRpath = yes; then
-
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
-fi
-
-           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"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SCO_SV-3.2*)
-           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"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SunOS-5.[0-6])
-           # Careful to not let 5.10+ fall into this case
-
-           # 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"
-           SHLIB_SUFFIX=".so"
-           if test "$GCC" = yes; then
-
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-else
-
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
-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 "`${CC} -dumpversion | awk -F. '{print $1}'`" -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_ARCH="-xarch=v9a"
-
-else
-
-                           CFLAGS="$CFLAGS -xarch=v9"
-                           LDFLAGS_ARCH="-xarch=v9"
-
-fi
-
-                       # Solaris 64 uses this as well
-                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
-
-fi
-
-
-else
-  if test "$arch" = "amd64 i386"; then
-
-                   if test "$GCC" = yes; then
-
-                       case $system in
-                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
-                               do64bit_ok=yes
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               { 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
-                       case $system in
-                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               CFLAGS="$CFLAGS -xarch=amd64"
-                               LDFLAGS="$LDFLAGS -xarch=amd64";;
-                       esac
-
-fi
-
-
-else
-  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
-echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
-fi
-
-fi
-
-
-fi
-
-
-           SHLIB_SUFFIX=".so"
-           if test "$GCC" = yes; then
-
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               if test "$do64bit_ok" = yes; then
-
-                   if test "$arch" = "sparcv9 sparc"; 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` | ..."
-                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
-
-else
-  if test "$arch" = "amd64 i386"; then
-
-                       # JH: static-libgcc is necessary for core Tcl, but may
-                       # not be necessary for extensions.
-                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
-
-fi
-
-fi
-
-
-fi
-
-
-else
-
-               case $system in
-                   SunOS-5.[1-9][0-9]*)
-                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
-                   *)
-                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
-               esac
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-
-fi
-
-           ;;
-       UNIX_SV* | UnixWare-5*)
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_LD='${CC} -G'
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-           # that don't grok the -Bexport option.  Test that it does.
-           echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
-echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_Bexport+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-               hold_ldflags=$LDFLAGS
-               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
-  tcl_cv_ld_Bexport=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_Bexport=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-               LDFLAGS=$hold_ldflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
-echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
-           if test $tcl_cv_ld_Bexport = yes; then
-
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-
-fi
-
-           CC_SEARCH_FLAGS=""
-           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
-
-
-
-
-    # Add in the arch flags late to ensure it wasn't removed.
-    # Not necessary in TEA, but this is aligned with core
-    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
-
-    # 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 "$GCC" = yes; then
-
-       case $system in
-           AIX-*) ;;
-           BSD/OS*) ;;
-           CYGWIN_*|MINGW32_*) ;;
-           IRIX*) ;;
-           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
-           Darwin-*) ;;
-           SCO_SV-3.2*) ;;
-           windows) ;;
-           *) SHLIB_CFLAGS="-fPIC" ;;
-       esac
-fi
-
-
-    if test "$tcl_cv_cc_visibility_hidden" != yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE extern
-_ACEOF
-
-
-fi
-
-
-    if test "$SHARED_LIB_SUFFIX" = ""; then
-
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
-fi
-
-    if test "$UNSHARED_LIB_SUFFIX" = ""; then
-
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
-fi
-
-
-    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
-       echo "$as_me:$LINENO: checking for SEH support in compiler" >&5
-echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6
-if test "${tcl_cv_seh+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  tcl_cv_seh=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-           int main(int argc, char** argv) {
-               int a, b = 0;
-               __try {
-                   a = 666 / b;
-               }
-               __except (EXCEPTION_EXECUTE_HANDLER) {
-                   return 0;
-               }
-               return 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
-  tcl_cv_seh=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-tcl_cv_seh=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5
-echo "${ECHO_T}$tcl_cv_seh" >&6
-       if test "$tcl_cv_seh" = "no" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NO_SEH 1
-_ACEOF
-
-       fi
-
-       #
-       # Check to see if the excpt.h include file provided contains the
-       # definition for EXCEPTION_DISPOSITION; if not, which is the case
-       # with Cygwin's version as of 2002-04-10, define it to be int,
-       # sufficient for getting the current code to work.
-       #
-       echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5
-echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6
-if test "${tcl_cv_eh_disposition+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 WIN32_LEAN_AND_MEAN
-#          include <windows.h>
-#          undef WIN32_LEAN_AND_MEAN
-
-int
-main ()
-{
-
-               EXCEPTION_DISPOSITION x;
-
-  ;
-  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_eh_disposition=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_eh_disposition=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5
-echo "${ECHO_T}$tcl_cv_eh_disposition" >&6
-       if test "$tcl_cv_eh_disposition" = "no" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define EXCEPTION_DISPOSITION int
-_ACEOF
-
-       fi
-
-       # Check to see if winnt.h defines CHAR, SHORT, and LONG
-       # even if VOID has already been #defined. The win32api
-       # used by mingw and cygwin is known to do this.
-
-       echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5
-echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6
-if test "${tcl_cv_winnt_ignore_void+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 VOID void
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-int
-main ()
-{
-
-               CHAR c;
-               SHORT s;
-               LONG l;
-
-  ;
-  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_winnt_ignore_void=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_winnt_ignore_void=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5
-echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6
-       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WINNT_IGNORE_VOID 1
-_ACEOF
-
-       fi
-    fi
-
-       # See if the compiler supports casting to a union type.
-       # This is used to stop gcc from printing a compiler
-       # warning when initializing a union member.
-
-       echo "$as_me:$LINENO: checking for cast to union support" >&5
-echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6
-if test "${tcl_cv_cast_to_union+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 ()
-{
-
-                 union foo { int i; double d; };
-                 union foo f = (union foo) (int) 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_cv_cast_to_union=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cast_to_union=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5
-echo "${ECHO_T}$tcl_cv_cast_to_union" >&6
-       if test "$tcl_cv_cast_to_union" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CAST_TO_UNION 1
-_ACEOF
-
-       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 "${tcl_cv_flag__largefile_source64+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 ()
-{
-char *p = (char *)open64;
-  ;
-  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__largefile_source64=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 _LARGEFILE_SOURCE64 1
-#include <sys/stat.h>
-int
-main ()
-{
-char *p = (char *)open64;
-  ;
-  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__largefile_source64=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_flag__largefile_source64=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__largefile_source64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define _LARGEFILE_SOURCE64 1
-_ACEOF
-
-       tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
-    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
-       # TEA specific: 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 <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
-echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
-echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
-       if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_DIRENT64 1
-_ACEOF
-
-       fi
-
-       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
-echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
-echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
-       if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_STAT64 1
-_ACEOF
-
-       fi
-
-
-
-for ac_func in open64 lseek64
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); 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 $ac_func
-
-/* 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 $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-       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" && \
-               test "x${ac_cv_func_lseek64}" = "xyes" && \
-               test "x${ac_cv_func_open64}" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TYPE_OFF64_T 1
-_ACEOF
-
-           echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-       else
-           echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-       fi
-    fi
-
-
-
-#--------------------------------------------------------------------
-# Set the default compiler switches based on the --enable-symbols option.
-#--------------------------------------------------------------------
-
-
-
-    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;
-    DBGX=""
-    if test "$tcl_ok" = "no"; then
-       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
-       LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
-       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
-    # TEA specific:
-    if test "${TEA_PLATFORM}" != "windows" ; then
-       LDFLAGS_DEFAULT="${LDFLAGS}"
-    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
-# can't for some reason, remove this definition.  If you aren't using
-# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
-# link against the non-stubbed Tcl library.  Add Tk too if necessary.
-#--------------------------------------------------------------------
-
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_TCL_STUBS 1
-_ACEOF
-
-
-#--------------------------------------------------------------------
-# This macro generates a line to use when building a library.  It
-# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
-# and TEA_LOAD_TCLCONFIG macros above.
-#--------------------------------------------------------------------
-
-
-    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)"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-print("manifest needed")
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "manifest needed" >/dev/null 2>&1; then
-
-       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
-       VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
-       VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
-       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
-
-    CLEANFILES="$CLEANFILES *.manifest"
-
-
-fi
-rm -f conftest*
-
-       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
-           if test x"${TK_BIN_DIR}" != x ; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-           fi
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-           if test "$GCC" = "yes"; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
-           fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-       else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-           if test "$GCC" = "yes"; then
-               PKG_LIB_FILE=lib${PKG_LIB_FILE}
-           fi
-       fi
-       # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
-       if test "$GCC" = "yes"; then
-           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
-       fi
-       # 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 their 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
-
-
-
-
-
-
-
-
-
-
-    ADD_MANIFEST=":"
-    if test "$GCC" != yes \
-           -a ${TEA_PLATFORM} == "windows" \
-           -a "${SHARED_BUILD}" = "1"; then
-
-       # This refers to "Manifest Tool" not "Magnetic Tape utility"
-       for ac_prog in mt
-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_MT+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$MT"; then
-  ac_cv_prog_MT="$MT" # 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_MT="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-MT=$ac_cv_prog_MT
-if test -n "$MT"; then
-  echo "$as_me:$LINENO: result: $MT" >&5
-echo "${ECHO_T}$MT" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$MT" && break
-done
-test -n "$MT" || MT="none"
-
-       if test "$MT" != none; then
-
-           ADD_MANIFEST="${MT} -nologo -manifest \$@.manifest -outputresource:\$@\;2"
-           CLEANFILES="$CLEANFILES ${PKG_LIB_FILE}.manifest"
-fi
-
-fi
-
-
-
-#--------------------------------------------------------------------
-# Determine the name of the tclsh and/or wish executables in the
-# Tcl and Tk build directories or the location they were installed
-# into. These paths are used to support running test cases only,
-# the Makefile should not be making use of these paths to generate
-# a pkgIndex.tcl file or anything else at extension build time.
-#--------------------------------------------------------------------
-
-
-    echo "$as_me:$LINENO: checking for tclsh" >&5
-echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
-    if test -f "${TCL_BIN_DIR}/Makefile" ; then
-        # tclConfig.sh is in Tcl build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
-        fi
-    else
-        # tclConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
-        fi
-        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${TCLSH_PROG}" ; then
-                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
-    fi
-    echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
-echo "${ECHO_T}${TCLSH_PROG}" >&6
-
-
-
-#--------------------------------------------------------------------
-# Finally, substitute all of the various values into the Makefile.
-# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in.  Include these here.
-#--------------------------------------------------------------------
-
-# Develop a fully qualified path for the package source dir
-eval tdbc_SRC_DIR="${srcdir}"
-tdbc_SRC_DIR=`cd "${tdbc_SRC_DIR}"; pwd`
-
-
-# Develop -I specifications for the build and installed directories where
-# tdbc.h may be found.
-
-    eval "tdbc_INCLUDE_SPEC=\"-I`${CYGPATH} ${includedir}`\""
-
-
-    eval "tdbc_BUILD_INCLUDE_SPEC=\"-I`${CYGPATH} ${tdbc_SRC_DIR}/generic`\""
-
-
-# Develop a fully qualified path for where .tcl files for the tdbc package
-# appear at run time.
-tdbc_LIB_DIR="${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}"
-
-
-
-# TODO: CONFIGURE_OUTPUTS is allegedly obsolete. How best to fix it?
-
-CONFIGURE_OUTPUTS="Makefile pkgIndex.tcl tdbcConfig.sh config.cache config.log config.status"
-
-
-# Make the export configuration for the TDBC package
-
-
-    #--------------------------------------------------------------------
-    # These are for tdbcConfig.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="${libdir}/tdbc${PACKAGE_VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-       eval tdbc_LIB_FLAG="-ltdbc${PACKAGE_VERSION}${DBGX}"
-       eval tdbc_STUB_LIB_FLAG="-ltdbcstub${PACKAGE_VERSION}${DBGX}"
-    else
-       eval tdbc_LIB_FLAG="-ltdbc`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-       eval tdbc_STUB_LIB_FLAG="-ltdbcstub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-    fi
-    tdbc_BUILD_LIB_SPEC="-L`pwd` ${tdbc_LIB_FLAG}"
-    tdbc_LIB_SPEC="-L${pkglibdir} ${tdbc_LIB_FLAG}"
-    tdbc_BUILD_STUB_LIB_SPEC="-L`pwd` ${tdbc_STUB_LIB_FLAG}"
-    tdbc_STUB_LIB_SPEC="-L${pkglibdir} ${tdbc_STUB_LIB_FLAG}"
-    tdbc_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}"
-    tdbc_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}"
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Set up to produce Makefile from Makefile.in and tdbcConfig.sh from
-# tdbcConfig.sh.in.
-
-                              ac_config_files="$ac_config_files Makefile pkgIndex.tcl tdbcConfig.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, 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.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `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 \
-       "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
-    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
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# 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[        ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[    ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[      ]*$//;
-}'
-fi
-
-# 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
-
-
-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
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
-
-: ${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.
-# Compiler output produced by configure, useful for debugging
-# 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
-
-# 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:$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
-    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 tdbc $as_me 1.0.2, 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="\\
-tdbc config.status 1.0.2
-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
-_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
-
-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
-
-_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" ;;
-  "tdbcConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tdbcConfig.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
-
-# 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
-
-# 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,@TCL_VERSION@,$TCL_VERSION,;t t
-s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;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,@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,@CLEANFILES@,$CLEANFILES,;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,@tcloo_VERSION@,$tcloo_VERSION,;t t
-s,@tcloo_BIN_DIR@,$tcloo_BIN_DIR,;t t
-s,@tcloo_SRC_DIR@,$tcloo_SRC_DIR,;t t
-s,@tcloo_LIB_FILE@,$tcloo_LIB_FILE,;t t
-s,@tcloo_LIB_SPEC@,$tcloo_LIB_SPEC,;t t
-s,@tcloo_STUB_LIB_FILE@,$tcloo_STUB_LIB_FILE,;t t
-s,@tcloo_STUB_LIB_SPEC@,$tcloo_STUB_LIB_SPEC,;t t
-s,@tcloo_STUB_LIB_PATH@,$tcloo_STUB_LIB_PATH,;t t
-s,@TCL_VERSION_REQ@,$TCL_VERSION_REQ,;t t
-s,@TCL_VERSION_DESIRED@,$TCL_VERSION_DESIRED,;t t
-s,@TCLOO_VERSION_REQ@,$TCLOO_VERSION_REQ,;t t
-s,@CPP@,$CPP,;t t
-s,@INSTALL@,$INSTALL,;t t
-s,@INSTALL_DATA_DIR@,$INSTALL_DATA_DIR,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_LIBRARY@,$INSTALL_LIBRARY,;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,@TCL_INCLUDES@,$TCL_INCLUDES,;t t
-s,@TCL_THREADS@,$TCL_THREADS,;t t
-s,@SHARED_BUILD@,$SHARED_BUILD,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@CELIB_DIR@,$CELIB_DIR,;t t
-s,@RC@,$RC,;t t
-s,@ac_ct_RC@,$ac_ct_RC,;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_LD_LIBS@,$SHLIB_LD_LIBS,;t t
-s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
-s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
-s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
-s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
-s,@TCL_DBGX@,$TCL_DBGX,;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,@VC_MANIFEST_EMBED_DLL@,$VC_MANIFEST_EMBED_DLL,;t t
-s,@VC_MANIFEST_EMBED_EXE@,$VC_MANIFEST_EMBED_EXE,;t t
-s,@MT@,$MT,;t t
-s,@ADD_MANIFEST@,$ADD_MANIFEST,;t t
-s,@TCLSH_PROG@,$TCLSH_PROG,;t t
-s,@tdbc_SRC_DIR@,$tdbc_SRC_DIR,;t t
-s,@tdbc_INCLUDE_SPEC@,$tdbc_INCLUDE_SPEC,;t t
-s,@tdbc_BUILD_INCLUDE_SPEC@,$tdbc_BUILD_INCLUDE_SPEC,;t t
-s,@tdbc_LIB_DIR@,$tdbc_LIB_DIR,;t t
-s,@CONFIGURE_OUTPUTS@,$CONFIGURE_OUTPUTS,;t t
-s,@tdbc_BUILD_LIB_SPEC@,$tdbc_BUILD_LIB_SPEC,;t t
-s,@tdbc_LIB_SPEC@,$tdbc_LIB_SPEC,;t t
-s,@tdbc_BUILD_STUB_LIB_SPEC@,$tdbc_BUILD_STUB_LIB_SPEC,;t t
-s,@tdbc_STUB_LIB_SPEC@,$tdbc_STUB_LIB_SPEC,;t t
-s,@tdbc_BUILD_STUB_LIB_PATH@,$tdbc_BUILD_STUB_LIB_PATH,;t t
-s,@tdbc_STUB_LIB_PATH@,$tdbc_STUB_LIB_PATH,;t t
-s,@MAJOR_VERSION@,$MAJOR_VERSION,;t t
-s,@MINOR_VERSION@,$MINOR_VERSION,;t t
-s,@PATCHLEVEL@,$PATCHLEVEL,;t t
-s,@LIBOBJS@,$LIBOBJS,;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"
-
-_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
-
-  # 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
-
-
-
-  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
-" $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
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-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
-
-
-# This is a comment added to force the 'execute' permission to update
-# in the Fossil repository.
similarity index 99%
rename from pkgs/tdbc1.0.2/ChangeLog
rename to pkgs/tdbc1.0.3/ChangeLog
index 2dde28c..57bbdc5 100644 (file)
@@ -1,3 +1,10 @@
+2015-01-23  Don Porter  <dgp@users.sourceforge.net>
+
+       * generic/tdbc.h: Advance version number to 1.0.3
+       * configure.in:
+       * README:
+       * configure:    autoconf-2.69
+
 2014-10-23  Don Porter  <dgp@users.sourceforge.net>
 
        * generic/tdbc.h: Advance version number to 1.0.2
similarity index 98%
rename from pkgs/tdbc1.0.2/README
rename to pkgs/tdbc1.0.3/README
index 827ba44..f76126c 100644 (file)
@@ -1,6 +1,6 @@
 README: tdbc
 
-    This is the 1.0.2 source distribution of Tcl Database Connectivity
+    This is the 1.0.3 source distribution of Tcl Database Connectivity
     (TDBC). TDBC is available from a Fossil version control repository
     at http://tdbc.tcl.tk/ .
 
diff --git a/pkgs/tdbc1.0.3/configure b/pkgs/tdbc1.0.3/configure
new file mode 100755 (executable)
index 0000000..ec0c4bf
--- /dev/null
@@ -0,0 +1,10212 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for tdbc 1.0.3.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 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 more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+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
+IFS=$as_save_IFS
+
+     ;;
+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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; 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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# 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
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # 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 sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# 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'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='tdbc'
+PACKAGE_TARNAME='tdbc'
+PACKAGE_VERSION='1.0.3'
+PACKAGE_STRING='tdbc 1.0.3'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+PATCHLEVEL
+MINOR_VERSION
+MAJOR_VERSION
+tdbc_STUB_LIB_PATH
+tdbc_BUILD_STUB_LIB_PATH
+tdbc_STUB_LIB_SPEC
+tdbc_BUILD_STUB_LIB_SPEC
+tdbc_LIB_SPEC
+tdbc_BUILD_LIB_SPEC
+CONFIGURE_OUTPUTS
+tdbc_LIB_DIR
+tdbc_BUILD_INCLUDE_SPEC
+tdbc_INCLUDE_SPEC
+tdbc_SRC_DIR
+TCLSH_PROG
+ADD_MANIFEST
+MT
+VC_MANIFEST_EMBED_EXE
+VC_MANIFEST_EMBED_DLL
+RANLIB_STUB
+MAKE_STUB_LIB
+MAKE_STATIC_LIB
+MAKE_SHARED_LIB
+MAKE_LIB
+TCL_DBGX
+LDFLAGS_DEFAULT
+CFLAGS_DEFAULT
+LD_LIBRARY_PATH_VAR
+SHLIB_CFLAGS
+SHLIB_LD_LIBS
+SHLIB_LD
+STLIB_LD
+CFLAGS_WARNING
+CFLAGS_OPTIMIZE
+CFLAGS_DEBUG
+RC
+CELIB_DIR
+AR
+SHARED_BUILD
+TCL_THREADS
+TCL_INCLUDES
+PKG_OBJECTS
+PKG_SOURCES
+MATH_LIBS
+EGREP
+GREP
+RANLIB
+SET_MAKE
+INSTALL_LIBRARY
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+INSTALL_DATA
+INSTALL_DATA_DIR
+INSTALL
+CPP
+TCLOO_VERSION_REQ
+TCL_VERSION_DESIRED
+TCL_VERSION_REQ
+tcloo_STUB_LIB_PATH
+tcloo_STUB_LIB_SPEC
+tcloo_STUB_LIB_FILE
+tcloo_LIB_SPEC
+tcloo_LIB_FILE
+tcloo_SRC_DIR
+tcloo_BIN_DIR
+tcloo_VERSION
+TCL_SHLIB_LD_LIBS
+TCL_LD_FLAGS
+TCL_EXTRA_CFLAGS
+TCL_DEFS
+TCL_LIBS
+CLEANFILES
+OBJEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+TCL_STUB_LIB_SPEC
+TCL_STUB_LIB_FLAG
+TCL_STUB_LIB_FILE
+TCL_LIB_SPEC
+TCL_LIB_FLAG
+TCL_LIB_FILE
+TCL_SRC_DIR
+TCL_BIN_DIR
+TCL_PATCH_LEVEL
+TCL_VERSION
+PKG_CFLAGS
+PKG_LIBS
+PKG_INCLUDES
+PKG_HEADERS
+PKG_TCL_SOURCES
+PKG_STUB_OBJECTS
+PKG_STUB_SOURCES
+PKG_STUB_LIB_FILE
+PKG_LIB_FILE
+EXEEXT
+CYGPATH
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_tcl
+with_tcloo
+with_tclinclude
+enable_threads
+enable_shared
+enable_64bit
+enable_64bit_vis
+enable_rpath
+enable_wince
+with_celib
+enable_symbols
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+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.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    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 ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -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_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$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 ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    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 ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    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 | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    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-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-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    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 ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    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-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 ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_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
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
+               datadir sysconfdir sharedstatedir localstatedir includedir \
+               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+               libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# 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
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# 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 the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_myself" : 'X\(//\)[^/]' \| \
+        X"$as_myself" : 'X\(//\)$' \| \
+        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    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=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# 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 tdbc 1.0.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 \`..']
+
+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]
+  --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]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/tdbc]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of tdbc 1.0.3:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-threads        build with threads
+  --enable-shared         build and link with shared libraries (default: on)
+  --enable-64bit          enable 64bit support (default: off)
+  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
+  --disable-rpath         disable rpath support (default: on)
+  --enable-wince          enable Win/CE support (where applicable)
+  --enable-symbols        build with debugging symbols (default: off)
+
+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-tcloo              directory containing tcloo configuration (tclooConfig.sh)
+  --with-tclinclude       directory containing the public Tcl header files
+  --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>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) 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.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested 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
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+tdbc configure 1.0.3
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 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
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); 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 $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* 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_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by tdbc $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+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`
+/usr/bin/hostinfo      = `(/usr/bin/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=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append 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
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset 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: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > 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
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_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 $ac_precious_vars; 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,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_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
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_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.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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
+
+
+
+#--------------------------------------------------------------------
+# 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.
+#--------------------------------------------------------------------
+
+ac_aux_dir=
+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"
+    break
+  elif 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/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
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+    # TEA extensions pass this us the version of TEA they think they
+    # are compatible with.
+    TEA_VERSION="3.9"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
+$as_echo_n "checking for correct TEA configuration... " >&6; }
+    if test x"${PACKAGE_NAME}" = x ; then
+       as_fn_error $? "
+The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5
+    fi
+    if test x"3.9" = x ; then
+       as_fn_error $? "
+TEA version not specified." "$LINENO" 5
+    elif test "3.9" != "${TEA_VERSION}" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
+$as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
+$as_echo "ok (TEA ${TEA_VERSION})" >&6; }
+    fi
+
+    # If the user did not set CFLAGS, set it now to keep macros
+    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
+    if test "${CFLAGS+set}" != "set" ; then
+       CFLAGS=""
+    fi
+
+    case "`uname -s`" in
+       *win32*|*WIN32*|*MINGW32_*)
+           # Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CYGPATH+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CYGPATH="cygpath -w"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
+fi
+fi
+CYGPATH=$ac_cv_prog_CYGPATH
+if test -n "$CYGPATH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
+$as_echo "$CYGPATH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+           EXEEXT=".exe"
+           TEA_PLATFORM="windows"
+           ;;
+       *CYGWIN_*)
+           CYGPATH=echo
+           EXEEXT=".exe"
+           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
+           ;;
+       *)
+           CYGPATH=echo
+           # Maybe we are cross-compiling....
+           case ${host_alias} in
+               *mingw32*)
+               EXEEXT=".exe"
+               TEA_PLATFORM="windows"
+               ;;
+           *)
+               EXEEXT=""
+               TEA_PLATFORM="unix"
+               ;;
+           esac
+           ;;
+    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
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
+$as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
+
+
+
+
+    # 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_...
+
+
+
+
+
+
+
+
+
+#--------------------------------------------------------------------
+# Load the tclConfig.sh file
+#--------------------------------------------------------------------
+
+
+
+    #
+    # 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 was given.
+if test "${with_tcl+set}" = set; then :
+  withval=$with_tcl; with_tclconfig="${withval}"
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
+$as_echo_n "checking for Tcl configuration... " >&6; }
+       if ${ac_cv_c_tclconfig+:} false; then :
+  $as_echo_n "(cached) " >&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
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
+$as_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
+                   as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
+               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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 common install locations
+           if test x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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"
+           as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
+       else
+           no_tcl=
+           TCL_BIN_DIR="${ac_cv_c_tclconfig}"
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
+       fi
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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_fn_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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+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 $# != 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
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* 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 -std 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 -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
+
+    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+$as_echo "loading" >&6; }
+       . "${TCL_BIN_DIR}/tclConfig.sh"
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tcl was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tcl.framework installed in an arbitrary location.
+       case ${TCL_DEFS} in
+           *TCL_FRAMEWORK*)
+               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
+                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
+                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
+                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
+                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5
+$as_echo_n "checking platform... " >&6; }
+    hold_cc=$CC; CC="$TCL_CC"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+           #ifdef _WIN32
+               #error win32
+           #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  TEA_PLATFORM="unix"
+else
+  TEA_PLATFORM="windows"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CC=$hold_cc
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
+$as_echo "$TEA_PLATFORM" >&6; }
+
+    # The BUILD_$pkg is to define the correct extern storage class
+    # handling when making this package
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_${PACKAGE_NAME} /**/
+_ACEOF
+
+    # Do this here as we have fully defined TEA_PLATFORM now
+    if test "${TEA_PLATFORM}" = "windows" ; then
+       EXEEXT=".exe"
+       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
+    fi
+
+    # TEA specific:
+
+
+
+
+
+
+
+
+#--------------------------------------------------------------------
+# Load the tkConfig.sh file if necessary (Tk extension)
+#--------------------------------------------------------------------
+
+#TEA_PATH_TKCONFIG
+#TEA_LOAD_TKCONFIG
+
+#--------------------------------------------------------------------
+# Load the tclooConfig.sh file on Tcl versions where oo is an
+# extension.
+#--------------------------------------------------------------------
+
+if test "${TCL_MAJOR_VERSION}" -lt 8 ; then
+    as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.5 or newer.
+Found configuration for Tcl ${TCL_VERSION}." "$LINENO" 5
+fi
+if test "${TCL_MAJOR_VERSION}" -eq 8 ; then
+  if test "${TCL_MINOR_VERSION}" -lt 5 ; then
+    as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.5 or newer.
+Found configuration for Tcl ${TCL_VERSION}." "$LINENO" 5
+  fi
+  if test "${TCL_MINOR_VERSION}" -eq 5 ; then
+
+    #
+    # Ok, lets find the tcloo configuration
+    # First, look for one uninstalled.
+    # the alternative search directory is invoked by --with-tcloo
+    #
+
+    if test x"${no_tcloo}" = x ; then
+       # we reset no_tcloo in case something fails here
+       no_tcloo=true
+
+# Check whether --with-tcloo was given.
+if test "${with_tcloo+set}" = set; then :
+  withval=$with_tcloo; with_tclooconfig=${withval}
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcloo configuration" >&5
+$as_echo_n "checking for tcloo configuration... " >&6; }
+       if ${ac_cv_c_tclooconfig+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+           # First check to see if --with-tcloo was specified.
+           if test x"${with_tclooconfig}" != x ; then
+               case ${with_tclooconfig} in
+                   */tclooConfig.sh )
+                       if test -f ${with_tclooconfig}; then
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcloo argument should refer to directory containing tclooConfig.sh, not to tclooConfig.sh itself" >&5
+$as_echo "$as_me: WARNING: --with-tcloo argument should refer to directory containing tclooConfig.sh, not to tclooConfig.sh itself" >&2;}
+                           with_tclooconfig=`echo ${with_tclooconfig} | sed 's!/tclooConfig\.sh$!!'`
+                       fi;;
+               esac
+               if test -f "${with_tclooconfig}/tclooConfig.sh" ; then
+                   ac_cv_c_tclooconfig=`(cd ${with_tclooconfig}; pwd)`
+               else
+                   as_fn_error $? "${with_tclooconfig} directory doesn't contain tclooConfig.sh" "$LINENO" 5
+               fi
+           fi
+
+           # then check for a private tcloo installation
+           if test x"${ac_cv_c_tclooconfig}" = x ; then
+               for i in \
+                       ../tcloo \
+                       `ls -dr ../tcloo*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
+                       `ls -dr ../tcloo*[0-9].[0-9][0-9] 2>/dev/null` \
+                       `ls -dr ../tcloo*[0-9].[0-9] 2>/dev/null` \
+                       `ls -dr ../tcloo*[0-9].[0-9]* 2>/dev/null` \
+                       ../../tcloo \
+                       `ls -dr ../../tcloo*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
+                       `ls -dr ../../tcloo*[0-9].[0-9][0-9] 2>/dev/null` \
+                       `ls -dr ../../tcloo*[0-9].[0-9] 2>/dev/null` \
+                       `ls -dr ../../tcloo*[0-9].[0-9]* 2>/dev/null` \
+                       ../../../tcloo \
+                       `ls -dr ../../../tcloo*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
+                       `ls -dr ../../../tcloo*[0-9].[0-9][0-9] 2>/dev/null` \
+                       `ls -dr ../../../tcloo*[0-9].[0-9] 2>/dev/null` \
+                       `ls -dr ../../../tcloo*[0-9].[0-9]* 2>/dev/null` \
+                       ${srcdir}/../tcloo \
+                       `ls -dr ${srcdir}/../tcloo*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
+                       `ls -dr ${srcdir}/../tcloo*[0-9].[0-9][0-9] 2>/dev/null` \
+                       `ls -dr ${srcdir}/../tcloo*[0-9].[0-9] 2>/dev/null` \
+                       `ls -dr ${srcdir}/../tcloo*[0-9].[0-9]* 2>/dev/null` \
+                       ; do
+                   if test -f "$i/tclooConfig.sh" ; then
+                       ac_cv_c_tclooconfig=`(cd $i; pwd)`
+                       break
+                   fi
+                   if test -f "$i/unix/tclooConfig.sh" ; then
+                       ac_cv_c_tclooconfig=`(cd $i/unix; pwd)`
+                       break
+                   fi
+               done
+           fi
+
+           # check in a few common install locations
+           if test x"${ac_cv_c_tclooconfig}" = x ; then
+               for i in `ls -d ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       ; do
+                   if test -f "$i/tclooConfig.sh" ; then
+                       ac_cv_c_tclooconfig=`(cd $i; pwd)`
+                       break
+                   fi
+               done
+           fi
+
+fi
+
+
+       if test x"${ac_cv_c_tclooconfig}" = x ; then
+           tcloo_BIN_DIR="# no tcloo configs found"
+           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find tcloo configuration definitions" >&5
+$as_echo "$as_me: WARNING: Cannot find tcloo configuration definitions" >&2;}
+           exit 0
+       else
+           no_tcloo=
+           tcloo_BIN_DIR=${ac_cv_c_tclooconfig}
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $tcloo_BIN_DIR/tclooConfig.sh" >&5
+$as_echo "found $tcloo_BIN_DIR/tclooConfig.sh" >&6; }
+       fi
+    fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${tcloo_BIN_DIR}/tclooConfig.sh" >&5
+$as_echo_n "checking for existence of ${tcloo_BIN_DIR}/tclooConfig.sh... " >&6; }
+
+    if test -f "${tcloo_BIN_DIR}/tclooConfig.sh" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+$as_echo "loading" >&6; }
+       . "${tcloo_BIN_DIR}/tclooConfig.sh"
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
+$as_echo "file not found" >&6; }
+    fi
+
+    #
+    # If the tcloo_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 tcloo_LIB_SPEC will be set to the value
+    # of tcloo_BUILD_LIB_SPEC. An extension should make use of tcloo_LIB_SPEC
+    # instead of tcloo_BUILD_LIB_SPEC since it will work with both an
+    # installed and uninstalled version of Tcl.
+    #
+
+    if test -f "${tcloo_BIN_DIR}/Makefile" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Makefile - using build library specs for tcloo" >&5
+$as_echo "$as_me: WARNING: Found Makefile - using build library specs for tcloo" >&2;}
+        tcloo_LIB_SPEC=${tcloo_BUILD_LIB_SPEC}
+        tcloo_STUB_LIB_SPEC=${tcloo_BUILD_STUB_LIB_SPEC}
+        tcloo_STUB_LIB_PATH=${tcloo_BUILD_STUB_LIB_PATH}
+        tcloo_INCLUDE_SPEC=${tcloo_BUILD_INCLUDE_SPEC}
+        tcloo_LIBRARY_PATH=${tcloo_LIBRARY_PATH}
+    fi
+
+
+
+
+
+
+
+
+
+
+
+
+    # Allow the caller to prevent this auto-check by specifying any 2nd arg
+    if test "x" = x; then :
+
+       # Check both upper and lower-case variants
+       # If a dev wanted non-stubs libs, this function could take an option
+       # to not use _STUB in the paths below
+       if test "x${tcloo_STUB_LIB_SPEC}" = x; then :
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For TCLOO_STUB library for LIBS" >&5
+$as_echo_n "checking For TCLOO_STUB library for LIBS... " >&6; }
+    # This simplifies the use of stub libraries by automatically adding
+    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
+    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
+    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
+    if test "x${TCLOO_STUB_LIB_SPEC}" != "x" ; then
+       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+
+    vars="\"`${CYGPATH} ${TCLOO_STUB_LIB_PATH}`\""
+    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
+
+
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TCLOO_STUB_LIB_PATH ${TCLOO_STUB_LIB_PATH}" >&5
+$as_echo "using TCLOO_STUB_LIB_PATH ${TCLOO_STUB_LIB_PATH}" >&6; }
+       else
+
+    vars="${TCLOO_STUB_LIB_SPEC}"
+    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
+
+
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TCLOO_STUB_LIB_SPEC ${TCLOO_STUB_LIB_SPEC}" >&5
+$as_echo "using TCLOO_STUB_LIB_SPEC ${TCLOO_STUB_LIB_SPEC}" >&6; }
+       fi
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
+$as_echo "file not found" >&6; }
+    fi
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For tcloo_STUB library for LIBS" >&5
+$as_echo_n "checking For tcloo_STUB library for LIBS... " >&6; }
+    # This simplifies the use of stub libraries by automatically adding
+    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
+    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
+    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
+    if test "x${tcloo_STUB_LIB_SPEC}" != "x" ; then
+       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+
+    vars="\"`${CYGPATH} ${tcloo_STUB_LIB_PATH}`\""
+    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
+
+
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tcloo_STUB_LIB_PATH ${tcloo_STUB_LIB_PATH}" >&5
+$as_echo "using tcloo_STUB_LIB_PATH ${tcloo_STUB_LIB_PATH}" >&6; }
+       else
+
+    vars="${tcloo_STUB_LIB_SPEC}"
+    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
+
+
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tcloo_STUB_LIB_SPEC ${tcloo_STUB_LIB_SPEC}" >&5
+$as_echo "using tcloo_STUB_LIB_SPEC ${tcloo_STUB_LIB_SPEC}" >&6; }
+       fi
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
+$as_echo "file not found" >&6; }
+    fi
+
+fi
+
+fi
+
+  else
+    TCLOO_CFLAGS=""
+  fi
+fi
+# Announce what versions of Tcl (and TclOO) are needed
+TCL_VERSION_REQ=8.5;
+TCL_VERSION_DESIRED=8.6;
+TCLOO_VERSION_REQ=0.6;
+
+#-----------------------------------------------------------------------
+# 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
+           { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
+$as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
+           prefix=${TCL_PREFIX}
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5
+$as_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
+           { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
+$as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
+           exec_prefix=${TCL_EXEC_PREFIX}
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5
+$as_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 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.
+
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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_fn_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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+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 $# != 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
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* 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 -std 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 -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+
+    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
+    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
+    INSTALL_DATA='${INSTALL} -m 644'
+    INSTALL_PROGRAM='${INSTALL}'
+    INSTALL_SCRIPT='${INSTALL}'
+    INSTALL_LIBRARY='${INSTALL_DATA}'
+
+
+
+
+
+
+
+
+    #--------------------------------------------------------------------
+    # Checks to see if the make program sets the $MAKE variable.
+    #--------------------------------------------------------------------
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+    #--------------------------------------------------------------------
+    # Find ranlib
+    #--------------------------------------------------------------------
+
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+    #--------------------------------------------------------------------
+    # Determines the correct binary file extension (.o, .obj, .exe etc.)
+    #--------------------------------------------------------------------
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+
+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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.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
+
+#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))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+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
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
+$as_echo_n "checking if the compiler understands -pipe... " >&6; }
+if ${tcl_cv_cc_pipe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_cc_pipe=yes
+else
+  tcl_cv_cc_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
+$as_echo "$tcl_cv_cc_pipe" >&6; }
+       if test $tcl_cv_cc_pipe = yes; then
+           CFLAGS="$CFLAGS -pipe"
+       fi
+    fi
+
+    #--------------------------------------------------------------------
+    # Common compiler flag setup
+    #--------------------------------------------------------------------
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+               #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; 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
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_bigendian=no
+else
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ 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").
+    #--------------------------------------------------------------------
+
+    ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin"
+if test "x$ac_cv_func_sin" = xyes; then :
+  MATH_LIBS=""
+else
+  MATH_LIBS="-lm"
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5
+$as_echo_n "checking for main in -lieee... " >&6; }
+if ${ac_cv_lib_ieee_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lieee  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ieee_main=yes
+else
+  ac_cv_lib_ieee_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5
+$as_echo "$ac_cv_lib_ieee_main" >&6; }
+if test "x$ac_cv_lib_ieee_main" = xyes; then :
+  MATH_LIBS="-lieee $MATH_LIBS"
+fi
+
+
+    #--------------------------------------------------------------------
+    # Interactive UNIX requires -linet instead of -lsocket, plus it
+    # needs net/errno.h to define the socket-related error codes.
+    #--------------------------------------------------------------------
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5
+$as_echo_n "checking for main in -linet... " >&6; }
+if ${ac_cv_lib_inet_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_inet_main=yes
+else
+  ac_cv_lib_inet_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5
+$as_echo "$ac_cv_lib_inet_main" >&6; }
+if test "x$ac_cv_lib_inet_main" = xyes; then :
+  LIBS="$LIBS -linet"
+fi
+
+    ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_net_errno_h" = xyes; then :
+
+
+$as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h
+
+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
+    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+if test "x$ac_cv_func_connect" = xyes; then :
+  tcl_checkSocket=0
+else
+  tcl_checkSocket=1
+fi
+
+    if test "$tcl_checkSocket" = 1; then
+       ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
+if test "x$ac_cv_func_setsockopt" = xyes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
+$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_setsockopt+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char setsockopt ();
+int
+main ()
+{
+return setsockopt ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_setsockopt=yes
+else
+  ac_cv_lib_socket_setsockopt=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
+$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
+if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
+  LIBS="$LIBS -lsocket"
+else
+  tcl_checkBoth=1
+fi
+
+fi
+
+    fi
+    if test "$tcl_checkBoth" = 1; then
+       tk_oldLibs=$LIBS
+       LIBS="$LIBS -lsocket -lnsl"
+       ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept"
+if test "x$ac_cv_func_accept" = xyes; then :
+  tcl_checkNsl=0
+else
+  LIBS=$tk_oldLibs
+fi
+
+    fi
+    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_nsl_gethostbyname=yes
+else
+  ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
+  LIBS="$LIBS -lnsl"
+fi
+
+fi
+
+
+    # TEA specific: 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}'
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5
+$as_echo_n "checking dirent.h... " >&6; }
+if ${tcl_cv_dirent_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_dirent_h=yes
+else
+  tcl_cv_dirent_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5
+$as_echo "$tcl_cv_dirent_h" >&6; }
+
+    if test $tcl_cv_dirent_h = no; then
+
+$as_echo "#define NO_DIRENT_H 1" >>confdefs.h
+
+    fi
+
+    # TEA specific:
+    ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_ERRNO_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
+if test "x$ac_cv_header_float_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_FLOAT_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default"
+if test "x$ac_cv_header_values_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_VALUES_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
+if test "x$ac_cv_header_limits_h" = xyes; then :
+
+$as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h
+
+else
+
+$as_echo "#define NO_LIMITS_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+  tcl_ok=1
+else
+  tcl_ok=0
+fi
+
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+
+$as_echo "#define NO_STDLIB_H 1" >>confdefs.h
+
+    fi
+    ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
+if test "x$ac_cv_header_string_h" = xyes; then :
+  tcl_ok=1
+else
+  tcl_ok=0
+fi
+
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+
+$as_echo "#define NO_STRING_H 1" >>confdefs.h
+
+    fi
+
+    ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_wait_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+
+
+    ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+
+else
+
+$as_echo "#define NO_DLFCN_H 1" >>confdefs.h
+
+fi
+
+
+
+    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
+    for ac_header in sys/param.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PARAM_H 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
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+
+#-----------------------------------------------------------------------
+# 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="tdbc.c tdbcStubInit.c tdbcTokenize.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
+               # To add more dirs here (like 'src'), you have to update VPATH
+               # in Makefile.in as well
+               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+                   -a ! -f "${srcdir}/macosx/$i" \
+                   ; then
+                   as_fn_error $? "could not find source file '$i'" "$LINENO" 5
+               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
+
+
+
+
+    vars="generic/tdbc.h generic/tdbcInt.h generic/tdbcDecls.h"
+    for i in $vars; do
+       # check for existence, be strict because it is installed
+       if test ! -f "${srcdir}/$i" ; then
+           as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
+       fi
+       PKG_HEADERS="$PKG_HEADERS $i"
+    done
+
+
+if test "${TCL_MAJOR_VERSION}" -eq 8 ; then
+  if test "${TCL_MINOR_VERSION}" -eq 5 ; then
+
+    vars="${TCLOO_INCLUDE_SPEC}"
+    for i in $vars; do
+       PKG_INCLUDES="$PKG_INCLUDES $i"
+    done
+
+
+
+    vars="${TCLOO_STUB_LIB_SPEC}"
+    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
+
+
+  fi
+fi
+
+    PKG_CFLAGS="$PKG_CFLAGS ${TCLOO_CFLAGS}"
+
+
+
+    vars="tdbcStubLib.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" \
+           -a ! -f "${srcdir}/macosx/$i" \
+           ; then
+           as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5
+       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/tdbc.tcl"
+    for i in $vars; do
+       # check for existence, be strict because it is installed
+       if test ! -f "${srcdir}/$i" ; then
+           as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
+       fi
+       PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
+    done
+
+
+
+#--------------------------------------------------------------------
+# A few miscellaneous platform-specific items:
+#
+# Define a special symbol for Windows (BUILD_sample in this case) so
+# that we create the export library with the dll.
+#
+# 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.
+#
+# TEA_ADD_* any platform specific compiler/build info here.
+#--------------------------------------------------------------------
+
+# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
+# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
+#CLEANFILES="$CLEANFILES pkgIndex.tcl"
+
+#--------------------------------------------------------------------
+# 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 called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
+#--------------------------------------------------------------------
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
+$as_echo_n "checking for Tcl public headers... " >&6; }
+
+
+# Check whether --with-tclinclude was given.
+if test "${with_tclinclude+set}" = set; then :
+  withval=$with_tclinclude; with_tclinclude=${withval}
+fi
+
+
+    if ${ac_cv_c_tclh+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       # 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
+               as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
+           fi
+       else
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tcl was built as a framework, attempt to use
+               # the framework's Headers directory
+               case ${TCL_DEFS} in
+                   *TCL_FRAMEWORK*)
+                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tcl is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TCL_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$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`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TCL_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           fi
+           for i in $list ; do
+               if test -f "$i/tcl.h" ; then
+                   ac_cv_c_tclh=$i
+                   break
+               fi
+           done
+       fi
+
+fi
+
+
+    # Print a message based on how we determined the include path
+
+    if test x"${ac_cv_c_tclh}" = x ; then
+       as_fn_error $? "tcl.h not found.  Please specify its location with --with-tclinclude" "$LINENO" 5
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
+$as_echo "${ac_cv_c_tclh}" >&6; }
+    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}\"
+
+
+
+
+#--------------------------------------------------------------------
+# Check whether --enable-threads or --disable-threads was given.
+# This auto-enables if Tcl was compiled threaded.
+#--------------------------------------------------------------------
+
+
+    # Check whether --enable-threads was given.
+if test "${enable_threads+set}" = set; then :
+  enableval=$enable_threads; tcl_ok=$enableval
+else
+  tcl_ok=yes
+fi
+
+
+    if test "${enable_threads+set}" = set; then
+       enableval="$enable_threads"
+       tcl_ok=$enableval
+    else
+       tcl_ok=yes
+    fi
+
+    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:
+
+           # USE_THREAD_ALLOC tells us to try the special thread-based
+           # allocator that significantly reduces lock contention
+
+$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
+
+
+$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+           if test "`uname -s`" = "SunOS" ; then
+
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+           fi
+
+$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
+$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init ();
+int
+main ()
+{
+return pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_mutex_init=yes
+else
+  ac_cv_lib_pthread_pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+           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]
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
+$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __pthread_mutex_init ();
+int
+main ()
+{
+return __pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread___pthread_mutex_init=yes
+else
+  ac_cv_lib_pthread___pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+           fi
+
+           if test "$tcl_ok" = "yes"; then
+               # The space is needed
+               THREADS_LIBS=" -lpthread"
+           else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
+$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
+if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthreads  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init ();
+int
+main ()
+{
+return pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthreads_pthread_mutex_init=yes
+else
+  ac_cv_lib_pthreads_pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+               if test "$tcl_ok" = "yes"; then
+                   # The space is needed
+                   THREADS_LIBS=" -lpthreads"
+               else
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
+$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
+if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init ();
+int
+main ()
+{
+return pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_pthread_mutex_init=yes
+else
+  ac_cv_lib_c_pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+                   if test "$tcl_ok" = "no"; then
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
+$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_init ();
+int
+main ()
+{
+return pthread_mutex_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_mutex_init=yes
+else
+  ac_cv_lib_c_r_pthread_mutex_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+                       if test "$tcl_ok" = "yes"; then
+                           # The space is needed
+                           THREADS_LIBS=" -pthread"
+                       else
+                           TCL_THREADS=0
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
+$as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
+                       fi
+                   fi
+               fi
+           fi
+       fi
+    else
+       TCL_THREADS=0
+    fi
+    # Do checking message here to not mess up interleaved configure output
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
+$as_echo_n "checking for building with threads... " >&6; }
+    if test "${TCL_THREADS}" = 1; then
+
+$as_echo "#define TCL_THREADS 1" >>confdefs.h
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
+$as_echo "yes (default)" >&6; }
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    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
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
+$as_echo "$as_me: WARNING:
+    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
+           fi
+           ;;
+       *)
+           if test "${TCL_THREADS}" = "1"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+    --enable-threads requested, but building against a Tcl that is NOT
+    thread-enabled.  This is an OK configuration that will also run in
+    a thread-enabled core." >&5
+$as_echo "$as_me: WARNING:
+    --enable-threads requested, but building against a Tcl that is NOT
+    thread-enabled.  This is an OK configuration that will also run in
+    a thread-enabled core." >&2;}
+           fi
+           ;;
+    esac
+
+
+
+#--------------------------------------------------------------------
+# The statement below defines a collection of symbols related to
+# building as a shared library instead of a static library.
+#--------------------------------------------------------------------
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
+$as_echo_n "checking how to build libraries... " >&6; }
+    # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; tcl_ok=$enableval
+else
+  tcl_ok=yes
+fi
+
+
+    if test "${enable_shared+set}" = set; then
+       enableval="$enable_shared"
+       tcl_ok=$enableval
+    else
+       tcl_ok=yes
+    fi
+
+    if test "$tcl_ok" = "yes" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
+$as_echo "shared" >&6; }
+       SHARED_BUILD=1
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+$as_echo "static" >&6; }
+       SHARED_BUILD=0
+
+$as_echo "#define STATIC_BUILD 1" >>confdefs.h
+
+    fi
+
+
+
+#--------------------------------------------------------------------
+# This macro figures out what flags to use with the compiler/linker
+# when building shared/static debug/optimized objects.  This information
+# can be taken from the tclConfig.sh file, but this figures it all out.
+#--------------------------------------------------------------------
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+
+
+    # Step 0.a: Enable 64 bit support?
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
+$as_echo_n "checking if 64bit support is requested... " >&6; }
+    # Check whether --enable-64bit was given.
+if test "${enable_64bit+set}" = set; then :
+  enableval=$enable_64bit; do64bit=$enableval
+else
+  do64bit=no
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
+$as_echo "$do64bit" >&6; }
+
+    # Step 0.b: Enable Solaris 64 bit VIS support?
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
+$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
+    # Check whether --enable-64bit-vis was given.
+if test "${enable_64bit_vis+set}" = set; then :
+  enableval=$enable_64bit_vis; do64bitVIS=$enableval
+else
+  do64bitVIS=no
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
+$as_echo "$do64bitVIS" >&6; }
+    # Force 64bit on with VIS
+    if test "$do64bitVIS" = "yes"; then :
+  do64bit=yes
+fi
+
+    # Step 0.c: Check if visibility support is available. Do this here so
+    # that platform specific alternatives can be used below if this fails.
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
+$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
+if ${tcl_cv_cc_visibility_hidden+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+           extern __attribute__((__visibility__("hidden"))) void f(void);
+           void f(void) {}
+int
+main ()
+{
+f();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_cc_visibility_hidden=yes
+else
+  tcl_cv_cc_visibility_hidden=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
+$as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
+    if test $tcl_cv_cc_visibility_hidden = yes; then :
+
+
+$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
+
+
+$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
+
+
+fi
+
+    # Step 0.d: Disable -rpath support?
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
+$as_echo_n "checking if rpath support is requested... " >&6; }
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; doRpath=$enableval
+else
+  doRpath=yes
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
+$as_echo "$doRpath" >&6; }
+
+    # TEA specific: Cross-compiling options for Windows/CE builds?
+
+    if test "${TEA_PLATFORM}" = windows; then :
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5
+$as_echo_n "checking if Windows/CE build is requested... " >&6; }
+       # Check whether --enable-wince was given.
+if test "${enable_wince+set}" = set; then :
+  enableval=$enable_wince; doWince=$enableval
+else
+  doWince=no
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5
+$as_echo "$doWince" >&6; }
+
+fi
+
+    # Set the variable "system" to hold the name and version number
+    # for the system.
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
+$as_echo_n "checking system version... " >&6; }
+if ${tcl_cv_sys_version+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       # TEA specific:
+       if test "${TEA_PLATFORM}" = "windows" ; then
+           tcl_cv_sys_version=windows
+       else
+           tcl_cv_sys_version=`uname -s`-`uname -r`
+           if test "$?" -ne 0 ; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
+$as_echo "$as_me: WARNING: can't find uname command" >&2;}
+               tcl_cv_sys_version=unknown
+           else
+               if test "`uname -s`" = "AIX" ; then
+                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
+               fi
+           fi
+       fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
+$as_echo "$tcl_cv_sys_version" >&6; }
+    system=$tcl_cv_sys_version
+
+
+    # Require ranlib early so we can override it in special cases below.
+
+
+
+    # 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 removed some core-only vars.
+
+    do64bit_ok=no
+    # default to '{$LIBS}' and set to "" on per-platform necessary basis
+    SHLIB_LD_LIBS='${LIBS}'
+    # When ld needs options to work in 64-bit mode, put them in
+    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
+    # is disabled by the user. [Bug 1016796]
+    LDFLAGS_ARCH=""
+    UNSHARED_LIB_SUFFIX=""
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    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"
+
+else
+
+       CFLAGS_OPTIMIZE=-O
+       CFLAGS_WARNING=""
+
+fi
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+    STLIB_LD='${AR} cr'
+    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+    if test "x$SHLIB_VERSION" = x; then :
+  SHLIB_VERSION=""
+else
+  SHLIB_VERSION=".$SHLIB_VERSION"
+fi
+    case $system in
+       # TEA specific:
+       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.
+           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+           # MACHINE is IX86 for LINK, but this is used by the manifest,
+           # which requires x86|amd64|ia64.
+           MACHINE="X86"
+           if test "$do64bit" != "no" ; then
+               if test "x${MSSDK}x" = "xx" ; then
+                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
+               fi
+               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
+               PATH64=""
+               case "$do64bit" in
+                   amd64|x64|yes)
+                       MACHINE="AMD64" ; # default to AMD64 64-bit build
+                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+                       ;;
+                   ia64)
+                       MACHINE="IA64"
+                       PATH64="${MSSDK}/Bin/Win64"
+                       ;;
+               esac
+               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
+$as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5
+$as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
+                   do64bit="no"
+               else
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: result:    Using 64-bit $MACHINE mode" >&5
+$as_echo "   Using 64-bit $MACHINE mode" >&6; }
+                   do64bit_ok="yes"
+               fi
+           fi
+
+           if test "$doWince" != "no" ; then
+               if test "$do64bit" != "no" ; then
+                   as_fn_error $? "Windows/CE and 64-bit builds incompatible" "$LINENO" 5
+               fi
+               if test "$GCC" = "yes" ; then
+                   as_fn_error $? "Windows/CE and GCC builds incompatible" "$LINENO" 5
+               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 was given.
+if test "${with_celib+set}" = set; then :
+  withval=$with_celib; with_celibconfig=${withval}
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5
+$as_echo_n "checking for Windows/CE celib directory... " >&6; }
+       if ${ac_cv_c_celibconfig+:} false; then :
+  $as_echo_n "(cached) " >&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
+                   as_fn_error $? "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5
+               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
+           as_fn_error $? "Cannot find celib support library directory" "$LINENO" 5
+       else
+           no_celib=
+           CELIB_DIR=${ac_cv_c_celibconfig}
+           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $CELIB_DIR" >&5
+$as_echo "found $CELIB_DIR" >&6; }
+       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
+               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
+               if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
+                   -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
+                   as_fn_error $? "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5
+                   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" != "no" ; then
+                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
+                   CC="\"${PATH64}/cl.exe\""
+                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+                   RC="\"${MSSDK}/bin/rc.exe\""
+                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+                   LINKBIN="\"${PATH64}/link.exe\""
+                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+                   # Avoid 'unresolved external symbol __security_cookie'
+                   # errors, c.f. http://support.microsoft.com/?id=894573
+
+    vars="bufferoverflowU.lib"
+    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
+
+
+               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
+               if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RC"; then
+  ac_cv_prog_RC="$RC" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RC="${ac_tool_prefix}windres"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RC=$ac_cv_prog_RC
+if test -n "$RC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
+$as_echo "$RC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RC"; then
+  ac_ct_RC=$RC
+  # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RC"; then
+  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RC="windres"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RC=$ac_cv_prog_ac_ct_RC
+if test -n "$ac_ct_RC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
+$as_echo "$ac_ct_RC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RC" = x; then
+    RC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RC=$ac_ct_RC
+  fi
+else
+  RC="$ac_cv_prog_RC"
+fi
+
+               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}"
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
+$as_echo_n "checking for cross-compile version of gcc... " >&6; }
+if ${ac_cv_cross+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+                           #ifdef _WIN32
+                               #error cross-compiler
+                           #endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_cross=yes
+else
+  ac_cv_cross=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
+$as_echo "$ac_cv_cross" >&6; }
+                     if test "$ac_cv_cross" = "yes"; then
+                       case "$do64bit" in
+                           amd64|x64|yes)
+                               CC="x86_64-w64-mingw32-gcc"
+                               LD="x86_64-w64-mingw32-ld"
+                               AR="x86_64-w64-mingw32-ar"
+                               RANLIB="x86_64-w64-mingw32-ranlib"
+                               RC="x86_64-w64-mingw32-windres"
+                           ;;
+                           *)
+                               CC="i686-w64-mingw32-gcc"
+                               LD="i686-w64-mingw32-ld"
+                               AR="i686-w64-mingw32-ar"
+                               RANLIB="i686-w64-mingw32-ranlib"
+                               RC="i686-w64-mingw32-windres"
+                           ;;
+                       esac
+               fi
+
+           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
+               # and also
+               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
+               # This essentially turns it all on.
+               LDFLAGS_DEBUG="-debug -debugtype:cv"
+               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_SUFFIX=".dll"
+           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       AIX-*)
+           if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then :
+
+               # AIX requires the _r compiler when gcc isn't being used
+               case "${CC}" in
+                   *_r|*_r\ *)
+                       # ok ...
+                       ;;
+                   *)
+                       # Make sure only first arg gets _r
+                       CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
+                       ;;
+               esac
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
+$as_echo "Using $CC for compiling with threads" >&6; }
+
+fi
+           LIBS="$LIBS -lc"
+           SHLIB_CFLAGS=""
+           SHLIB_SUFFIX=".so"
+
+           LD_LIBRARY_PATH_VAR="LIBPATH"
+
+           # Check to enable 64-bit flags for compiler/linker
+           if test "$do64bit" = yes; then :
+
+               if test "$GCC" = yes; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+
+else
+
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS -q64"
+                   LDFLAGS_ARCH="-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"
+               if test "$GCC" = yes; then :
+
+                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+
+else
+
+                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+
+fi
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+
+else
+
+               if test "$GCC" = yes; then :
+
+                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
+
+else
+
+                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
+                   LDFLAGS="$LDFLAGS -brtl"
+
+fi
+               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+fi
+           ;;
+       BeOS*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -nostart'
+           SHLIB_SUFFIX=".so"
+
+           #-----------------------------------------------------------
+           # Check for inet_ntoa in -lbind, for BeOS (which also needs
+           # -lsocket, even if the network functions are in -lnet which
+           # is always linked to, for compatibility.
+           #-----------------------------------------------------------
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
+$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
+if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbind  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntoa ();
+int
+main ()
+{
+return inet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bind_inet_ntoa=yes
+else
+  ac_cv_lib_bind_inet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
+$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
+if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
+  LIBS="$LIBS -lbind -lsocket"
+fi
+
+           ;;
+       BSD/OS-4.*)
+           SHLIB_CFLAGS="-export-dynamic -fPIC"
+           SHLIB_LD='${CC} -shared'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       CYGWIN_*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD='${CC} -shared'
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
+           SHLIB_SUFFIX=".dll"
+           EXEEXT=".exe"
+           do64bit_ok=yes
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       Haiku*)
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
+$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
+if ${ac_cv_lib_network_inet_ntoa+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnetwork  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntoa ();
+int
+main ()
+{
+return inet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_network_inet_ntoa=yes
+else
+  ac_cv_lib_network_inet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
+$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
+if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
+  LIBS="$LIBS -lnetwork"
+fi
+
+           ;;
+       HP-UX-*.11.*)
+           # Use updated header definitions where possible
+
+$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
+
+           # TEA specific: Needed by Tcl, but not most extensions
+           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
+           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
+
+           if test "`uname -m`" = ia64; then :
+
+               SHLIB_SUFFIX=".so"
+               # Use newer C++ library for C++ extensions
+               #if test "$GCC" != "yes" ; then
+               #   CPPFLAGS="-AA"
+               #fi
+
+else
+
+               SHLIB_SUFFIX=".sl"
+
+fi
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_shl_load=yes
+else
+  ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+
+           if test "$tcl_ok" = yes; then :
+
+               LDFLAGS="$LDFLAGS -Wl,-E"
+               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+
+fi
+           if test "$GCC" = yes; then :
+
+               SHLIB_LD='${CC} -shared'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+else
+
+               CFLAGS="$CFLAGS -z"
+               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+               #CFLAGS="$CFLAGS +DAportable"
+               SHLIB_CFLAGS="+z"
+               SHLIB_LD="ld -b"
+
+fi
+
+           # Check to enable 64-bit flags for compiler/linker
+           if test "$do64bit" = "yes"; then :
+
+               if test "$GCC" = yes; then :
+
+                   case `${CC} -dumpmachine` in
+                       hppa64*)
+                           # 64-bit gcc in use.  Fix flags for GNU ld.
+                           do64bit_ok=yes
+                           SHLIB_LD='${CC} -shared'
+                           if test $doRpath = yes; then :
+
+                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+                           ;;
+                       *)
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+                           ;;
+                   esac
+
+else
+
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS +DD64"
+                   LDFLAGS_ARCH="+DD64"
+
+fi
+
+fi ;;
+       IRIX-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+fi
+           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_SUFFIX=".so"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+fi
+
+           # Check to enable 64-bit flags for compiler/linker
+
+           if test "$do64bit" = yes; then :
+
+               if test "$GCC" = yes; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
+$as_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_ARCH="-64"
+
+fi
+
+fi
+           ;;
+       Linux*|GNU*|NetBSD-Debian)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+
+           # TEA specific:
+           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           if test "`uname -m`" = "alpha"; then :
+  CFLAGS="$CFLAGS -mieee"
+fi
+           if test $do64bit = yes; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
+$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
+if ${tcl_cv_cc_m64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                   hold_cflags=$CFLAGS
+                   CFLAGS="$CFLAGS -m64"
+                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_cc_m64=yes
+else
+  tcl_cv_cc_m64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                   CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
+$as_echo "$tcl_cv_cc_m64" >&6; }
+               if test $tcl_cv_cc_m64 = yes; then :
+
+                   CFLAGS="$CFLAGS -m64"
+                   do64bit_ok=yes
+
+fi
+
+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
+           ;;
+       Lynx*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           CFLAGS_OPTIMIZE=-02
+           SHLIB_LD='${CC} -shared'
+           LD_FLAGS="-Wl,--export-dynamic"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+           ;;
+       OpenBSD-*)
+           arch=`arch -s`
+           case "$arch" in
+           vax)
+               SHLIB_SUFFIX=""
+               SHARED_LIB_SUFFIX=""
+               LDFLAGS=""
+               ;;
+           *)
+               case "$arch" in
+               alpha|sparc64)
+                   SHLIB_CFLAGS="-fPIC"
+                   ;;
+               *)
+                   SHLIB_CFLAGS="-fpic"
+                   ;;
+               esac
+               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+               SHLIB_SUFFIX=".so"
+               if test $doRpath = yes; then :
+
+                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
+               LDFLAGS="-Wl,-export-dynamic"
+               ;;
+           esac
+           case "$arch" in
+           vax)
+               CFLAGS_OPTIMIZE="-O1"
+               ;;
+           *)
+               CFLAGS_OPTIMIZE="-O2"
+               ;;
+           esac
+           if test "${TCL_THREADS}" = "1"; then :
+
+               # On OpenBSD:   Compile with -pthread
+               #               Don't link with -lpthread
+               LIBS=`echo $LIBS | sed s/-lpthread//`
+               CFLAGS="$CFLAGS -pthread"
+
+fi
+           # OpenBSD doesn't do version numbers with dots.
+           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       NetBSD-*)
+           # NetBSD has ELF and can use 'cc -shared' to build shared libs
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           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
+           ;;
+       FreeBSD-*)
+           # This configuration from FreeBSD Ports.
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD="${CC} -shared"
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
+           SHLIB_SUFFIX=".so"
+           LDFLAGS=""
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+fi
+           if test "${TCL_THREADS}" = "1"; then :
+
+               # The -pthread needs to go in the LDFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+fi
+           case $system in
+           FreeBSD-3.*)
+               # Version numbers are dot-stripped by system policy.
+               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
+               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+               TCL_LIB_VERSIONS_OK=nodots
+               ;;
+           esac
+           ;;
+       Darwin-*)
+           CFLAGS_OPTIMIZE="-Os"
+           SHLIB_CFLAGS="-fno-common"
+           # To avoid discrepancies between what headers configure sees during
+           # preprocessing tests and compiling tests, move any -isysroot and
+           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
+           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
+           CFLAGS="`echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
+           if test $do64bit = yes; then :
+
+               case `arch` in
+                   ppc)
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
+$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
+if ${tcl_cv_cc_arch_ppc64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_cc_arch_ppc64=yes
+else
+  tcl_cv_cc_arch_ppc64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                           CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
+$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
+                       if test $tcl_cv_cc_arch_ppc64 = yes; then :
+
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           do64bit_ok=yes
+
+fi;;
+                   i386)
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
+$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
+if ${tcl_cv_cc_arch_x86_64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_cc_arch_x86_64=yes
+else
+  tcl_cv_cc_arch_x86_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                           CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
+$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
+                       if test $tcl_cv_cc_arch_x86_64 = yes; then :
+
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           do64bit_ok=yes
+
+fi;;
+                   *)
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
+$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
+               esac
+
+else
+
+               # Check for combined 32-bit and 64-bit fat build
+               if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
+                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
+
+                   fat_32_64=yes
+fi
+
+fi
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
+$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
+if ${tcl_cv_ld_single_module+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_ld_single_module=yes
+else
+  tcl_cv_ld_single_module=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LDFLAGS=$hold_ldflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
+$as_echo "$tcl_cv_ld_single_module" >&6; }
+           if test $tcl_cv_ld_single_module = yes; then :
+
+               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+
+fi
+           # TEA specific: link shlib with current and compatibility version flags
+           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
+           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
+           SHLIB_SUFFIX=".dylib"
+           # Don't use -prebind when building for Mac OS X 10.4 or later only:
+           if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
+               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then :
+
+               LDFLAGS="$LDFLAGS -prebind"
+fi
+           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
+$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
+if ${tcl_cv_ld_search_paths_first+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_ld_search_paths_first=yes
+else
+  tcl_cv_ld_search_paths_first=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LDFLAGS=$hold_ldflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
+$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
+           if test $tcl_cv_ld_search_paths_first = yes; then :
+
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+
+fi
+           if test "$tcl_cv_cc_visibility_hidden" != yes; then :
+
+
+$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
+
+               tcl_cv_cc_visibility_hidden=yes
+
+fi
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+           # TEA specific: for combined 32 & 64 bit fat builds of Tk
+           # extensions, verify that 64-bit build is possible.
+           if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then :
+
+               if test "${TEA_WINDOWINGSYSTEM}" = x11; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
+$as_echo_n "checking for 64-bit X11... " >&6; }
+if ${tcl_cv_lib_x11_64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
+                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_lib_x11_64=yes
+else
+  tcl_cv_lib_x11_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
+$as_echo "$tcl_cv_lib_x11_64" >&6; }
+
+fi
+               if test "${TEA_WINDOWINGSYSTEM}" = aqua; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
+$as_echo_n "checking for 64-bit Tk... " >&6; }
+if ${tcl_cv_lib_tk_64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
+                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <tk.h>
+int
+main ()
+{
+Tk_InitStubs(NULL, "", 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_lib_tk_64=yes
+else
+  tcl_cv_lib_tk_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
+$as_echo "$tcl_cv_lib_tk_64" >&6; }
+
+fi
+               # remove 64-bit arch flags from CFLAGS et al. if configuration
+               # does not support 64-bit.
+               if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then :
+
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
+$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
+                   for v in CFLAGS CPPFLAGS LDFLAGS; do
+                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
+                   done
+fi
+
+fi
+           ;;
+       OS/390-*)
+           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
+
+$as_echo "#define _OE_SOCKETS 1" >>confdefs.h
+
+           ;;
+       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_SUFFIX=".so"
+           if test $doRpath = yes; then :
+
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+fi
+           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"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SCO_SV-3.2*)
+           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"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SunOS-5.[0-6])
+           # Careful to not let 5.10+ fall into this case
+
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+
+$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_SUFFIX=".so"
+           if test "$GCC" = yes; then :
+
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+else
+
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+fi
+           ;;
+       SunOS-5*)
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+
+$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+
+           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 "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
+
+                           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
+$as_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_ARCH="-xarch=v9a"
+
+else
+
+                           CFLAGS="$CFLAGS -xarch=v9"
+                           LDFLAGS_ARCH="-xarch=v9"
+
+fi
+                       # Solaris 64 uses this as well
+                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
+
+fi
+
+else
+  if test "$arch" = "amd64 i386"; then :
+
+                   if test "$GCC" = yes; then :
+
+                       case $system in
+                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
+                               do64bit_ok=yes
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
+                       esac
+
+else
+
+                       do64bit_ok=yes
+                       case $system in
+                           SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               CFLAGS="$CFLAGS -xarch=amd64"
+                               LDFLAGS="$LDFLAGS -xarch=amd64";;
+                       esac
+
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
+fi
+fi
+
+fi
+
+           SHLIB_SUFFIX=".so"
+           if test "$GCC" = yes; then :
+
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               if test "$do64bit_ok" = yes; then :
+
+                   if test "$arch" = "sparcv9 sparc"; 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` | ..."
+                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+
+else
+  if test "$arch" = "amd64 i386"; then :
+
+                       # JH: static-libgcc is necessary for core Tcl, but may
+                       # not be necessary for extensions.
+                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
+
+fi
+fi
+
+fi
+
+else
+
+               case $system in
+                   SunOS-5.[1-9][0-9]*)
+                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
+                   *)
+                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
+               esac
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+
+fi
+           ;;
+       UNIX_SV* | UnixWare-5*)
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_LD='${CC} -G'
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
+           # that don't grok the -Bexport option.  Test that it does.
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
+$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
+if ${tcl_cv_ld_Bexport+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int i;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  tcl_cv_ld_Bexport=yes
+else
+  tcl_cv_ld_Bexport=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LDFLAGS=$hold_ldflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
+$as_echo "$tcl_cv_ld_Bexport" >&6; }
+           if test $tcl_cv_ld_Bexport = yes; then :
+
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+
+fi
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+    esac
+
+    if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
+$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
+
+fi
+
+
+
+    # Add in the arch flags late to ensure it wasn't removed.
+    # Not necessary in TEA, but this is aligned with core
+    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
+
+    # 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 "$GCC" = yes; then :
+
+       case $system in
+           AIX-*) ;;
+           BSD/OS*) ;;
+           CYGWIN_*|MINGW32_*) ;;
+           IRIX*) ;;
+           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
+           Darwin-*) ;;
+           SCO_SV-3.2*) ;;
+           windows) ;;
+           *) SHLIB_CFLAGS="-fPIC" ;;
+       esac
+fi
+
+    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
+
+
+$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
+
+
+fi
+
+    if test "$SHARED_LIB_SUFFIX" = ""; then :
+
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
+fi
+    if test "$UNSHARED_LIB_SUFFIX" = ""; then :
+
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+fi
+
+    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
+$as_echo_n "checking for SEH support in compiler... " >&6; }
+if ${tcl_cv_seh+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  tcl_cv_seh=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+           int main(int argc, char** argv) {
+               int a, b = 0;
+               __try {
+                   a = 666 / b;
+               }
+               __except (EXCEPTION_EXECUTE_HANDLER) {
+                   return 0;
+               }
+               return 1;
+           }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  tcl_cv_seh=yes
+else
+  tcl_cv_seh=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
+$as_echo "$tcl_cv_seh" >&6; }
+       if test "$tcl_cv_seh" = "no" ; then
+
+$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
+
+       fi
+
+       #
+       # Check to see if the excpt.h include file provided contains the
+       # definition for EXCEPTION_DISPOSITION; if not, which is the case
+       # with Cygwin's version as of 2002-04-10, define it to be int,
+       # sufficient for getting the current code to work.
+       #
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
+$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
+if ${tcl_cv_eh_disposition+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#          define WIN32_LEAN_AND_MEAN
+#          include <windows.h>
+#          undef WIN32_LEAN_AND_MEAN
+
+int
+main ()
+{
+
+               EXCEPTION_DISPOSITION x;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_eh_disposition=yes
+else
+  tcl_cv_eh_disposition=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
+$as_echo "$tcl_cv_eh_disposition" >&6; }
+       if test "$tcl_cv_eh_disposition" = "no" ; then
+
+$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
+
+       fi
+
+       # Check to see if winnt.h defines CHAR, SHORT, and LONG
+       # even if VOID has already been #defined. The win32api
+       # used by mingw and cygwin is known to do this.
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
+$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
+if ${tcl_cv_winnt_ignore_void+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define VOID void
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+int
+main ()
+{
+
+               CHAR c;
+               SHORT s;
+               LONG l;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_winnt_ignore_void=yes
+else
+  tcl_cv_winnt_ignore_void=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
+$as_echo "$tcl_cv_winnt_ignore_void" >&6; }
+       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
+
+$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
+
+       fi
+    fi
+
+       # See if the compiler supports casting to a union type.
+       # This is used to stop gcc from printing a compiler
+       # warning when initializing a union member.
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
+$as_echo_n "checking for cast to union support... " >&6; }
+if ${tcl_cv_cast_to_union+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+                 union foo { int i; double d; };
+                 union foo f = (union foo) (int) 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_cast_to_union=yes
+else
+  tcl_cv_cast_to_union=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
+$as_echo "$tcl_cv_cast_to_union" >&6; }
+       if test "$tcl_cv_cast_to_union" = "yes"; then
+
+$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
+
+       fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+    # These must be called after we do the basic CFLAGS checks and
+    # verify any possible 64-bit or similar switches are necessary
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
+$as_echo_n "checking for required early compiler flags... " >&6; }
+    tcl_flags=""
+
+    if ${tcl_cv_flag__isoc99_source+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__isoc99_source=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _ISOC99_SOURCE 1
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__isoc99_source=yes
+else
+  tcl_cv_flag__isoc99_source=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
+
+$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
+
+       tcl_flags="$tcl_flags _ISOC99_SOURCE"
+    fi
+
+
+    if ${tcl_cv_flag__largefile64_source+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile64_source=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _LARGEFILE64_SOURCE 1
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile64_source=yes
+else
+  tcl_cv_flag__largefile64_source=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
+
+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+
+       tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
+    fi
+
+
+    if ${tcl_cv_flag__largefile_source64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+int
+main ()
+{
+char *p = (char *)open64;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile_source64=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _LARGEFILE_SOURCE64 1
+#include <sys/stat.h>
+int
+main ()
+{
+char *p = (char *)open64;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_flag__largefile_source64=yes
+else
+  tcl_cv_flag__largefile_source64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
+
+$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
+
+       tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
+    fi
+
+    if test "x${tcl_flags}" = "x" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
+$as_echo "${tcl_flags}" >&6; }
+    fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
+$as_echo_n "checking for 64-bit integer type... " >&6; }
+    if ${tcl_cv_type_64bit+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       tcl_cv_type_64bit=none
+       # See if the compiler knows natively about __int64
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+__int64 value = (__int64) 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_type_64bit=__int64
+else
+  tcl_type_64bit="long long"
+fi
+rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+switch (0) {
+            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
+        }
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_type_64bit=${tcl_type_64bit}
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+    if test "${tcl_cv_type_64bit}" = none ; then
+
+$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5
+$as_echo "using long" >&6; }
+    elif test "${tcl_cv_type_64bit}" = "__int64" \
+               -a "${TEA_PLATFORM}" = "windows" ; then
+       # TEA specific: We actually want to use the default tcl.h checks in
+       # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
+$as_echo "using Tcl header defaults" >&6; }
+    else
+
+cat >>confdefs.h <<_ACEOF
+#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
+_ACEOF
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
+$as_echo "${tcl_cv_type_64bit}" >&6; }
+
+       # Now check for auxiliary declarations
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
+$as_echo_n "checking for struct dirent64... " >&6; }
+if ${tcl_cv_struct_dirent64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <dirent.h>
+int
+main ()
+{
+struct dirent64 p;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_struct_dirent64=yes
+else
+  tcl_cv_struct_dirent64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
+$as_echo "$tcl_cv_struct_dirent64" >&6; }
+       if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+
+$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
+
+       fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
+$as_echo_n "checking for struct stat64... " >&6; }
+if ${tcl_cv_struct_stat64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 p;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_struct_stat64=yes
+else
+  tcl_cv_struct_stat64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
+$as_echo "$tcl_cv_struct_stat64" >&6; }
+       if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+
+$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
+
+       fi
+
+       for ac_func in open64 lseek64
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
+$as_echo_n "checking for off64_t... " >&6; }
+       if ${tcl_cv_type_off64_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+int
+main ()
+{
+off64_t offset;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_cv_type_off64_t=yes
+else
+  tcl_cv_type_off64_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+                       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
+               test "x${ac_cv_func_lseek64}" = "xyes" && \
+               test "x${ac_cv_func_open64}" = "xyes" ; then
+
+$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
+
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
+    fi
+
+
+
+#--------------------------------------------------------------------
+# Set the default compiler switches based on the --enable-symbols option.
+#--------------------------------------------------------------------
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
+$as_echo_n "checking for build with symbols... " >&6; }
+    # Check whether --enable-symbols was given.
+if test "${enable_symbols+set}" = set; then :
+  enableval=$enable_symbols; tcl_ok=$enableval
+else
+  tcl_ok=no
+fi
+
+    DBGX=""
+    if test "$tcl_ok" = "no"; then
+       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
+       LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    else
+       CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
+       LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+       if test "$tcl_ok" = "yes"; then
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
+$as_echo "yes (standard debugging)" >&6; }
+       fi
+    fi
+    # TEA specific:
+    if test "${TEA_PLATFORM}" != "windows" ; then
+       LDFLAGS_DEFAULT="${LDFLAGS}"
+    fi
+
+
+
+
+    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+
+$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
+
+    fi
+
+    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+       if test "$tcl_ok" = "all"; then
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
+$as_echo "enabled symbols mem debugging" >&6; }
+       else
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
+$as_echo "enabled $tcl_ok debugging" >&6; }
+       fi
+    fi
+
+
+#--------------------------------------------------------------------
+# Everyone should be linking against the Tcl stub library.  If you
+# can't for some reason, remove this definition.  If you aren't using
+# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
+# link against the non-stubbed Tcl library.  Add Tk too if necessary.
+#--------------------------------------------------------------------
+
+
+$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
+
+
+#--------------------------------------------------------------------
+# This macro generates a line to use when building a library.  It
+# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
+# and TEA_LOAD_TCLCONFIG macros above.
+#--------------------------------------------------------------------
+
+
+    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)"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+print("manifest needed")
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "manifest needed" >/dev/null 2>&1; then :
+
+       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
+       VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
+       VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
+       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
+
+    CLEANFILES="$CLEANFILES *.manifest"
+
+
+fi
+rm -f conftest*
+
+       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
+           if test x"${TK_BIN_DIR}" != x ; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+           fi
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+           if test "$GCC" = "yes"; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
+           fi
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+       else
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           if test "$GCC" = "yes"; then
+               PKG_LIB_FILE=lib${PKG_LIB_FILE}
+           fi
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       if test "$GCC" = "yes"; then
+           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
+       fi
+       # 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_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           RANLIB=:
+       else
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${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
+
+
+
+
+
+
+
+
+
+
+    ADD_MANIFEST=":"
+    if test "$GCC" != yes \
+           -a ${TEA_PLATFORM} == "windows" \
+           -a "${SHARED_BUILD}" = "1"; then :
+
+       # This refers to "Manifest Tool" not "Magnetic Tape utility"
+       for ac_prog in mt
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MT"; then
+  ac_cv_prog_MT="$MT" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MT="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MT=$ac_cv_prog_MT
+if test -n "$MT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
+$as_echo "$MT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$MT" && break
+done
+test -n "$MT" || MT="none"
+
+       if test "$MT" != none; then :
+
+           ADD_MANIFEST="${MT} -nologo -manifest \$@.manifest -outputresource:\$@\;2"
+           CLEANFILES="$CLEANFILES ${PKG_LIB_FILE}.manifest"
+fi
+fi
+
+
+#--------------------------------------------------------------------
+# Determine the name of the tclsh and/or wish executables in the
+# Tcl and Tk build directories or the location they were installed
+# into. These paths are used to support running test cases only,
+# the Makefile should not be making use of these paths to generate
+# a pkgIndex.tcl file or anything else at extension build time.
+#--------------------------------------------------------------------
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
+$as_echo_n "checking for tclsh... " >&6; }
+    if test -f "${TCL_BIN_DIR}/Makefile" ; then
+        # tclConfig.sh is in Tcl build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+        fi
+    else
+        # tclConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+        fi
+        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${TCLSH_PROG}" ; then
+                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
+$as_echo "${TCLSH_PROG}" >&6; }
+
+
+
+#--------------------------------------------------------------------
+# Finally, substitute all of the various values into the Makefile.
+# You may alternatively have a special pkgIndex.tcl.in or other files
+# which require substituting th AC variables in.  Include these here.
+#--------------------------------------------------------------------
+
+# Develop a fully qualified path for the package source dir
+eval tdbc_SRC_DIR="${srcdir}"
+tdbc_SRC_DIR=`cd "${tdbc_SRC_DIR}"; pwd`
+
+
+# Develop -I specifications for the build and installed directories where
+# tdbc.h may be found.
+
+    eval "tdbc_INCLUDE_SPEC=\"-I`${CYGPATH} ${includedir}`\""
+
+
+    eval "tdbc_BUILD_INCLUDE_SPEC=\"-I`${CYGPATH} ${tdbc_SRC_DIR}/generic`\""
+
+
+# Develop a fully qualified path for where .tcl files for the tdbc package
+# appear at run time.
+tdbc_LIB_DIR="${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}"
+
+
+
+# TODO: CONFIGURE_OUTPUTS is allegedly obsolete. How best to fix it?
+
+CONFIGURE_OUTPUTS="Makefile pkgIndex.tcl tdbcConfig.sh config.cache config.log config.status"
+
+
+# Make the export configuration for the TDBC package
+
+
+    #--------------------------------------------------------------------
+    # These are for tdbcConfig.sh
+    #--------------------------------------------------------------------
+
+    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
+    eval pkglibdir="${libdir}/tdbc${PACKAGE_VERSION}"
+    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+       eval tdbc_LIB_FLAG="-ltdbc${PACKAGE_VERSION}${DBGX}"
+       eval tdbc_STUB_LIB_FLAG="-ltdbcstub${PACKAGE_VERSION}${DBGX}"
+    else
+       eval tdbc_LIB_FLAG="-ltdbc`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+       eval tdbc_STUB_LIB_FLAG="-ltdbcstub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+    fi
+    tdbc_BUILD_LIB_SPEC="-L`pwd` ${tdbc_LIB_FLAG}"
+    tdbc_LIB_SPEC="-L${pkglibdir} ${tdbc_LIB_FLAG}"
+    tdbc_BUILD_STUB_LIB_SPEC="-L`pwd` ${tdbc_STUB_LIB_FLAG}"
+    tdbc_STUB_LIB_SPEC="-L${pkglibdir} ${tdbc_STUB_LIB_FLAG}"
+    tdbc_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}"
+    tdbc_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Set up to produce Makefile from Makefile.in and tdbcConfig.sh from
+# tdbcConfig.sh.in.
+
+ac_config_files="$ac_config_files Makefile pkgIndex.tcl tdbcConfig.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, 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.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `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, we kill variables containing newlines.
+# 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.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# 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 branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[     `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+       g
+       s/^\n//
+       s/\n/ /g
+       p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+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
+IFS=$as_save_IFS
+
+     ;;
+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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; 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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# 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
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# 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'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by tdbc $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   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 the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+tdbc config.status 1.0.3
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+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=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+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 || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
+    "tdbcConfig.sh") CONFIG_FILES="$CONFIG_FILES tdbcConfig.sh" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# 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
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries 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[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[      ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X "  :F $CONFIG_FILES      "
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # 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.  */
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+
+  esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# 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 || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+# This is a comment added to force the 'execute' permission to update
+# in the Fossil repository.
similarity index 99%
rename from pkgs/tdbc1.0.2/configure.in
rename to pkgs/tdbc1.0.3/configure.in
index 0a704ea..3c09e8a 100755 (executable)
@@ -13,7 +13,7 @@ dnl   to configure the system for the local environment.
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([tdbc], [1.0.2])
+AC_INIT([tdbc], [1.0.3])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
similarity index 96%
rename from pkgs/tdbc1.0.2/generic/tdbc.h
rename to pkgs/tdbc1.0.3/generic/tdbc.h
index 2a4dd6e..280acb3 100644 (file)
@@ -59,8 +59,8 @@ DLLIMPORT int         Tdbc_Init(Tcl_Interp* interp);
  * appear near the top of configure.in.
  */
 
-#define        TDBC_VERSION    "1.0.2"
-#define TDBC_PATCHLEVEL "1.0.2"
+#define        TDBC_VERSION    "1.0.3"
+#define TDBC_PATCHLEVEL "1.0.3"
 
 /*
  * Include the Stubs declarations for the public API, generated from
similarity index 99%
rename from pkgs/itcl4.0.2/tclconfig/tcl.m4
rename to pkgs/tdbc1.0.3/tclconfig/tcl.m4
index e7b1113..b0ae59f 100644 (file)
@@ -3369,15 +3369,15 @@ print("manifest needed")
            if test "$GCC" = "yes"; then
                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
            fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
        else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
            if test "$GCC" = "yes"; then
                PKG_LIB_FILE=lib${PKG_LIB_FILE}
            fi
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
        if test "$GCC" = "yes"; then
            PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
        fi
@@ -3391,13 +3391,13 @@ print("manifest needed")
            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}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
            RANLIB=:
        else
-           eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     fi
 
     # These are escaped so that only CFLAGS is picked up at configure time.
similarity index 98%
rename from pkgs/tdbcmysql1.0.2/ChangeLog
rename to pkgs/tdbcmysql1.0.3/ChangeLog
index b18cc3b..4fbba7c 100644 (file)
@@ -1,3 +1,9 @@
+2014-01-23  Don Porter  <dgp@users.sourceforge.net>
+
+       * configure.in:
+       * README:       Advanced version number to 1.0.3.
+       * configure:    TEA update; autoconf 2.69
+
 2014-10-23  Don Porter  <dgp@users.sourceforge.net>
 
        * configure.in:
similarity index 97%
rename from pkgs/tdbcmysql1.0.2/README
rename to pkgs/tdbcmysql1.0.3/README
index c71f43f..4d36065 100644 (file)
@@ -1,6 +1,6 @@
 README: tdbcmysql
 
-    This is the 1.0.2 source distribution of the driver for Tcl
+    This is the 1.0.3 source distribution of the driver for Tcl
     Database Connectivity (TDBC) to access MySQL databases.. TDBC and
     its drivers are available from a Fossil version control repository
     at http://tdbc.tcl.tk/
similarity index 98%
rename from pkgs/tdbcmysql1.0.2/configure
rename to pkgs/tdbcmysql1.0.3/configure
index abad4ca..41c24b7 100755 (executable)
@@ -1,11 +1,9 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for tdbcmysql 1.0.2.
+# Generated by GNU Autoconf 2.69 for tdbcmysql 1.0.3.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -134,6 +132,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -212,21 +236,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       # Preserve -v and -x to the replacement shell.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       case $- in # ((((
-         *v*x* | *x*v* ) as_opts=-vx ;;
-         *v* ) as_opts=-v ;;
-         *x* ) as_opts=-x ;;
-         * ) as_opts= ;;
-       esac
-       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -328,6 +356,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # 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 sensitive to this).
@@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -504,28 +544,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -557,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tdbcmysql'
 PACKAGE_TARNAME='tdbcmysql'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='tdbcmysql 1.0.2'
+PACKAGE_VERSION='1.0.3'
+PACKAGE_STRING='tdbcmysql 1.0.3'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1204,8 +1224,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_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
@@ -1291,7 +1309,7 @@ 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 tdbcmysql 1.0.2 to adapt to many kinds of systems.
+\`configure' configures tdbcmysql 1.0.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1352,7 +1370,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tdbcmysql 1.0.2:";;
+     short | recursive ) echo "Configuration of tdbcmysql 1.0.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1453,10 +1471,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tdbcmysql configure 1.0.2
-generated by GNU Autoconf 2.68
+tdbcmysql configure 1.0.3
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1642,7 +1660,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -1886,7 +1904,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1902,7 +1921,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1928,7 +1948,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1944,7 +1965,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1978,7 +2000,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2050,8 +2073,8 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tdbcmysql $as_me 1.0.2, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+It was created by tdbcmysql $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2480,7 +2503,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CYGPATH="cygpath -w"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2730,7 +2753,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2770,7 +2793,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2823,7 +2846,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2864,7 +2887,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_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
@@ -2922,7 +2945,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2966,7 +2989,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3412,8 +3435,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -3970,7 +3992,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4010,7 +4032,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4063,7 +4085,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4104,7 +4126,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_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
@@ -4162,7 +4184,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4206,7 +4228,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4402,8 +4424,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -4697,7 +4718,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4737,7 +4758,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4797,7 +4818,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -4863,7 +4884,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -6560,7 +6581,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6600,7 +6621,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6828,7 +6849,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="${ac_tool_prefix}ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6868,7 +6889,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7161,7 +7182,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RC="${ac_tool_prefix}windres"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7201,7 +7222,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RC="windres"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9163,15 +9184,15 @@ rm -f conftest*
            if test "$GCC" = "yes"; then
                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
            fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
        else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
            if test "$GCC" = "yes"; then
                PKG_LIB_FILE=lib${PKG_LIB_FILE}
            fi
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
        if test "$GCC" = "yes"; then
            PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
        fi
@@ -9185,13 +9206,13 @@ rm -f conftest*
            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}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
            RANLIB=:
        else
-           eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     fi
 
     # These are escaped so that only CFLAGS is picked up at configure time.
@@ -9234,7 +9255,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MT="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9764,16 +9785,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -9833,28 +9854,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -9875,8 +9884,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tdbcmysql $as_me 1.0.2, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+This file was extended by tdbcmysql $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -9928,11 +9937,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tdbcmysql config.status 1.0.2
-configured by $0, generated by GNU Autoconf 2.68,
+tdbcmysql config.status 1.0.3
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -10009,7 +10018,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
similarity index 99%
rename from pkgs/tdbcmysql1.0.2/configure.in
rename to pkgs/tdbcmysql1.0.3/configure.in
index 155d429..faeb6ee 100755 (executable)
@@ -18,7 +18,7 @@ dnl   to configure the system for the local environment.
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([tdbcmysql], [1.0.2])
+AC_INIT([tdbcmysql], [1.0.3])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
similarity index 99%
rename from pkgs/sqlite3.8.7.1/tclconfig/tcl.m4
rename to pkgs/tdbcmysql1.0.3/tclconfig/tcl.m4
index e7b1113..b0ae59f 100644 (file)
@@ -3369,15 +3369,15 @@ print("manifest needed")
            if test "$GCC" = "yes"; then
                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
            fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
        else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
            if test "$GCC" = "yes"; then
                PKG_LIB_FILE=lib${PKG_LIB_FILE}
            fi
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
        if test "$GCC" = "yes"; then
            PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
        fi
@@ -3391,13 +3391,13 @@ print("manifest needed")
            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}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
            RANLIB=:
        else
-           eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     fi
 
     # These are escaped so that only CFLAGS is picked up at configure time.
diff --git a/pkgs/tdbcodbc1.0.2/tclconfig/tcl.m4 b/pkgs/tdbcodbc1.0.2/tclconfig/tcl.m4
deleted file mode 100644 (file)
index e7b1113..0000000
+++ /dev/null
@@ -1,4180 +0,0 @@
-# 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.
-
-AC_PREREQ(2.57)
-
-dnl TEA extensions pass us the version of TEA they think they
-dnl are compatible with (must be set in TEA_INIT below)
-dnl TEA_VERSION="3.9"
-
-# Possible values for key variables defined:
-#
-# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
-# TEA_PLATFORM        - windows unix
-#
-
-#------------------------------------------------------------------------
-# 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 TEA specific: 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,
-           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 common install locations
-           if test x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
-       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,
-           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tk.framework/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/Tk.framework; 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 ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       ; do
-                   if test -f "$i/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tkconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
-       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:
-#
-#      Substitutes 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([could not find ${TCL_BIN_DIR}/tclConfig.sh])
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tcl was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tcl.framework installed in an arbitrary location.
-       case ${TCL_DEFS} in
-           *TCL_FRAMEWORK*)
-               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
-                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
-                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
-                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
-                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
-                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-    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_PATCH_LEVEL)
-    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_MSG_CHECKING([platform])
-    hold_cc=$CC; CC="$TCL_CC"
-    AC_TRY_COMPILE(,[
-           #ifdef _WIN32
-               #error win32
-           #endif
-    ], TEA_PLATFORM="unix",
-           TEA_PLATFORM="windows"
-    )
-    CC=$hold_cc
-    AC_MSG_RESULT($TEA_PLATFORM)
-
-    # The BUILD_$pkg is to define the correct extern storage class
-    # handling when making this package
-    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
-           [Building extension source?])
-    # Do this here as we have fully defined TEA_PLATFORM now
-    if test "${TEA_PLATFORM}" = "windows" ; then
-       EXEEXT=".exe"
-       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
-    fi
-
-    # TEA specific:
-    AC_SUBST(CLEANFILES)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-])
-
-#------------------------------------------------------------------------
-# 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
-
-    # eval is required to do the TK_DBGX substitution
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tk was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tk.framework installed in an arbitrary location.
-       case ${TK_DEFS} in
-           *TK_FRAMEWORK*)
-               if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
-                   for i in "`cd "${TK_BIN_DIR}"; pwd`" \
-                            "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
-                           TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
-                   TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
-                   TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TK_DBGX substitution
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    # TEA specific: Ensure windowingsystem is defined
-    if test "${TEA_PLATFORM}" = "unix" ; then
-       case ${TK_DEFS} in
-           *MAC_OSX_TK*)
-               AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
-               TEA_WINDOWINGSYSTEM="aqua"
-               ;;
-           *)
-               TEA_WINDOWINGSYSTEM="x11"
-               ;;
-       esac
-    elif test "${TEA_PLATFORM}" = "windows" ; then
-       TEA_WINDOWINGSYSTEM="win32"
-    fi
-
-    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)
-
-    # TEA specific:
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#      Determine the fully qualified path name of the tclsh executable
-#      in the Tcl build directory or the tclsh installed in a bin
-#      directory. This macro will correctly determine the name
-#      of the tclsh executable even if tclsh has not yet been
-#      built in the build directory. The tclsh found is always
-#      associated with a tclConfig.sh file. This tclsh should be used
-#      only for running extension test cases. It should never be
-#      or generation of files (like pkgIndex.tcl) at build time.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Substitutes the following vars:
-#              TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PROG_TCLSH], [
-    AC_MSG_CHECKING([for tclsh])
-    if test -f "${TCL_BIN_DIR}/Makefile" ; then
-        # tclConfig.sh is in Tcl build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
-        fi
-    else
-        # tclConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
-        fi
-        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${TCLSH_PROG}" ; then
-                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
-    fi
-    AC_MSG_RESULT([${TCLSH_PROG}])
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#      Determine the fully qualified path name of the wish executable
-#      in the Tk build directory or the wish installed in a bin
-#      directory. This macro will correctly determine the name
-#      of the wish executable even if wish has not yet been
-#      built in the build directory. The wish found is always
-#      associated with a tkConfig.sh file. This wish should be used
-#      only for running extension test cases. It should never be
-#      or generation of files (like pkgIndex.tcl) at build time.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Substitutes the following vars:
-#              WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PROG_WISH], [
-    AC_MSG_CHECKING([for wish])
-    if test -f "${TK_BIN_DIR}/Makefile" ; then
-        # tkConfig.sh is in Tk build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
-        else
-            WISH_PROG="${TK_BIN_DIR}/wish"
-        fi
-    else
-        # tkConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
-        else
-            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
-        fi
-        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${WISH_PROG}" ; then
-                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
-    fi
-    AC_MSG_RESULT([${WISH_PROG}])
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# 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,
-       AC_HELP_STRING([--enable-shared],
-           [build and link with shared libraries (default: on)]),
-       [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, 1, [Is this a 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, "no" means
-#      threads are disabled.  "yes" is the 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.
-#
-#      Note that it is legal to have a thread enabled extension run in a
-#      threaded or non-threaded Tcl core, but a non-threaded extension may
-#      only run in a non-threaded Tcl core.
-#
-# 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
-#              _THREAD_SAFE
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_ENABLE_THREADS], [
-    AC_ARG_ENABLE(threads,
-       AC_HELP_STRING([--enable-threads],
-           [build with threads]),
-       [tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_threads+set}" = set; then
-       enableval="$enable_threads"
-       tcl_ok=$enableval
-    else
-       tcl_ok=yes
-    fi
-
-    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:
-
-           # USE_THREAD_ALLOC tells us to try the special thread-based
-           # allocator that significantly reduces lock contention
-           AC_DEFINE(USE_THREAD_ALLOC, 1,
-               [Do we want to use the threaded memory allocator?])
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           if test "`uname -s`" = "SunOS" ; then
-               AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-                       [Do we really want to follow the standard? Yes we do!])
-           fi
-           AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
-           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([Do not know how to find pthread lib on your system - thread support disabled])
-                       fi
-                   fi
-               fi
-           fi
-       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, 1, [Are we building with threads enabled?])
-       AC_MSG_RESULT([yes (default)])
-    else
-       AC_MSG_RESULT([no])
-    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 Tcl
-    that IS thread-enabled.  It is recommended to use --enable-threads.])
-           fi
-           ;;
-       *)
-           if test "${TCL_THREADS}" = "1"; then
-               AC_MSG_WARN([
-    --enable-threads requested, but building against a Tcl that is NOT
-    thread-enabled.  This is an OK configuration that will also run in
-    a thread-enabled core.])
-           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
-#
-#      TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
-#      the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
-#      Requires the following vars to be set in the Makefile:
-#              CFLAGS_DEFAULT
-#              LDFLAGS_DEFAULT
-#
-# 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) -DNDEBUG" 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 TEA specific: Make sure we are initialized
-    AC_REQUIRE([TEA_CONFIG_CFLAGS])
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols,
-       AC_HELP_STRING([--enable-symbols],
-           [build with debugging symbols (default: off)]),
-       [tcl_ok=$enableval], [tcl_ok=no])
-    DBGX=""
-    if test "$tcl_ok" = "no"; then
-       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
-       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
-    # TEA specific:
-    if test "${TEA_PLATFORM}" != "windows" ; then
-       LDFLAGS_DEFAULT="${LDFLAGS}"
-    fi
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-    AC_SUBST(TCL_DBGX)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-       AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
-    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,
-       AC_HELP_STRING([--enable-langinfo],
-           [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
-       [langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-       AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-       AC_CACHE_VAL(tcl_cv_langinfo_h, [
-           AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
-                   [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
-       AC_MSG_RESULT([$tcl_cv_langinfo_h])
-       if test $tcl_cv_langinfo_h = yes; then
-           AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
-       fi
-    else
-       AC_MSG_RESULT([$langinfo_ok])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_SYSTEM
-#
-#      Determine what the system is (some things cannot be easily checked
-#      on a feature-driven basis, alas). This can usually be done via the
-#      "uname" command.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Defines the following var:
-#
-#      system -        System/platform/version identification code.
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_CONFIG_SYSTEM], [
-    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
-       # TEA specific:
-       if test "${TEA_PLATFORM}" = "windows" ; then
-           tcl_cv_sys_version=windows
-       else
-           tcl_cv_sys_version=`uname -s`-`uname -r`
-           if test "$?" -ne 0 ; then
-               AC_MSG_WARN([can't find uname command])
-               tcl_cv_sys_version=unknown
-           else
-               if test "`uname -s`" = "AIX" ; then
-                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
-               fi
-           fi
-       fi
-    ])
-    system=$tcl_cv_sys_version
-])
-
-#--------------------------------------------------------------------
-# 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 and substitutes the following vars:
-#
-#      DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
-#       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. Could
-#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
-#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/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 defaults to
-#                       "${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.
-#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
-#                       in a static or 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 a shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
-#      CFLAGS_DEBUG -
-#                      Flags used when running the compiler in debug mode
-#      CFLAGS_OPTIMIZE -
-#                      Flags used when running the compiler in optimize mode
-#      CFLAGS -        Additional CFLAGS added as necessary (usually 64-bit)
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_CONFIG_CFLAGS], [
-    dnl TEA specific: Make sure we are initialized
-    AC_REQUIRE([TEA_INIT])
-
-    # Step 0.a: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is requested])
-    AC_ARG_ENABLE(64bit,
-       AC_HELP_STRING([--enable-64bit],
-           [enable 64bit support (default: off)]),
-       [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,
-       AC_HELP_STRING([--enable-64bit-vis],
-           [enable 64bit Sparc VIS support (default: off)]),
-       [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-    # Force 64bit on with VIS
-    AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes])
-
-    # Step 0.c: Check if visibility support is available. Do this here so
-    # that platform specific alternatives can be used below if this fails.
-
-    AC_CACHE_CHECK([if compiler supports visibility "hidden"],
-       tcl_cv_cc_visibility_hidden, [
-       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
-       AC_TRY_LINK([
-           extern __attribute__((__visibility__("hidden"))) void f(void);
-           void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
-           tcl_cv_cc_visibility_hidden=no)
-       CFLAGS=$hold_cflags])
-    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
-       AC_DEFINE(MODULE_SCOPE,
-           [extern __attribute__((__visibility__("hidden")))],
-           [Compiler support for module scope symbols])
-       AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
-    ])
-
-    # Step 0.d: Disable -rpath support?
-
-    AC_MSG_CHECKING([if rpath support is requested])
-    AC_ARG_ENABLE(rpath,
-       AC_HELP_STRING([--disable-rpath],
-           [disable rpath support (default: on)]),
-       [doRpath=$enableval], [doRpath=yes])
-    AC_MSG_RESULT([$doRpath])
-
-    # TEA specific: Cross-compiling options for Windows/CE builds?
-
-    AS_IF([test "${TEA_PLATFORM}" = windows], [
-       AC_MSG_CHECKING([if Windows/CE build is requested])
-       AC_ARG_ENABLE(wince,
-           AC_HELP_STRING([--enable-wince],
-               [enable Win/CE support (where applicable)]),
-           [doWince=$enableval], [doWince=no])
-       AC_MSG_RESULT([$doWince])
-    ])
-
-    # Set the variable "system" to hold the name and version number
-    # for the system.
-
-    TEA_CONFIG_SYSTEM
-
-    # Require ranlib early so we can override it in special cases below.
-
-    AC_REQUIRE([AC_PROG_RANLIB])
-
-    # 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 removed some core-only vars.
-
-    do64bit_ok=no
-    # default to '{$LIBS}' and set to "" on per-platform necessary basis
-    SHLIB_LD_LIBS='${LIBS}'
-    # When ld needs options to work in 64-bit mode, put them in
-    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
-    # is disabled by the user. [Bug 1016796]
-    LDFLAGS_ARCH=""
-    UNSHARED_LIB_SUFFIX=""
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    AS_IF([test "$GCC" = yes], [
-       CFLAGS_OPTIMIZE=-O2
-       CFLAGS_WARNING="-Wall"
-    ], [
-       CFLAGS_OPTIMIZE=-O
-       CFLAGS_WARNING=""
-    ])
-    AC_CHECK_TOOL(AR, ar)
-    STLIB_LD='${AR} cr'
-    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
-    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION=""],[SHLIB_VERSION=".$SHLIB_VERSION"])
-    case $system in
-       # TEA specific:
-       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.
-           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
-           # MACHINE is IX86 for LINK, but this is used by the manifest,
-           # which requires x86|amd64|ia64.
-           MACHINE="X86"
-           if test "$do64bit" != "no" ; then
-               if test "x${MSSDK}x" = "xx" ; then
-                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
-               fi
-               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
-               PATH64=""
-               case "$do64bit" in
-                   amd64|x64|yes)
-                       MACHINE="AMD64" ; # default to AMD64 64-bit build
-                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
-                       ;;
-                   ia64)
-                       MACHINE="IA64"
-                       PATH64="${MSSDK}/Bin/Win64"
-                       ;;
-               esac
-               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
-                   AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
-                   AC_MSG_WARN([Ensure latest Platform SDK is installed])
-                   do64bit="no"
-               else
-                   AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
-                   do64bit_ok="yes"
-               fi
-           fi
-
-           if test "$doWince" != "no" ; then
-               if test "$do64bit" != "no" ; 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
-               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
-               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
-               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" != "no" ; then
-                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
-                   CC="\"${PATH64}/cl.exe\""
-                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
-                   RC="\"${MSSDK}/bin/rc.exe\""
-                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
-                   LINKBIN="\"${PATH64}/link.exe\""
-                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
-                   # Avoid 'unresolved external symbol __security_cookie'
-                   # errors, c.f. http://support.microsoft.com/?id=894573
-                   TEA_ADD_LIBS([bufferoverflowU.lib])
-               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, 1, [WinCE def ]$i)
-                   done
-                   AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
-                   AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
-                   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
-               AC_CHECK_TOOL(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}"
-
-               AC_CACHE_CHECK(for cross-compile version of gcc,
-                       ac_cv_cross,
-                       AC_TRY_COMPILE([
-                           #ifdef _WIN32
-                               #error cross-compiler
-                           #endif
-                       ], [],
-                       ac_cv_cross=yes,
-                       ac_cv_cross=no)
-                     )
-                     if test "$ac_cv_cross" = "yes"; then
-                       case "$do64bit" in
-                           amd64|x64|yes)
-                               CC="x86_64-w64-mingw32-gcc"
-                               LD="x86_64-w64-mingw32-ld"
-                               AR="x86_64-w64-mingw32-ar"
-                               RANLIB="x86_64-w64-mingw32-ranlib"
-                               RC="x86_64-w64-mingw32-windres"
-                           ;;
-                           *)
-                               CC="i686-w64-mingw32-gcc"
-                               LD="i686-w64-mingw32-ld"
-                               AR="i686-w64-mingw32-ar"
-                               RANLIB="i686-w64-mingw32-ranlib"
-                               RC="i686-w64-mingw32-windres"
-                           ;;
-                       esac
-               fi
-
-           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
-               # and also
-               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
-               # This essentially turns it all on.
-               LDFLAGS_DEBUG="-debug -debugtype:cv"
-               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_SUFFIX=".dll"
-           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
-
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       AIX-*)
-           AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
-               # AIX requires the _r compiler when gcc isn't being used
-               case "${CC}" in
-                   *_r|*_r\ *)
-                       # ok ...
-                       ;;
-                   *)
-                       # Make sure only first arg gets _r
-                       CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
-                       ;;
-               esac
-               AC_MSG_RESULT([Using $CC for compiling with threads])
-           ])
-           LIBS="$LIBS -lc"
-           SHLIB_CFLAGS=""
-           SHLIB_SUFFIX=".so"
-
-           LD_LIBRARY_PATH_VAR="LIBPATH"
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = yes], [
-               AS_IF([test "$GCC" = yes], [
-                   AC_MSG_WARN([64bit mode not supported with GCC on $system])
-               ], [
-                   do64bit_ok=yes
-                   CFLAGS="$CFLAGS -q64"
-                   LDFLAGS_ARCH="-q64"
-                   RANLIB="${RANLIB} -X64"
-                   AR="${AR} -X64"
-                   SHLIB_LD_FLAGS="-b64"
-               ])
-           ])
-
-           AS_IF([test "`uname -m`" = ia64], [
-               # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               AS_IF([test "$GCC" = yes], [
-                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               ], [
-                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-               ])
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-           ], [
-               AS_IF([test "$GCC" = yes], [
-                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
-               ], [
-                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
-                   LDFLAGS="$LDFLAGS -brtl"
-               ])
-               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
-               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ])
-           ;;
-       BeOS*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -nostart'
-           SHLIB_SUFFIX=".so"
-
-           #-----------------------------------------------------------
-           # Check for inet_ntoa in -lbind, for BeOS (which also needs
-           # -lsocket, even if the network functions are in -lnet which
-           # is always linked to, for compatibility.
-           #-----------------------------------------------------------
-           AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
-           ;;
-       BSD/OS-4.*)
-           SHLIB_CFLAGS="-export-dynamic -fPIC"
-           SHLIB_LD='${CC} -shared'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       CYGWIN_*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD='${CC} -shared'
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
-           SHLIB_SUFFIX=".dll"
-           EXEEXT=".exe"
-           do64bit_ok=yes
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       Haiku*)
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
-           AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
-           ;;
-       HP-UX-*.11.*)
-           # Use updated header definitions where possible
-           AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
-           # TEA specific: Needed by Tcl, but not most extensions
-           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
-           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
-
-           AS_IF([test "`uname -m`" = ia64], [
-               SHLIB_SUFFIX=".so"
-               # Use newer C++ library for C++ extensions
-               #if test "$GCC" != "yes" ; then
-               #   CPPFLAGS="-AA"
-               #fi
-           ], [
-               SHLIB_SUFFIX=".sl"
-           ])
-           AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-           AS_IF([test "$tcl_ok" = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-E"
-               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
-               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
-           ])
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ], [
-               CFLAGS="$CFLAGS -z"
-               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-               #CFLAGS="$CFLAGS +DAportable"
-               SHLIB_CFLAGS="+z"
-               SHLIB_LD="ld -b"
-           ])
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = "yes"], [
-               AS_IF([test "$GCC" = yes], [
-                   case `${CC} -dumpmachine` in
-                       hppa64*)
-                           # 64-bit gcc in use.  Fix flags for GNU ld.
-                           do64bit_ok=yes
-                           SHLIB_LD='${CC} -shared'
-                           AS_IF([test $doRpath = yes], [
-                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-                           ;;
-                       *)
-                           AC_MSG_WARN([64bit mode not supported with GCC on $system])
-                           ;;
-                   esac
-               ], [
-                   do64bit_ok=yes
-                   CFLAGS="$CFLAGS +DD64"
-                   LDFLAGS_ARCH="+DD64"
-               ])
-           ]) ;;
-       IRIX-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-           AS_IF([test "$GCC" = yes], [
-               CFLAGS="$CFLAGS -mabi=n32"
-               LDFLAGS="$LDFLAGS -mabi=n32"
-           ], [
-               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"
-           ])
-           ;;
-       IRIX64-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-
-           # Check to enable 64-bit flags for compiler/linker
-
-           AS_IF([test "$do64bit" = yes], [
-               AS_IF([test "$GCC" = yes], [
-                   AC_MSG_WARN([64bit mode not supported by gcc])
-               ], [
-                   do64bit_ok=yes
-                   SHLIB_LD="ld -64 -shared -rdata_shared"
-                   CFLAGS="$CFLAGS -64"
-                   LDFLAGS_ARCH="-64"
-               ])
-           ])
-           ;;
-       Linux*|GNU*|NetBSD-Debian)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-
-           # TEA specific:
-           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
-
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
-           AS_IF([test $do64bit = yes], [
-               AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
-                   hold_cflags=$CFLAGS
-                   CFLAGS="$CFLAGS -m64"
-                   AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
-                   CFLAGS=$hold_cflags])
-               AS_IF([test $tcl_cv_cc_m64 = yes], [
-                   CFLAGS="$CFLAGS -m64"
-                   do64bit_ok=yes
-               ])
-          ])
-
-           # 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.
-
-           AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
-           ;;
-       Lynx*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           CFLAGS_OPTIMIZE=-02
-           SHLIB_LD='${CC} -shared'
-           LD_FLAGS="-Wl,--export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           ;;
-       OpenBSD-*)
-           arch=`arch -s`
-           case "$arch" in
-           vax)
-               SHLIB_SUFFIX=""
-               SHARED_LIB_SUFFIX=""
-               LDFLAGS=""
-               ;;
-           *)
-               case "$arch" in
-               alpha|sparc64)
-                   SHLIB_CFLAGS="-fPIC"
-                   ;;
-               *)
-                   SHLIB_CFLAGS="-fpic"
-                   ;;
-               esac
-               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-               SHLIB_SUFFIX=".so"
-               AS_IF([test $doRpath = yes], [
-                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
-               LDFLAGS="-Wl,-export-dynamic"
-               ;;
-           esac
-           case "$arch" in
-           vax)
-               CFLAGS_OPTIMIZE="-O1"
-               ;;
-           *)
-               CFLAGS_OPTIMIZE="-O2"
-               ;;
-           esac
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # On OpenBSD:   Compile with -pthread
-               #               Don't link with -lpthread
-               LIBS=`echo $LIBS | sed s/-lpthread//`
-               CFLAGS="$CFLAGS -pthread"
-           ])
-           # OpenBSD doesn't do version numbers with dots.
-           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       NetBSD-*)
-           # NetBSD has ELF and can use 'cc -shared' to build shared libs
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # The -pthread needs to go in the CFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS -pthread"
-               LDFLAGS="$LDFLAGS -pthread"
-           ])
-           ;;
-       FreeBSD-*)
-           # This configuration from FreeBSD Ports.
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD="${CC} -shared"
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
-           SHLIB_SUFFIX=".so"
-           LDFLAGS=""
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # The -pthread needs to go in the LDFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
-           case $system in
-           FreeBSD-3.*)
-               # Version numbers are dot-stripped by system policy.
-               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
-               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
-               TCL_LIB_VERSIONS_OK=nodots
-               ;;
-           esac
-           ;;
-       Darwin-*)
-           CFLAGS_OPTIMIZE="-Os"
-           SHLIB_CFLAGS="-fno-common"
-           # To avoid discrepancies between what headers configure sees during
-           # preprocessing tests and compiling tests, move any -isysroot and
-           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
-           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
-           CFLAGS="`echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
-           AS_IF([test $do64bit = yes], [
-               case `arch` in
-                   ppc)
-                       AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
-                               tcl_cv_cc_arch_ppc64, [
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
-                                   tcl_cv_cc_arch_ppc64=no)
-                           CFLAGS=$hold_cflags])
-                       AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           do64bit_ok=yes
-                       ]);;
-                   i386)
-                       AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
-                               tcl_cv_cc_arch_x86_64, [
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
-                                   tcl_cv_cc_arch_x86_64=no)
-                           CFLAGS=$hold_cflags])
-                       AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           do64bit_ok=yes
-                       ]);;
-                   *)
-                       AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
-               esac
-           ], [
-               # Check for combined 32-bit and 64-bit fat build
-               AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
-                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
-                   fat_32_64=yes])
-           ])
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_single_module = yes], [
-               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
-           ])
-           # TEA specific: link shlib with current and compatibility version flags
-           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
-           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
-           SHLIB_SUFFIX=".dylib"
-           # Don't use -prebind when building for Mac OS X 10.4 or later only:
-           AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
-               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
-               LDFLAGS="$LDFLAGS -prebind"])
-           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
-           AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
-                   tcl_cv_ld_search_paths_first, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
-                       tcl_cv_ld_search_paths_first=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-           ])
-           AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
-               AC_DEFINE(MODULE_SCOPE, [__private_extern__],
-                   [Compiler support for module scope symbols])
-               tcl_cv_cc_visibility_hidden=yes
-           ])
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-           # TEA specific: for combined 32 & 64 bit fat builds of Tk
-           # extensions, verify that 64-bit build is possible.
-           AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
-               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [
-                   AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
-                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
-                       AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();],
-                           tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no)
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done])
-               ])
-               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [
-                   AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
-                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
-                       AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);],
-                           tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no)
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done])
-               ])
-               # remove 64-bit arch flags from CFLAGS et al. if configuration
-               # does not support 64-bit.
-               AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
-                   AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
-                   for v in CFLAGS CPPFLAGS LDFLAGS; do
-                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
-                   done])
-           ])
-           ;;
-       OS/390-*)
-           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
-           AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
-               [Should OS/390 do the right thing with sockets?])
-           ;;
-       OSF1-V*)
-           # Digital OSF/1
-           SHLIB_CFLAGS=""
-           AS_IF([test "$SHARED_BUILD" = 1], [
-               SHLIB_LD='ld -shared -expect_unresolved "*"'
-           ], [
-               SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-           ])
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-           AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
-               CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
-           # see pthread_intro(3) for pthread support on osf1, k.furukawa
-           AS_IF([test "${TCL_THREADS}" = 1], [
-               CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-               CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-               LIBS=`echo $LIBS | sed s/-lpthreads//`
-               AS_IF([test "$GCC" = yes], [
-                   LIBS="$LIBS -lpthread -lmach -lexc"
-               ], [
-                   CFLAGS="$CFLAGS -pthread"
-                   LDFLAGS="$LDFLAGS -pthread"
-               ])
-           ])
-           ;;
-       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"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SCO_SV-3.2*)
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_CFLAGS="-fPIC -melf"
-               LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
-           ], [
-               SHLIB_CFLAGS="-Kpic -belf"
-               LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
-           ])
-           SHLIB_LD="ld -G"
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SunOS-5.[[0-6]])
-           # Careful to not let 5.10+ fall into this case
-
-           # Note: If _REENTRANT isn't defined, then Solaris
-           # won't define thread-safe library routines.
-
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-               [Do we really want to follow the standard? Yes we do!])
-
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ], [
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ])
-           ;;
-       SunOS-5*)
-           # Note: If _REENTRANT isn't defined, then Solaris
-           # won't define thread-safe library routines.
-
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-               [Do we really want to follow the standard? Yes we do!])
-
-           SHLIB_CFLAGS="-KPIC"
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = yes], [
-               arch=`isainfo`
-               AS_IF([test "$arch" = "sparcv9 sparc"], [
-                   AS_IF([test "$GCC" = yes], [
-                       AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
-                           AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
-                       ], [
-                           do64bit_ok=yes
-                           CFLAGS="$CFLAGS -m64 -mcpu=v9"
-                           LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
-                           SHLIB_CFLAGS="-fPIC"
-                       ])
-                   ], [
-                       do64bit_ok=yes
-                       AS_IF([test "$do64bitVIS" = yes], [
-                           CFLAGS="$CFLAGS -xarch=v9a"
-                           LDFLAGS_ARCH="-xarch=v9a"
-                       ], [
-                           CFLAGS="$CFLAGS -xarch=v9"
-                           LDFLAGS_ARCH="-xarch=v9"
-                       ])
-                       # Solaris 64 uses this as well
-                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
-                   ])
-               ], [AS_IF([test "$arch" = "amd64 i386"], [
-                   AS_IF([test "$GCC" = yes], [
-                       case $system in
-                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
-                               do64bit_ok=yes
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               AC_MSG_WARN([64bit mode not supported with GCC on $system]);;
-                       esac
-                   ], [
-                       do64bit_ok=yes
-                       case $system in
-                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               CFLAGS="$CFLAGS -xarch=amd64"
-                               LDFLAGS="$LDFLAGS -xarch=amd64";;
-                       esac
-                   ])
-               ], [AC_MSG_WARN([64bit mode not supported for $arch])])])
-           ])
-
-           SHLIB_SUFFIX=".so"
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               AS_IF([test "$do64bit_ok" = yes], [
-                   AS_IF([test "$arch" = "sparcv9 sparc"], [
-                       # 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` | ..."
-                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
-                   ], [AS_IF([test "$arch" = "amd64 i386"], [
-                       # JH: static-libgcc is necessary for core Tcl, but may
-                       # not be necessary for extensions.
-                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
-                   ])])
-               ])
-           ], [
-               case $system in
-                   SunOS-5.[[1-9]][[0-9]]*)
-                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
-                   *)
-                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
-               esac
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-           ])
-           ;;
-       UNIX_SV* | UnixWare-5*)
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_LD='${CC} -G'
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-           # that don't grok the -Bexport option.  Test that it does.
-           AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_Bexport = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-           ])
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-    esac
-
-    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
-       AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
-    ])
-
-dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
-dnl # until the end of configure, as configure's compile and link tests use
-dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
-dnl # preprocessing tests use only CPPFLAGS.
-    AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
-
-    # Add in the arch flags late to ensure it wasn't removed.
-    # Not necessary in TEA, but this is aligned with core
-    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
-
-    # 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.
-
-    AS_IF([test "$GCC" = yes], [
-       case $system in
-           AIX-*) ;;
-           BSD/OS*) ;;
-           CYGWIN_*|MINGW32_*) ;;
-           IRIX*) ;;
-           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
-           Darwin-*) ;;
-           SCO_SV-3.2*) ;;
-           windows) ;;
-           *) SHLIB_CFLAGS="-fPIC" ;;
-       esac])
-
-    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
-       AC_DEFINE(MODULE_SCOPE, [extern],
-           [No Compiler support for module scope symbols])
-    ])
-
-    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
-    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
-
-    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
-       AC_CACHE_CHECK(for SEH support in compiler,
-           tcl_cv_seh,
-       AC_TRY_RUN([
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-           int main(int argc, char** argv) {
-               int a, b = 0;
-               __try {
-                   a = 666 / b;
-               }
-               __except (EXCEPTION_EXECUTE_HANDLER) {
-                   return 0;
-               }
-               return 1;
-           }
-       ],
-           tcl_cv_seh=yes,
-           tcl_cv_seh=no,
-           tcl_cv_seh=no)
-       )
-       if test "$tcl_cv_seh" = "no" ; then
-           AC_DEFINE(HAVE_NO_SEH, 1,
-                   [Defined when mingw does not support SEH])
-       fi
-
-       #
-       # Check to see if the excpt.h include file provided contains the
-       # definition for EXCEPTION_DISPOSITION; if not, which is the case
-       # with Cygwin's version as of 2002-04-10, define it to be int,
-       # sufficient for getting the current code to work.
-       #
-       AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
-           tcl_cv_eh_disposition,
-           AC_TRY_COMPILE([
-#          define WIN32_LEAN_AND_MEAN
-#          include <windows.h>
-#          undef WIN32_LEAN_AND_MEAN
-           ],[
-               EXCEPTION_DISPOSITION x;
-           ],
-               tcl_cv_eh_disposition=yes,
-               tcl_cv_eh_disposition=no)
-       )
-       if test "$tcl_cv_eh_disposition" = "no" ; then
-       AC_DEFINE(EXCEPTION_DISPOSITION, int,
-               [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
-       fi
-
-       # Check to see if winnt.h defines CHAR, SHORT, and LONG
-       # even if VOID has already been #defined. The win32api
-       # used by mingw and cygwin is known to do this.
-
-       AC_CACHE_CHECK(for winnt.h that ignores VOID define,
-           tcl_cv_winnt_ignore_void,
-           AC_TRY_COMPILE([
-#define VOID void
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-           ], [
-               CHAR c;
-               SHORT s;
-               LONG l;
-           ],
-        tcl_cv_winnt_ignore_void=yes,
-        tcl_cv_winnt_ignore_void=no)
-       )
-       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
-           AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
-                   [Defined when cygwin/mingw ignores VOID define in winnt.h])
-       fi
-    fi
-
-       # See if the compiler supports casting to a union type.
-       # This is used to stop gcc from printing a compiler
-       # warning when initializing a union member.
-
-       AC_CACHE_CHECK(for cast to union support,
-           tcl_cv_cast_to_union,
-           AC_TRY_COMPILE([],
-           [
-                 union foo { int i; double d; };
-                 union foo f = (union foo) (int) 0;
-           ],
-           tcl_cv_cast_to_union=yes,
-           tcl_cv_cast_to_union=no)
-       )
-       if test "$tcl_cv_cast_to_union" = "yes"; then
-           AC_DEFINE(HAVE_CAST_TO_UNION, 1,
-                   [Defined when compiler supports casting to union type.])
-       fi
-
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(SHLIB_CFLAGS)
-
-    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_CACHE_CHECK([termios vs. termio vs. sgtty], 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=no, tcl_cv_api_serial=no)
-    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, 1, [Use the termios API for serial lines]);;
-       termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
-       sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#      Supply substitutes for missing POSIX header files.  Special
-#      notes:
-#          - stdlib.h doesn't define strtol, strtoul, or
-#            strtod in some 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_CACHE_CHECK([dirent.h], tcl_cv_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_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
-
-    if test $tcl_cv_dirent_h = no; then
-       AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
-    fi
-
-    # TEA specific:
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
-    AC_CHECK_HEADER(limits.h,
-       [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
-       [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <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, 1, [Do we have <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, 1, [Do we have <string.h>?])
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <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
-#              PKG_LIBS (appends to)
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_PATH_X], [
-    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
-       TEA_PATH_UNIX_X
-    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/Xlib.h>], , not_really_there="yes")
-       else
-           if test ! -r $x_includes/X11/Xlib.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])
-       found_xincludes="no"
-       AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
-       if test "$found_xincludes" = "no"; 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/Xlib.h; then
-                   AC_MSG_RESULT([$i])
-                   XINCLUDES=" -I$i"
-                   found_xincludes="yes"
-                   break
-               fi
-           done
-       fi
-    else
-       if test "$x_includes" != ""; then
-           XINCLUDES="-I$x_includes"
-           found_xincludes="yes"
-       fi
-    fi
-    if test "$found_xincludes" = "no"; then
-       AC_MSG_RESULT([couldn't find any!])
-    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 -o -r $i/libX11.dylib; 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
-    # TEA specific:
-    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)
-    TEA_CONFIG_SYSTEM
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    case $system in
-       OSF*)
-           AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
-           AC_MSG_RESULT([FIONBIO])
-           ;;
-       *)
-           AC_MSG_RESULT([O_NONBLOCK])
-           ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANDLER
-#
-#      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_CACHE_CHECK([tm_tzadj in struct tm], 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)])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-       AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
-    fi
-
-    AC_CACHE_CHECK([tm_gmtoff in struct tm], 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)])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-       AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
-       AC_TRY_COMPILE([#include <time.h>],
-           [extern long timezone;
-           timezone += 1;
-           exit (0);],
-           tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
-    if test $tcl_cv_timezone_long = yes ; then
-       AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
-    else
-       #
-       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-       #
-       AC_CACHE_CHECK([time_t timezone variable], 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)])
-       if test $tcl_cv_timezone_time = yes ; then
-           AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
-       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_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
-           AC_TRY_RUN([
-               extern double strtod();
-               int main() {
-                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
-                   char *term;
-                   double value;
-                   value = strtod(infString, &term);
-                   if ((term != infString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(nanString, &term);
-                   if ((term != nanString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(spaceString, &term);
-                   if (term == (spaceString+1)) {
-                       exit(1);
-                   }
-                   exit(0);
-               }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
-                   tcl_cv_strtod_buggy=buggy)])
-       if test "$tcl_cv_strtod_buggy" = buggy; then
-           AC_LIBOBJ([fixstrtod])
-           USE_COMPAT=1
-           AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
-       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 (not in TEA, only needed in core)
-#              LIBS
-#              MATH_LIBS
-#
-# Results:
-#
-#      Substitutes the following vars:
-#              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, 1, [Do we 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"])])
-
-    # TEA specific: 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
-#              _LARGEFILE_SOURCE64
-#--------------------------------------------------------------------
-
-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, 1, [Add the ]$1[ flag when building])
-       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);])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
-       [char *p = (char *)open64;])
-    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, 1, [Are wide integers to be implemented with C 'long's?])
-       AC_MSG_RESULT([using long])
-    elif test "${tcl_cv_type_64bit}" = "__int64" \
-               -a "${TEA_PLATFORM}" = "windows" ; then
-       # TEA specific: 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},
-           [What type should be used to define wide integers?])
-       AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-       # Now check for auxiliary declarations
-       AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
-           AC_TRY_COMPILE([#include <sys/types.h>
-#include <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, 1, [Is 'struct dirent64' in <sys/types.h>?])
-       fi
-
-       AC_CACHE_CHECK([for struct stat64], 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, 1, [Is 'struct stat64' in <sys/stat.h>?])
-       fi
-
-       AC_CHECK_FUNCS(open64 lseek64)
-       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)])
-       dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
-       dnl functions lseek64 and open64 are defined.
-       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
-               test "x${ac_cv_func_lseek64}" = "xyes" && \
-               test "x${ac_cv_func_open64}" = "xyes" ; then
-           AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
-           AC_MSG_RESULT([yes])
-       else
-           AC_MSG_RESULT([no])
-       fi
-    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_VERSION
-#              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.9"
-
-    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
-
-    # If the user did not set CFLAGS, set it now to keep macros
-    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-       CFLAGS=""
-    fi
-
-    case "`uname -s`" in
-       *win32*|*WIN32*|*MINGW32_*)
-           AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-           EXEEXT=".exe"
-           TEA_PLATFORM="windows"
-           ;;
-       *CYGWIN_*)
-           CYGPATH=echo
-           EXEEXT=".exe"
-           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
-           ;;
-       *)
-           CYGPATH=echo
-           # Maybe we are cross-compiling....
-           case ${host_alias} in
-               *mingw32*)
-               EXEEXT=".exe"
-               TEA_PLATFORM="windows"
-               ;;
-           *)
-               EXEEXT=""
-               TEA_PLATFORM="unix"
-               ;;
-           esac
-           ;;
-    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_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}])
-
-    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
-               # To add more dirs here (like 'src'), you have to update VPATH
-               # in Makefile.in as well
-               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
-                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-                   -a ! -f "${srcdir}/macosx/$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" \
-           -a ! -f "${srcdir}/macosx/$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_ADD_CLEANFILES --
-#
-#      Specify one or more CLEANFILES.
-#
-# Arguments:
-#      one or more file names to clean target
-#
-# Results:
-#
-#      Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG
-#------------------------------------------------------------------------
-AC_DEFUN([TEA_ADD_CLEANFILES], [
-    CLEANFILES="$CLEANFILES $@"
-])
-
-#------------------------------------------------------------------------
-# 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.
-
-    AC_PROG_CC
-    AC_PROG_CPP
-
-    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
-    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
-    INSTALL_DATA='${INSTALL} -m 644'
-    INSTALL_PROGRAM='${INSTALL}'
-    INSTALL_SCRIPT='${INSTALL}'
-    INSTALL_LIBRARY='${INSTALL_DATA}'
-
-    AC_SUBST(INSTALL)
-    AC_SUBST(INSTALL_DATA_DIR)
-    AC_SUBST(INSTALL_DATA)
-    AC_SUBST(INSTALL_PROGRAM)
-    AC_SUBST(INSTALL_SCRIPT)
-    AC_SUBST(INSTALL_LIBRARY)
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_CHECK_TOOL(RANLIB, 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_CACHE_CHECK([if the compiler understands -pipe],
-           tcl_cv_cc_pipe, [
-           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
-           AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
-           CFLAGS=$hold_cflags])
-       if test $tcl_cv_cc_pipe = yes; then
-           CFLAGS="$CFLAGS -pipe"
-       fi
-    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
-#      VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
-#      VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
-#------------------------------------------------------------------------
-
-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)"
-       AC_EGREP_CPP([manifest needed], [
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-print("manifest needed")
-#endif
-       ], [
-       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
-       VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
-       VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
-       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
-       TEA_ADD_CLEANFILES([*.manifest])
-       ])
-       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
-           if test x"${TK_BIN_DIR}" != x ; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-           fi
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-           if test "$GCC" = "yes"; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
-           fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-       else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-           if test "$GCC" = "yes"; then
-               PKG_LIB_FILE=lib${PKG_LIB_FILE}
-           fi
-       fi
-       # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
-       if test "$GCC" = "yes"; then
-           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
-       fi
-       # 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 their 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)
-    AC_SUBST(VC_MANIFEST_EMBED_DLL)
-    AC_SUBST(VC_MANIFEST_EMBED_EXE)
-])
-
-#------------------------------------------------------------------------
-# 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/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
-           `ls -dr /usr/lib64/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:
-#
-#      Substitutes the following vars:
-#              TCL_TOP_DIR_NATIVE
-#              TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
-    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
-    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
-    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
-
-    # Check to see if tcl<Plat>Port.h isn't already with the public headers
-    # Don't look for tclInt.h because that resides with tcl.h in the core
-    # sources, but the <plat>Port headers are in a different directory
-    if test "${TEA_PLATFORM}" = "windows" -a \
-       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
-       result="private headers found with public headers"
-    elif test "${TEA_PLATFORM}" = "unix" -a \
-       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
-       result="private headers found with public headers"
-    else
-       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
-       if test "${TEA_PLATFORM}" = "windows"; then
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
-       else
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
-       fi
-       # Overwrite the previous TCL_INCLUDES as this should capture both
-       # public and private headers in the same set.
-       # We want to ensure these are substituted so as not to require
-       # any *_NATIVE vars be defined in the Makefile
-       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-       if test "`uname -s`" = "Darwin"; then
-            # If Tcl was built as a framework, attempt to use
-            # the framework's Headers and PrivateHeaders directories
-            case ${TCL_DEFS} in
-               *TCL_FRAMEWORK*)
-                   if test -d "${TCL_BIN_DIR}/Headers" -a \
-                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
-                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
-                   else
-                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
-                   fi
-                   ;;
-           esac
-           result="Using ${TCL_INCLUDES}"
-       else
-           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
-               AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
-           fi
-           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
-       fi
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([${result}])
-])
-
-#------------------------------------------------------------------------
-# 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.
-#
-#      Substitutes 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
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tcl was built as a framework, attempt to use
-               # the framework's Headers directory
-               case ${TCL_DEFS} in
-                   *TCL_FRAMEWORK*)
-                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tcl is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TCL_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$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`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TCL_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           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:
-#
-#      Substitutes the following vars:
-#              TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
-    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
-    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
-    AC_MSG_CHECKING([for Tk private include files])
-
-    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
-    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
-
-    # Check to see if tk<Plat>Port.h isn't already with the public headers
-    # Don't look for tkInt.h because that resides with tk.h in the core
-    # sources, but the <plat>Port headers are in a different directory
-    if test "${TEA_PLATFORM}" = "windows" -a \
-       -f "${ac_cv_c_tkh}/tkWinPort.h"; then
-       result="private headers found with public headers"
-    elif test "${TEA_PLATFORM}" = "unix" -a \
-       -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
-       result="private headers found with public headers"
-    else
-       TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
-       TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
-       if test "${TEA_PLATFORM}" = "windows"; then
-           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
-       else
-           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
-       fi
-       # Overwrite the previous TK_INCLUDES as this should capture both
-       # public and private headers in the same set.
-       # We want to ensure these are substituted so as not to require
-       # any *_NATIVE vars be defined in the Makefile
-       TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-       # Detect and add ttk subdir
-       if test -d "${TK_SRC_DIR}/generic/ttk"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
-       fi
-       if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
-       fi
-       if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
-       fi
-       if test "`uname -s`" = "Darwin"; then
-           # If Tk was built as a framework, attempt to use
-           # the framework's Headers and PrivateHeaders directories
-           case ${TK_DEFS} in
-               *TK_FRAMEWORK*)
-                       if test -d "${TK_BIN_DIR}/Headers" -a \
-                               -d "${TK_BIN_DIR}/PrivateHeaders"; then
-                           TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
-                       else
-                           TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
-                       fi
-                       ;;
-           esac
-           result="Using ${TK_INCLUDES}"
-       else
-           if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
-              AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
-           fi
-           result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
-       fi
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([${result}])
-])
-
-#------------------------------------------------------------------------
-# 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.
-#
-#      Substitutes 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
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tk was built as a framework, attempt to use
-               # the framework's Headers directory.
-               case ${TK_DEFS} in
-                   *TK_FRAMEWORK*)
-                       list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tk is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TK_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tk's --prefix location,
-           # relative to directory of tkConfig.sh, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$list \
-               `ls -d ${temp_includedir}        2>/dev/null` \
-               `ls -d ${TK_PREFIX}/include      2>/dev/null` \
-               `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
-               `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-               `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TK_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           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_WINDOWINGSYSTEM}" != "x11"; then
-       # On Windows and Aqua, 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_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 ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 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:
-#
-#      Substitutes 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}
-        $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
-        $1_LIBRARY_PATH=${$1_LIBRARY_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)
-
-    # Allow the caller to prevent this auto-check by specifying any 2nd arg
-    AS_IF([test "x$2" = x], [
-       # Check both upper and lower-case variants
-       # If a dev wanted non-stubs libs, this function could take an option
-       # to not use _STUB in the paths below
-       AS_IF([test "x${$1_STUB_LIB_SPEC}" = x],
-           [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
-           [TEA_LOAD_CONFIG_LIB($1_STUB)])
-    ])
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG_LIB --
-#
-#      Helper function to load correct library from another extension's
-#      ${PACKAGE}Config.sh.
-#
-# Results:
-#      Adds to LIBS the appropriate extension library
-#------------------------------------------------------------------------
-AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
-    AC_MSG_CHECKING([For $1 library for LIBS])
-    # This simplifies the use of stub libraries by automatically adding
-    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
-    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
-    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
-    if test "x${$1_LIB_SPEC}" != "x" ; then
-       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-           TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"])
-           AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}])
-       else
-           TEA_ADD_LIBS([${$1_LIB_SPEC}])
-           AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}])
-       fi
-    else
-       AC_MSG_RESULT([file not found])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#      Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#
-#      Requires the following vars to be set:
-#              $1
-#
-# Results:
-#      Substitutes the following vars:
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_EXPORT_CONFIG], [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-       eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
-       eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
-    else
-       eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-       eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
-
-
-#------------------------------------------------------------------------
-# 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}
-           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
-           AC_MSG_RESULT([found $CELIB_DIR])
-       fi
-    fi
-])
-# Local Variables:
-# mode: autoconf
-# End:
similarity index 98%
rename from pkgs/tdbcodbc1.0.2/ChangeLog
rename to pkgs/tdbcodbc1.0.3/ChangeLog
index d621500..d6c4895 100644 (file)
@@ -1,3 +1,13 @@
+2015-01-23  Don Porter  <dgp@users.sourceforge.net>
+
+       * configure.in:
+       * README:       Advanced version number to 1.0.3.
+       * configure:    TEA update; autoconf-2.69.
+
+2014-10-27  Don Porter  <dgp@users.sourceforge.net>
+
+       * generic/tdbcodbc.c:   Used && instead of &.
+
 2014-10-23  Don Porter  <dgp@users.sourceforge.net>
 
        * configure.in:
similarity index 95%
rename from pkgs/tdbcodbc1.0.2/README
rename to pkgs/tdbcodbc1.0.3/README
index 09c7727..4eddded 100644 (file)
@@ -1,6 +1,6 @@
 README: tdbcodbc
 
-    This is the 1.0.2 source distribution of the bridge between Tcl
+    This is the 1.0.3 source distribution of the bridge between Tcl
     Database Connectivity (TDBC) and Open Database Connectivity
     (ODBC), a database-neutral API layer available on all Windows
     systems and many others.. TDBC and its drivers are available from
similarity index 98%
rename from pkgs/tdbcodbc1.0.2/configure
rename to pkgs/tdbcodbc1.0.3/configure
index 926682d..0a2a6d8 100755 (executable)
@@ -1,11 +1,9 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for tdbcodbc 1.0.2.
+# Generated by GNU Autoconf 2.69 for tdbcodbc 1.0.3.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -134,6 +132,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -212,21 +236,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       # Preserve -v and -x to the replacement shell.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       case $- in # ((((
-         *v*x* | *x*v* ) as_opts=-vx ;;
-         *v* ) as_opts=-v ;;
-         *x* ) as_opts=-x ;;
-         * ) as_opts= ;;
-       esac
-       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -328,6 +356,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # 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 sensitive to this).
@@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -504,28 +544,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -557,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tdbcodbc'
 PACKAGE_TARNAME='tdbcodbc'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='tdbcodbc 1.0.2'
+PACKAGE_VERSION='1.0.3'
+PACKAGE_STRING='tdbcodbc 1.0.3'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1204,8 +1224,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_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
@@ -1291,7 +1309,7 @@ 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 tdbcodbc 1.0.2 to adapt to many kinds of systems.
+\`configure' configures tdbcodbc 1.0.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1352,7 +1370,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tdbcodbc 1.0.2:";;
+     short | recursive ) echo "Configuration of tdbcodbc 1.0.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1453,10 +1471,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tdbcodbc configure 1.0.2
-generated by GNU Autoconf 2.68
+tdbcodbc configure 1.0.3
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1642,7 +1660,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -1886,7 +1904,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1902,7 +1921,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1928,7 +1948,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1944,7 +1965,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1978,7 +2000,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2050,8 +2073,8 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tdbcodbc $as_me 1.0.2, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+It was created by tdbcodbc $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2480,7 +2503,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CYGPATH="cygpath -w"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2730,7 +2753,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2770,7 +2793,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2823,7 +2846,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2864,7 +2887,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_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
@@ -2922,7 +2945,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2966,7 +2989,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3412,8 +3435,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -3968,7 +3990,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4008,7 +4030,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4061,7 +4083,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4102,7 +4124,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_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
@@ -4160,7 +4182,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4204,7 +4226,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4400,8 +4422,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -4695,7 +4716,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4735,7 +4756,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4795,7 +4816,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -4861,7 +4882,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -6554,7 +6575,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6594,7 +6615,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6822,7 +6843,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="${ac_tool_prefix}ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6862,7 +6883,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7155,7 +7176,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RC="${ac_tool_prefix}windres"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7195,7 +7216,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RC="windres"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9155,15 +9176,15 @@ rm -f conftest*
            if test "$GCC" = "yes"; then
                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
            fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
        else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
            if test "$GCC" = "yes"; then
                PKG_LIB_FILE=lib${PKG_LIB_FILE}
            fi
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
        if test "$GCC" = "yes"; then
            PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
        fi
@@ -9177,13 +9198,13 @@ rm -f conftest*
            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}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
            RANLIB=:
        else
-           eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     fi
 
     # These are escaped so that only CFLAGS is picked up at configure time.
@@ -9226,7 +9247,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MT="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9756,16 +9777,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -9825,28 +9846,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -9867,8 +9876,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tdbcodbc $as_me 1.0.2, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+This file was extended by tdbcodbc $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -9920,11 +9929,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tdbcodbc config.status 1.0.2
-configured by $0, generated by GNU Autoconf 2.68,
+tdbcodbc config.status 1.0.3
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -10001,7 +10010,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
similarity index 99%
rename from pkgs/tdbcodbc1.0.2/configure.in
rename to pkgs/tdbcodbc1.0.3/configure.in
index eb33f3c..3953940 100755 (executable)
@@ -18,7 +18,7 @@ dnl   to configure the system for the local environment.
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([tdbcodbc], [1.0.2])
+AC_INIT([tdbcodbc], [1.0.3])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
diff --git a/pkgs/tdbcodbc1.0.3/tclconfig/tcl.m4 b/pkgs/tdbcodbc1.0.3/tclconfig/tcl.m4
new file mode 100644 (file)
index 0000000..b0ae59f
--- /dev/null
@@ -0,0 +1,4180 @@
+# 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.
+
+AC_PREREQ(2.57)
+
+dnl TEA extensions pass us the version of TEA they think they
+dnl are compatible with (must be set in TEA_INIT below)
+dnl TEA_VERSION="3.9"
+
+# Possible values for key variables defined:
+#
+# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
+# TEA_PLATFORM        - windows unix
+#
+
+#------------------------------------------------------------------------
+# 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 TEA specific: 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,
+           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 common install locations
+           if test x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
+       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,
+           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tk.framework/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/Tk.framework; 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 ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       ; do
+                   if test -f "$i/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tkconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
+       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:
+#
+#      Substitutes 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([could not find ${TCL_BIN_DIR}/tclConfig.sh])
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tcl was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tcl.framework installed in an arbitrary location.
+       case ${TCL_DEFS} in
+           *TCL_FRAMEWORK*)
+               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
+                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
+                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
+                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
+                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+    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_PATCH_LEVEL)
+    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_MSG_CHECKING([platform])
+    hold_cc=$CC; CC="$TCL_CC"
+    AC_TRY_COMPILE(,[
+           #ifdef _WIN32
+               #error win32
+           #endif
+    ], TEA_PLATFORM="unix",
+           TEA_PLATFORM="windows"
+    )
+    CC=$hold_cc
+    AC_MSG_RESULT($TEA_PLATFORM)
+
+    # The BUILD_$pkg is to define the correct extern storage class
+    # handling when making this package
+    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
+           [Building extension source?])
+    # Do this here as we have fully defined TEA_PLATFORM now
+    if test "${TEA_PLATFORM}" = "windows" ; then
+       EXEEXT=".exe"
+       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
+    fi
+
+    # TEA specific:
+    AC_SUBST(CLEANFILES)
+    AC_SUBST(TCL_LIBS)
+    AC_SUBST(TCL_DEFS)
+    AC_SUBST(TCL_EXTRA_CFLAGS)
+    AC_SUBST(TCL_LD_FLAGS)
+    AC_SUBST(TCL_SHLIB_LD_LIBS)
+])
+
+#------------------------------------------------------------------------
+# 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
+
+    # eval is required to do the TK_DBGX substitution
+    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tk was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tk.framework installed in an arbitrary location.
+       case ${TK_DEFS} in
+           *TK_FRAMEWORK*)
+               if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
+                   for i in "`cd "${TK_BIN_DIR}"; pwd`" \
+                            "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
+                           TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
+                   TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
+                   TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TK_DBGX substitution
+    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+    # TEA specific: Ensure windowingsystem is defined
+    if test "${TEA_PLATFORM}" = "unix" ; then
+       case ${TK_DEFS} in
+           *MAC_OSX_TK*)
+               AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
+               TEA_WINDOWINGSYSTEM="aqua"
+               ;;
+           *)
+               TEA_WINDOWINGSYSTEM="x11"
+               ;;
+       esac
+    elif test "${TEA_PLATFORM}" = "windows" ; then
+       TEA_WINDOWINGSYSTEM="win32"
+    fi
+
+    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)
+
+    # TEA specific:
+    AC_SUBST(TK_LIBS)
+    AC_SUBST(TK_XINCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_TCLSH
+#      Determine the fully qualified path name of the tclsh executable
+#      in the Tcl build directory or the tclsh installed in a bin
+#      directory. This macro will correctly determine the name
+#      of the tclsh executable even if tclsh has not yet been
+#      built in the build directory. The tclsh found is always
+#      associated with a tclConfig.sh file. This tclsh should be used
+#      only for running extension test cases. It should never be
+#      or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Substitutes the following vars:
+#              TCLSH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_TCLSH], [
+    AC_MSG_CHECKING([for tclsh])
+    if test -f "${TCL_BIN_DIR}/Makefile" ; then
+        # tclConfig.sh is in Tcl build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+        fi
+    else
+        # tclConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+        fi
+        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${TCLSH_PROG}" ; then
+                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
+    fi
+    AC_MSG_RESULT([${TCLSH_PROG}])
+    AC_SUBST(TCLSH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_WISH
+#      Determine the fully qualified path name of the wish executable
+#      in the Tk build directory or the wish installed in a bin
+#      directory. This macro will correctly determine the name
+#      of the wish executable even if wish has not yet been
+#      built in the build directory. The wish found is always
+#      associated with a tkConfig.sh file. This wish should be used
+#      only for running extension test cases. It should never be
+#      or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Substitutes the following vars:
+#              WISH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_WISH], [
+    AC_MSG_CHECKING([for wish])
+    if test -f "${TK_BIN_DIR}/Makefile" ; then
+        # tkConfig.sh is in Tk build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+        else
+            WISH_PROG="${TK_BIN_DIR}/wish"
+        fi
+    else
+        # tkConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+        else
+            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
+        fi
+        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${WISH_PROG}" ; then
+                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
+    fi
+    AC_MSG_RESULT([${WISH_PROG}])
+    AC_SUBST(WISH_PROG)
+])
+
+#------------------------------------------------------------------------
+# 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,
+       AC_HELP_STRING([--enable-shared],
+           [build and link with shared libraries (default: on)]),
+       [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, 1, [Is this a 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, "no" means
+#      threads are disabled.  "yes" is the 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.
+#
+#      Note that it is legal to have a thread enabled extension run in a
+#      threaded or non-threaded Tcl core, but a non-threaded extension may
+#      only run in a non-threaded Tcl core.
+#
+# 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
+#              _THREAD_SAFE
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_ENABLE_THREADS], [
+    AC_ARG_ENABLE(threads,
+       AC_HELP_STRING([--enable-threads],
+           [build with threads]),
+       [tcl_ok=$enableval], [tcl_ok=yes])
+
+    if test "${enable_threads+set}" = set; then
+       enableval="$enable_threads"
+       tcl_ok=$enableval
+    else
+       tcl_ok=yes
+    fi
+
+    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:
+
+           # USE_THREAD_ALLOC tells us to try the special thread-based
+           # allocator that significantly reduces lock contention
+           AC_DEFINE(USE_THREAD_ALLOC, 1,
+               [Do we want to use the threaded memory allocator?])
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           if test "`uname -s`" = "SunOS" ; then
+               AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+                       [Do we really want to follow the standard? Yes we do!])
+           fi
+           AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
+           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([Do not know how to find pthread lib on your system - thread support disabled])
+                       fi
+                   fi
+               fi
+           fi
+       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, 1, [Are we building with threads enabled?])
+       AC_MSG_RESULT([yes (default)])
+    else
+       AC_MSG_RESULT([no])
+    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 Tcl
+    that IS thread-enabled.  It is recommended to use --enable-threads.])
+           fi
+           ;;
+       *)
+           if test "${TCL_THREADS}" = "1"; then
+               AC_MSG_WARN([
+    --enable-threads requested, but building against a Tcl that is NOT
+    thread-enabled.  This is an OK configuration that will also run in
+    a thread-enabled core.])
+           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
+#
+#      TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
+#      the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
+#      Requires the following vars to be set in the Makefile:
+#              CFLAGS_DEFAULT
+#              LDFLAGS_DEFAULT
+#
+# 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) -DNDEBUG" 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 TEA specific: Make sure we are initialized
+    AC_REQUIRE([TEA_CONFIG_CFLAGS])
+    AC_MSG_CHECKING([for build with symbols])
+    AC_ARG_ENABLE(symbols,
+       AC_HELP_STRING([--enable-symbols],
+           [build with debugging symbols (default: off)]),
+       [tcl_ok=$enableval], [tcl_ok=no])
+    DBGX=""
+    if test "$tcl_ok" = "no"; then
+       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
+       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
+    # TEA specific:
+    if test "${TEA_PLATFORM}" != "windows" ; then
+       LDFLAGS_DEFAULT="${LDFLAGS}"
+    fi
+    AC_SUBST(CFLAGS_DEFAULT)
+    AC_SUBST(LDFLAGS_DEFAULT)
+    AC_SUBST(TCL_DBGX)
+
+    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+       AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
+    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,
+       AC_HELP_STRING([--enable-langinfo],
+           [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
+       [langinfo_ok=$enableval], [langinfo_ok=yes])
+
+    HAVE_LANGINFO=0
+    if test "$langinfo_ok" = "yes"; then
+       AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
+    fi
+    AC_MSG_CHECKING([whether to use nl_langinfo])
+    if test "$langinfo_ok" = "yes"; then
+       AC_CACHE_VAL(tcl_cv_langinfo_h, [
+           AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
+                   [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
+       AC_MSG_RESULT([$tcl_cv_langinfo_h])
+       if test $tcl_cv_langinfo_h = yes; then
+           AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
+       fi
+    else
+       AC_MSG_RESULT([$langinfo_ok])
+    fi
+])
+
+#--------------------------------------------------------------------
+# TEA_CONFIG_SYSTEM
+#
+#      Determine what the system is (some things cannot be easily checked
+#      on a feature-driven basis, alas). This can usually be done via the
+#      "uname" command.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Defines the following var:
+#
+#      system -        System/platform/version identification code.
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_SYSTEM], [
+    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
+       # TEA specific:
+       if test "${TEA_PLATFORM}" = "windows" ; then
+           tcl_cv_sys_version=windows
+       else
+           tcl_cv_sys_version=`uname -s`-`uname -r`
+           if test "$?" -ne 0 ; then
+               AC_MSG_WARN([can't find uname command])
+               tcl_cv_sys_version=unknown
+           else
+               if test "`uname -s`" = "AIX" ; then
+                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
+               fi
+           fi
+       fi
+    ])
+    system=$tcl_cv_sys_version
+])
+
+#--------------------------------------------------------------------
+# 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 and substitutes the following vars:
+#
+#      DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
+#       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. Could
+#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
+#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/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 defaults to
+#                       "${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.
+#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
+#                       in a static or 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 a shared library needs to have
+#                       a .a extension whereas shared objects for loadable
+#                       extensions have a .so extension.  Defaults to
+#                       ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
+#      CFLAGS_DEBUG -
+#                      Flags used when running the compiler in debug mode
+#      CFLAGS_OPTIMIZE -
+#                      Flags used when running the compiler in optimize mode
+#      CFLAGS -        Additional CFLAGS added as necessary (usually 64-bit)
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_CFLAGS], [
+    dnl TEA specific: Make sure we are initialized
+    AC_REQUIRE([TEA_INIT])
+
+    # Step 0.a: Enable 64 bit support?
+
+    AC_MSG_CHECKING([if 64bit support is requested])
+    AC_ARG_ENABLE(64bit,
+       AC_HELP_STRING([--enable-64bit],
+           [enable 64bit support (default: off)]),
+       [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,
+       AC_HELP_STRING([--enable-64bit-vis],
+           [enable 64bit Sparc VIS support (default: off)]),
+       [do64bitVIS=$enableval], [do64bitVIS=no])
+    AC_MSG_RESULT([$do64bitVIS])
+    # Force 64bit on with VIS
+    AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes])
+
+    # Step 0.c: Check if visibility support is available. Do this here so
+    # that platform specific alternatives can be used below if this fails.
+
+    AC_CACHE_CHECK([if compiler supports visibility "hidden"],
+       tcl_cv_cc_visibility_hidden, [
+       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
+       AC_TRY_LINK([
+           extern __attribute__((__visibility__("hidden"))) void f(void);
+           void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
+           tcl_cv_cc_visibility_hidden=no)
+       CFLAGS=$hold_cflags])
+    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
+       AC_DEFINE(MODULE_SCOPE,
+           [extern __attribute__((__visibility__("hidden")))],
+           [Compiler support for module scope symbols])
+       AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
+    ])
+
+    # Step 0.d: Disable -rpath support?
+
+    AC_MSG_CHECKING([if rpath support is requested])
+    AC_ARG_ENABLE(rpath,
+       AC_HELP_STRING([--disable-rpath],
+           [disable rpath support (default: on)]),
+       [doRpath=$enableval], [doRpath=yes])
+    AC_MSG_RESULT([$doRpath])
+
+    # TEA specific: Cross-compiling options for Windows/CE builds?
+
+    AS_IF([test "${TEA_PLATFORM}" = windows], [
+       AC_MSG_CHECKING([if Windows/CE build is requested])
+       AC_ARG_ENABLE(wince,
+           AC_HELP_STRING([--enable-wince],
+               [enable Win/CE support (where applicable)]),
+           [doWince=$enableval], [doWince=no])
+       AC_MSG_RESULT([$doWince])
+    ])
+
+    # Set the variable "system" to hold the name and version number
+    # for the system.
+
+    TEA_CONFIG_SYSTEM
+
+    # Require ranlib early so we can override it in special cases below.
+
+    AC_REQUIRE([AC_PROG_RANLIB])
+
+    # 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 removed some core-only vars.
+
+    do64bit_ok=no
+    # default to '{$LIBS}' and set to "" on per-platform necessary basis
+    SHLIB_LD_LIBS='${LIBS}'
+    # When ld needs options to work in 64-bit mode, put them in
+    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
+    # is disabled by the user. [Bug 1016796]
+    LDFLAGS_ARCH=""
+    UNSHARED_LIB_SUFFIX=""
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+    TCL_LIB_VERSIONS_OK=ok
+    CFLAGS_DEBUG=-g
+    AS_IF([test "$GCC" = yes], [
+       CFLAGS_OPTIMIZE=-O2
+       CFLAGS_WARNING="-Wall"
+    ], [
+       CFLAGS_OPTIMIZE=-O
+       CFLAGS_WARNING=""
+    ])
+    AC_CHECK_TOOL(AR, ar)
+    STLIB_LD='${AR} cr'
+    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION=""],[SHLIB_VERSION=".$SHLIB_VERSION"])
+    case $system in
+       # TEA specific:
+       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.
+           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+           # MACHINE is IX86 for LINK, but this is used by the manifest,
+           # which requires x86|amd64|ia64.
+           MACHINE="X86"
+           if test "$do64bit" != "no" ; then
+               if test "x${MSSDK}x" = "xx" ; then
+                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
+               fi
+               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
+               PATH64=""
+               case "$do64bit" in
+                   amd64|x64|yes)
+                       MACHINE="AMD64" ; # default to AMD64 64-bit build
+                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+                       ;;
+                   ia64)
+                       MACHINE="IA64"
+                       PATH64="${MSSDK}/Bin/Win64"
+                       ;;
+               esac
+               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
+                   AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
+                   AC_MSG_WARN([Ensure latest Platform SDK is installed])
+                   do64bit="no"
+               else
+                   AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
+                   do64bit_ok="yes"
+               fi
+           fi
+
+           if test "$doWince" != "no" ; then
+               if test "$do64bit" != "no" ; 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
+               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
+               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" != "no" ; then
+                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
+                   CC="\"${PATH64}/cl.exe\""
+                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+                   RC="\"${MSSDK}/bin/rc.exe\""
+                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+                   LINKBIN="\"${PATH64}/link.exe\""
+                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+                   # Avoid 'unresolved external symbol __security_cookie'
+                   # errors, c.f. http://support.microsoft.com/?id=894573
+                   TEA_ADD_LIBS([bufferoverflowU.lib])
+               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, 1, [WinCE def ]$i)
+                   done
+                   AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
+                   AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
+                   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
+               AC_CHECK_TOOL(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}"
+
+               AC_CACHE_CHECK(for cross-compile version of gcc,
+                       ac_cv_cross,
+                       AC_TRY_COMPILE([
+                           #ifdef _WIN32
+                               #error cross-compiler
+                           #endif
+                       ], [],
+                       ac_cv_cross=yes,
+                       ac_cv_cross=no)
+                     )
+                     if test "$ac_cv_cross" = "yes"; then
+                       case "$do64bit" in
+                           amd64|x64|yes)
+                               CC="x86_64-w64-mingw32-gcc"
+                               LD="x86_64-w64-mingw32-ld"
+                               AR="x86_64-w64-mingw32-ar"
+                               RANLIB="x86_64-w64-mingw32-ranlib"
+                               RC="x86_64-w64-mingw32-windres"
+                           ;;
+                           *)
+                               CC="i686-w64-mingw32-gcc"
+                               LD="i686-w64-mingw32-ld"
+                               AR="i686-w64-mingw32-ar"
+                               RANLIB="i686-w64-mingw32-ranlib"
+                               RC="i686-w64-mingw32-windres"
+                           ;;
+                       esac
+               fi
+
+           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
+               # and also
+               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
+               # This essentially turns it all on.
+               LDFLAGS_DEBUG="-debug -debugtype:cv"
+               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_SUFFIX=".dll"
+           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       AIX-*)
+           AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
+               # AIX requires the _r compiler when gcc isn't being used
+               case "${CC}" in
+                   *_r|*_r\ *)
+                       # ok ...
+                       ;;
+                   *)
+                       # Make sure only first arg gets _r
+                       CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
+                       ;;
+               esac
+               AC_MSG_RESULT([Using $CC for compiling with threads])
+           ])
+           LIBS="$LIBS -lc"
+           SHLIB_CFLAGS=""
+           SHLIB_SUFFIX=".so"
+
+           LD_LIBRARY_PATH_VAR="LIBPATH"
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = yes], [
+               AS_IF([test "$GCC" = yes], [
+                   AC_MSG_WARN([64bit mode not supported with GCC on $system])
+               ], [
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS -q64"
+                   LDFLAGS_ARCH="-q64"
+                   RANLIB="${RANLIB} -X64"
+                   AR="${AR} -X64"
+                   SHLIB_LD_FLAGS="-b64"
+               ])
+           ])
+
+           AS_IF([test "`uname -m`" = ia64], [
+               # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               AS_IF([test "$GCC" = yes], [
+                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               ], [
+                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+               ])
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+           ], [
+               AS_IF([test "$GCC" = yes], [
+                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
+               ], [
+                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
+                   LDFLAGS="$LDFLAGS -brtl"
+               ])
+               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ])
+           ;;
+       BeOS*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -nostart'
+           SHLIB_SUFFIX=".so"
+
+           #-----------------------------------------------------------
+           # Check for inet_ntoa in -lbind, for BeOS (which also needs
+           # -lsocket, even if the network functions are in -lnet which
+           # is always linked to, for compatibility.
+           #-----------------------------------------------------------
+           AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
+           ;;
+       BSD/OS-4.*)
+           SHLIB_CFLAGS="-export-dynamic -fPIC"
+           SHLIB_LD='${CC} -shared'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       CYGWIN_*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD='${CC} -shared'
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
+           SHLIB_SUFFIX=".dll"
+           EXEEXT=".exe"
+           do64bit_ok=yes
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       Haiku*)
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+           AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
+           ;;
+       HP-UX-*.11.*)
+           # Use updated header definitions where possible
+           AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
+           # TEA specific: Needed by Tcl, but not most extensions
+           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
+           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
+
+           AS_IF([test "`uname -m`" = ia64], [
+               SHLIB_SUFFIX=".so"
+               # Use newer C++ library for C++ extensions
+               #if test "$GCC" != "yes" ; then
+               #   CPPFLAGS="-AA"
+               #fi
+           ], [
+               SHLIB_SUFFIX=".sl"
+           ])
+           AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
+           AS_IF([test "$tcl_ok" = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-E"
+               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+           ])
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ], [
+               CFLAGS="$CFLAGS -z"
+               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+               #CFLAGS="$CFLAGS +DAportable"
+               SHLIB_CFLAGS="+z"
+               SHLIB_LD="ld -b"
+           ])
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = "yes"], [
+               AS_IF([test "$GCC" = yes], [
+                   case `${CC} -dumpmachine` in
+                       hppa64*)
+                           # 64-bit gcc in use.  Fix flags for GNU ld.
+                           do64bit_ok=yes
+                           SHLIB_LD='${CC} -shared'
+                           AS_IF([test $doRpath = yes], [
+                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+                           ;;
+                       *)
+                           AC_MSG_WARN([64bit mode not supported with GCC on $system])
+                           ;;
+                   esac
+               ], [
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS +DD64"
+                   LDFLAGS_ARCH="+DD64"
+               ])
+           ]) ;;
+       IRIX-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+           AS_IF([test "$GCC" = yes], [
+               CFLAGS="$CFLAGS -mabi=n32"
+               LDFLAGS="$LDFLAGS -mabi=n32"
+           ], [
+               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"
+           ])
+           ;;
+       IRIX64-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+
+           # Check to enable 64-bit flags for compiler/linker
+
+           AS_IF([test "$do64bit" = yes], [
+               AS_IF([test "$GCC" = yes], [
+                   AC_MSG_WARN([64bit mode not supported by gcc])
+               ], [
+                   do64bit_ok=yes
+                   SHLIB_LD="ld -64 -shared -rdata_shared"
+                   CFLAGS="$CFLAGS -64"
+                   LDFLAGS_ARCH="-64"
+               ])
+           ])
+           ;;
+       Linux*|GNU*|NetBSD-Debian)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+
+           # TEA specific:
+           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
+           AS_IF([test $do64bit = yes], [
+               AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
+                   hold_cflags=$CFLAGS
+                   CFLAGS="$CFLAGS -m64"
+                   AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
+                   CFLAGS=$hold_cflags])
+               AS_IF([test $tcl_cv_cc_m64 = yes], [
+                   CFLAGS="$CFLAGS -m64"
+                   do64bit_ok=yes
+               ])
+          ])
+
+           # 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.
+
+           AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
+           ;;
+       Lynx*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           CFLAGS_OPTIMIZE=-02
+           SHLIB_LD='${CC} -shared'
+           LD_FLAGS="-Wl,--export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           ;;
+       OpenBSD-*)
+           arch=`arch -s`
+           case "$arch" in
+           vax)
+               SHLIB_SUFFIX=""
+               SHARED_LIB_SUFFIX=""
+               LDFLAGS=""
+               ;;
+           *)
+               case "$arch" in
+               alpha|sparc64)
+                   SHLIB_CFLAGS="-fPIC"
+                   ;;
+               *)
+                   SHLIB_CFLAGS="-fpic"
+                   ;;
+               esac
+               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+               SHLIB_SUFFIX=".so"
+               AS_IF([test $doRpath = yes], [
+                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
+               LDFLAGS="-Wl,-export-dynamic"
+               ;;
+           esac
+           case "$arch" in
+           vax)
+               CFLAGS_OPTIMIZE="-O1"
+               ;;
+           *)
+               CFLAGS_OPTIMIZE="-O2"
+               ;;
+           esac
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # On OpenBSD:   Compile with -pthread
+               #               Don't link with -lpthread
+               LIBS=`echo $LIBS | sed s/-lpthread//`
+               CFLAGS="$CFLAGS -pthread"
+           ])
+           # OpenBSD doesn't do version numbers with dots.
+           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       NetBSD-*)
+           # NetBSD has ELF and can use 'cc -shared' to build shared libs
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # The -pthread needs to go in the CFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS -pthread"
+               LDFLAGS="$LDFLAGS -pthread"
+           ])
+           ;;
+       FreeBSD-*)
+           # This configuration from FreeBSD Ports.
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD="${CC} -shared"
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
+           SHLIB_SUFFIX=".so"
+           LDFLAGS=""
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # The -pthread needs to go in the LDFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
+           case $system in
+           FreeBSD-3.*)
+               # Version numbers are dot-stripped by system policy.
+               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
+               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+               TCL_LIB_VERSIONS_OK=nodots
+               ;;
+           esac
+           ;;
+       Darwin-*)
+           CFLAGS_OPTIMIZE="-Os"
+           SHLIB_CFLAGS="-fno-common"
+           # To avoid discrepancies between what headers configure sees during
+           # preprocessing tests and compiling tests, move any -isysroot and
+           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
+           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
+           CFLAGS="`echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
+           AS_IF([test $do64bit = yes], [
+               case `arch` in
+                   ppc)
+                       AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
+                               tcl_cv_cc_arch_ppc64, [
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
+                                   tcl_cv_cc_arch_ppc64=no)
+                           CFLAGS=$hold_cflags])
+                       AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           do64bit_ok=yes
+                       ]);;
+                   i386)
+                       AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
+                               tcl_cv_cc_arch_x86_64, [
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
+                                   tcl_cv_cc_arch_x86_64=no)
+                           CFLAGS=$hold_cflags])
+                       AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           do64bit_ok=yes
+                       ]);;
+                   *)
+                       AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
+               esac
+           ], [
+               # Check for combined 32-bit and 64-bit fat build
+               AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
+                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
+                   fat_32_64=yes])
+           ])
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_single_module = yes], [
+               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+           ])
+           # TEA specific: link shlib with current and compatibility version flags
+           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
+           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
+           SHLIB_SUFFIX=".dylib"
+           # Don't use -prebind when building for Mac OS X 10.4 or later only:
+           AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
+               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
+               LDFLAGS="$LDFLAGS -prebind"])
+           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+           AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
+                   tcl_cv_ld_search_paths_first, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
+                       tcl_cv_ld_search_paths_first=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+           ])
+           AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
+               AC_DEFINE(MODULE_SCOPE, [__private_extern__],
+                   [Compiler support for module scope symbols])
+               tcl_cv_cc_visibility_hidden=yes
+           ])
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+           # TEA specific: for combined 32 & 64 bit fat builds of Tk
+           # extensions, verify that 64-bit build is possible.
+           AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
+               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [
+                   AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
+                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
+                       AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();],
+                           tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no)
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done])
+               ])
+               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [
+                   AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
+                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
+                       AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);],
+                           tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no)
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done])
+               ])
+               # remove 64-bit arch flags from CFLAGS et al. if configuration
+               # does not support 64-bit.
+               AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
+                   AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
+                   for v in CFLAGS CPPFLAGS LDFLAGS; do
+                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
+                   done])
+           ])
+           ;;
+       OS/390-*)
+           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
+           AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
+               [Should OS/390 do the right thing with sockets?])
+           ;;
+       OSF1-V*)
+           # Digital OSF/1
+           SHLIB_CFLAGS=""
+           AS_IF([test "$SHARED_BUILD" = 1], [
+               SHLIB_LD='ld -shared -expect_unresolved "*"'
+           ], [
+               SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+           ])
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+           AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
+               CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
+           # see pthread_intro(3) for pthread support on osf1, k.furukawa
+           AS_IF([test "${TCL_THREADS}" = 1], [
+               CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+               CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+               LIBS=`echo $LIBS | sed s/-lpthreads//`
+               AS_IF([test "$GCC" = yes], [
+                   LIBS="$LIBS -lpthread -lmach -lexc"
+               ], [
+                   CFLAGS="$CFLAGS -pthread"
+                   LDFLAGS="$LDFLAGS -pthread"
+               ])
+           ])
+           ;;
+       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"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SCO_SV-3.2*)
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_CFLAGS="-fPIC -melf"
+               LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+           ], [
+               SHLIB_CFLAGS="-Kpic -belf"
+               LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+           ])
+           SHLIB_LD="ld -G"
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SunOS-5.[[0-6]])
+           # Careful to not let 5.10+ fall into this case
+
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+               [Do we really want to follow the standard? Yes we do!])
+
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ], [
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ])
+           ;;
+       SunOS-5*)
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+               [Do we really want to follow the standard? Yes we do!])
+
+           SHLIB_CFLAGS="-KPIC"
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = yes], [
+               arch=`isainfo`
+               AS_IF([test "$arch" = "sparcv9 sparc"], [
+                   AS_IF([test "$GCC" = yes], [
+                       AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
+                           AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
+                       ], [
+                           do64bit_ok=yes
+                           CFLAGS="$CFLAGS -m64 -mcpu=v9"
+                           LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+                           SHLIB_CFLAGS="-fPIC"
+                       ])
+                   ], [
+                       do64bit_ok=yes
+                       AS_IF([test "$do64bitVIS" = yes], [
+                           CFLAGS="$CFLAGS -xarch=v9a"
+                           LDFLAGS_ARCH="-xarch=v9a"
+                       ], [
+                           CFLAGS="$CFLAGS -xarch=v9"
+                           LDFLAGS_ARCH="-xarch=v9"
+                       ])
+                       # Solaris 64 uses this as well
+                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
+                   ])
+               ], [AS_IF([test "$arch" = "amd64 i386"], [
+                   AS_IF([test "$GCC" = yes], [
+                       case $system in
+                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
+                               do64bit_ok=yes
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               AC_MSG_WARN([64bit mode not supported with GCC on $system]);;
+                       esac
+                   ], [
+                       do64bit_ok=yes
+                       case $system in
+                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               CFLAGS="$CFLAGS -xarch=amd64"
+                               LDFLAGS="$LDFLAGS -xarch=amd64";;
+                       esac
+                   ])
+               ], [AC_MSG_WARN([64bit mode not supported for $arch])])])
+           ])
+
+           SHLIB_SUFFIX=".so"
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               AS_IF([test "$do64bit_ok" = yes], [
+                   AS_IF([test "$arch" = "sparcv9 sparc"], [
+                       # 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` | ..."
+                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+                   ], [AS_IF([test "$arch" = "amd64 i386"], [
+                       # JH: static-libgcc is necessary for core Tcl, but may
+                       # not be necessary for extensions.
+                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
+                   ])])
+               ])
+           ], [
+               case $system in
+                   SunOS-5.[[1-9]][[0-9]]*)
+                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
+                   *)
+                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
+               esac
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+           ])
+           ;;
+       UNIX_SV* | UnixWare-5*)
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_LD='${CC} -G'
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
+           # that don't grok the -Bexport option.  Test that it does.
+           AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_Bexport = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+           ])
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+    esac
+
+    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
+       AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
+    ])
+
+dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
+dnl # until the end of configure, as configure's compile and link tests use
+dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
+dnl # preprocessing tests use only CPPFLAGS.
+    AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
+
+    # Add in the arch flags late to ensure it wasn't removed.
+    # Not necessary in TEA, but this is aligned with core
+    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
+
+    # 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.
+
+    AS_IF([test "$GCC" = yes], [
+       case $system in
+           AIX-*) ;;
+           BSD/OS*) ;;
+           CYGWIN_*|MINGW32_*) ;;
+           IRIX*) ;;
+           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
+           Darwin-*) ;;
+           SCO_SV-3.2*) ;;
+           windows) ;;
+           *) SHLIB_CFLAGS="-fPIC" ;;
+       esac])
+
+    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
+       AC_DEFINE(MODULE_SCOPE, [extern],
+           [No Compiler support for module scope symbols])
+    ])
+
+    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
+    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
+
+    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
+       AC_CACHE_CHECK(for SEH support in compiler,
+           tcl_cv_seh,
+       AC_TRY_RUN([
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+           int main(int argc, char** argv) {
+               int a, b = 0;
+               __try {
+                   a = 666 / b;
+               }
+               __except (EXCEPTION_EXECUTE_HANDLER) {
+                   return 0;
+               }
+               return 1;
+           }
+       ],
+           tcl_cv_seh=yes,
+           tcl_cv_seh=no,
+           tcl_cv_seh=no)
+       )
+       if test "$tcl_cv_seh" = "no" ; then
+           AC_DEFINE(HAVE_NO_SEH, 1,
+                   [Defined when mingw does not support SEH])
+       fi
+
+       #
+       # Check to see if the excpt.h include file provided contains the
+       # definition for EXCEPTION_DISPOSITION; if not, which is the case
+       # with Cygwin's version as of 2002-04-10, define it to be int,
+       # sufficient for getting the current code to work.
+       #
+       AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
+           tcl_cv_eh_disposition,
+           AC_TRY_COMPILE([
+#          define WIN32_LEAN_AND_MEAN
+#          include <windows.h>
+#          undef WIN32_LEAN_AND_MEAN
+           ],[
+               EXCEPTION_DISPOSITION x;
+           ],
+               tcl_cv_eh_disposition=yes,
+               tcl_cv_eh_disposition=no)
+       )
+       if test "$tcl_cv_eh_disposition" = "no" ; then
+       AC_DEFINE(EXCEPTION_DISPOSITION, int,
+               [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
+       fi
+
+       # Check to see if winnt.h defines CHAR, SHORT, and LONG
+       # even if VOID has already been #defined. The win32api
+       # used by mingw and cygwin is known to do this.
+
+       AC_CACHE_CHECK(for winnt.h that ignores VOID define,
+           tcl_cv_winnt_ignore_void,
+           AC_TRY_COMPILE([
+#define VOID void
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+           ], [
+               CHAR c;
+               SHORT s;
+               LONG l;
+           ],
+        tcl_cv_winnt_ignore_void=yes,
+        tcl_cv_winnt_ignore_void=no)
+       )
+       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
+           AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
+                   [Defined when cygwin/mingw ignores VOID define in winnt.h])
+       fi
+    fi
+
+       # See if the compiler supports casting to a union type.
+       # This is used to stop gcc from printing a compiler
+       # warning when initializing a union member.
+
+       AC_CACHE_CHECK(for cast to union support,
+           tcl_cv_cast_to_union,
+           AC_TRY_COMPILE([],
+           [
+                 union foo { int i; double d; };
+                 union foo f = (union foo) (int) 0;
+           ],
+           tcl_cv_cast_to_union=yes,
+           tcl_cv_cast_to_union=no)
+       )
+       if test "$tcl_cv_cast_to_union" = "yes"; then
+           AC_DEFINE(HAVE_CAST_TO_UNION, 1,
+                   [Defined when compiler supports casting to union type.])
+       fi
+
+    AC_SUBST(CFLAGS_DEBUG)
+    AC_SUBST(CFLAGS_OPTIMIZE)
+    AC_SUBST(CFLAGS_WARNING)
+
+    AC_SUBST(STLIB_LD)
+    AC_SUBST(SHLIB_LD)
+
+    AC_SUBST(SHLIB_LD_LIBS)
+    AC_SUBST(SHLIB_CFLAGS)
+
+    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_CACHE_CHECK([termios vs. termio vs. sgtty], 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=no, tcl_cv_api_serial=no)
+    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, 1, [Use the termios API for serial lines]);;
+       termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
+       sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
+    esac
+])
+
+#--------------------------------------------------------------------
+# TEA_MISSING_POSIX_HEADERS
+#
+#      Supply substitutes for missing POSIX header files.  Special
+#      notes:
+#          - stdlib.h doesn't define strtol, strtoul, or
+#            strtod in some 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_CACHE_CHECK([dirent.h], tcl_cv_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_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
+
+    if test $tcl_cv_dirent_h = no; then
+       AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
+    fi
+
+    # TEA specific:
+    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
+    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
+    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
+    AC_CHECK_HEADER(limits.h,
+       [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
+       [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <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, 1, [Do we have <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, 1, [Do we have <string.h>?])
+    fi
+
+    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
+    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <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
+#              PKG_LIBS (appends to)
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_X], [
+    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
+       TEA_PATH_UNIX_X
+    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/Xlib.h>], , not_really_there="yes")
+       else
+           if test ! -r $x_includes/X11/Xlib.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])
+       found_xincludes="no"
+       AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
+       if test "$found_xincludes" = "no"; 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/Xlib.h; then
+                   AC_MSG_RESULT([$i])
+                   XINCLUDES=" -I$i"
+                   found_xincludes="yes"
+                   break
+               fi
+           done
+       fi
+    else
+       if test "$x_includes" != ""; then
+           XINCLUDES="-I$x_includes"
+           found_xincludes="yes"
+       fi
+    fi
+    if test "$found_xincludes" = "no"; then
+       AC_MSG_RESULT([couldn't find any!])
+    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 -o -r $i/libX11.dylib; 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
+    # TEA specific:
+    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)
+    TEA_CONFIG_SYSTEM
+    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
+    case $system in
+       OSF*)
+           AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
+           AC_MSG_RESULT([FIONBIO])
+           ;;
+       *)
+           AC_MSG_RESULT([O_NONBLOCK])
+           ;;
+    esac
+])
+
+#--------------------------------------------------------------------
+# TEA_TIME_HANDLER
+#
+#      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_CACHE_CHECK([tm_tzadj in struct tm], 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)])
+    if test $tcl_cv_member_tm_tzadj = yes ; then
+       AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
+    fi
+
+    AC_CACHE_CHECK([tm_gmtoff in struct tm], 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)])
+    if test $tcl_cv_member_tm_gmtoff = yes ; then
+       AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
+    fi
+
+    #
+    # Its important to include time.h in this check, as some systems
+    # (like convex) have timezone functions, etc.
+    #
+    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
+       AC_TRY_COMPILE([#include <time.h>],
+           [extern long timezone;
+           timezone += 1;
+           exit (0);],
+           tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
+    if test $tcl_cv_timezone_long = yes ; then
+       AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+    else
+       #
+       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+       #
+       AC_CACHE_CHECK([time_t timezone variable], 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)])
+       if test $tcl_cv_timezone_time = yes ; then
+           AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+       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_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
+           AC_TRY_RUN([
+               extern double strtod();
+               int main() {
+                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
+                   char *term;
+                   double value;
+                   value = strtod(infString, &term);
+                   if ((term != infString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(nanString, &term);
+                   if ((term != nanString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(spaceString, &term);
+                   if (term == (spaceString+1)) {
+                       exit(1);
+                   }
+                   exit(0);
+               }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
+                   tcl_cv_strtod_buggy=buggy)])
+       if test "$tcl_cv_strtod_buggy" = buggy; then
+           AC_LIBOBJ([fixstrtod])
+           USE_COMPAT=1
+           AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
+       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 (not in TEA, only needed in core)
+#              LIBS
+#              MATH_LIBS
+#
+# Results:
+#
+#      Substitutes the following vars:
+#              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, 1, [Do we 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"])])
+
+    # TEA specific: 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
+#              _LARGEFILE_SOURCE64
+#--------------------------------------------------------------------
+
+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, 1, [Add the ]$1[ flag when building])
+       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);])
+    TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
+       [char *p = (char *)open64;])
+    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, 1, [Are wide integers to be implemented with C 'long's?])
+       AC_MSG_RESULT([using long])
+    elif test "${tcl_cv_type_64bit}" = "__int64" \
+               -a "${TEA_PLATFORM}" = "windows" ; then
+       # TEA specific: 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},
+           [What type should be used to define wide integers?])
+       AC_MSG_RESULT([${tcl_cv_type_64bit}])
+
+       # Now check for auxiliary declarations
+       AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
+           AC_TRY_COMPILE([#include <sys/types.h>
+#include <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, 1, [Is 'struct dirent64' in <sys/types.h>?])
+       fi
+
+       AC_CACHE_CHECK([for struct stat64], 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, 1, [Is 'struct stat64' in <sys/stat.h>?])
+       fi
+
+       AC_CHECK_FUNCS(open64 lseek64)
+       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)])
+       dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
+       dnl functions lseek64 and open64 are defined.
+       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
+               test "x${ac_cv_func_lseek64}" = "xyes" && \
+               test "x${ac_cv_func_open64}" = "xyes" ; then
+           AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
+           AC_MSG_RESULT([yes])
+       else
+           AC_MSG_RESULT([no])
+       fi
+    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_VERSION
+#              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.9"
+
+    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
+
+    # If the user did not set CFLAGS, set it now to keep macros
+    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
+    if test "${CFLAGS+set}" != "set" ; then
+       CFLAGS=""
+    fi
+
+    case "`uname -s`" in
+       *win32*|*WIN32*|*MINGW32_*)
+           AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+           EXEEXT=".exe"
+           TEA_PLATFORM="windows"
+           ;;
+       *CYGWIN_*)
+           CYGPATH=echo
+           EXEEXT=".exe"
+           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
+           ;;
+       *)
+           CYGPATH=echo
+           # Maybe we are cross-compiling....
+           case ${host_alias} in
+               *mingw32*)
+               EXEEXT=".exe"
+               TEA_PLATFORM="windows"
+               ;;
+           *)
+               EXEEXT=""
+               TEA_PLATFORM="unix"
+               ;;
+           esac
+           ;;
+    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_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}])
+
+    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
+               # To add more dirs here (like 'src'), you have to update VPATH
+               # in Makefile.in as well
+               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+                   -a ! -f "${srcdir}/macosx/$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" \
+           -a ! -f "${srcdir}/macosx/$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_ADD_CLEANFILES --
+#
+#      Specify one or more CLEANFILES.
+#
+# Arguments:
+#      one or more file names to clean target
+#
+# Results:
+#
+#      Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_CLEANFILES], [
+    CLEANFILES="$CLEANFILES $@"
+])
+
+#------------------------------------------------------------------------
+# 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.
+
+    AC_PROG_CC
+    AC_PROG_CPP
+
+    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
+    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
+    INSTALL_DATA='${INSTALL} -m 644'
+    INSTALL_PROGRAM='${INSTALL}'
+    INSTALL_SCRIPT='${INSTALL}'
+    INSTALL_LIBRARY='${INSTALL_DATA}'
+
+    AC_SUBST(INSTALL)
+    AC_SUBST(INSTALL_DATA_DIR)
+    AC_SUBST(INSTALL_DATA)
+    AC_SUBST(INSTALL_PROGRAM)
+    AC_SUBST(INSTALL_SCRIPT)
+    AC_SUBST(INSTALL_LIBRARY)
+
+    #--------------------------------------------------------------------
+    # Checks to see if the make program sets the $MAKE variable.
+    #--------------------------------------------------------------------
+
+    AC_PROG_MAKE_SET
+
+    #--------------------------------------------------------------------
+    # Find ranlib
+    #--------------------------------------------------------------------
+
+    AC_CHECK_TOOL(RANLIB, 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_CACHE_CHECK([if the compiler understands -pipe],
+           tcl_cv_cc_pipe, [
+           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+           AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
+           CFLAGS=$hold_cflags])
+       if test $tcl_cv_cc_pipe = yes; then
+           CFLAGS="$CFLAGS -pipe"
+       fi
+    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
+#      VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
+#      VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
+#------------------------------------------------------------------------
+
+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)"
+       AC_EGREP_CPP([manifest needed], [
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+print("manifest needed")
+#endif
+       ], [
+       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
+       VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
+       VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
+       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
+       TEA_ADD_CLEANFILES([*.manifest])
+       ])
+       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
+           if test x"${TK_BIN_DIR}" != x ; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+           fi
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+           if test "$GCC" = "yes"; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
+           fi
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+       else
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           if test "$GCC" = "yes"; then
+               PKG_LIB_FILE=lib${PKG_LIB_FILE}
+           fi
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       if test "$GCC" = "yes"; then
+           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
+       fi
+       # 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_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           RANLIB=:
+       else
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${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)
+    AC_SUBST(VC_MANIFEST_EMBED_DLL)
+    AC_SUBST(VC_MANIFEST_EMBED_EXE)
+])
+
+#------------------------------------------------------------------------
+# 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/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
+           `ls -dr /usr/lib64/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:
+#
+#      Substitutes the following vars:
+#              TCL_TOP_DIR_NATIVE
+#              TCL_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
+    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
+    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
+    AC_MSG_CHECKING([for Tcl private include files])
+
+    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
+    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
+
+    # Check to see if tcl<Plat>Port.h isn't already with the public headers
+    # Don't look for tclInt.h because that resides with tcl.h in the core
+    # sources, but the <plat>Port headers are in a different directory
+    if test "${TEA_PLATFORM}" = "windows" -a \
+       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
+       result="private headers found with public headers"
+    elif test "${TEA_PLATFORM}" = "unix" -a \
+       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
+       result="private headers found with public headers"
+    else
+       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
+       if test "${TEA_PLATFORM}" = "windows"; then
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
+       else
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
+       fi
+       # Overwrite the previous TCL_INCLUDES as this should capture both
+       # public and private headers in the same set.
+       # We want to ensure these are substituted so as not to require
+       # any *_NATIVE vars be defined in the Makefile
+       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+       if test "`uname -s`" = "Darwin"; then
+            # If Tcl was built as a framework, attempt to use
+            # the framework's Headers and PrivateHeaders directories
+            case ${TCL_DEFS} in
+               *TCL_FRAMEWORK*)
+                   if test -d "${TCL_BIN_DIR}/Headers" -a \
+                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
+                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
+                   else
+                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
+                   fi
+                   ;;
+           esac
+           result="Using ${TCL_INCLUDES}"
+       else
+           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
+               AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
+           fi
+           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
+       fi
+    fi
+
+    AC_SUBST(TCL_TOP_DIR_NATIVE)
+
+    AC_SUBST(TCL_INCLUDES)
+    AC_MSG_RESULT([${result}])
+])
+
+#------------------------------------------------------------------------
+# 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.
+#
+#      Substitutes 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
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tcl was built as a framework, attempt to use
+               # the framework's Headers directory
+               case ${TCL_DEFS} in
+                   *TCL_FRAMEWORK*)
+                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tcl is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TCL_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$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`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TCL_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           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:
+#
+#      Substitutes the following vars:
+#              TK_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
+    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
+    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
+    AC_MSG_CHECKING([for Tk private include files])
+
+    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
+    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
+
+    # Check to see if tk<Plat>Port.h isn't already with the public headers
+    # Don't look for tkInt.h because that resides with tk.h in the core
+    # sources, but the <plat>Port headers are in a different directory
+    if test "${TEA_PLATFORM}" = "windows" -a \
+       -f "${ac_cv_c_tkh}/tkWinPort.h"; then
+       result="private headers found with public headers"
+    elif test "${TEA_PLATFORM}" = "unix" -a \
+       -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
+       result="private headers found with public headers"
+    else
+       TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
+       TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
+       if test "${TEA_PLATFORM}" = "windows"; then
+           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
+       else
+           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
+       fi
+       # Overwrite the previous TK_INCLUDES as this should capture both
+       # public and private headers in the same set.
+       # We want to ensure these are substituted so as not to require
+       # any *_NATIVE vars be defined in the Makefile
+       TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
+       # Detect and add ttk subdir
+       if test -d "${TK_SRC_DIR}/generic/ttk"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
+       fi
+       if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
+       fi
+       if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
+       fi
+       if test "`uname -s`" = "Darwin"; then
+           # If Tk was built as a framework, attempt to use
+           # the framework's Headers and PrivateHeaders directories
+           case ${TK_DEFS} in
+               *TK_FRAMEWORK*)
+                       if test -d "${TK_BIN_DIR}/Headers" -a \
+                               -d "${TK_BIN_DIR}/PrivateHeaders"; then
+                           TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
+                       else
+                           TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
+                       fi
+                       ;;
+           esac
+           result="Using ${TK_INCLUDES}"
+       else
+           if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
+              AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
+           fi
+           result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
+       fi
+    fi
+
+    AC_SUBST(TK_TOP_DIR_NATIVE)
+    AC_SUBST(TK_XLIB_DIR_NATIVE)
+
+    AC_SUBST(TK_INCLUDES)
+    AC_MSG_RESULT([${result}])
+])
+
+#------------------------------------------------------------------------
+# 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.
+#
+#      Substitutes 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
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tk was built as a framework, attempt to use
+               # the framework's Headers directory.
+               case ${TK_DEFS} in
+                   *TK_FRAMEWORK*)
+                       list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tk is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TK_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tk's --prefix location,
+           # relative to directory of tkConfig.sh, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$list \
+               `ls -d ${temp_includedir}        2>/dev/null` \
+               `ls -d ${TK_PREFIX}/include      2>/dev/null` \
+               `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
+               `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
+               `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TK_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           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_WINDOWINGSYSTEM}" != "x11"; then
+       # On Windows and Aqua, 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_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 ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 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:
+#
+#      Substitutes 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}
+        $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
+        $1_LIBRARY_PATH=${$1_LIBRARY_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)
+
+    # Allow the caller to prevent this auto-check by specifying any 2nd arg
+    AS_IF([test "x$2" = x], [
+       # Check both upper and lower-case variants
+       # If a dev wanted non-stubs libs, this function could take an option
+       # to not use _STUB in the paths below
+       AS_IF([test "x${$1_STUB_LIB_SPEC}" = x],
+           [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
+           [TEA_LOAD_CONFIG_LIB($1_STUB)])
+    ])
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_CONFIG_LIB --
+#
+#      Helper function to load correct library from another extension's
+#      ${PACKAGE}Config.sh.
+#
+# Results:
+#      Adds to LIBS the appropriate extension library
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
+    AC_MSG_CHECKING([For $1 library for LIBS])
+    # This simplifies the use of stub libraries by automatically adding
+    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
+    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
+    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
+    if test "x${$1_LIB_SPEC}" != "x" ; then
+       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+           TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"])
+           AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}])
+       else
+           TEA_ADD_LIBS([${$1_LIB_SPEC}])
+           AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}])
+       fi
+    else
+       AC_MSG_RESULT([file not found])
+    fi
+])
+
+#------------------------------------------------------------------------
+# TEA_EXPORT_CONFIG --
+#
+#      Define the data to insert into the ${PACKAGE}Config.sh file
+#
+# Arguments:
+#
+#      Requires the following vars to be set:
+#              $1
+#
+# Results:
+#      Substitutes the following vars:
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_EXPORT_CONFIG], [
+    #--------------------------------------------------------------------
+    # These are for $1Config.sh
+    #--------------------------------------------------------------------
+
+    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
+    eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
+    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+       eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
+       eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
+    else
+       eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+       eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+    fi
+    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
+    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
+    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
+    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
+    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
+    $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
+
+    AC_SUBST($1_BUILD_LIB_SPEC)
+    AC_SUBST($1_LIB_SPEC)
+    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
+    AC_SUBST($1_STUB_LIB_SPEC)
+    AC_SUBST($1_BUILD_STUB_LIB_PATH)
+    AC_SUBST($1_STUB_LIB_PATH)
+
+    AC_SUBST(MAJOR_VERSION)
+    AC_SUBST(MINOR_VERSION)
+    AC_SUBST(PATCHLEVEL)
+])
+
+
+#------------------------------------------------------------------------
+# 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}
+           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
+           AC_MSG_RESULT([found $CELIB_DIR])
+       fi
+    fi
+])
+# Local Variables:
+# mode: autoconf
+# End:
diff --git a/pkgs/tdbcpostgres1.0.2/tclconfig/tcl.m4 b/pkgs/tdbcpostgres1.0.2/tclconfig/tcl.m4
deleted file mode 100644 (file)
index e7b1113..0000000
+++ /dev/null
@@ -1,4180 +0,0 @@
-# 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.
-
-AC_PREREQ(2.57)
-
-dnl TEA extensions pass us the version of TEA they think they
-dnl are compatible with (must be set in TEA_INIT below)
-dnl TEA_VERSION="3.9"
-
-# Possible values for key variables defined:
-#
-# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
-# TEA_PLATFORM        - windows unix
-#
-
-#------------------------------------------------------------------------
-# 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 TEA specific: 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,
-           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 common install locations
-           if test x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
-       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,
-           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tk.framework/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/Tk.framework; 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 ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       ; do
-                   if test -f "$i/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tkconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
-       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:
-#
-#      Substitutes 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([could not find ${TCL_BIN_DIR}/tclConfig.sh])
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tcl was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tcl.framework installed in an arbitrary location.
-       case ${TCL_DEFS} in
-           *TCL_FRAMEWORK*)
-               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
-                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
-                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
-                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
-                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
-                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-    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_PATCH_LEVEL)
-    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_MSG_CHECKING([platform])
-    hold_cc=$CC; CC="$TCL_CC"
-    AC_TRY_COMPILE(,[
-           #ifdef _WIN32
-               #error win32
-           #endif
-    ], TEA_PLATFORM="unix",
-           TEA_PLATFORM="windows"
-    )
-    CC=$hold_cc
-    AC_MSG_RESULT($TEA_PLATFORM)
-
-    # The BUILD_$pkg is to define the correct extern storage class
-    # handling when making this package
-    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
-           [Building extension source?])
-    # Do this here as we have fully defined TEA_PLATFORM now
-    if test "${TEA_PLATFORM}" = "windows" ; then
-       EXEEXT=".exe"
-       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
-    fi
-
-    # TEA specific:
-    AC_SUBST(CLEANFILES)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-])
-
-#------------------------------------------------------------------------
-# 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
-
-    # eval is required to do the TK_DBGX substitution
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tk was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tk.framework installed in an arbitrary location.
-       case ${TK_DEFS} in
-           *TK_FRAMEWORK*)
-               if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
-                   for i in "`cd "${TK_BIN_DIR}"; pwd`" \
-                            "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
-                           TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
-                   TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
-                   TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TK_DBGX substitution
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    # TEA specific: Ensure windowingsystem is defined
-    if test "${TEA_PLATFORM}" = "unix" ; then
-       case ${TK_DEFS} in
-           *MAC_OSX_TK*)
-               AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
-               TEA_WINDOWINGSYSTEM="aqua"
-               ;;
-           *)
-               TEA_WINDOWINGSYSTEM="x11"
-               ;;
-       esac
-    elif test "${TEA_PLATFORM}" = "windows" ; then
-       TEA_WINDOWINGSYSTEM="win32"
-    fi
-
-    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)
-
-    # TEA specific:
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#      Determine the fully qualified path name of the tclsh executable
-#      in the Tcl build directory or the tclsh installed in a bin
-#      directory. This macro will correctly determine the name
-#      of the tclsh executable even if tclsh has not yet been
-#      built in the build directory. The tclsh found is always
-#      associated with a tclConfig.sh file. This tclsh should be used
-#      only for running extension test cases. It should never be
-#      or generation of files (like pkgIndex.tcl) at build time.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Substitutes the following vars:
-#              TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PROG_TCLSH], [
-    AC_MSG_CHECKING([for tclsh])
-    if test -f "${TCL_BIN_DIR}/Makefile" ; then
-        # tclConfig.sh is in Tcl build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
-        fi
-    else
-        # tclConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
-        fi
-        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${TCLSH_PROG}" ; then
-                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
-    fi
-    AC_MSG_RESULT([${TCLSH_PROG}])
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#      Determine the fully qualified path name of the wish executable
-#      in the Tk build directory or the wish installed in a bin
-#      directory. This macro will correctly determine the name
-#      of the wish executable even if wish has not yet been
-#      built in the build directory. The wish found is always
-#      associated with a tkConfig.sh file. This wish should be used
-#      only for running extension test cases. It should never be
-#      or generation of files (like pkgIndex.tcl) at build time.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Substitutes the following vars:
-#              WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PROG_WISH], [
-    AC_MSG_CHECKING([for wish])
-    if test -f "${TK_BIN_DIR}/Makefile" ; then
-        # tkConfig.sh is in Tk build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
-        else
-            WISH_PROG="${TK_BIN_DIR}/wish"
-        fi
-    else
-        # tkConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
-        else
-            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
-        fi
-        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${WISH_PROG}" ; then
-                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
-    fi
-    AC_MSG_RESULT([${WISH_PROG}])
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# 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,
-       AC_HELP_STRING([--enable-shared],
-           [build and link with shared libraries (default: on)]),
-       [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, 1, [Is this a 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, "no" means
-#      threads are disabled.  "yes" is the 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.
-#
-#      Note that it is legal to have a thread enabled extension run in a
-#      threaded or non-threaded Tcl core, but a non-threaded extension may
-#      only run in a non-threaded Tcl core.
-#
-# 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
-#              _THREAD_SAFE
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_ENABLE_THREADS], [
-    AC_ARG_ENABLE(threads,
-       AC_HELP_STRING([--enable-threads],
-           [build with threads]),
-       [tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_threads+set}" = set; then
-       enableval="$enable_threads"
-       tcl_ok=$enableval
-    else
-       tcl_ok=yes
-    fi
-
-    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:
-
-           # USE_THREAD_ALLOC tells us to try the special thread-based
-           # allocator that significantly reduces lock contention
-           AC_DEFINE(USE_THREAD_ALLOC, 1,
-               [Do we want to use the threaded memory allocator?])
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           if test "`uname -s`" = "SunOS" ; then
-               AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-                       [Do we really want to follow the standard? Yes we do!])
-           fi
-           AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
-           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([Do not know how to find pthread lib on your system - thread support disabled])
-                       fi
-                   fi
-               fi
-           fi
-       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, 1, [Are we building with threads enabled?])
-       AC_MSG_RESULT([yes (default)])
-    else
-       AC_MSG_RESULT([no])
-    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 Tcl
-    that IS thread-enabled.  It is recommended to use --enable-threads.])
-           fi
-           ;;
-       *)
-           if test "${TCL_THREADS}" = "1"; then
-               AC_MSG_WARN([
-    --enable-threads requested, but building against a Tcl that is NOT
-    thread-enabled.  This is an OK configuration that will also run in
-    a thread-enabled core.])
-           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
-#
-#      TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
-#      the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
-#      Requires the following vars to be set in the Makefile:
-#              CFLAGS_DEFAULT
-#              LDFLAGS_DEFAULT
-#
-# 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) -DNDEBUG" 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 TEA specific: Make sure we are initialized
-    AC_REQUIRE([TEA_CONFIG_CFLAGS])
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols,
-       AC_HELP_STRING([--enable-symbols],
-           [build with debugging symbols (default: off)]),
-       [tcl_ok=$enableval], [tcl_ok=no])
-    DBGX=""
-    if test "$tcl_ok" = "no"; then
-       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
-       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
-    # TEA specific:
-    if test "${TEA_PLATFORM}" != "windows" ; then
-       LDFLAGS_DEFAULT="${LDFLAGS}"
-    fi
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-    AC_SUBST(TCL_DBGX)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-       AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
-    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,
-       AC_HELP_STRING([--enable-langinfo],
-           [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
-       [langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-       AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-       AC_CACHE_VAL(tcl_cv_langinfo_h, [
-           AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
-                   [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
-       AC_MSG_RESULT([$tcl_cv_langinfo_h])
-       if test $tcl_cv_langinfo_h = yes; then
-           AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
-       fi
-    else
-       AC_MSG_RESULT([$langinfo_ok])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_SYSTEM
-#
-#      Determine what the system is (some things cannot be easily checked
-#      on a feature-driven basis, alas). This can usually be done via the
-#      "uname" command.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Defines the following var:
-#
-#      system -        System/platform/version identification code.
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_CONFIG_SYSTEM], [
-    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
-       # TEA specific:
-       if test "${TEA_PLATFORM}" = "windows" ; then
-           tcl_cv_sys_version=windows
-       else
-           tcl_cv_sys_version=`uname -s`-`uname -r`
-           if test "$?" -ne 0 ; then
-               AC_MSG_WARN([can't find uname command])
-               tcl_cv_sys_version=unknown
-           else
-               if test "`uname -s`" = "AIX" ; then
-                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
-               fi
-           fi
-       fi
-    ])
-    system=$tcl_cv_sys_version
-])
-
-#--------------------------------------------------------------------
-# 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 and substitutes the following vars:
-#
-#      DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
-#       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. Could
-#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
-#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/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 defaults to
-#                       "${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.
-#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
-#                       in a static or 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 a shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
-#      CFLAGS_DEBUG -
-#                      Flags used when running the compiler in debug mode
-#      CFLAGS_OPTIMIZE -
-#                      Flags used when running the compiler in optimize mode
-#      CFLAGS -        Additional CFLAGS added as necessary (usually 64-bit)
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_CONFIG_CFLAGS], [
-    dnl TEA specific: Make sure we are initialized
-    AC_REQUIRE([TEA_INIT])
-
-    # Step 0.a: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is requested])
-    AC_ARG_ENABLE(64bit,
-       AC_HELP_STRING([--enable-64bit],
-           [enable 64bit support (default: off)]),
-       [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,
-       AC_HELP_STRING([--enable-64bit-vis],
-           [enable 64bit Sparc VIS support (default: off)]),
-       [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-    # Force 64bit on with VIS
-    AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes])
-
-    # Step 0.c: Check if visibility support is available. Do this here so
-    # that platform specific alternatives can be used below if this fails.
-
-    AC_CACHE_CHECK([if compiler supports visibility "hidden"],
-       tcl_cv_cc_visibility_hidden, [
-       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
-       AC_TRY_LINK([
-           extern __attribute__((__visibility__("hidden"))) void f(void);
-           void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
-           tcl_cv_cc_visibility_hidden=no)
-       CFLAGS=$hold_cflags])
-    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
-       AC_DEFINE(MODULE_SCOPE,
-           [extern __attribute__((__visibility__("hidden")))],
-           [Compiler support for module scope symbols])
-       AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
-    ])
-
-    # Step 0.d: Disable -rpath support?
-
-    AC_MSG_CHECKING([if rpath support is requested])
-    AC_ARG_ENABLE(rpath,
-       AC_HELP_STRING([--disable-rpath],
-           [disable rpath support (default: on)]),
-       [doRpath=$enableval], [doRpath=yes])
-    AC_MSG_RESULT([$doRpath])
-
-    # TEA specific: Cross-compiling options for Windows/CE builds?
-
-    AS_IF([test "${TEA_PLATFORM}" = windows], [
-       AC_MSG_CHECKING([if Windows/CE build is requested])
-       AC_ARG_ENABLE(wince,
-           AC_HELP_STRING([--enable-wince],
-               [enable Win/CE support (where applicable)]),
-           [doWince=$enableval], [doWince=no])
-       AC_MSG_RESULT([$doWince])
-    ])
-
-    # Set the variable "system" to hold the name and version number
-    # for the system.
-
-    TEA_CONFIG_SYSTEM
-
-    # Require ranlib early so we can override it in special cases below.
-
-    AC_REQUIRE([AC_PROG_RANLIB])
-
-    # 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 removed some core-only vars.
-
-    do64bit_ok=no
-    # default to '{$LIBS}' and set to "" on per-platform necessary basis
-    SHLIB_LD_LIBS='${LIBS}'
-    # When ld needs options to work in 64-bit mode, put them in
-    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
-    # is disabled by the user. [Bug 1016796]
-    LDFLAGS_ARCH=""
-    UNSHARED_LIB_SUFFIX=""
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    AS_IF([test "$GCC" = yes], [
-       CFLAGS_OPTIMIZE=-O2
-       CFLAGS_WARNING="-Wall"
-    ], [
-       CFLAGS_OPTIMIZE=-O
-       CFLAGS_WARNING=""
-    ])
-    AC_CHECK_TOOL(AR, ar)
-    STLIB_LD='${AR} cr'
-    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
-    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION=""],[SHLIB_VERSION=".$SHLIB_VERSION"])
-    case $system in
-       # TEA specific:
-       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.
-           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
-           # MACHINE is IX86 for LINK, but this is used by the manifest,
-           # which requires x86|amd64|ia64.
-           MACHINE="X86"
-           if test "$do64bit" != "no" ; then
-               if test "x${MSSDK}x" = "xx" ; then
-                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
-               fi
-               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
-               PATH64=""
-               case "$do64bit" in
-                   amd64|x64|yes)
-                       MACHINE="AMD64" ; # default to AMD64 64-bit build
-                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
-                       ;;
-                   ia64)
-                       MACHINE="IA64"
-                       PATH64="${MSSDK}/Bin/Win64"
-                       ;;
-               esac
-               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
-                   AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
-                   AC_MSG_WARN([Ensure latest Platform SDK is installed])
-                   do64bit="no"
-               else
-                   AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
-                   do64bit_ok="yes"
-               fi
-           fi
-
-           if test "$doWince" != "no" ; then
-               if test "$do64bit" != "no" ; 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
-               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
-               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
-               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" != "no" ; then
-                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
-                   CC="\"${PATH64}/cl.exe\""
-                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
-                   RC="\"${MSSDK}/bin/rc.exe\""
-                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
-                   LINKBIN="\"${PATH64}/link.exe\""
-                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
-                   # Avoid 'unresolved external symbol __security_cookie'
-                   # errors, c.f. http://support.microsoft.com/?id=894573
-                   TEA_ADD_LIBS([bufferoverflowU.lib])
-               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, 1, [WinCE def ]$i)
-                   done
-                   AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
-                   AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
-                   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
-               AC_CHECK_TOOL(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}"
-
-               AC_CACHE_CHECK(for cross-compile version of gcc,
-                       ac_cv_cross,
-                       AC_TRY_COMPILE([
-                           #ifdef _WIN32
-                               #error cross-compiler
-                           #endif
-                       ], [],
-                       ac_cv_cross=yes,
-                       ac_cv_cross=no)
-                     )
-                     if test "$ac_cv_cross" = "yes"; then
-                       case "$do64bit" in
-                           amd64|x64|yes)
-                               CC="x86_64-w64-mingw32-gcc"
-                               LD="x86_64-w64-mingw32-ld"
-                               AR="x86_64-w64-mingw32-ar"
-                               RANLIB="x86_64-w64-mingw32-ranlib"
-                               RC="x86_64-w64-mingw32-windres"
-                           ;;
-                           *)
-                               CC="i686-w64-mingw32-gcc"
-                               LD="i686-w64-mingw32-ld"
-                               AR="i686-w64-mingw32-ar"
-                               RANLIB="i686-w64-mingw32-ranlib"
-                               RC="i686-w64-mingw32-windres"
-                           ;;
-                       esac
-               fi
-
-           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
-               # and also
-               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
-               # This essentially turns it all on.
-               LDFLAGS_DEBUG="-debug -debugtype:cv"
-               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_SUFFIX=".dll"
-           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
-
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       AIX-*)
-           AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
-               # AIX requires the _r compiler when gcc isn't being used
-               case "${CC}" in
-                   *_r|*_r\ *)
-                       # ok ...
-                       ;;
-                   *)
-                       # Make sure only first arg gets _r
-                       CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
-                       ;;
-               esac
-               AC_MSG_RESULT([Using $CC for compiling with threads])
-           ])
-           LIBS="$LIBS -lc"
-           SHLIB_CFLAGS=""
-           SHLIB_SUFFIX=".so"
-
-           LD_LIBRARY_PATH_VAR="LIBPATH"
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = yes], [
-               AS_IF([test "$GCC" = yes], [
-                   AC_MSG_WARN([64bit mode not supported with GCC on $system])
-               ], [
-                   do64bit_ok=yes
-                   CFLAGS="$CFLAGS -q64"
-                   LDFLAGS_ARCH="-q64"
-                   RANLIB="${RANLIB} -X64"
-                   AR="${AR} -X64"
-                   SHLIB_LD_FLAGS="-b64"
-               ])
-           ])
-
-           AS_IF([test "`uname -m`" = ia64], [
-               # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               AS_IF([test "$GCC" = yes], [
-                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               ], [
-                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-               ])
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-           ], [
-               AS_IF([test "$GCC" = yes], [
-                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
-               ], [
-                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
-                   LDFLAGS="$LDFLAGS -brtl"
-               ])
-               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
-               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ])
-           ;;
-       BeOS*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -nostart'
-           SHLIB_SUFFIX=".so"
-
-           #-----------------------------------------------------------
-           # Check for inet_ntoa in -lbind, for BeOS (which also needs
-           # -lsocket, even if the network functions are in -lnet which
-           # is always linked to, for compatibility.
-           #-----------------------------------------------------------
-           AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
-           ;;
-       BSD/OS-4.*)
-           SHLIB_CFLAGS="-export-dynamic -fPIC"
-           SHLIB_LD='${CC} -shared'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       CYGWIN_*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD='${CC} -shared'
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
-           SHLIB_SUFFIX=".dll"
-           EXEEXT=".exe"
-           do64bit_ok=yes
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       Haiku*)
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
-           AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
-           ;;
-       HP-UX-*.11.*)
-           # Use updated header definitions where possible
-           AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
-           # TEA specific: Needed by Tcl, but not most extensions
-           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
-           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
-
-           AS_IF([test "`uname -m`" = ia64], [
-               SHLIB_SUFFIX=".so"
-               # Use newer C++ library for C++ extensions
-               #if test "$GCC" != "yes" ; then
-               #   CPPFLAGS="-AA"
-               #fi
-           ], [
-               SHLIB_SUFFIX=".sl"
-           ])
-           AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-           AS_IF([test "$tcl_ok" = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-E"
-               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
-               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
-           ])
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ], [
-               CFLAGS="$CFLAGS -z"
-               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-               #CFLAGS="$CFLAGS +DAportable"
-               SHLIB_CFLAGS="+z"
-               SHLIB_LD="ld -b"
-           ])
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = "yes"], [
-               AS_IF([test "$GCC" = yes], [
-                   case `${CC} -dumpmachine` in
-                       hppa64*)
-                           # 64-bit gcc in use.  Fix flags for GNU ld.
-                           do64bit_ok=yes
-                           SHLIB_LD='${CC} -shared'
-                           AS_IF([test $doRpath = yes], [
-                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-                           ;;
-                       *)
-                           AC_MSG_WARN([64bit mode not supported with GCC on $system])
-                           ;;
-                   esac
-               ], [
-                   do64bit_ok=yes
-                   CFLAGS="$CFLAGS +DD64"
-                   LDFLAGS_ARCH="+DD64"
-               ])
-           ]) ;;
-       IRIX-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-           AS_IF([test "$GCC" = yes], [
-               CFLAGS="$CFLAGS -mabi=n32"
-               LDFLAGS="$LDFLAGS -mabi=n32"
-           ], [
-               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"
-           ])
-           ;;
-       IRIX64-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-
-           # Check to enable 64-bit flags for compiler/linker
-
-           AS_IF([test "$do64bit" = yes], [
-               AS_IF([test "$GCC" = yes], [
-                   AC_MSG_WARN([64bit mode not supported by gcc])
-               ], [
-                   do64bit_ok=yes
-                   SHLIB_LD="ld -64 -shared -rdata_shared"
-                   CFLAGS="$CFLAGS -64"
-                   LDFLAGS_ARCH="-64"
-               ])
-           ])
-           ;;
-       Linux*|GNU*|NetBSD-Debian)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-
-           # TEA specific:
-           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
-
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
-           AS_IF([test $do64bit = yes], [
-               AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
-                   hold_cflags=$CFLAGS
-                   CFLAGS="$CFLAGS -m64"
-                   AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
-                   CFLAGS=$hold_cflags])
-               AS_IF([test $tcl_cv_cc_m64 = yes], [
-                   CFLAGS="$CFLAGS -m64"
-                   do64bit_ok=yes
-               ])
-          ])
-
-           # 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.
-
-           AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
-           ;;
-       Lynx*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           CFLAGS_OPTIMIZE=-02
-           SHLIB_LD='${CC} -shared'
-           LD_FLAGS="-Wl,--export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           ;;
-       OpenBSD-*)
-           arch=`arch -s`
-           case "$arch" in
-           vax)
-               SHLIB_SUFFIX=""
-               SHARED_LIB_SUFFIX=""
-               LDFLAGS=""
-               ;;
-           *)
-               case "$arch" in
-               alpha|sparc64)
-                   SHLIB_CFLAGS="-fPIC"
-                   ;;
-               *)
-                   SHLIB_CFLAGS="-fpic"
-                   ;;
-               esac
-               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-               SHLIB_SUFFIX=".so"
-               AS_IF([test $doRpath = yes], [
-                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
-               LDFLAGS="-Wl,-export-dynamic"
-               ;;
-           esac
-           case "$arch" in
-           vax)
-               CFLAGS_OPTIMIZE="-O1"
-               ;;
-           *)
-               CFLAGS_OPTIMIZE="-O2"
-               ;;
-           esac
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # On OpenBSD:   Compile with -pthread
-               #               Don't link with -lpthread
-               LIBS=`echo $LIBS | sed s/-lpthread//`
-               CFLAGS="$CFLAGS -pthread"
-           ])
-           # OpenBSD doesn't do version numbers with dots.
-           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       NetBSD-*)
-           # NetBSD has ELF and can use 'cc -shared' to build shared libs
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # The -pthread needs to go in the CFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS -pthread"
-               LDFLAGS="$LDFLAGS -pthread"
-           ])
-           ;;
-       FreeBSD-*)
-           # This configuration from FreeBSD Ports.
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD="${CC} -shared"
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
-           SHLIB_SUFFIX=".so"
-           LDFLAGS=""
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # The -pthread needs to go in the LDFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
-           case $system in
-           FreeBSD-3.*)
-               # Version numbers are dot-stripped by system policy.
-               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
-               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
-               TCL_LIB_VERSIONS_OK=nodots
-               ;;
-           esac
-           ;;
-       Darwin-*)
-           CFLAGS_OPTIMIZE="-Os"
-           SHLIB_CFLAGS="-fno-common"
-           # To avoid discrepancies between what headers configure sees during
-           # preprocessing tests and compiling tests, move any -isysroot and
-           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
-           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
-           CFLAGS="`echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
-           AS_IF([test $do64bit = yes], [
-               case `arch` in
-                   ppc)
-                       AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
-                               tcl_cv_cc_arch_ppc64, [
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
-                                   tcl_cv_cc_arch_ppc64=no)
-                           CFLAGS=$hold_cflags])
-                       AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           do64bit_ok=yes
-                       ]);;
-                   i386)
-                       AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
-                               tcl_cv_cc_arch_x86_64, [
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
-                                   tcl_cv_cc_arch_x86_64=no)
-                           CFLAGS=$hold_cflags])
-                       AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           do64bit_ok=yes
-                       ]);;
-                   *)
-                       AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
-               esac
-           ], [
-               # Check for combined 32-bit and 64-bit fat build
-               AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
-                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
-                   fat_32_64=yes])
-           ])
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_single_module = yes], [
-               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
-           ])
-           # TEA specific: link shlib with current and compatibility version flags
-           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
-           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
-           SHLIB_SUFFIX=".dylib"
-           # Don't use -prebind when building for Mac OS X 10.4 or later only:
-           AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
-               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
-               LDFLAGS="$LDFLAGS -prebind"])
-           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
-           AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
-                   tcl_cv_ld_search_paths_first, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
-                       tcl_cv_ld_search_paths_first=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-           ])
-           AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
-               AC_DEFINE(MODULE_SCOPE, [__private_extern__],
-                   [Compiler support for module scope symbols])
-               tcl_cv_cc_visibility_hidden=yes
-           ])
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-           # TEA specific: for combined 32 & 64 bit fat builds of Tk
-           # extensions, verify that 64-bit build is possible.
-           AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
-               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [
-                   AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
-                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
-                       AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();],
-                           tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no)
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done])
-               ])
-               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [
-                   AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
-                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
-                       AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);],
-                           tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no)
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done])
-               ])
-               # remove 64-bit arch flags from CFLAGS et al. if configuration
-               # does not support 64-bit.
-               AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
-                   AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
-                   for v in CFLAGS CPPFLAGS LDFLAGS; do
-                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
-                   done])
-           ])
-           ;;
-       OS/390-*)
-           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
-           AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
-               [Should OS/390 do the right thing with sockets?])
-           ;;
-       OSF1-V*)
-           # Digital OSF/1
-           SHLIB_CFLAGS=""
-           AS_IF([test "$SHARED_BUILD" = 1], [
-               SHLIB_LD='ld -shared -expect_unresolved "*"'
-           ], [
-               SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-           ])
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-           AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
-               CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
-           # see pthread_intro(3) for pthread support on osf1, k.furukawa
-           AS_IF([test "${TCL_THREADS}" = 1], [
-               CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-               CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-               LIBS=`echo $LIBS | sed s/-lpthreads//`
-               AS_IF([test "$GCC" = yes], [
-                   LIBS="$LIBS -lpthread -lmach -lexc"
-               ], [
-                   CFLAGS="$CFLAGS -pthread"
-                   LDFLAGS="$LDFLAGS -pthread"
-               ])
-           ])
-           ;;
-       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"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SCO_SV-3.2*)
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_CFLAGS="-fPIC -melf"
-               LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
-           ], [
-               SHLIB_CFLAGS="-Kpic -belf"
-               LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
-           ])
-           SHLIB_LD="ld -G"
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SunOS-5.[[0-6]])
-           # Careful to not let 5.10+ fall into this case
-
-           # Note: If _REENTRANT isn't defined, then Solaris
-           # won't define thread-safe library routines.
-
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-               [Do we really want to follow the standard? Yes we do!])
-
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ], [
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ])
-           ;;
-       SunOS-5*)
-           # Note: If _REENTRANT isn't defined, then Solaris
-           # won't define thread-safe library routines.
-
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-               [Do we really want to follow the standard? Yes we do!])
-
-           SHLIB_CFLAGS="-KPIC"
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = yes], [
-               arch=`isainfo`
-               AS_IF([test "$arch" = "sparcv9 sparc"], [
-                   AS_IF([test "$GCC" = yes], [
-                       AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
-                           AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
-                       ], [
-                           do64bit_ok=yes
-                           CFLAGS="$CFLAGS -m64 -mcpu=v9"
-                           LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
-                           SHLIB_CFLAGS="-fPIC"
-                       ])
-                   ], [
-                       do64bit_ok=yes
-                       AS_IF([test "$do64bitVIS" = yes], [
-                           CFLAGS="$CFLAGS -xarch=v9a"
-                           LDFLAGS_ARCH="-xarch=v9a"
-                       ], [
-                           CFLAGS="$CFLAGS -xarch=v9"
-                           LDFLAGS_ARCH="-xarch=v9"
-                       ])
-                       # Solaris 64 uses this as well
-                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
-                   ])
-               ], [AS_IF([test "$arch" = "amd64 i386"], [
-                   AS_IF([test "$GCC" = yes], [
-                       case $system in
-                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
-                               do64bit_ok=yes
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               AC_MSG_WARN([64bit mode not supported with GCC on $system]);;
-                       esac
-                   ], [
-                       do64bit_ok=yes
-                       case $system in
-                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               CFLAGS="$CFLAGS -xarch=amd64"
-                               LDFLAGS="$LDFLAGS -xarch=amd64";;
-                       esac
-                   ])
-               ], [AC_MSG_WARN([64bit mode not supported for $arch])])])
-           ])
-
-           SHLIB_SUFFIX=".so"
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               AS_IF([test "$do64bit_ok" = yes], [
-                   AS_IF([test "$arch" = "sparcv9 sparc"], [
-                       # 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` | ..."
-                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
-                   ], [AS_IF([test "$arch" = "amd64 i386"], [
-                       # JH: static-libgcc is necessary for core Tcl, but may
-                       # not be necessary for extensions.
-                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
-                   ])])
-               ])
-           ], [
-               case $system in
-                   SunOS-5.[[1-9]][[0-9]]*)
-                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
-                   *)
-                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
-               esac
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-           ])
-           ;;
-       UNIX_SV* | UnixWare-5*)
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_LD='${CC} -G'
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-           # that don't grok the -Bexport option.  Test that it does.
-           AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_Bexport = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-           ])
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-    esac
-
-    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
-       AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
-    ])
-
-dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
-dnl # until the end of configure, as configure's compile and link tests use
-dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
-dnl # preprocessing tests use only CPPFLAGS.
-    AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
-
-    # Add in the arch flags late to ensure it wasn't removed.
-    # Not necessary in TEA, but this is aligned with core
-    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
-
-    # 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.
-
-    AS_IF([test "$GCC" = yes], [
-       case $system in
-           AIX-*) ;;
-           BSD/OS*) ;;
-           CYGWIN_*|MINGW32_*) ;;
-           IRIX*) ;;
-           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
-           Darwin-*) ;;
-           SCO_SV-3.2*) ;;
-           windows) ;;
-           *) SHLIB_CFLAGS="-fPIC" ;;
-       esac])
-
-    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
-       AC_DEFINE(MODULE_SCOPE, [extern],
-           [No Compiler support for module scope symbols])
-    ])
-
-    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
-    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
-
-    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
-       AC_CACHE_CHECK(for SEH support in compiler,
-           tcl_cv_seh,
-       AC_TRY_RUN([
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-           int main(int argc, char** argv) {
-               int a, b = 0;
-               __try {
-                   a = 666 / b;
-               }
-               __except (EXCEPTION_EXECUTE_HANDLER) {
-                   return 0;
-               }
-               return 1;
-           }
-       ],
-           tcl_cv_seh=yes,
-           tcl_cv_seh=no,
-           tcl_cv_seh=no)
-       )
-       if test "$tcl_cv_seh" = "no" ; then
-           AC_DEFINE(HAVE_NO_SEH, 1,
-                   [Defined when mingw does not support SEH])
-       fi
-
-       #
-       # Check to see if the excpt.h include file provided contains the
-       # definition for EXCEPTION_DISPOSITION; if not, which is the case
-       # with Cygwin's version as of 2002-04-10, define it to be int,
-       # sufficient for getting the current code to work.
-       #
-       AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
-           tcl_cv_eh_disposition,
-           AC_TRY_COMPILE([
-#          define WIN32_LEAN_AND_MEAN
-#          include <windows.h>
-#          undef WIN32_LEAN_AND_MEAN
-           ],[
-               EXCEPTION_DISPOSITION x;
-           ],
-               tcl_cv_eh_disposition=yes,
-               tcl_cv_eh_disposition=no)
-       )
-       if test "$tcl_cv_eh_disposition" = "no" ; then
-       AC_DEFINE(EXCEPTION_DISPOSITION, int,
-               [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
-       fi
-
-       # Check to see if winnt.h defines CHAR, SHORT, and LONG
-       # even if VOID has already been #defined. The win32api
-       # used by mingw and cygwin is known to do this.
-
-       AC_CACHE_CHECK(for winnt.h that ignores VOID define,
-           tcl_cv_winnt_ignore_void,
-           AC_TRY_COMPILE([
-#define VOID void
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-           ], [
-               CHAR c;
-               SHORT s;
-               LONG l;
-           ],
-        tcl_cv_winnt_ignore_void=yes,
-        tcl_cv_winnt_ignore_void=no)
-       )
-       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
-           AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
-                   [Defined when cygwin/mingw ignores VOID define in winnt.h])
-       fi
-    fi
-
-       # See if the compiler supports casting to a union type.
-       # This is used to stop gcc from printing a compiler
-       # warning when initializing a union member.
-
-       AC_CACHE_CHECK(for cast to union support,
-           tcl_cv_cast_to_union,
-           AC_TRY_COMPILE([],
-           [
-                 union foo { int i; double d; };
-                 union foo f = (union foo) (int) 0;
-           ],
-           tcl_cv_cast_to_union=yes,
-           tcl_cv_cast_to_union=no)
-       )
-       if test "$tcl_cv_cast_to_union" = "yes"; then
-           AC_DEFINE(HAVE_CAST_TO_UNION, 1,
-                   [Defined when compiler supports casting to union type.])
-       fi
-
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(SHLIB_CFLAGS)
-
-    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_CACHE_CHECK([termios vs. termio vs. sgtty], 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=no, tcl_cv_api_serial=no)
-    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, 1, [Use the termios API for serial lines]);;
-       termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
-       sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#      Supply substitutes for missing POSIX header files.  Special
-#      notes:
-#          - stdlib.h doesn't define strtol, strtoul, or
-#            strtod in some 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_CACHE_CHECK([dirent.h], tcl_cv_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_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
-
-    if test $tcl_cv_dirent_h = no; then
-       AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
-    fi
-
-    # TEA specific:
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
-    AC_CHECK_HEADER(limits.h,
-       [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
-       [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <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, 1, [Do we have <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, 1, [Do we have <string.h>?])
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <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
-#              PKG_LIBS (appends to)
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_PATH_X], [
-    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
-       TEA_PATH_UNIX_X
-    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/Xlib.h>], , not_really_there="yes")
-       else
-           if test ! -r $x_includes/X11/Xlib.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])
-       found_xincludes="no"
-       AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
-       if test "$found_xincludes" = "no"; 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/Xlib.h; then
-                   AC_MSG_RESULT([$i])
-                   XINCLUDES=" -I$i"
-                   found_xincludes="yes"
-                   break
-               fi
-           done
-       fi
-    else
-       if test "$x_includes" != ""; then
-           XINCLUDES="-I$x_includes"
-           found_xincludes="yes"
-       fi
-    fi
-    if test "$found_xincludes" = "no"; then
-       AC_MSG_RESULT([couldn't find any!])
-    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 -o -r $i/libX11.dylib; 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
-    # TEA specific:
-    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)
-    TEA_CONFIG_SYSTEM
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    case $system in
-       OSF*)
-           AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
-           AC_MSG_RESULT([FIONBIO])
-           ;;
-       *)
-           AC_MSG_RESULT([O_NONBLOCK])
-           ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANDLER
-#
-#      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_CACHE_CHECK([tm_tzadj in struct tm], 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)])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-       AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
-    fi
-
-    AC_CACHE_CHECK([tm_gmtoff in struct tm], 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)])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-       AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
-       AC_TRY_COMPILE([#include <time.h>],
-           [extern long timezone;
-           timezone += 1;
-           exit (0);],
-           tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
-    if test $tcl_cv_timezone_long = yes ; then
-       AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
-    else
-       #
-       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-       #
-       AC_CACHE_CHECK([time_t timezone variable], 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)])
-       if test $tcl_cv_timezone_time = yes ; then
-           AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
-       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_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
-           AC_TRY_RUN([
-               extern double strtod();
-               int main() {
-                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
-                   char *term;
-                   double value;
-                   value = strtod(infString, &term);
-                   if ((term != infString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(nanString, &term);
-                   if ((term != nanString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(spaceString, &term);
-                   if (term == (spaceString+1)) {
-                       exit(1);
-                   }
-                   exit(0);
-               }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
-                   tcl_cv_strtod_buggy=buggy)])
-       if test "$tcl_cv_strtod_buggy" = buggy; then
-           AC_LIBOBJ([fixstrtod])
-           USE_COMPAT=1
-           AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
-       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 (not in TEA, only needed in core)
-#              LIBS
-#              MATH_LIBS
-#
-# Results:
-#
-#      Substitutes the following vars:
-#              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, 1, [Do we 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"])])
-
-    # TEA specific: 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
-#              _LARGEFILE_SOURCE64
-#--------------------------------------------------------------------
-
-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, 1, [Add the ]$1[ flag when building])
-       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);])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
-       [char *p = (char *)open64;])
-    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, 1, [Are wide integers to be implemented with C 'long's?])
-       AC_MSG_RESULT([using long])
-    elif test "${tcl_cv_type_64bit}" = "__int64" \
-               -a "${TEA_PLATFORM}" = "windows" ; then
-       # TEA specific: 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},
-           [What type should be used to define wide integers?])
-       AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-       # Now check for auxiliary declarations
-       AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
-           AC_TRY_COMPILE([#include <sys/types.h>
-#include <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, 1, [Is 'struct dirent64' in <sys/types.h>?])
-       fi
-
-       AC_CACHE_CHECK([for struct stat64], 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, 1, [Is 'struct stat64' in <sys/stat.h>?])
-       fi
-
-       AC_CHECK_FUNCS(open64 lseek64)
-       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)])
-       dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
-       dnl functions lseek64 and open64 are defined.
-       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
-               test "x${ac_cv_func_lseek64}" = "xyes" && \
-               test "x${ac_cv_func_open64}" = "xyes" ; then
-           AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
-           AC_MSG_RESULT([yes])
-       else
-           AC_MSG_RESULT([no])
-       fi
-    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_VERSION
-#              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.9"
-
-    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
-
-    # If the user did not set CFLAGS, set it now to keep macros
-    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-       CFLAGS=""
-    fi
-
-    case "`uname -s`" in
-       *win32*|*WIN32*|*MINGW32_*)
-           AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-           EXEEXT=".exe"
-           TEA_PLATFORM="windows"
-           ;;
-       *CYGWIN_*)
-           CYGPATH=echo
-           EXEEXT=".exe"
-           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
-           ;;
-       *)
-           CYGPATH=echo
-           # Maybe we are cross-compiling....
-           case ${host_alias} in
-               *mingw32*)
-               EXEEXT=".exe"
-               TEA_PLATFORM="windows"
-               ;;
-           *)
-               EXEEXT=""
-               TEA_PLATFORM="unix"
-               ;;
-           esac
-           ;;
-    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_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}])
-
-    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
-               # To add more dirs here (like 'src'), you have to update VPATH
-               # in Makefile.in as well
-               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
-                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-                   -a ! -f "${srcdir}/macosx/$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" \
-           -a ! -f "${srcdir}/macosx/$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_ADD_CLEANFILES --
-#
-#      Specify one or more CLEANFILES.
-#
-# Arguments:
-#      one or more file names to clean target
-#
-# Results:
-#
-#      Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG
-#------------------------------------------------------------------------
-AC_DEFUN([TEA_ADD_CLEANFILES], [
-    CLEANFILES="$CLEANFILES $@"
-])
-
-#------------------------------------------------------------------------
-# 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.
-
-    AC_PROG_CC
-    AC_PROG_CPP
-
-    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
-    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
-    INSTALL_DATA='${INSTALL} -m 644'
-    INSTALL_PROGRAM='${INSTALL}'
-    INSTALL_SCRIPT='${INSTALL}'
-    INSTALL_LIBRARY='${INSTALL_DATA}'
-
-    AC_SUBST(INSTALL)
-    AC_SUBST(INSTALL_DATA_DIR)
-    AC_SUBST(INSTALL_DATA)
-    AC_SUBST(INSTALL_PROGRAM)
-    AC_SUBST(INSTALL_SCRIPT)
-    AC_SUBST(INSTALL_LIBRARY)
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_CHECK_TOOL(RANLIB, 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_CACHE_CHECK([if the compiler understands -pipe],
-           tcl_cv_cc_pipe, [
-           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
-           AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
-           CFLAGS=$hold_cflags])
-       if test $tcl_cv_cc_pipe = yes; then
-           CFLAGS="$CFLAGS -pipe"
-       fi
-    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
-#      VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
-#      VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
-#------------------------------------------------------------------------
-
-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)"
-       AC_EGREP_CPP([manifest needed], [
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-print("manifest needed")
-#endif
-       ], [
-       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
-       VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
-       VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
-       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
-       TEA_ADD_CLEANFILES([*.manifest])
-       ])
-       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
-           if test x"${TK_BIN_DIR}" != x ; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-           fi
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-           if test "$GCC" = "yes"; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
-           fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-       else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-           if test "$GCC" = "yes"; then
-               PKG_LIB_FILE=lib${PKG_LIB_FILE}
-           fi
-       fi
-       # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
-       if test "$GCC" = "yes"; then
-           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
-       fi
-       # 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 their 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)
-    AC_SUBST(VC_MANIFEST_EMBED_DLL)
-    AC_SUBST(VC_MANIFEST_EMBED_EXE)
-])
-
-#------------------------------------------------------------------------
-# 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/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
-           `ls -dr /usr/lib64/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:
-#
-#      Substitutes the following vars:
-#              TCL_TOP_DIR_NATIVE
-#              TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
-    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
-    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
-    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
-
-    # Check to see if tcl<Plat>Port.h isn't already with the public headers
-    # Don't look for tclInt.h because that resides with tcl.h in the core
-    # sources, but the <plat>Port headers are in a different directory
-    if test "${TEA_PLATFORM}" = "windows" -a \
-       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
-       result="private headers found with public headers"
-    elif test "${TEA_PLATFORM}" = "unix" -a \
-       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
-       result="private headers found with public headers"
-    else
-       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
-       if test "${TEA_PLATFORM}" = "windows"; then
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
-       else
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
-       fi
-       # Overwrite the previous TCL_INCLUDES as this should capture both
-       # public and private headers in the same set.
-       # We want to ensure these are substituted so as not to require
-       # any *_NATIVE vars be defined in the Makefile
-       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-       if test "`uname -s`" = "Darwin"; then
-            # If Tcl was built as a framework, attempt to use
-            # the framework's Headers and PrivateHeaders directories
-            case ${TCL_DEFS} in
-               *TCL_FRAMEWORK*)
-                   if test -d "${TCL_BIN_DIR}/Headers" -a \
-                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
-                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
-                   else
-                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
-                   fi
-                   ;;
-           esac
-           result="Using ${TCL_INCLUDES}"
-       else
-           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
-               AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
-           fi
-           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
-       fi
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([${result}])
-])
-
-#------------------------------------------------------------------------
-# 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.
-#
-#      Substitutes 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
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tcl was built as a framework, attempt to use
-               # the framework's Headers directory
-               case ${TCL_DEFS} in
-                   *TCL_FRAMEWORK*)
-                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tcl is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TCL_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$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`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TCL_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           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:
-#
-#      Substitutes the following vars:
-#              TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
-    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
-    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
-    AC_MSG_CHECKING([for Tk private include files])
-
-    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
-    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
-
-    # Check to see if tk<Plat>Port.h isn't already with the public headers
-    # Don't look for tkInt.h because that resides with tk.h in the core
-    # sources, but the <plat>Port headers are in a different directory
-    if test "${TEA_PLATFORM}" = "windows" -a \
-       -f "${ac_cv_c_tkh}/tkWinPort.h"; then
-       result="private headers found with public headers"
-    elif test "${TEA_PLATFORM}" = "unix" -a \
-       -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
-       result="private headers found with public headers"
-    else
-       TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
-       TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
-       if test "${TEA_PLATFORM}" = "windows"; then
-           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
-       else
-           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
-       fi
-       # Overwrite the previous TK_INCLUDES as this should capture both
-       # public and private headers in the same set.
-       # We want to ensure these are substituted so as not to require
-       # any *_NATIVE vars be defined in the Makefile
-       TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-       # Detect and add ttk subdir
-       if test -d "${TK_SRC_DIR}/generic/ttk"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
-       fi
-       if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
-       fi
-       if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
-       fi
-       if test "`uname -s`" = "Darwin"; then
-           # If Tk was built as a framework, attempt to use
-           # the framework's Headers and PrivateHeaders directories
-           case ${TK_DEFS} in
-               *TK_FRAMEWORK*)
-                       if test -d "${TK_BIN_DIR}/Headers" -a \
-                               -d "${TK_BIN_DIR}/PrivateHeaders"; then
-                           TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
-                       else
-                           TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
-                       fi
-                       ;;
-           esac
-           result="Using ${TK_INCLUDES}"
-       else
-           if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
-              AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
-           fi
-           result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
-       fi
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([${result}])
-])
-
-#------------------------------------------------------------------------
-# 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.
-#
-#      Substitutes 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
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tk was built as a framework, attempt to use
-               # the framework's Headers directory.
-               case ${TK_DEFS} in
-                   *TK_FRAMEWORK*)
-                       list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tk is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TK_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tk's --prefix location,
-           # relative to directory of tkConfig.sh, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$list \
-               `ls -d ${temp_includedir}        2>/dev/null` \
-               `ls -d ${TK_PREFIX}/include      2>/dev/null` \
-               `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
-               `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-               `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TK_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           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_WINDOWINGSYSTEM}" != "x11"; then
-       # On Windows and Aqua, 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_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 ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 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:
-#
-#      Substitutes 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}
-        $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
-        $1_LIBRARY_PATH=${$1_LIBRARY_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)
-
-    # Allow the caller to prevent this auto-check by specifying any 2nd arg
-    AS_IF([test "x$2" = x], [
-       # Check both upper and lower-case variants
-       # If a dev wanted non-stubs libs, this function could take an option
-       # to not use _STUB in the paths below
-       AS_IF([test "x${$1_STUB_LIB_SPEC}" = x],
-           [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
-           [TEA_LOAD_CONFIG_LIB($1_STUB)])
-    ])
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG_LIB --
-#
-#      Helper function to load correct library from another extension's
-#      ${PACKAGE}Config.sh.
-#
-# Results:
-#      Adds to LIBS the appropriate extension library
-#------------------------------------------------------------------------
-AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
-    AC_MSG_CHECKING([For $1 library for LIBS])
-    # This simplifies the use of stub libraries by automatically adding
-    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
-    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
-    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
-    if test "x${$1_LIB_SPEC}" != "x" ; then
-       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-           TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"])
-           AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}])
-       else
-           TEA_ADD_LIBS([${$1_LIB_SPEC}])
-           AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}])
-       fi
-    else
-       AC_MSG_RESULT([file not found])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#      Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#
-#      Requires the following vars to be set:
-#              $1
-#
-# Results:
-#      Substitutes the following vars:
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_EXPORT_CONFIG], [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-       eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
-       eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
-    else
-       eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-       eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
-
-
-#------------------------------------------------------------------------
-# 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}
-           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
-           AC_MSG_RESULT([found $CELIB_DIR])
-       fi
-    fi
-])
-# Local Variables:
-# mode: autoconf
-# End:
similarity index 97%
rename from pkgs/tdbcpostgres1.0.2/ChangeLog
rename to pkgs/tdbcpostgres1.0.3/ChangeLog
index 43384d2..591f1da 100644 (file)
@@ -1,3 +1,7 @@
+*** Now that tdbcpostgres is under Fossil control, the ChangeLog is
+    no longer being maintained. Please refer to the change history at
+    http://core.tcl.tk/tdbcpostgres/timeline/
+
 2014-10-23  Don Porter  <dgp@users.sourceforge.net>
 
        * configure.in:
similarity index 96%
rename from pkgs/tdbcpostgres1.0.2/README
rename to pkgs/tdbcpostgres1.0.3/README
index 7a4e283..26909b6 100644 (file)
@@ -1,6 +1,6 @@
 README: tdbcpostgres
 
-    This is the 1.0.2 source distribution of the driver for Tcl
+    This is the 1.0.3 source distribution of the driver for Tcl
     Database Connectivity (TDBC) to access Postgres databases. TDBC and
     its drivers are available from a Fossil version control repository
     at http://tdbc.tcl.tk/
similarity index 97%
rename from pkgs/tdbcpostgres1.0.2/configure
rename to pkgs/tdbcpostgres1.0.3/configure
index 7e79163..1dd6ba7 100755 (executable)
@@ -1,11 +1,9 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for tdbcpostgres 1.0.2.
+# Generated by GNU Autoconf 2.69 for tdbcpostgres 1.0.3.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -134,6 +132,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -212,21 +236,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       # Preserve -v and -x to the replacement shell.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       case $- in # ((((
-         *v*x* | *x*v* ) as_opts=-vx ;;
-         *v* ) as_opts=-v ;;
-         *x* ) as_opts=-x ;;
-         * ) as_opts= ;;
-       esac
-       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -328,6 +356,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # 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 sensitive to this).
@@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -504,28 +544,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -557,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tdbcpostgres'
 PACKAGE_TARNAME='tdbcpostgres'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='tdbcpostgres 1.0.2'
+PACKAGE_VERSION='1.0.3'
+PACKAGE_STRING='tdbcpostgres 1.0.3'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1204,8 +1224,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_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
@@ -1291,7 +1309,7 @@ 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 tdbcpostgres 1.0.2 to adapt to many kinds of systems.
+\`configure' configures tdbcpostgres 1.0.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1352,7 +1370,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tdbcpostgres 1.0.2:";;
+     short | recursive ) echo "Configuration of tdbcpostgres 1.0.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1453,10 +1471,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tdbcpostgres configure 1.0.2
-generated by GNU Autoconf 2.68
+tdbcpostgres configure 1.0.3
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1642,7 +1660,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -1886,7 +1904,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1902,7 +1921,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1928,7 +1948,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1944,7 +1965,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1978,7 +2000,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2050,8 +2073,8 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tdbcpostgres $as_me 1.0.2, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+It was created by tdbcpostgres $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2480,7 +2503,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CYGPATH="cygpath -w"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2730,7 +2753,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2770,7 +2793,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2823,7 +2846,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2864,7 +2887,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_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
@@ -2922,7 +2945,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2966,7 +2989,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3412,8 +3435,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -3963,7 +3985,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4003,7 +4025,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4056,7 +4078,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4097,7 +4119,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_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
@@ -4155,7 +4177,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4199,7 +4221,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4395,8 +4417,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -4690,7 +4711,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4730,7 +4751,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4790,7 +4811,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -4856,7 +4877,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -6554,7 +6575,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6594,7 +6615,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6822,7 +6843,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="${ac_tool_prefix}ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6862,7 +6883,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7155,7 +7176,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RC="${ac_tool_prefix}windres"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7195,7 +7216,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RC="windres"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9096,6 +9117,128 @@ $as_echo "#define USE_TK_STUBS 1" >>confdefs.h
 
 
 #--------------------------------------------------------------------
+# We need the INT2PTR and PTR2INT macros, so make sure that intptr_t
+# is defined.
+#--------------------------------------------------------------------
+
+for ac_header in stdint.h sys/types.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_intptr_t" = xyes; then :
+
+
+$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size signed integer type" >&5
+$as_echo_n "checking for pointer-size signed integer type... " >&6; }
+if ${tcl_cv_intptr_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    for tcl_cv_intptr_t in "int" "long" "long long" none; do
+       if test "$tcl_cv_intptr_t" != none; then
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           test "$tcl_ok" = yes && break; fi
+    done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_intptr_t" >&5
+$as_echo "$tcl_cv_intptr_t" >&6; }
+    if test "$tcl_cv_intptr_t" != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define intptr_t $tcl_cv_intptr_t
+_ACEOF
+
+    fi
+
+fi
+
+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+
+$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size unsigned integer type" >&5
+$as_echo_n "checking for pointer-size unsigned integer type... " >&6; }
+if ${tcl_cv_uintptr_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
+           none; do
+       if test "$tcl_cv_uintptr_t" != none; then
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  tcl_ok=yes
+else
+  tcl_ok=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           test "$tcl_ok" = yes && break; fi
+    done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_uintptr_t" >&5
+$as_echo "$tcl_cv_uintptr_t" >&6; }
+    if test "$tcl_cv_uintptr_t" != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define uintptr_t $tcl_cv_uintptr_t
+_ACEOF
+
+    fi
+
+fi
+
+
+#--------------------------------------------------------------------
 # Locate the ws2_32 library; we need it for ntohs and friends
 #--------------------------------------------------------------------
 
@@ -9253,15 +9396,15 @@ rm -f conftest*
            if test "$GCC" = "yes"; then
                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
            fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
        else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
            if test "$GCC" = "yes"; then
                PKG_LIB_FILE=lib${PKG_LIB_FILE}
            fi
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
        if test "$GCC" = "yes"; then
            PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
        fi
@@ -9275,13 +9418,13 @@ rm -f conftest*
            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}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
            RANLIB=:
        else
-           eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
        fi
        # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     fi
 
     # These are escaped so that only CFLAGS is picked up at configure time.
@@ -9324,7 +9467,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MT="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9854,16 +9997,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -9923,28 +10066,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -9965,8 +10096,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tdbcpostgres $as_me 1.0.2, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+This file was extended by tdbcpostgres $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -10018,11 +10149,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tdbcpostgres config.status 1.0.2
-configured by $0, generated by GNU Autoconf 2.68,
+tdbcpostgres config.status 1.0.3
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -10099,7 +10230,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
similarity index 85%
rename from pkgs/tdbcpostgres1.0.2/configure.in
rename to pkgs/tdbcpostgres1.0.3/configure.in
index f69838b..0b8408f 100755 (executable)
@@ -18,7 +18,7 @@ dnl   to configure the system for the local environment.
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([tdbcpostgres], [1.0.2])
+AC_INIT([tdbcpostgres], [1.0.3])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
@@ -189,6 +189,44 @@ AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
 AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
 
 #--------------------------------------------------------------------
+# We need the INT2PTR and PTR2INT macros, so make sure that intptr_t
+# is defined.
+#--------------------------------------------------------------------
+
+AC_CHECK_HEADERS(stdint.h sys/types.h)
+AC_CHECK_TYPE([intptr_t], [
+    AC_DEFINE([HAVE_INTPTR_T], 1, [Do we have the intptr_t type?])], [
+    AC_CACHE_CHECK([for pointer-size signed integer type], tcl_cv_intptr_t, [
+    for tcl_cv_intptr_t in "int" "long" "long long" none; do
+       if test "$tcl_cv_intptr_t" != none; then
+           AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT],
+                   [[sizeof (void *) <= sizeof ($tcl_cv_intptr_t)]])],
+               [tcl_ok=yes], [tcl_ok=no])
+           test "$tcl_ok" = yes && break; fi
+    done])
+    if test "$tcl_cv_intptr_t" != none; then
+       AC_DEFINE_UNQUOTED([intptr_t], [$tcl_cv_intptr_t], [Signed integer
+          type wide enough to hold a pointer.])
+    fi
+])
+AC_CHECK_TYPE([uintptr_t], [
+    AC_DEFINE([HAVE_UINTPTR_T], 1, [Do we have the uintptr_t type?])], [
+    AC_CACHE_CHECK([for pointer-size unsigned integer type], tcl_cv_uintptr_t, [
+    for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
+           none; do
+       if test "$tcl_cv_uintptr_t" != none; then
+           AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT],
+                   [[sizeof (void *) <= sizeof ($tcl_cv_uintptr_t)]])],
+               [tcl_ok=yes], [tcl_ok=no])
+           test "$tcl_ok" = yes && break; fi
+    done])
+    if test "$tcl_cv_uintptr_t" != none; then
+       AC_DEFINE_UNQUOTED([uintptr_t], [$tcl_cv_uintptr_t], [Unsigned integer
+          type wide enough to hold a pointer.])
+    fi
+])
+
+#--------------------------------------------------------------------
 # Locate the ws2_32 library; we need it for ntohs and friends
 #--------------------------------------------------------------------
 
@@ -27,6 +27,9 @@
 #ifdef HAVE_STDINT_H
 #include <stdint.h>
 #endif
+#ifdef HAVE_SYS_TYPES_H
+#    include <sys/types.h>
+#endif
 
 #ifdef USE_NATIVE_POSTGRES
 #include <libpq-fe.h>
@@ -53,6 +56,31 @@ typedef short int16_t;
 #define snprintf _snprintf
 #endif
 
+/*
+ * Macros used to cast between pointers and integers (e.g. when storing an int
+ * in ClientData), on 64-bit architectures they avoid gcc warning about "cast
+ * to/from pointer from/to integer of different size".
+ */
+
+#if !defined(INT2PTR) && !defined(PTR2INT)
+#   if defined(HAVE_INTPTR_T) || defined(intptr_t)
+#      define INT2PTR(p) ((void *)(intptr_t)(p))
+#      define PTR2INT(p) ((int)(intptr_t)(p))
+#   else
+#      define INT2PTR(p) ((void *)(p))
+#      define PTR2INT(p) ((int)(p))
+#   endif
+#endif
+#if !defined(UINT2PTR) && !defined(PTR2UINT)
+#   if defined(HAVE_UINTPTR_T) || defined(uintptr_t)
+#      define UINT2PTR(p) ((void *)(uintptr_t)(p))
+#      define PTR2UINT(p) ((unsigned int)(uintptr_t)(p))
+#   else
+#      define UINT2PTR(p) ((void *)(p))
+#      define PTR2UINT(p) ((unsigned int)(p))
+#   endif
+#endif
+
 /* Static data contained within this file */
 
 static Tcl_Mutex pgMutex;      /* Mutex protecting per-process structures */
@@ -2095,15 +2123,15 @@ ResultDescToTcl(
            entry =
                Tcl_CreateHashEntry(&names, fieldName, &new);
            while (!new) {
-               count = (int) Tcl_GetHashValue(entry);
+               count = PTR2INT(Tcl_GetHashValue(entry));
                ++count;
-               Tcl_SetHashValue(entry, (ClientData) count);
+               Tcl_SetHashValue(entry, INT2PTR(count));
                sprintf(numbuf, "#%d", count);
                Tcl_AppendToObj(nameObj, numbuf, -1);
                entry = Tcl_CreateHashEntry(&names, Tcl_GetString(nameObj),
                                            &new);
            }
-           Tcl_SetHashValue(entry, (ClientData) count);
+           Tcl_SetHashValue(entry, INT2PTR(count));
            Tcl_ListObjAppendElement(NULL, retval, nameObj);
            Tcl_DecrRefCount(nameObj);
        }
@@ -2363,7 +2391,7 @@ StatementParamsMethod(
        }
        typeHashEntry =
            Tcl_FindHashEntry(&(pidata->typeNumHash),
-                             (const char*) (sdata->paramDataTypes[i]));
+                             INT2PTR(sdata->paramDataTypes[i]));
        if (typeHashEntry != NULL) {
            dataTypeName = (Tcl_Obj*) Tcl_GetHashValue(typeHashEntry);
            Tcl_DictObjPut(NULL, paramDesc, literals[LIT_TYPE], dataTypeName);
@@ -2888,6 +2916,8 @@ ResultSetConstructor(
     ckfree((char*)paramValues);
     ckfree((char*)paramLengths);
     ckfree((char*)paramFormats);
+    ckfree((char*)paramNeedsFreeing);
+    ckfree((char*)paramTempObjs);
 
     return status;
     
@@ -2968,7 +2998,7 @@ ResultSetNextrowMethod(
     int objc,                  /* Parameter count */
     Tcl_Obj *const objv[]      /* Parameter vector */
 ) {
-    int lists = (int) clientData;
+    int lists = PTR2INT(clientData);
 
     Tcl_Object thisObject = Tcl_ObjectContextObject(context);
                                /* The current result set object */
@@ -3244,7 +3274,7 @@ Tdbcpostgres_Init(
        int new;
        Tcl_HashEntry* entry =
            Tcl_CreateHashEntry(&(pidata->typeNumHash), 
-                               (const char*) (int) (dataTypes[i].oid),
+                               INT2PTR(dataTypes[i].oid),
                                &new);
        Tcl_Obj* nameObj = Tcl_NewStringObj(dataTypes[i].name, -1);
        Tcl_IncrRefCount(nameObj);
@@ -3406,3 +3436,10 @@ DeletePerInterpData(
    Tcl_MutexUnlock(&pgMutex);
 
 }
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/pkgs/tdbcpostgres1.0.3/tclconfig/tcl.m4 b/pkgs/tdbcpostgres1.0.3/tclconfig/tcl.m4
new file mode 100644 (file)
index 0000000..b0ae59f
--- /dev/null
@@ -0,0 +1,4180 @@
+# 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.
+
+AC_PREREQ(2.57)
+
+dnl TEA extensions pass us the version of TEA they think they
+dnl are compatible with (must be set in TEA_INIT below)
+dnl TEA_VERSION="3.9"
+
+# Possible values for key variables defined:
+#
+# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
+# TEA_PLATFORM        - windows unix
+#
+
+#------------------------------------------------------------------------
+# 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 TEA specific: 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,
+           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 common install locations
+           if test x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
+       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,
+           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tk.framework/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/Tk.framework; 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 ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       ; do
+                   if test -f "$i/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tkconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
+       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:
+#
+#      Substitutes 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([could not find ${TCL_BIN_DIR}/tclConfig.sh])
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tcl was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tcl.framework installed in an arbitrary location.
+       case ${TCL_DEFS} in
+           *TCL_FRAMEWORK*)
+               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
+                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
+                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
+                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
+                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+    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_PATCH_LEVEL)
+    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_MSG_CHECKING([platform])
+    hold_cc=$CC; CC="$TCL_CC"
+    AC_TRY_COMPILE(,[
+           #ifdef _WIN32
+               #error win32
+           #endif
+    ], TEA_PLATFORM="unix",
+           TEA_PLATFORM="windows"
+    )
+    CC=$hold_cc
+    AC_MSG_RESULT($TEA_PLATFORM)
+
+    # The BUILD_$pkg is to define the correct extern storage class
+    # handling when making this package
+    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
+           [Building extension source?])
+    # Do this here as we have fully defined TEA_PLATFORM now
+    if test "${TEA_PLATFORM}" = "windows" ; then
+       EXEEXT=".exe"
+       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
+    fi
+
+    # TEA specific:
+    AC_SUBST(CLEANFILES)
+    AC_SUBST(TCL_LIBS)
+    AC_SUBST(TCL_DEFS)
+    AC_SUBST(TCL_EXTRA_CFLAGS)
+    AC_SUBST(TCL_LD_FLAGS)
+    AC_SUBST(TCL_SHLIB_LD_LIBS)
+])
+
+#------------------------------------------------------------------------
+# 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
+
+    # eval is required to do the TK_DBGX substitution
+    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tk was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tk.framework installed in an arbitrary location.
+       case ${TK_DEFS} in
+           *TK_FRAMEWORK*)
+               if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
+                   for i in "`cd "${TK_BIN_DIR}"; pwd`" \
+                            "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
+                           TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
+                   TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
+                   TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TK_DBGX substitution
+    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+    # TEA specific: Ensure windowingsystem is defined
+    if test "${TEA_PLATFORM}" = "unix" ; then
+       case ${TK_DEFS} in
+           *MAC_OSX_TK*)
+               AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
+               TEA_WINDOWINGSYSTEM="aqua"
+               ;;
+           *)
+               TEA_WINDOWINGSYSTEM="x11"
+               ;;
+       esac
+    elif test "${TEA_PLATFORM}" = "windows" ; then
+       TEA_WINDOWINGSYSTEM="win32"
+    fi
+
+    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)
+
+    # TEA specific:
+    AC_SUBST(TK_LIBS)
+    AC_SUBST(TK_XINCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_TCLSH
+#      Determine the fully qualified path name of the tclsh executable
+#      in the Tcl build directory or the tclsh installed in a bin
+#      directory. This macro will correctly determine the name
+#      of the tclsh executable even if tclsh has not yet been
+#      built in the build directory. The tclsh found is always
+#      associated with a tclConfig.sh file. This tclsh should be used
+#      only for running extension test cases. It should never be
+#      or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Substitutes the following vars:
+#              TCLSH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_TCLSH], [
+    AC_MSG_CHECKING([for tclsh])
+    if test -f "${TCL_BIN_DIR}/Makefile" ; then
+        # tclConfig.sh is in Tcl build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+        fi
+    else
+        # tclConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+        fi
+        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${TCLSH_PROG}" ; then
+                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
+    fi
+    AC_MSG_RESULT([${TCLSH_PROG}])
+    AC_SUBST(TCLSH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_WISH
+#      Determine the fully qualified path name of the wish executable
+#      in the Tk build directory or the wish installed in a bin
+#      directory. This macro will correctly determine the name
+#      of the wish executable even if wish has not yet been
+#      built in the build directory. The wish found is always
+#      associated with a tkConfig.sh file. This wish should be used
+#      only for running extension test cases. It should never be
+#      or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Substitutes the following vars:
+#              WISH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_WISH], [
+    AC_MSG_CHECKING([for wish])
+    if test -f "${TK_BIN_DIR}/Makefile" ; then
+        # tkConfig.sh is in Tk build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+        else
+            WISH_PROG="${TK_BIN_DIR}/wish"
+        fi
+    else
+        # tkConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+        else
+            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
+        fi
+        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${WISH_PROG}" ; then
+                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
+    fi
+    AC_MSG_RESULT([${WISH_PROG}])
+    AC_SUBST(WISH_PROG)
+])
+
+#------------------------------------------------------------------------
+# 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,
+       AC_HELP_STRING([--enable-shared],
+           [build and link with shared libraries (default: on)]),
+       [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, 1, [Is this a 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, "no" means
+#      threads are disabled.  "yes" is the 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.
+#
+#      Note that it is legal to have a thread enabled extension run in a
+#      threaded or non-threaded Tcl core, but a non-threaded extension may
+#      only run in a non-threaded Tcl core.
+#
+# 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
+#              _THREAD_SAFE
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_ENABLE_THREADS], [
+    AC_ARG_ENABLE(threads,
+       AC_HELP_STRING([--enable-threads],
+           [build with threads]),
+       [tcl_ok=$enableval], [tcl_ok=yes])
+
+    if test "${enable_threads+set}" = set; then
+       enableval="$enable_threads"
+       tcl_ok=$enableval
+    else
+       tcl_ok=yes
+    fi
+
+    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:
+
+           # USE_THREAD_ALLOC tells us to try the special thread-based
+           # allocator that significantly reduces lock contention
+           AC_DEFINE(USE_THREAD_ALLOC, 1,
+               [Do we want to use the threaded memory allocator?])
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           if test "`uname -s`" = "SunOS" ; then
+               AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+                       [Do we really want to follow the standard? Yes we do!])
+           fi
+           AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
+           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([Do not know how to find pthread lib on your system - thread support disabled])
+                       fi
+                   fi
+               fi
+           fi
+       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, 1, [Are we building with threads enabled?])
+       AC_MSG_RESULT([yes (default)])
+    else
+       AC_MSG_RESULT([no])
+    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 Tcl
+    that IS thread-enabled.  It is recommended to use --enable-threads.])
+           fi
+           ;;
+       *)
+           if test "${TCL_THREADS}" = "1"; then
+               AC_MSG_WARN([
+    --enable-threads requested, but building against a Tcl that is NOT
+    thread-enabled.  This is an OK configuration that will also run in
+    a thread-enabled core.])
+           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
+#
+#      TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
+#      the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
+#      Requires the following vars to be set in the Makefile:
+#              CFLAGS_DEFAULT
+#              LDFLAGS_DEFAULT
+#
+# 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) -DNDEBUG" 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 TEA specific: Make sure we are initialized
+    AC_REQUIRE([TEA_CONFIG_CFLAGS])
+    AC_MSG_CHECKING([for build with symbols])
+    AC_ARG_ENABLE(symbols,
+       AC_HELP_STRING([--enable-symbols],
+           [build with debugging symbols (default: off)]),
+       [tcl_ok=$enableval], [tcl_ok=no])
+    DBGX=""
+    if test "$tcl_ok" = "no"; then
+       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
+       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
+    # TEA specific:
+    if test "${TEA_PLATFORM}" != "windows" ; then
+       LDFLAGS_DEFAULT="${LDFLAGS}"
+    fi
+    AC_SUBST(CFLAGS_DEFAULT)
+    AC_SUBST(LDFLAGS_DEFAULT)
+    AC_SUBST(TCL_DBGX)
+
+    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+       AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
+    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,
+       AC_HELP_STRING([--enable-langinfo],
+           [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
+       [langinfo_ok=$enableval], [langinfo_ok=yes])
+
+    HAVE_LANGINFO=0
+    if test "$langinfo_ok" = "yes"; then
+       AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
+    fi
+    AC_MSG_CHECKING([whether to use nl_langinfo])
+    if test "$langinfo_ok" = "yes"; then
+       AC_CACHE_VAL(tcl_cv_langinfo_h, [
+           AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
+                   [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
+       AC_MSG_RESULT([$tcl_cv_langinfo_h])
+       if test $tcl_cv_langinfo_h = yes; then
+           AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
+       fi
+    else
+       AC_MSG_RESULT([$langinfo_ok])
+    fi
+])
+
+#--------------------------------------------------------------------
+# TEA_CONFIG_SYSTEM
+#
+#      Determine what the system is (some things cannot be easily checked
+#      on a feature-driven basis, alas). This can usually be done via the
+#      "uname" command.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Defines the following var:
+#
+#      system -        System/platform/version identification code.
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_SYSTEM], [
+    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
+       # TEA specific:
+       if test "${TEA_PLATFORM}" = "windows" ; then
+           tcl_cv_sys_version=windows
+       else
+           tcl_cv_sys_version=`uname -s`-`uname -r`
+           if test "$?" -ne 0 ; then
+               AC_MSG_WARN([can't find uname command])
+               tcl_cv_sys_version=unknown
+           else
+               if test "`uname -s`" = "AIX" ; then
+                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
+               fi
+           fi
+       fi
+    ])
+    system=$tcl_cv_sys_version
+])
+
+#--------------------------------------------------------------------
+# 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 and substitutes the following vars:
+#
+#      DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
+#       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. Could
+#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
+#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/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 defaults to
+#                       "${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.
+#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
+#                       in a static or 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 a shared library needs to have
+#                       a .a extension whereas shared objects for loadable
+#                       extensions have a .so extension.  Defaults to
+#                       ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
+#      CFLAGS_DEBUG -
+#                      Flags used when running the compiler in debug mode
+#      CFLAGS_OPTIMIZE -
+#                      Flags used when running the compiler in optimize mode
+#      CFLAGS -        Additional CFLAGS added as necessary (usually 64-bit)
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_CFLAGS], [
+    dnl TEA specific: Make sure we are initialized
+    AC_REQUIRE([TEA_INIT])
+
+    # Step 0.a: Enable 64 bit support?
+
+    AC_MSG_CHECKING([if 64bit support is requested])
+    AC_ARG_ENABLE(64bit,
+       AC_HELP_STRING([--enable-64bit],
+           [enable 64bit support (default: off)]),
+       [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,
+       AC_HELP_STRING([--enable-64bit-vis],
+           [enable 64bit Sparc VIS support (default: off)]),
+       [do64bitVIS=$enableval], [do64bitVIS=no])
+    AC_MSG_RESULT([$do64bitVIS])
+    # Force 64bit on with VIS
+    AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes])
+
+    # Step 0.c: Check if visibility support is available. Do this here so
+    # that platform specific alternatives can be used below if this fails.
+
+    AC_CACHE_CHECK([if compiler supports visibility "hidden"],
+       tcl_cv_cc_visibility_hidden, [
+       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
+       AC_TRY_LINK([
+           extern __attribute__((__visibility__("hidden"))) void f(void);
+           void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
+           tcl_cv_cc_visibility_hidden=no)
+       CFLAGS=$hold_cflags])
+    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
+       AC_DEFINE(MODULE_SCOPE,
+           [extern __attribute__((__visibility__("hidden")))],
+           [Compiler support for module scope symbols])
+       AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
+    ])
+
+    # Step 0.d: Disable -rpath support?
+
+    AC_MSG_CHECKING([if rpath support is requested])
+    AC_ARG_ENABLE(rpath,
+       AC_HELP_STRING([--disable-rpath],
+           [disable rpath support (default: on)]),
+       [doRpath=$enableval], [doRpath=yes])
+    AC_MSG_RESULT([$doRpath])
+
+    # TEA specific: Cross-compiling options for Windows/CE builds?
+
+    AS_IF([test "${TEA_PLATFORM}" = windows], [
+       AC_MSG_CHECKING([if Windows/CE build is requested])
+       AC_ARG_ENABLE(wince,
+           AC_HELP_STRING([--enable-wince],
+               [enable Win/CE support (where applicable)]),
+           [doWince=$enableval], [doWince=no])
+       AC_MSG_RESULT([$doWince])
+    ])
+
+    # Set the variable "system" to hold the name and version number
+    # for the system.
+
+    TEA_CONFIG_SYSTEM
+
+    # Require ranlib early so we can override it in special cases below.
+
+    AC_REQUIRE([AC_PROG_RANLIB])
+
+    # 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 removed some core-only vars.
+
+    do64bit_ok=no
+    # default to '{$LIBS}' and set to "" on per-platform necessary basis
+    SHLIB_LD_LIBS='${LIBS}'
+    # When ld needs options to work in 64-bit mode, put them in
+    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
+    # is disabled by the user. [Bug 1016796]
+    LDFLAGS_ARCH=""
+    UNSHARED_LIB_SUFFIX=""
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+    TCL_LIB_VERSIONS_OK=ok
+    CFLAGS_DEBUG=-g
+    AS_IF([test "$GCC" = yes], [
+       CFLAGS_OPTIMIZE=-O2
+       CFLAGS_WARNING="-Wall"
+    ], [
+       CFLAGS_OPTIMIZE=-O
+       CFLAGS_WARNING=""
+    ])
+    AC_CHECK_TOOL(AR, ar)
+    STLIB_LD='${AR} cr'
+    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION=""],[SHLIB_VERSION=".$SHLIB_VERSION"])
+    case $system in
+       # TEA specific:
+       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.
+           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+           # MACHINE is IX86 for LINK, but this is used by the manifest,
+           # which requires x86|amd64|ia64.
+           MACHINE="X86"
+           if test "$do64bit" != "no" ; then
+               if test "x${MSSDK}x" = "xx" ; then
+                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
+               fi
+               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
+               PATH64=""
+               case "$do64bit" in
+                   amd64|x64|yes)
+                       MACHINE="AMD64" ; # default to AMD64 64-bit build
+                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+                       ;;
+                   ia64)
+                       MACHINE="IA64"
+                       PATH64="${MSSDK}/Bin/Win64"
+                       ;;
+               esac
+               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
+                   AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
+                   AC_MSG_WARN([Ensure latest Platform SDK is installed])
+                   do64bit="no"
+               else
+                   AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
+                   do64bit_ok="yes"
+               fi
+           fi
+
+           if test "$doWince" != "no" ; then
+               if test "$do64bit" != "no" ; 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
+               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
+               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" != "no" ; then
+                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
+                   CC="\"${PATH64}/cl.exe\""
+                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+                   RC="\"${MSSDK}/bin/rc.exe\""
+                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+                   LINKBIN="\"${PATH64}/link.exe\""
+                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+                   # Avoid 'unresolved external symbol __security_cookie'
+                   # errors, c.f. http://support.microsoft.com/?id=894573
+                   TEA_ADD_LIBS([bufferoverflowU.lib])
+               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, 1, [WinCE def ]$i)
+                   done
+                   AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
+                   AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
+                   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
+               AC_CHECK_TOOL(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}"
+
+               AC_CACHE_CHECK(for cross-compile version of gcc,
+                       ac_cv_cross,
+                       AC_TRY_COMPILE([
+                           #ifdef _WIN32
+                               #error cross-compiler
+                           #endif
+                       ], [],
+                       ac_cv_cross=yes,
+                       ac_cv_cross=no)
+                     )
+                     if test "$ac_cv_cross" = "yes"; then
+                       case "$do64bit" in
+                           amd64|x64|yes)
+                               CC="x86_64-w64-mingw32-gcc"
+                               LD="x86_64-w64-mingw32-ld"
+                               AR="x86_64-w64-mingw32-ar"
+                               RANLIB="x86_64-w64-mingw32-ranlib"
+                               RC="x86_64-w64-mingw32-windres"
+                           ;;
+                           *)
+                               CC="i686-w64-mingw32-gcc"
+                               LD="i686-w64-mingw32-ld"
+                               AR="i686-w64-mingw32-ar"
+                               RANLIB="i686-w64-mingw32-ranlib"
+                               RC="i686-w64-mingw32-windres"
+                           ;;
+                       esac
+               fi
+
+           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
+               # and also
+               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
+               # This essentially turns it all on.
+               LDFLAGS_DEBUG="-debug -debugtype:cv"
+               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_SUFFIX=".dll"
+           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       AIX-*)
+           AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
+               # AIX requires the _r compiler when gcc isn't being used
+               case "${CC}" in
+                   *_r|*_r\ *)
+                       # ok ...
+                       ;;
+                   *)
+                       # Make sure only first arg gets _r
+                       CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
+                       ;;
+               esac
+               AC_MSG_RESULT([Using $CC for compiling with threads])
+           ])
+           LIBS="$LIBS -lc"
+           SHLIB_CFLAGS=""
+           SHLIB_SUFFIX=".so"
+
+           LD_LIBRARY_PATH_VAR="LIBPATH"
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = yes], [
+               AS_IF([test "$GCC" = yes], [
+                   AC_MSG_WARN([64bit mode not supported with GCC on $system])
+               ], [
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS -q64"
+                   LDFLAGS_ARCH="-q64"
+                   RANLIB="${RANLIB} -X64"
+                   AR="${AR} -X64"
+                   SHLIB_LD_FLAGS="-b64"
+               ])
+           ])
+
+           AS_IF([test "`uname -m`" = ia64], [
+               # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               AS_IF([test "$GCC" = yes], [
+                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               ], [
+                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+               ])
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+           ], [
+               AS_IF([test "$GCC" = yes], [
+                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
+               ], [
+                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
+                   LDFLAGS="$LDFLAGS -brtl"
+               ])
+               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ])
+           ;;
+       BeOS*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -nostart'
+           SHLIB_SUFFIX=".so"
+
+           #-----------------------------------------------------------
+           # Check for inet_ntoa in -lbind, for BeOS (which also needs
+           # -lsocket, even if the network functions are in -lnet which
+           # is always linked to, for compatibility.
+           #-----------------------------------------------------------
+           AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
+           ;;
+       BSD/OS-4.*)
+           SHLIB_CFLAGS="-export-dynamic -fPIC"
+           SHLIB_LD='${CC} -shared'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       CYGWIN_*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD='${CC} -shared'
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
+           SHLIB_SUFFIX=".dll"
+           EXEEXT=".exe"
+           do64bit_ok=yes
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       Haiku*)
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+           AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
+           ;;
+       HP-UX-*.11.*)
+           # Use updated header definitions where possible
+           AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
+           # TEA specific: Needed by Tcl, but not most extensions
+           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
+           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
+
+           AS_IF([test "`uname -m`" = ia64], [
+               SHLIB_SUFFIX=".so"
+               # Use newer C++ library for C++ extensions
+               #if test "$GCC" != "yes" ; then
+               #   CPPFLAGS="-AA"
+               #fi
+           ], [
+               SHLIB_SUFFIX=".sl"
+           ])
+           AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
+           AS_IF([test "$tcl_ok" = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-E"
+               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+           ])
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ], [
+               CFLAGS="$CFLAGS -z"
+               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+               #CFLAGS="$CFLAGS +DAportable"
+               SHLIB_CFLAGS="+z"
+               SHLIB_LD="ld -b"
+           ])
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = "yes"], [
+               AS_IF([test "$GCC" = yes], [
+                   case `${CC} -dumpmachine` in
+                       hppa64*)
+                           # 64-bit gcc in use.  Fix flags for GNU ld.
+                           do64bit_ok=yes
+                           SHLIB_LD='${CC} -shared'
+                           AS_IF([test $doRpath = yes], [
+                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+                           ;;
+                       *)
+                           AC_MSG_WARN([64bit mode not supported with GCC on $system])
+                           ;;
+                   esac
+               ], [
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS +DD64"
+                   LDFLAGS_ARCH="+DD64"
+               ])
+           ]) ;;
+       IRIX-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+           AS_IF([test "$GCC" = yes], [
+               CFLAGS="$CFLAGS -mabi=n32"
+               LDFLAGS="$LDFLAGS -mabi=n32"
+           ], [
+               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"
+           ])
+           ;;
+       IRIX64-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+
+           # Check to enable 64-bit flags for compiler/linker
+
+           AS_IF([test "$do64bit" = yes], [
+               AS_IF([test "$GCC" = yes], [
+                   AC_MSG_WARN([64bit mode not supported by gcc])
+               ], [
+                   do64bit_ok=yes
+                   SHLIB_LD="ld -64 -shared -rdata_shared"
+                   CFLAGS="$CFLAGS -64"
+                   LDFLAGS_ARCH="-64"
+               ])
+           ])
+           ;;
+       Linux*|GNU*|NetBSD-Debian)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+
+           # TEA specific:
+           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
+           AS_IF([test $do64bit = yes], [
+               AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
+                   hold_cflags=$CFLAGS
+                   CFLAGS="$CFLAGS -m64"
+                   AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
+                   CFLAGS=$hold_cflags])
+               AS_IF([test $tcl_cv_cc_m64 = yes], [
+                   CFLAGS="$CFLAGS -m64"
+                   do64bit_ok=yes
+               ])
+          ])
+
+           # 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.
+
+           AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
+           ;;
+       Lynx*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           CFLAGS_OPTIMIZE=-02
+           SHLIB_LD='${CC} -shared'
+           LD_FLAGS="-Wl,--export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           ;;
+       OpenBSD-*)
+           arch=`arch -s`
+           case "$arch" in
+           vax)
+               SHLIB_SUFFIX=""
+               SHARED_LIB_SUFFIX=""
+               LDFLAGS=""
+               ;;
+           *)
+               case "$arch" in
+               alpha|sparc64)
+                   SHLIB_CFLAGS="-fPIC"
+                   ;;
+               *)
+                   SHLIB_CFLAGS="-fpic"
+                   ;;
+               esac
+               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+               SHLIB_SUFFIX=".so"
+               AS_IF([test $doRpath = yes], [
+                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
+               LDFLAGS="-Wl,-export-dynamic"
+               ;;
+           esac
+           case "$arch" in
+           vax)
+               CFLAGS_OPTIMIZE="-O1"
+               ;;
+           *)
+               CFLAGS_OPTIMIZE="-O2"
+               ;;
+           esac
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # On OpenBSD:   Compile with -pthread
+               #               Don't link with -lpthread
+               LIBS=`echo $LIBS | sed s/-lpthread//`
+               CFLAGS="$CFLAGS -pthread"
+           ])
+           # OpenBSD doesn't do version numbers with dots.
+           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       NetBSD-*)
+           # NetBSD has ELF and can use 'cc -shared' to build shared libs
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # The -pthread needs to go in the CFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS -pthread"
+               LDFLAGS="$LDFLAGS -pthread"
+           ])
+           ;;
+       FreeBSD-*)
+           # This configuration from FreeBSD Ports.
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD="${CC} -shared"
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
+           SHLIB_SUFFIX=".so"
+           LDFLAGS=""
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # The -pthread needs to go in the LDFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
+           case $system in
+           FreeBSD-3.*)
+               # Version numbers are dot-stripped by system policy.
+               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
+               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+               TCL_LIB_VERSIONS_OK=nodots
+               ;;
+           esac
+           ;;
+       Darwin-*)
+           CFLAGS_OPTIMIZE="-Os"
+           SHLIB_CFLAGS="-fno-common"
+           # To avoid discrepancies between what headers configure sees during
+           # preprocessing tests and compiling tests, move any -isysroot and
+           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
+           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
+           CFLAGS="`echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
+           AS_IF([test $do64bit = yes], [
+               case `arch` in
+                   ppc)
+                       AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
+                               tcl_cv_cc_arch_ppc64, [
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
+                                   tcl_cv_cc_arch_ppc64=no)
+                           CFLAGS=$hold_cflags])
+                       AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           do64bit_ok=yes
+                       ]);;
+                   i386)
+                       AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
+                               tcl_cv_cc_arch_x86_64, [
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
+                                   tcl_cv_cc_arch_x86_64=no)
+                           CFLAGS=$hold_cflags])
+                       AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           do64bit_ok=yes
+                       ]);;
+                   *)
+                       AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
+               esac
+           ], [
+               # Check for combined 32-bit and 64-bit fat build
+               AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
+                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
+                   fat_32_64=yes])
+           ])
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_single_module = yes], [
+               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+           ])
+           # TEA specific: link shlib with current and compatibility version flags
+           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
+           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
+           SHLIB_SUFFIX=".dylib"
+           # Don't use -prebind when building for Mac OS X 10.4 or later only:
+           AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
+               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
+               LDFLAGS="$LDFLAGS -prebind"])
+           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+           AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
+                   tcl_cv_ld_search_paths_first, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
+                       tcl_cv_ld_search_paths_first=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+           ])
+           AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
+               AC_DEFINE(MODULE_SCOPE, [__private_extern__],
+                   [Compiler support for module scope symbols])
+               tcl_cv_cc_visibility_hidden=yes
+           ])
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+           # TEA specific: for combined 32 & 64 bit fat builds of Tk
+           # extensions, verify that 64-bit build is possible.
+           AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
+               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [
+                   AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
+                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
+                       AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();],
+                           tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no)
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done])
+               ])
+               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [
+                   AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
+                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
+                       AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);],
+                           tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no)
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done])
+               ])
+               # remove 64-bit arch flags from CFLAGS et al. if configuration
+               # does not support 64-bit.
+               AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
+                   AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
+                   for v in CFLAGS CPPFLAGS LDFLAGS; do
+                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
+                   done])
+           ])
+           ;;
+       OS/390-*)
+           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
+           AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
+               [Should OS/390 do the right thing with sockets?])
+           ;;
+       OSF1-V*)
+           # Digital OSF/1
+           SHLIB_CFLAGS=""
+           AS_IF([test "$SHARED_BUILD" = 1], [
+               SHLIB_LD='ld -shared -expect_unresolved "*"'
+           ], [
+               SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+           ])
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+           AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
+               CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
+           # see pthread_intro(3) for pthread support on osf1, k.furukawa
+           AS_IF([test "${TCL_THREADS}" = 1], [
+               CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+               CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+               LIBS=`echo $LIBS | sed s/-lpthreads//`
+               AS_IF([test "$GCC" = yes], [
+                   LIBS="$LIBS -lpthread -lmach -lexc"
+               ], [
+                   CFLAGS="$CFLAGS -pthread"
+                   LDFLAGS="$LDFLAGS -pthread"
+               ])
+           ])
+           ;;
+       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"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SCO_SV-3.2*)
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_CFLAGS="-fPIC -melf"
+               LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+           ], [
+               SHLIB_CFLAGS="-Kpic -belf"
+               LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+           ])
+           SHLIB_LD="ld -G"
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SunOS-5.[[0-6]])
+           # Careful to not let 5.10+ fall into this case
+
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+               [Do we really want to follow the standard? Yes we do!])
+
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ], [
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ])
+           ;;
+       SunOS-5*)
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+               [Do we really want to follow the standard? Yes we do!])
+
+           SHLIB_CFLAGS="-KPIC"
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = yes], [
+               arch=`isainfo`
+               AS_IF([test "$arch" = "sparcv9 sparc"], [
+                   AS_IF([test "$GCC" = yes], [
+                       AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
+                           AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
+                       ], [
+                           do64bit_ok=yes
+                           CFLAGS="$CFLAGS -m64 -mcpu=v9"
+                           LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+                           SHLIB_CFLAGS="-fPIC"
+                       ])
+                   ], [
+                       do64bit_ok=yes
+                       AS_IF([test "$do64bitVIS" = yes], [
+                           CFLAGS="$CFLAGS -xarch=v9a"
+                           LDFLAGS_ARCH="-xarch=v9a"
+                       ], [
+                           CFLAGS="$CFLAGS -xarch=v9"
+                           LDFLAGS_ARCH="-xarch=v9"
+                       ])
+                       # Solaris 64 uses this as well
+                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
+                   ])
+               ], [AS_IF([test "$arch" = "amd64 i386"], [
+                   AS_IF([test "$GCC" = yes], [
+                       case $system in
+                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
+                               do64bit_ok=yes
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               AC_MSG_WARN([64bit mode not supported with GCC on $system]);;
+                       esac
+                   ], [
+                       do64bit_ok=yes
+                       case $system in
+                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               CFLAGS="$CFLAGS -xarch=amd64"
+                               LDFLAGS="$LDFLAGS -xarch=amd64";;
+                       esac
+                   ])
+               ], [AC_MSG_WARN([64bit mode not supported for $arch])])])
+           ])
+
+           SHLIB_SUFFIX=".so"
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               AS_IF([test "$do64bit_ok" = yes], [
+                   AS_IF([test "$arch" = "sparcv9 sparc"], [
+                       # 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` | ..."
+                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+                   ], [AS_IF([test "$arch" = "amd64 i386"], [
+                       # JH: static-libgcc is necessary for core Tcl, but may
+                       # not be necessary for extensions.
+                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
+                   ])])
+               ])
+           ], [
+               case $system in
+                   SunOS-5.[[1-9]][[0-9]]*)
+                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
+                   *)
+                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
+               esac
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+           ])
+           ;;
+       UNIX_SV* | UnixWare-5*)
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_LD='${CC} -G'
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
+           # that don't grok the -Bexport option.  Test that it does.
+           AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_Bexport = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+           ])
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+    esac
+
+    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
+       AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
+    ])
+
+dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
+dnl # until the end of configure, as configure's compile and link tests use
+dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
+dnl # preprocessing tests use only CPPFLAGS.
+    AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
+
+    # Add in the arch flags late to ensure it wasn't removed.
+    # Not necessary in TEA, but this is aligned with core
+    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
+
+    # 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.
+
+    AS_IF([test "$GCC" = yes], [
+       case $system in
+           AIX-*) ;;
+           BSD/OS*) ;;
+           CYGWIN_*|MINGW32_*) ;;
+           IRIX*) ;;
+           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
+           Darwin-*) ;;
+           SCO_SV-3.2*) ;;
+           windows) ;;
+           *) SHLIB_CFLAGS="-fPIC" ;;
+       esac])
+
+    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
+       AC_DEFINE(MODULE_SCOPE, [extern],
+           [No Compiler support for module scope symbols])
+    ])
+
+    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
+    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
+
+    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
+       AC_CACHE_CHECK(for SEH support in compiler,
+           tcl_cv_seh,
+       AC_TRY_RUN([
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+           int main(int argc, char** argv) {
+               int a, b = 0;
+               __try {
+                   a = 666 / b;
+               }
+               __except (EXCEPTION_EXECUTE_HANDLER) {
+                   return 0;
+               }
+               return 1;
+           }
+       ],
+           tcl_cv_seh=yes,
+           tcl_cv_seh=no,
+           tcl_cv_seh=no)
+       )
+       if test "$tcl_cv_seh" = "no" ; then
+           AC_DEFINE(HAVE_NO_SEH, 1,
+                   [Defined when mingw does not support SEH])
+       fi
+
+       #
+       # Check to see if the excpt.h include file provided contains the
+       # definition for EXCEPTION_DISPOSITION; if not, which is the case
+       # with Cygwin's version as of 2002-04-10, define it to be int,
+       # sufficient for getting the current code to work.
+       #
+       AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
+           tcl_cv_eh_disposition,
+           AC_TRY_COMPILE([
+#          define WIN32_LEAN_AND_MEAN
+#          include <windows.h>
+#          undef WIN32_LEAN_AND_MEAN
+           ],[
+               EXCEPTION_DISPOSITION x;
+           ],
+               tcl_cv_eh_disposition=yes,
+               tcl_cv_eh_disposition=no)
+       )
+       if test "$tcl_cv_eh_disposition" = "no" ; then
+       AC_DEFINE(EXCEPTION_DISPOSITION, int,
+               [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
+       fi
+
+       # Check to see if winnt.h defines CHAR, SHORT, and LONG
+       # even if VOID has already been #defined. The win32api
+       # used by mingw and cygwin is known to do this.
+
+       AC_CACHE_CHECK(for winnt.h that ignores VOID define,
+           tcl_cv_winnt_ignore_void,
+           AC_TRY_COMPILE([
+#define VOID void
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+           ], [
+               CHAR c;
+               SHORT s;
+               LONG l;
+           ],
+        tcl_cv_winnt_ignore_void=yes,
+        tcl_cv_winnt_ignore_void=no)
+       )
+       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
+           AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
+                   [Defined when cygwin/mingw ignores VOID define in winnt.h])
+       fi
+    fi
+
+       # See if the compiler supports casting to a union type.
+       # This is used to stop gcc from printing a compiler
+       # warning when initializing a union member.
+
+       AC_CACHE_CHECK(for cast to union support,
+           tcl_cv_cast_to_union,
+           AC_TRY_COMPILE([],
+           [
+                 union foo { int i; double d; };
+                 union foo f = (union foo) (int) 0;
+           ],
+           tcl_cv_cast_to_union=yes,
+           tcl_cv_cast_to_union=no)
+       )
+       if test "$tcl_cv_cast_to_union" = "yes"; then
+           AC_DEFINE(HAVE_CAST_TO_UNION, 1,
+                   [Defined when compiler supports casting to union type.])
+       fi
+
+    AC_SUBST(CFLAGS_DEBUG)
+    AC_SUBST(CFLAGS_OPTIMIZE)
+    AC_SUBST(CFLAGS_WARNING)
+
+    AC_SUBST(STLIB_LD)
+    AC_SUBST(SHLIB_LD)
+
+    AC_SUBST(SHLIB_LD_LIBS)
+    AC_SUBST(SHLIB_CFLAGS)
+
+    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_CACHE_CHECK([termios vs. termio vs. sgtty], 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=no, tcl_cv_api_serial=no)
+    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, 1, [Use the termios API for serial lines]);;
+       termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
+       sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
+    esac
+])
+
+#--------------------------------------------------------------------
+# TEA_MISSING_POSIX_HEADERS
+#
+#      Supply substitutes for missing POSIX header files.  Special
+#      notes:
+#          - stdlib.h doesn't define strtol, strtoul, or
+#            strtod in some 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_CACHE_CHECK([dirent.h], tcl_cv_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_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
+
+    if test $tcl_cv_dirent_h = no; then
+       AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
+    fi
+
+    # TEA specific:
+    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
+    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
+    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
+    AC_CHECK_HEADER(limits.h,
+       [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
+       [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <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, 1, [Do we have <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, 1, [Do we have <string.h>?])
+    fi
+
+    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
+    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <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
+#              PKG_LIBS (appends to)
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_X], [
+    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
+       TEA_PATH_UNIX_X
+    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/Xlib.h>], , not_really_there="yes")
+       else
+           if test ! -r $x_includes/X11/Xlib.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])
+       found_xincludes="no"
+       AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
+       if test "$found_xincludes" = "no"; 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/Xlib.h; then
+                   AC_MSG_RESULT([$i])
+                   XINCLUDES=" -I$i"
+                   found_xincludes="yes"
+                   break
+               fi
+           done
+       fi
+    else
+       if test "$x_includes" != ""; then
+           XINCLUDES="-I$x_includes"
+           found_xincludes="yes"
+       fi
+    fi
+    if test "$found_xincludes" = "no"; then
+       AC_MSG_RESULT([couldn't find any!])
+    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 -o -r $i/libX11.dylib; 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
+    # TEA specific:
+    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)
+    TEA_CONFIG_SYSTEM
+    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
+    case $system in
+       OSF*)
+           AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
+           AC_MSG_RESULT([FIONBIO])
+           ;;
+       *)
+           AC_MSG_RESULT([O_NONBLOCK])
+           ;;
+    esac
+])
+
+#--------------------------------------------------------------------
+# TEA_TIME_HANDLER
+#
+#      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_CACHE_CHECK([tm_tzadj in struct tm], 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)])
+    if test $tcl_cv_member_tm_tzadj = yes ; then
+       AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
+    fi
+
+    AC_CACHE_CHECK([tm_gmtoff in struct tm], 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)])
+    if test $tcl_cv_member_tm_gmtoff = yes ; then
+       AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
+    fi
+
+    #
+    # Its important to include time.h in this check, as some systems
+    # (like convex) have timezone functions, etc.
+    #
+    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
+       AC_TRY_COMPILE([#include <time.h>],
+           [extern long timezone;
+           timezone += 1;
+           exit (0);],
+           tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
+    if test $tcl_cv_timezone_long = yes ; then
+       AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+    else
+       #
+       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+       #
+       AC_CACHE_CHECK([time_t timezone variable], 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)])
+       if test $tcl_cv_timezone_time = yes ; then
+           AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+       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_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
+           AC_TRY_RUN([
+               extern double strtod();
+               int main() {
+                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
+                   char *term;
+                   double value;
+                   value = strtod(infString, &term);
+                   if ((term != infString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(nanString, &term);
+                   if ((term != nanString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(spaceString, &term);
+                   if (term == (spaceString+1)) {
+                       exit(1);
+                   }
+                   exit(0);
+               }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
+                   tcl_cv_strtod_buggy=buggy)])
+       if test "$tcl_cv_strtod_buggy" = buggy; then
+           AC_LIBOBJ([fixstrtod])
+           USE_COMPAT=1
+           AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
+       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 (not in TEA, only needed in core)
+#              LIBS
+#              MATH_LIBS
+#
+# Results:
+#
+#      Substitutes the following vars:
+#              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, 1, [Do we 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"])])
+
+    # TEA specific: 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
+#              _LARGEFILE_SOURCE64
+#--------------------------------------------------------------------
+
+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, 1, [Add the ]$1[ flag when building])
+       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);])
+    TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
+       [char *p = (char *)open64;])
+    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, 1, [Are wide integers to be implemented with C 'long's?])
+       AC_MSG_RESULT([using long])
+    elif test "${tcl_cv_type_64bit}" = "__int64" \
+               -a "${TEA_PLATFORM}" = "windows" ; then
+       # TEA specific: 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},
+           [What type should be used to define wide integers?])
+       AC_MSG_RESULT([${tcl_cv_type_64bit}])
+
+       # Now check for auxiliary declarations
+       AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
+           AC_TRY_COMPILE([#include <sys/types.h>
+#include <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, 1, [Is 'struct dirent64' in <sys/types.h>?])
+       fi
+
+       AC_CACHE_CHECK([for struct stat64], 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, 1, [Is 'struct stat64' in <sys/stat.h>?])
+       fi
+
+       AC_CHECK_FUNCS(open64 lseek64)
+       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)])
+       dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
+       dnl functions lseek64 and open64 are defined.
+       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
+               test "x${ac_cv_func_lseek64}" = "xyes" && \
+               test "x${ac_cv_func_open64}" = "xyes" ; then
+           AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
+           AC_MSG_RESULT([yes])
+       else
+           AC_MSG_RESULT([no])
+       fi
+    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_VERSION
+#              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.9"
+
+    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
+
+    # If the user did not set CFLAGS, set it now to keep macros
+    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
+    if test "${CFLAGS+set}" != "set" ; then
+       CFLAGS=""
+    fi
+
+    case "`uname -s`" in
+       *win32*|*WIN32*|*MINGW32_*)
+           AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+           EXEEXT=".exe"
+           TEA_PLATFORM="windows"
+           ;;
+       *CYGWIN_*)
+           CYGPATH=echo
+           EXEEXT=".exe"
+           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
+           ;;
+       *)
+           CYGPATH=echo
+           # Maybe we are cross-compiling....
+           case ${host_alias} in
+               *mingw32*)
+               EXEEXT=".exe"
+               TEA_PLATFORM="windows"
+               ;;
+           *)
+               EXEEXT=""
+               TEA_PLATFORM="unix"
+               ;;
+           esac
+           ;;
+    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_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}])
+
+    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
+               # To add more dirs here (like 'src'), you have to update VPATH
+               # in Makefile.in as well
+               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+                   -a ! -f "${srcdir}/macosx/$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" \
+           -a ! -f "${srcdir}/macosx/$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_ADD_CLEANFILES --
+#
+#      Specify one or more CLEANFILES.
+#
+# Arguments:
+#      one or more file names to clean target
+#
+# Results:
+#
+#      Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_CLEANFILES], [
+    CLEANFILES="$CLEANFILES $@"
+])
+
+#------------------------------------------------------------------------
+# 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.
+
+    AC_PROG_CC
+    AC_PROG_CPP
+
+    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
+    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
+    INSTALL_DATA='${INSTALL} -m 644'
+    INSTALL_PROGRAM='${INSTALL}'
+    INSTALL_SCRIPT='${INSTALL}'
+    INSTALL_LIBRARY='${INSTALL_DATA}'
+
+    AC_SUBST(INSTALL)
+    AC_SUBST(INSTALL_DATA_DIR)
+    AC_SUBST(INSTALL_DATA)
+    AC_SUBST(INSTALL_PROGRAM)
+    AC_SUBST(INSTALL_SCRIPT)
+    AC_SUBST(INSTALL_LIBRARY)
+
+    #--------------------------------------------------------------------
+    # Checks to see if the make program sets the $MAKE variable.
+    #--------------------------------------------------------------------
+
+    AC_PROG_MAKE_SET
+
+    #--------------------------------------------------------------------
+    # Find ranlib
+    #--------------------------------------------------------------------
+
+    AC_CHECK_TOOL(RANLIB, 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_CACHE_CHECK([if the compiler understands -pipe],
+           tcl_cv_cc_pipe, [
+           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+           AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
+           CFLAGS=$hold_cflags])
+       if test $tcl_cv_cc_pipe = yes; then
+           CFLAGS="$CFLAGS -pipe"
+       fi
+    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
+#      VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
+#      VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
+#------------------------------------------------------------------------
+
+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)"
+       AC_EGREP_CPP([manifest needed], [
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+print("manifest needed")
+#endif
+       ], [
+       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
+       VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
+       VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
+       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
+       TEA_ADD_CLEANFILES([*.manifest])
+       ])
+       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
+           if test x"${TK_BIN_DIR}" != x ; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+           fi
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+           if test "$GCC" = "yes"; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
+           fi
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+       else
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           if test "$GCC" = "yes"; then
+               PKG_LIB_FILE=lib${PKG_LIB_FILE}
+           fi
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       if test "$GCC" = "yes"; then
+           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
+       fi
+       # 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_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           RANLIB=:
+       else
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${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)
+    AC_SUBST(VC_MANIFEST_EMBED_DLL)
+    AC_SUBST(VC_MANIFEST_EMBED_EXE)
+])
+
+#------------------------------------------------------------------------
+# 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/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
+           `ls -dr /usr/lib64/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:
+#
+#      Substitutes the following vars:
+#              TCL_TOP_DIR_NATIVE
+#              TCL_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
+    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
+    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
+    AC_MSG_CHECKING([for Tcl private include files])
+
+    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
+    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
+
+    # Check to see if tcl<Plat>Port.h isn't already with the public headers
+    # Don't look for tclInt.h because that resides with tcl.h in the core
+    # sources, but the <plat>Port headers are in a different directory
+    if test "${TEA_PLATFORM}" = "windows" -a \
+       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
+       result="private headers found with public headers"
+    elif test "${TEA_PLATFORM}" = "unix" -a \
+       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
+       result="private headers found with public headers"
+    else
+       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
+       if test "${TEA_PLATFORM}" = "windows"; then
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
+       else
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
+       fi
+       # Overwrite the previous TCL_INCLUDES as this should capture both
+       # public and private headers in the same set.
+       # We want to ensure these are substituted so as not to require
+       # any *_NATIVE vars be defined in the Makefile
+       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+       if test "`uname -s`" = "Darwin"; then
+            # If Tcl was built as a framework, attempt to use
+            # the framework's Headers and PrivateHeaders directories
+            case ${TCL_DEFS} in
+               *TCL_FRAMEWORK*)
+                   if test -d "${TCL_BIN_DIR}/Headers" -a \
+                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
+                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
+                   else
+                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
+                   fi
+                   ;;
+           esac
+           result="Using ${TCL_INCLUDES}"
+       else
+           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
+               AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
+           fi
+           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
+       fi
+    fi
+
+    AC_SUBST(TCL_TOP_DIR_NATIVE)
+
+    AC_SUBST(TCL_INCLUDES)
+    AC_MSG_RESULT([${result}])
+])
+
+#------------------------------------------------------------------------
+# 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.
+#
+#      Substitutes 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
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tcl was built as a framework, attempt to use
+               # the framework's Headers directory
+               case ${TCL_DEFS} in
+                   *TCL_FRAMEWORK*)
+                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tcl is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TCL_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$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`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TCL_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           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:
+#
+#      Substitutes the following vars:
+#              TK_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
+    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
+    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
+    AC_MSG_CHECKING([for Tk private include files])
+
+    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
+    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
+
+    # Check to see if tk<Plat>Port.h isn't already with the public headers
+    # Don't look for tkInt.h because that resides with tk.h in the core
+    # sources, but the <plat>Port headers are in a different directory
+    if test "${TEA_PLATFORM}" = "windows" -a \
+       -f "${ac_cv_c_tkh}/tkWinPort.h"; then
+       result="private headers found with public headers"
+    elif test "${TEA_PLATFORM}" = "unix" -a \
+       -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
+       result="private headers found with public headers"
+    else
+       TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
+       TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
+       if test "${TEA_PLATFORM}" = "windows"; then
+           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
+       else
+           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
+       fi
+       # Overwrite the previous TK_INCLUDES as this should capture both
+       # public and private headers in the same set.
+       # We want to ensure these are substituted so as not to require
+       # any *_NATIVE vars be defined in the Makefile
+       TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
+       # Detect and add ttk subdir
+       if test -d "${TK_SRC_DIR}/generic/ttk"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
+       fi
+       if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
+       fi
+       if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
+       fi
+       if test "`uname -s`" = "Darwin"; then
+           # If Tk was built as a framework, attempt to use
+           # the framework's Headers and PrivateHeaders directories
+           case ${TK_DEFS} in
+               *TK_FRAMEWORK*)
+                       if test -d "${TK_BIN_DIR}/Headers" -a \
+                               -d "${TK_BIN_DIR}/PrivateHeaders"; then
+                           TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
+                       else
+                           TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
+                       fi
+                       ;;
+           esac
+           result="Using ${TK_INCLUDES}"
+       else
+           if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
+              AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
+           fi
+           result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
+       fi
+    fi
+
+    AC_SUBST(TK_TOP_DIR_NATIVE)
+    AC_SUBST(TK_XLIB_DIR_NATIVE)
+
+    AC_SUBST(TK_INCLUDES)
+    AC_MSG_RESULT([${result}])
+])
+
+#------------------------------------------------------------------------
+# 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.
+#
+#      Substitutes 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
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tk was built as a framework, attempt to use
+               # the framework's Headers directory.
+               case ${TK_DEFS} in
+                   *TK_FRAMEWORK*)
+                       list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tk is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TK_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tk's --prefix location,
+           # relative to directory of tkConfig.sh, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$list \
+               `ls -d ${temp_includedir}        2>/dev/null` \
+               `ls -d ${TK_PREFIX}/include      2>/dev/null` \
+               `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
+               `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
+               `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TK_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           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_WINDOWINGSYSTEM}" != "x11"; then
+       # On Windows and Aqua, 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_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 ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 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:
+#
+#      Substitutes 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}
+        $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
+        $1_LIBRARY_PATH=${$1_LIBRARY_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)
+
+    # Allow the caller to prevent this auto-check by specifying any 2nd arg
+    AS_IF([test "x$2" = x], [
+       # Check both upper and lower-case variants
+       # If a dev wanted non-stubs libs, this function could take an option
+       # to not use _STUB in the paths below
+       AS_IF([test "x${$1_STUB_LIB_SPEC}" = x],
+           [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
+           [TEA_LOAD_CONFIG_LIB($1_STUB)])
+    ])
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_CONFIG_LIB --
+#
+#      Helper function to load correct library from another extension's
+#      ${PACKAGE}Config.sh.
+#
+# Results:
+#      Adds to LIBS the appropriate extension library
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
+    AC_MSG_CHECKING([For $1 library for LIBS])
+    # This simplifies the use of stub libraries by automatically adding
+    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
+    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
+    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
+    if test "x${$1_LIB_SPEC}" != "x" ; then
+       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+           TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"])
+           AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}])
+       else
+           TEA_ADD_LIBS([${$1_LIB_SPEC}])
+           AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}])
+       fi
+    else
+       AC_MSG_RESULT([file not found])
+    fi
+])
+
+#------------------------------------------------------------------------
+# TEA_EXPORT_CONFIG --
+#
+#      Define the data to insert into the ${PACKAGE}Config.sh file
+#
+# Arguments:
+#
+#      Requires the following vars to be set:
+#              $1
+#
+# Results:
+#      Substitutes the following vars:
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_EXPORT_CONFIG], [
+    #--------------------------------------------------------------------
+    # These are for $1Config.sh
+    #--------------------------------------------------------------------
+
+    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
+    eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
+    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+       eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
+       eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
+    else
+       eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+       eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+    fi
+    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
+    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
+    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
+    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
+    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
+    $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
+
+    AC_SUBST($1_BUILD_LIB_SPEC)
+    AC_SUBST($1_LIB_SPEC)
+    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
+    AC_SUBST($1_STUB_LIB_SPEC)
+    AC_SUBST($1_BUILD_STUB_LIB_PATH)
+    AC_SUBST($1_STUB_LIB_PATH)
+
+    AC_SUBST(MAJOR_VERSION)
+    AC_SUBST(MINOR_VERSION)
+    AC_SUBST(PATCHLEVEL)
+])
+
+
+#------------------------------------------------------------------------
+# 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}
+           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
+           AC_MSG_RESULT([found $CELIB_DIR])
+       fi
+    fi
+])
+# Local Variables:
+# mode: autoconf
+# End:
diff --git a/pkgs/tdbcsqlite3-1.0.2/tclconfig/tcl.m4 b/pkgs/tdbcsqlite3-1.0.2/tclconfig/tcl.m4
deleted file mode 100644 (file)
index 6ff4a2a..0000000
+++ /dev/null
@@ -1,4168 +0,0 @@
-# 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.
-
-AC_PREREQ(2.57)
-
-dnl TEA extensions pass us the version of TEA they think they
-dnl are compatible with (must be set in TEA_INIT below)
-dnl TEA_VERSION="3.9"
-
-# Possible values for key variables defined:
-#
-# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
-# TEA_PLATFORM        - windows unix
-#
-
-#------------------------------------------------------------------------
-# 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 TEA specific: 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,
-           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 common install locations
-           if test x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
-       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,
-           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tk.framework/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/Tk.framework; 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 ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       ; do
-                   if test -f "$i/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tkconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
-       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:
-#
-#      Substitutes 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([could not find ${TCL_BIN_DIR}/tclConfig.sh])
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tcl was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tcl.framework installed in an arbitrary location.
-       case ${TCL_DEFS} in
-           *TCL_FRAMEWORK*)
-               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
-                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
-                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
-                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
-                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
-                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-    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_PATCH_LEVEL)
-    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_MSG_CHECKING([platform])
-    hold_cc=$CC; CC="$TCL_CC"
-    AC_TRY_COMPILE(,[
-           #ifdef _WIN32
-               #error win32
-           #endif
-    ], TEA_PLATFORM="unix",
-           TEA_PLATFORM="windows"
-    )
-    CC=$hold_cc
-    AC_MSG_RESULT($TEA_PLATFORM)
-
-    # The BUILD_$pkg is to define the correct extern storage class
-    # handling when making this package
-    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
-           [Building extension source?])
-    # Do this here as we have fully defined TEA_PLATFORM now
-    if test "${TEA_PLATFORM}" = "windows" ; then
-       EXEEXT=".exe"
-       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
-    fi
-
-    # TEA specific:
-    AC_SUBST(CLEANFILES)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-])
-
-#------------------------------------------------------------------------
-# 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
-
-    # eval is required to do the TK_DBGX substitution
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tk was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tk.framework installed in an arbitrary location.
-       case ${TK_DEFS} in
-           *TK_FRAMEWORK*)
-               if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
-                   for i in "`cd "${TK_BIN_DIR}"; pwd`" \
-                            "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
-                           TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
-                   TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
-                   TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TK_DBGX substitution
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    # TEA specific: Ensure windowingsystem is defined
-    if test "${TEA_PLATFORM}" = "unix" ; then
-       case ${TK_DEFS} in
-           *MAC_OSX_TK*)
-               AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
-               TEA_WINDOWINGSYSTEM="aqua"
-               ;;
-           *)
-               TEA_WINDOWINGSYSTEM="x11"
-               ;;
-       esac
-    elif test "${TEA_PLATFORM}" = "windows" ; then
-       TEA_WINDOWINGSYSTEM="win32"
-    fi
-
-    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)
-
-    # TEA specific:
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#      Determine the fully qualified path name of the tclsh executable
-#      in the Tcl build directory or the tclsh installed in a bin
-#      directory. This macro will correctly determine the name
-#      of the tclsh executable even if tclsh has not yet been
-#      built in the build directory. The tclsh found is always
-#      associated with a tclConfig.sh file. This tclsh should be used
-#      only for running extension test cases. It should never be
-#      or generation of files (like pkgIndex.tcl) at build time.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Substitutes the following vars:
-#              TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PROG_TCLSH], [
-    AC_MSG_CHECKING([for tclsh])
-    if test -f "${TCL_BIN_DIR}/Makefile" ; then
-        # tclConfig.sh is in Tcl build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
-        fi
-    else
-        # tclConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
-        fi
-        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${TCLSH_PROG}" ; then
-                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
-    fi
-    AC_MSG_RESULT([${TCLSH_PROG}])
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#      Determine the fully qualified path name of the wish executable
-#      in the Tk build directory or the wish installed in a bin
-#      directory. This macro will correctly determine the name
-#      of the wish executable even if wish has not yet been
-#      built in the build directory. The wish found is always
-#      associated with a tkConfig.sh file. This wish should be used
-#      only for running extension test cases. It should never be
-#      or generation of files (like pkgIndex.tcl) at build time.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Substitutes the following vars:
-#              WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PROG_WISH], [
-    AC_MSG_CHECKING([for wish])
-    if test -f "${TK_BIN_DIR}/Makefile" ; then
-        # tkConfig.sh is in Tk build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
-        else
-            WISH_PROG="${TK_BIN_DIR}/wish"
-        fi
-    else
-        # tkConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
-        else
-            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
-        fi
-        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${WISH_PROG}" ; then
-                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
-    fi
-    AC_MSG_RESULT([${WISH_PROG}])
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# 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,
-       AC_HELP_STRING([--enable-shared],
-           [build and link with shared libraries (default: on)]),
-       [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, 1, [Is this a 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, "no" means
-#      threads are disabled.  "yes" is the 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.
-#
-#      Note that it is legal to have a thread enabled extension run in a
-#      threaded or non-threaded Tcl core, but a non-threaded extension may
-#      only run in a non-threaded Tcl core.
-#
-# 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
-#              _THREAD_SAFE
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_ENABLE_THREADS], [
-    AC_ARG_ENABLE(threads,
-       AC_HELP_STRING([--enable-threads],
-           [build with threads]),
-       [tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_threads+set}" = set; then
-       enableval="$enable_threads"
-       tcl_ok=$enableval
-    else
-       tcl_ok=yes
-    fi
-
-    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:
-
-           # USE_THREAD_ALLOC tells us to try the special thread-based
-           # allocator that significantly reduces lock contention
-           AC_DEFINE(USE_THREAD_ALLOC, 1,
-               [Do we want to use the threaded memory allocator?])
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           if test "`uname -s`" = "SunOS" ; then
-               AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-                       [Do we really want to follow the standard? Yes we do!])
-           fi
-           AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
-           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([Do not know how to find pthread lib on your system - thread support disabled])
-                       fi
-                   fi
-               fi
-           fi
-       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, 1, [Are we building with threads enabled?])
-       AC_MSG_RESULT([yes (default)])
-    else
-       AC_MSG_RESULT([no])
-    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 Tcl
-    that IS thread-enabled.  It is recommended to use --enable-threads.])
-           fi
-           ;;
-       *)
-           if test "${TCL_THREADS}" = "1"; then
-               AC_MSG_WARN([
-    --enable-threads requested, but building against a Tcl that is NOT
-    thread-enabled.  This is an OK configuration that will also run in
-    a thread-enabled core.])
-           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
-#
-#      TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
-#      the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
-#      Requires the following vars to be set in the Makefile:
-#              CFLAGS_DEFAULT
-#              LDFLAGS_DEFAULT
-#
-# 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) -DNDEBUG" 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 TEA specific: Make sure we are initialized
-    AC_REQUIRE([TEA_CONFIG_CFLAGS])
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols,
-       AC_HELP_STRING([--enable-symbols],
-           [build with debugging symbols (default: off)]),
-       [tcl_ok=$enableval], [tcl_ok=no])
-    DBGX=""
-    if test "$tcl_ok" = "no"; then
-       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
-       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
-    # TEA specific:
-    if test "${TEA_PLATFORM}" != "windows" ; then
-       LDFLAGS_DEFAULT="${LDFLAGS}"
-    fi
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-    AC_SUBST(TCL_DBGX)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-       AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
-    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,
-       AC_HELP_STRING([--enable-langinfo],
-           [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
-       [langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-       AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-       AC_CACHE_VAL(tcl_cv_langinfo_h, [
-           AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
-                   [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
-       AC_MSG_RESULT([$tcl_cv_langinfo_h])
-       if test $tcl_cv_langinfo_h = yes; then
-           AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
-       fi
-    else
-       AC_MSG_RESULT([$langinfo_ok])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_SYSTEM
-#
-#      Determine what the system is (some things cannot be easily checked
-#      on a feature-driven basis, alas). This can usually be done via the
-#      "uname" command.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Defines the following var:
-#
-#      system -        System/platform/version identification code.
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_CONFIG_SYSTEM], [
-    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
-       # TEA specific:
-       if test "${TEA_PLATFORM}" = "windows" ; then
-           tcl_cv_sys_version=windows
-       else
-           tcl_cv_sys_version=`uname -s`-`uname -r`
-           if test "$?" -ne 0 ; then
-               AC_MSG_WARN([can't find uname command])
-               tcl_cv_sys_version=unknown
-           else
-               if test "`uname -s`" = "AIX" ; then
-                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
-               fi
-           fi
-       fi
-    ])
-    system=$tcl_cv_sys_version
-])
-
-#--------------------------------------------------------------------
-# 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 and substitutes the following vars:
-#
-#      DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
-#       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. Could
-#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
-#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/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 defaults to
-#                       "${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.
-#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
-#                       in a static or 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 a shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
-#      CFLAGS_DEBUG -
-#                      Flags used when running the compiler in debug mode
-#      CFLAGS_OPTIMIZE -
-#                      Flags used when running the compiler in optimize mode
-#      CFLAGS -        Additional CFLAGS added as necessary (usually 64-bit)
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_CONFIG_CFLAGS], [
-    dnl TEA specific: Make sure we are initialized
-    AC_REQUIRE([TEA_INIT])
-
-    # Step 0.a: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is requested])
-    AC_ARG_ENABLE(64bit,
-       AC_HELP_STRING([--enable-64bit],
-           [enable 64bit support (default: off)]),
-       [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,
-       AC_HELP_STRING([--enable-64bit-vis],
-           [enable 64bit Sparc VIS support (default: off)]),
-       [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-    # Force 64bit on with VIS
-    AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes])
-
-    # Step 0.c: Check if visibility support is available. Do this here so
-    # that platform specific alternatives can be used below if this fails.
-
-    AC_CACHE_CHECK([if compiler supports visibility "hidden"],
-       tcl_cv_cc_visibility_hidden, [
-       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
-       AC_TRY_LINK([
-           extern __attribute__((__visibility__("hidden"))) void f(void);
-           void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
-           tcl_cv_cc_visibility_hidden=no)
-       CFLAGS=$hold_cflags])
-    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
-       AC_DEFINE(MODULE_SCOPE,
-           [extern __attribute__((__visibility__("hidden")))],
-           [Compiler support for module scope symbols])
-       AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
-    ])
-
-    # Step 0.d: Disable -rpath support?
-
-    AC_MSG_CHECKING([if rpath support is requested])
-    AC_ARG_ENABLE(rpath,
-       AC_HELP_STRING([--disable-rpath],
-           [disable rpath support (default: on)]),
-       [doRpath=$enableval], [doRpath=yes])
-    AC_MSG_RESULT([$doRpath])
-
-    # TEA specific: Cross-compiling options for Windows/CE builds?
-
-    AS_IF([test "${TEA_PLATFORM}" = windows], [
-       AC_MSG_CHECKING([if Windows/CE build is requested])
-       AC_ARG_ENABLE(wince,
-           AC_HELP_STRING([--enable-wince],
-               [enable Win/CE support (where applicable)]),
-           [doWince=$enableval], [doWince=no])
-       AC_MSG_RESULT([$doWince])
-    ])
-
-    # Set the variable "system" to hold the name and version number
-    # for the system.
-
-    TEA_CONFIG_SYSTEM
-
-    # Require ranlib early so we can override it in special cases below.
-
-    AC_REQUIRE([AC_PROG_RANLIB])
-
-    # 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 removed some core-only vars.
-
-    do64bit_ok=no
-    # default to '{$LIBS}' and set to "" on per-platform necessary basis
-    SHLIB_LD_LIBS='${LIBS}'
-    # When ld needs options to work in 64-bit mode, put them in
-    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
-    # is disabled by the user. [Bug 1016796]
-    LDFLAGS_ARCH=""
-    UNSHARED_LIB_SUFFIX=""
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    AS_IF([test "$GCC" = yes], [
-       CFLAGS_OPTIMIZE=-O2
-       CFLAGS_WARNING="-Wall"
-    ], [
-       CFLAGS_OPTIMIZE=-O
-       CFLAGS_WARNING=""
-    ])
-    AC_CHECK_TOOL(AR, ar)
-    STLIB_LD='${AR} cr'
-    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
-    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION="1.0"])
-    case $system in
-       # TEA specific:
-       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.
-           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
-           # MACHINE is IX86 for LINK, but this is used by the manifest,
-           # which requires x86|amd64|ia64.
-           MACHINE="X86"
-           if test "$do64bit" != "no" ; then
-               if test "x${MSSDK}x" = "xx" ; then
-                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
-               fi
-               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
-               PATH64=""
-               case "$do64bit" in
-                   amd64|x64|yes)
-                       MACHINE="AMD64" ; # default to AMD64 64-bit build
-                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
-                       ;;
-                   ia64)
-                       MACHINE="IA64"
-                       PATH64="${MSSDK}/Bin/Win64"
-                       ;;
-               esac
-               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
-                   AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
-                   AC_MSG_WARN([Ensure latest Platform SDK is installed])
-                   do64bit="no"
-               else
-                   AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
-                   do64bit_ok="yes"
-               fi
-           fi
-
-           if test "$doWince" != "no" ; then
-               if test "$do64bit" != "no" ; 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
-               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
-               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
-               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" != "no" ; then
-                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
-                   CC="\"${PATH64}/cl.exe\""
-                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
-                   RC="\"${MSSDK}/bin/rc.exe\""
-                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
-                   LINKBIN="\"${PATH64}/link.exe\""
-                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
-                   # Avoid 'unresolved external symbol __security_cookie'
-                   # errors, c.f. http://support.microsoft.com/?id=894573
-                   TEA_ADD_LIBS([bufferoverflowU.lib])
-               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, 1, [WinCE def ]$i)
-                   done
-                   AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
-                   AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
-                   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
-               AC_CHECK_TOOL(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}"
-
-               AC_CACHE_CHECK(for cross-compile version of gcc,
-                       ac_cv_cross,
-                       AC_TRY_COMPILE([
-                           #ifdef _WIN32
-                               #error cross-compiler
-                           #endif
-                       ], [],
-                       ac_cv_cross=yes,
-                       ac_cv_cross=no)
-                     )
-                     if test "$ac_cv_cross" = "yes"; then
-                       case "$do64bit" in
-                           amd64|x64|yes)
-                               CC="x86_64-w64-mingw32-gcc"
-                               LD="x86_64-w64-mingw32-ld"
-                               AR="x86_64-w64-mingw32-ar"
-                               RANLIB="x86_64-w64-mingw32-ranlib"
-                               RC="x86_64-w64-mingw32-windres"
-                           ;;
-                           *)
-                               CC="i686-w64-mingw32-gcc"
-                               LD="i686-w64-mingw32-ld"
-                               AR="i686-w64-mingw32-ar"
-                               RANLIB="i686-w64-mingw32-ranlib"
-                               RC="i686-w64-mingw32-windres"
-                           ;;
-                       esac
-               fi
-
-           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
-               # and also
-               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
-               # This essentially turns it all on.
-               LDFLAGS_DEBUG="-debug -debugtype:cv"
-               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_SUFFIX=".dll"
-           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
-
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       AIX-*)
-           AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
-               # AIX requires the _r compiler when gcc isn't being used
-               case "${CC}" in
-                   *_r|*_r\ *)
-                       # ok ...
-                       ;;
-                   *)
-                       # Make sure only first arg gets _r
-                       CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
-                       ;;
-               esac
-               AC_MSG_RESULT([Using $CC for compiling with threads])
-           ])
-           LIBS="$LIBS -lc"
-           SHLIB_CFLAGS=""
-           SHLIB_SUFFIX=".so"
-
-           LD_LIBRARY_PATH_VAR="LIBPATH"
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = yes], [
-               AS_IF([test "$GCC" = yes], [
-                   AC_MSG_WARN([64bit mode not supported with GCC on $system])
-               ], [
-                   do64bit_ok=yes
-                   CFLAGS="$CFLAGS -q64"
-                   LDFLAGS_ARCH="-q64"
-                   RANLIB="${RANLIB} -X64"
-                   AR="${AR} -X64"
-                   SHLIB_LD_FLAGS="-b64"
-               ])
-           ])
-
-           AS_IF([test "`uname -m`" = ia64], [
-               # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               AS_IF([test "$GCC" = yes], [
-                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               ], [
-                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-               ])
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-           ], [
-               AS_IF([test "$GCC" = yes], [
-                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
-               ], [
-                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
-                   LDFLAGS="$LDFLAGS -brtl"
-               ])
-               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
-               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ])
-           ;;
-       BeOS*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -nostart'
-           SHLIB_SUFFIX=".so"
-
-           #-----------------------------------------------------------
-           # Check for inet_ntoa in -lbind, for BeOS (which also needs
-           # -lsocket, even if the network functions are in -lnet which
-           # is always linked to, for compatibility.
-           #-----------------------------------------------------------
-           AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
-           ;;
-       BSD/OS-4.*)
-           SHLIB_CFLAGS="-export-dynamic -fPIC"
-           SHLIB_LD='${CC} -shared'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       CYGWIN_*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD='${CC} -shared'
-           SHLIB_SUFFIX=".dll"
-           EXEEXT=".exe"
-           do64bit_ok=yes
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       Haiku*)
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
-           AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
-           ;;
-       HP-UX-*.11.*)
-           # Use updated header definitions where possible
-           AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
-           # TEA specific: Needed by Tcl, but not most extensions
-           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
-           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
-
-           AS_IF([test "`uname -m`" = ia64], [
-               SHLIB_SUFFIX=".so"
-               # Use newer C++ library for C++ extensions
-               #if test "$GCC" != "yes" ; then
-               #   CPPFLAGS="-AA"
-               #fi
-           ], [
-               SHLIB_SUFFIX=".sl"
-           ])
-           AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-           AS_IF([test "$tcl_ok" = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-E"
-               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
-               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
-           ])
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ], [
-               CFLAGS="$CFLAGS -z"
-               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-               #CFLAGS="$CFLAGS +DAportable"
-               SHLIB_CFLAGS="+z"
-               SHLIB_LD="ld -b"
-           ])
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = "yes"], [
-               AS_IF([test "$GCC" = yes], [
-                   case `${CC} -dumpmachine` in
-                       hppa64*)
-                           # 64-bit gcc in use.  Fix flags for GNU ld.
-                           do64bit_ok=yes
-                           SHLIB_LD='${CC} -shared'
-                           AS_IF([test $doRpath = yes], [
-                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-                           ;;
-                       *)
-                           AC_MSG_WARN([64bit mode not supported with GCC on $system])
-                           ;;
-                   esac
-               ], [
-                   do64bit_ok=yes
-                   CFLAGS="$CFLAGS +DD64"
-                   LDFLAGS_ARCH="+DD64"
-               ])
-           ]) ;;
-       IRIX-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-           AS_IF([test "$GCC" = yes], [
-               CFLAGS="$CFLAGS -mabi=n32"
-               LDFLAGS="$LDFLAGS -mabi=n32"
-           ], [
-               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"
-           ])
-           ;;
-       IRIX64-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-
-           # Check to enable 64-bit flags for compiler/linker
-
-           AS_IF([test "$do64bit" = yes], [
-               AS_IF([test "$GCC" = yes], [
-                   AC_MSG_WARN([64bit mode not supported by gcc])
-               ], [
-                   do64bit_ok=yes
-                   SHLIB_LD="ld -64 -shared -rdata_shared"
-                   CFLAGS="$CFLAGS -64"
-                   LDFLAGS_ARCH="-64"
-               ])
-           ])
-           ;;
-       Linux*|GNU*|NetBSD-Debian)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-
-           # TEA specific:
-           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
-
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
-           AS_IF([test $do64bit = yes], [
-               AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
-                   hold_cflags=$CFLAGS
-                   CFLAGS="$CFLAGS -m64"
-                   AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
-                   CFLAGS=$hold_cflags])
-               AS_IF([test $tcl_cv_cc_m64 = yes], [
-                   CFLAGS="$CFLAGS -m64"
-                   do64bit_ok=yes
-               ])
-          ])
-
-           # 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.
-
-           AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
-           ;;
-       Lynx*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           CFLAGS_OPTIMIZE=-02
-           SHLIB_LD='${CC} -shared'
-           LD_FLAGS="-Wl,--export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           ;;
-       OpenBSD-*)
-           arch=`arch -s`
-           case "$arch" in
-           vax)
-               SHLIB_SUFFIX=""
-               SHARED_LIB_SUFFIX=""
-               LDFLAGS=""
-               ;;
-           *)
-               SHLIB_CFLAGS="-fPIC"
-               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-               SHLIB_SUFFIX=".so"
-               AS_IF([test $doRpath = yes], [
-                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
-               LDFLAGS="-Wl,-export-dynamic"
-               ;;
-           esac
-           case "$arch" in
-           vax)
-               CFLAGS_OPTIMIZE="-O1"
-               ;;
-           *)
-               CFLAGS_OPTIMIZE="-O2"
-               ;;
-           esac
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # On OpenBSD:   Compile with -pthread
-               #               Don't link with -lpthread
-               LIBS=`echo $LIBS | sed s/-lpthread//`
-               CFLAGS="$CFLAGS -pthread"
-           ])
-           # OpenBSD doesn't do version numbers with dots.
-           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       NetBSD-*)
-           # NetBSD has ELF and can use 'cc -shared' to build shared libs
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # The -pthread needs to go in the CFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS -pthread"
-               LDFLAGS="$LDFLAGS -pthread"
-           ])
-           ;;
-       FreeBSD-*)
-           # This configuration from FreeBSD Ports.
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD="${CC} -shared"
-           TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$[@]"
-           TK_SHLIB_LD_EXTRAS="-Wl,-soname,\$[@]"
-           SHLIB_SUFFIX=".so"
-           LDFLAGS=""
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # The -pthread needs to go in the LDFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
-           case $system in
-           FreeBSD-3.*)
-               # Version numbers are dot-stripped by system policy.
-               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
-               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
-               TCL_LIB_VERSIONS_OK=nodots
-               ;;
-           esac
-           ;;
-       Darwin-*)
-           CFLAGS_OPTIMIZE="-Os"
-           SHLIB_CFLAGS="-fno-common"
-           # To avoid discrepancies between what headers configure sees during
-           # preprocessing tests and compiling tests, move any -isysroot and
-           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
-           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
-           CFLAGS="`echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
-           AS_IF([test $do64bit = yes], [
-               case `arch` in
-                   ppc)
-                       AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
-                               tcl_cv_cc_arch_ppc64, [
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
-                                   tcl_cv_cc_arch_ppc64=no)
-                           CFLAGS=$hold_cflags])
-                       AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           do64bit_ok=yes
-                       ]);;
-                   i386)
-                       AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
-                               tcl_cv_cc_arch_x86_64, [
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
-                                   tcl_cv_cc_arch_x86_64=no)
-                           CFLAGS=$hold_cflags])
-                       AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           do64bit_ok=yes
-                       ]);;
-                   *)
-                       AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
-               esac
-           ], [
-               # Check for combined 32-bit and 64-bit fat build
-               AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
-                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
-                   fat_32_64=yes])
-           ])
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_single_module = yes], [
-               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
-           ])
-           # TEA specific: link shlib with current and compatibility version flags
-           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
-           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
-           SHLIB_SUFFIX=".dylib"
-           # Don't use -prebind when building for Mac OS X 10.4 or later only:
-           AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
-               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
-               LDFLAGS="$LDFLAGS -prebind"])
-           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
-           AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
-                   tcl_cv_ld_search_paths_first, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
-                       tcl_cv_ld_search_paths_first=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-           ])
-           AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
-               AC_DEFINE(MODULE_SCOPE, [__private_extern__],
-                   [Compiler support for module scope symbols])
-               tcl_cv_cc_visibility_hidden=yes
-           ])
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-           # TEA specific: for combined 32 & 64 bit fat builds of Tk
-           # extensions, verify that 64-bit build is possible.
-           AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
-               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [
-                   AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
-                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
-                       AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();],
-                           tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no)
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done])
-               ])
-               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [
-                   AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
-                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
-                       AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);],
-                           tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no)
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done])
-               ])
-               # remove 64-bit arch flags from CFLAGS et al. if configuration
-               # does not support 64-bit.
-               AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
-                   AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
-                   for v in CFLAGS CPPFLAGS LDFLAGS; do
-                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
-                   done])
-           ])
-           ;;
-       OS/390-*)
-           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
-           AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
-               [Should OS/390 do the right thing with sockets?])
-           ;;
-       OSF1-V*)
-           # Digital OSF/1
-           SHLIB_CFLAGS=""
-           AS_IF([test "$SHARED_BUILD" = 1], [
-               SHLIB_LD='ld -shared -expect_unresolved "*"'
-           ], [
-               SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-           ])
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-           AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
-               CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
-           # see pthread_intro(3) for pthread support on osf1, k.furukawa
-           AS_IF([test "${TCL_THREADS}" = 1], [
-               CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-               CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-               LIBS=`echo $LIBS | sed s/-lpthreads//`
-               AS_IF([test "$GCC" = yes], [
-                   LIBS="$LIBS -lpthread -lmach -lexc"
-               ], [
-                   CFLAGS="$CFLAGS -pthread"
-                   LDFLAGS="$LDFLAGS -pthread"
-               ])
-           ])
-           ;;
-       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"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SCO_SV-3.2*)
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_CFLAGS="-fPIC -melf"
-               LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
-           ], [
-               SHLIB_CFLAGS="-Kpic -belf"
-               LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
-           ])
-           SHLIB_LD="ld -G"
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SunOS-5.[[0-6]])
-           # Careful to not let 5.10+ fall into this case
-
-           # Note: If _REENTRANT isn't defined, then Solaris
-           # won't define thread-safe library routines.
-
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-               [Do we really want to follow the standard? Yes we do!])
-
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ], [
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ])
-           ;;
-       SunOS-5*)
-           # Note: If _REENTRANT isn't defined, then Solaris
-           # won't define thread-safe library routines.
-
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-               [Do we really want to follow the standard? Yes we do!])
-
-           SHLIB_CFLAGS="-KPIC"
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = yes], [
-               arch=`isainfo`
-               AS_IF([test "$arch" = "sparcv9 sparc"], [
-                   AS_IF([test "$GCC" = yes], [
-                       AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
-                           AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
-                       ], [
-                           do64bit_ok=yes
-                           CFLAGS="$CFLAGS -m64 -mcpu=v9"
-                           LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
-                           SHLIB_CFLAGS="-fPIC"
-                       ])
-                   ], [
-                       do64bit_ok=yes
-                       AS_IF([test "$do64bitVIS" = yes], [
-                           CFLAGS="$CFLAGS -xarch=v9a"
-                           LDFLAGS_ARCH="-xarch=v9a"
-                       ], [
-                           CFLAGS="$CFLAGS -xarch=v9"
-                           LDFLAGS_ARCH="-xarch=v9"
-                       ])
-                       # Solaris 64 uses this as well
-                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
-                   ])
-               ], [AS_IF([test "$arch" = "amd64 i386"], [
-                   AS_IF([test "$GCC" = yes], [
-                       case $system in
-                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
-                               do64bit_ok=yes
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               AC_MSG_WARN([64bit mode not supported with GCC on $system]);;
-                       esac
-                   ], [
-                       do64bit_ok=yes
-                       case $system in
-                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               CFLAGS="$CFLAGS -xarch=amd64"
-                               LDFLAGS="$LDFLAGS -xarch=amd64";;
-                       esac
-                   ])
-               ], [AC_MSG_WARN([64bit mode not supported for $arch])])])
-           ])
-
-           SHLIB_SUFFIX=".so"
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               AS_IF([test "$do64bit_ok" = yes], [
-                   AS_IF([test "$arch" = "sparcv9 sparc"], [
-                       # 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` | ..."
-                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
-                   ], [AS_IF([test "$arch" = "amd64 i386"], [
-                       # JH: static-libgcc is necessary for core Tcl, but may
-                       # not be necessary for extensions.
-                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
-                   ])])
-               ])
-           ], [
-               case $system in
-                   SunOS-5.[[1-9]][[0-9]]*)
-                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
-                   *)
-                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
-               esac
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-           ])
-           ;;
-       UNIX_SV* | UnixWare-5*)
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_LD='${CC} -G'
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-           # that don't grok the -Bexport option.  Test that it does.
-           AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_Bexport = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-           ])
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-    esac
-
-    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
-       AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
-    ])
-
-dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
-dnl # until the end of configure, as configure's compile and link tests use
-dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
-dnl # preprocessing tests use only CPPFLAGS.
-    AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
-
-    # Add in the arch flags late to ensure it wasn't removed.
-    # Not necessary in TEA, but this is aligned with core
-    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
-
-    # 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.
-
-    AS_IF([test "$GCC" = yes], [
-       case $system in
-           AIX-*) ;;
-           BSD/OS*) ;;
-           CYGWIN_*|MINGW32_*) ;;
-           IRIX*) ;;
-           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
-           Darwin-*) ;;
-           SCO_SV-3.2*) ;;
-           windows) ;;
-           *) SHLIB_CFLAGS="-fPIC" ;;
-       esac])
-
-    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
-       AC_DEFINE(MODULE_SCOPE, [extern],
-           [No Compiler support for module scope symbols])
-    ])
-
-    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
-    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
-
-    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
-       AC_CACHE_CHECK(for SEH support in compiler,
-           tcl_cv_seh,
-       AC_TRY_RUN([
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-           int main(int argc, char** argv) {
-               int a, b = 0;
-               __try {
-                   a = 666 / b;
-               }
-               __except (EXCEPTION_EXECUTE_HANDLER) {
-                   return 0;
-               }
-               return 1;
-           }
-       ],
-           tcl_cv_seh=yes,
-           tcl_cv_seh=no,
-           tcl_cv_seh=no)
-       )
-       if test "$tcl_cv_seh" = "no" ; then
-           AC_DEFINE(HAVE_NO_SEH, 1,
-                   [Defined when mingw does not support SEH])
-       fi
-
-       #
-       # Check to see if the excpt.h include file provided contains the
-       # definition for EXCEPTION_DISPOSITION; if not, which is the case
-       # with Cygwin's version as of 2002-04-10, define it to be int,
-       # sufficient for getting the current code to work.
-       #
-       AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
-           tcl_cv_eh_disposition,
-           AC_TRY_COMPILE([
-#          define WIN32_LEAN_AND_MEAN
-#          include <windows.h>
-#          undef WIN32_LEAN_AND_MEAN
-           ],[
-               EXCEPTION_DISPOSITION x;
-           ],
-               tcl_cv_eh_disposition=yes,
-               tcl_cv_eh_disposition=no)
-       )
-       if test "$tcl_cv_eh_disposition" = "no" ; then
-       AC_DEFINE(EXCEPTION_DISPOSITION, int,
-               [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
-       fi
-
-       # Check to see if winnt.h defines CHAR, SHORT, and LONG
-       # even if VOID has already been #defined. The win32api
-       # used by mingw and cygwin is known to do this.
-
-       AC_CACHE_CHECK(for winnt.h that ignores VOID define,
-           tcl_cv_winnt_ignore_void,
-           AC_TRY_COMPILE([
-#define VOID void
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-           ], [
-               CHAR c;
-               SHORT s;
-               LONG l;
-           ],
-        tcl_cv_winnt_ignore_void=yes,
-        tcl_cv_winnt_ignore_void=no)
-       )
-       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
-           AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
-                   [Defined when cygwin/mingw ignores VOID define in winnt.h])
-       fi
-    fi
-
-       # See if the compiler supports casting to a union type.
-       # This is used to stop gcc from printing a compiler
-       # warning when initializing a union member.
-
-       AC_CACHE_CHECK(for cast to union support,
-           tcl_cv_cast_to_union,
-           AC_TRY_COMPILE([],
-           [
-                 union foo { int i; double d; };
-                 union foo f = (union foo) (int) 0;
-           ],
-           tcl_cv_cast_to_union=yes,
-           tcl_cv_cast_to_union=no)
-       )
-       if test "$tcl_cv_cast_to_union" = "yes"; then
-           AC_DEFINE(HAVE_CAST_TO_UNION, 1,
-                   [Defined when compiler supports casting to union type.])
-       fi
-
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(SHLIB_CFLAGS)
-
-    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_CACHE_CHECK([termios vs. termio vs. sgtty], 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=no, tcl_cv_api_serial=no)
-    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, 1, [Use the termios API for serial lines]);;
-       termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
-       sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#      Supply substitutes for missing POSIX header files.  Special
-#      notes:
-#          - stdlib.h doesn't define strtol, strtoul, or
-#            strtod in some 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_CACHE_CHECK([dirent.h], tcl_cv_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_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
-
-    if test $tcl_cv_dirent_h = no; then
-       AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
-    fi
-
-    # TEA specific:
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
-    AC_CHECK_HEADER(limits.h,
-       [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
-       [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <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, 1, [Do we have <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, 1, [Do we have <string.h>?])
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <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
-#              PKG_LIBS (appends to)
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_PATH_X], [
-    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
-       TEA_PATH_UNIX_X
-    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/Xlib.h>], , not_really_there="yes")
-       else
-           if test ! -r $x_includes/X11/Xlib.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])
-       found_xincludes="no"
-       AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
-       if test "$found_xincludes" = "no"; 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/Xlib.h; then
-                   AC_MSG_RESULT([$i])
-                   XINCLUDES=" -I$i"
-                   found_xincludes="yes"
-                   break
-               fi
-           done
-       fi
-    else
-       if test "$x_includes" != ""; then
-           XINCLUDES="-I$x_includes"
-           found_xincludes="yes"
-       fi
-    fi
-    if test "$found_xincludes" = "no"; then
-       AC_MSG_RESULT([couldn't find any!])
-    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 -o -r $i/libX11.dylib; 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
-    # TEA specific:
-    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)
-    TEA_CONFIG_SYSTEM
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    case $system in
-       OSF*)
-           AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
-           AC_MSG_RESULT([FIONBIO])
-           ;;
-       *)
-           AC_MSG_RESULT([O_NONBLOCK])
-           ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANDLER
-#
-#      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_CACHE_CHECK([tm_tzadj in struct tm], 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)])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-       AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
-    fi
-
-    AC_CACHE_CHECK([tm_gmtoff in struct tm], 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)])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-       AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
-       AC_TRY_COMPILE([#include <time.h>],
-           [extern long timezone;
-           timezone += 1;
-           exit (0);],
-           tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
-    if test $tcl_cv_timezone_long = yes ; then
-       AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
-    else
-       #
-       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-       #
-       AC_CACHE_CHECK([time_t timezone variable], 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)])
-       if test $tcl_cv_timezone_time = yes ; then
-           AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
-       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_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
-           AC_TRY_RUN([
-               extern double strtod();
-               int main() {
-                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
-                   char *term;
-                   double value;
-                   value = strtod(infString, &term);
-                   if ((term != infString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(nanString, &term);
-                   if ((term != nanString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(spaceString, &term);
-                   if (term == (spaceString+1)) {
-                       exit(1);
-                   }
-                   exit(0);
-               }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
-                   tcl_cv_strtod_buggy=buggy)])
-       if test "$tcl_cv_strtod_buggy" = buggy; then
-           AC_LIBOBJ([fixstrtod])
-           USE_COMPAT=1
-           AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
-       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 (not in TEA, only needed in core)
-#              LIBS
-#              MATH_LIBS
-#
-# Results:
-#
-#      Substitutes the following vars:
-#              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, 1, [Do we 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"])])
-
-    # TEA specific: 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
-#              _LARGEFILE_SOURCE64
-#--------------------------------------------------------------------
-
-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, 1, [Add the ]$1[ flag when building])
-       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);])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
-       [char *p = (char *)open64;])
-    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, 1, [Are wide integers to be implemented with C 'long's?])
-       AC_MSG_RESULT([using long])
-    elif test "${tcl_cv_type_64bit}" = "__int64" \
-               -a "${TEA_PLATFORM}" = "windows" ; then
-       # TEA specific: 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},
-           [What type should be used to define wide integers?])
-       AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-       # Now check for auxiliary declarations
-       AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
-           AC_TRY_COMPILE([#include <sys/types.h>
-#include <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, 1, [Is 'struct dirent64' in <sys/types.h>?])
-       fi
-
-       AC_CACHE_CHECK([for struct stat64], 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, 1, [Is 'struct stat64' in <sys/stat.h>?])
-       fi
-
-       AC_CHECK_FUNCS(open64 lseek64)
-       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)])
-       dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
-       dnl functions lseek64 and open64 are defined.
-       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
-               test "x${ac_cv_func_lseek64}" = "xyes" && \
-               test "x${ac_cv_func_open64}" = "xyes" ; then
-           AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
-           AC_MSG_RESULT([yes])
-       else
-           AC_MSG_RESULT([no])
-       fi
-    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_VERSION
-#              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.9"
-
-    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
-
-    # If the user did not set CFLAGS, set it now to keep macros
-    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-       CFLAGS=""
-    fi
-
-    case "`uname -s`" in
-       *win32*|*WIN32*|*MINGW32_*)
-           AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-           EXEEXT=".exe"
-           TEA_PLATFORM="windows"
-           ;;
-       *CYGWIN_*)
-           CYGPATH=echo
-           EXEEXT=".exe"
-           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
-           ;;
-       *)
-           CYGPATH=echo
-           # Maybe we are cross-compiling....
-           case ${host_alias} in
-               *mingw32*)
-               EXEEXT=".exe"
-               TEA_PLATFORM="windows"
-               ;;
-           *)
-               EXEEXT=""
-               TEA_PLATFORM="unix"
-               ;;
-           esac
-           ;;
-    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_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}])
-
-    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
-               # To add more dirs here (like 'src'), you have to update VPATH
-               # in Makefile.in as well
-               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
-                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-                   -a ! -f "${srcdir}/macosx/$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" \
-           -a ! -f "${srcdir}/macosx/$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_ADD_CLEANFILES --
-#
-#      Specify one or more CLEANFILES.
-#
-# Arguments:
-#      one or more file names to clean target
-#
-# Results:
-#
-#      Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG
-#------------------------------------------------------------------------
-AC_DEFUN([TEA_ADD_CLEANFILES], [
-    CLEANFILES="$CLEANFILES $@"
-])
-
-#------------------------------------------------------------------------
-# 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.
-
-    AC_PROG_CC
-    AC_PROG_CPP
-
-    INSTALL="\$(SHELL) \$(srcdir)/tclconfig/install-sh -c"
-    AC_SUBST(INSTALL)
-    INSTALL_DATA="\${INSTALL} -m 644"
-    AC_SUBST(INSTALL_DATA)
-    INSTALL_PROGRAM="\${INSTALL}"
-    AC_SUBST(INSTALL_PROGRAM)
-    INSTALL_SCRIPT="\${INSTALL}"
-    AC_SUBST(INSTALL_SCRIPT)
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_CHECK_TOOL(RANLIB, 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_CACHE_CHECK([if the compiler understands -pipe],
-           tcl_cv_cc_pipe, [
-           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
-           AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
-           CFLAGS=$hold_cflags])
-       if test $tcl_cv_cc_pipe = yes; then
-           CFLAGS="$CFLAGS -pipe"
-       fi
-    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
-#      VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
-#      VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
-#------------------------------------------------------------------------
-
-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)"
-       AC_EGREP_CPP([manifest needed], [
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-print("manifest needed")
-#endif
-       ], [
-       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
-       VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
-       VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
-       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
-       TEA_ADD_CLEANFILES([*.manifest])
-       ])
-       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
-           if test x"${TK_BIN_DIR}" != x ; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-           fi
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-           if test "$GCC" = "yes"; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
-           fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-       else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-           if test "$GCC" = "yes"; then
-               PKG_LIB_FILE=lib${PKG_LIB_FILE}
-           fi
-       fi
-       # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
-       if test "$GCC" = "yes"; then
-           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
-       fi
-       # 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 their 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)
-    AC_SUBST(VC_MANIFEST_EMBED_DLL)
-    AC_SUBST(VC_MANIFEST_EMBED_EXE)
-])
-
-#------------------------------------------------------------------------
-# 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/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
-           `ls -dr /usr/lib64/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:
-#
-#      Substitutes the following vars:
-#              TCL_TOP_DIR_NATIVE
-#              TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
-    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
-    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
-    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
-
-    # Check to see if tcl<Plat>Port.h isn't already with the public headers
-    # Don't look for tclInt.h because that resides with tcl.h in the core
-    # sources, but the <plat>Port headers are in a different directory
-    if test "${TEA_PLATFORM}" = "windows" -a \
-       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
-       result="private headers found with public headers"
-    elif test "${TEA_PLATFORM}" = "unix" -a \
-       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
-       result="private headers found with public headers"
-    else
-       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
-       if test "${TEA_PLATFORM}" = "windows"; then
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
-       else
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
-       fi
-       # Overwrite the previous TCL_INCLUDES as this should capture both
-       # public and private headers in the same set.
-       # We want to ensure these are substituted so as not to require
-       # any *_NATIVE vars be defined in the Makefile
-       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-       if test "`uname -s`" = "Darwin"; then
-            # If Tcl was built as a framework, attempt to use
-            # the framework's Headers and PrivateHeaders directories
-            case ${TCL_DEFS} in
-               *TCL_FRAMEWORK*)
-                   if test -d "${TCL_BIN_DIR}/Headers" -a \
-                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
-                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
-                   else
-                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
-                   fi
-                   ;;
-           esac
-           result="Using ${TCL_INCLUDES}"
-       else
-           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
-               AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
-           fi
-           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
-       fi
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([${result}])
-])
-
-#------------------------------------------------------------------------
-# 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.
-#
-#      Substitutes 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
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tcl was built as a framework, attempt to use
-               # the framework's Headers directory
-               case ${TCL_DEFS} in
-                   *TCL_FRAMEWORK*)
-                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tcl is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TCL_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$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`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TCL_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           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:
-#
-#      Substitutes the following vars:
-#              TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
-    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
-    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
-    AC_MSG_CHECKING([for Tk private include files])
-
-    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
-    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
-
-    # Check to see if tk<Plat>Port.h isn't already with the public headers
-    # Don't look for tkInt.h because that resides with tk.h in the core
-    # sources, but the <plat>Port headers are in a different directory
-    if test "${TEA_PLATFORM}" = "windows" -a \
-       -f "${ac_cv_c_tkh}/tkWinPort.h"; then
-       result="private headers found with public headers"
-    elif test "${TEA_PLATFORM}" = "unix" -a \
-       -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
-       result="private headers found with public headers"
-    else
-       TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
-       TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
-       if test "${TEA_PLATFORM}" = "windows"; then
-           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
-       else
-           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
-       fi
-       # Overwrite the previous TK_INCLUDES as this should capture both
-       # public and private headers in the same set.
-       # We want to ensure these are substituted so as not to require
-       # any *_NATIVE vars be defined in the Makefile
-       TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-       # Detect and add ttk subdir
-       if test -d "${TK_SRC_DIR}/generic/ttk"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
-       fi
-       if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
-       fi
-       if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
-       fi
-       if test "`uname -s`" = "Darwin"; then
-           # If Tk was built as a framework, attempt to use
-           # the framework's Headers and PrivateHeaders directories
-           case ${TK_DEFS} in
-               *TK_FRAMEWORK*)
-                       if test -d "${TK_BIN_DIR}/Headers" -a \
-                               -d "${TK_BIN_DIR}/PrivateHeaders"; then
-                           TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
-                       else
-                           TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
-                       fi
-                       ;;
-           esac
-           result="Using ${TK_INCLUDES}"
-       else
-           if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
-              AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
-           fi
-           result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
-       fi
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([${result}])
-])
-
-#------------------------------------------------------------------------
-# 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.
-#
-#      Substitutes 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
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tk was built as a framework, attempt to use
-               # the framework's Headers directory.
-               case ${TK_DEFS} in
-                   *TK_FRAMEWORK*)
-                       list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tk is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TK_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tk's --prefix location,
-           # relative to directory of tkConfig.sh, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$list \
-               `ls -d ${temp_includedir}        2>/dev/null` \
-               `ls -d ${TK_PREFIX}/include      2>/dev/null` \
-               `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
-               `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-               `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TK_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           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_WINDOWINGSYSTEM}" != "x11"; then
-       # On Windows and Aqua, 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_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 ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 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:
-#
-#      Substitutes 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}
-        $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
-        $1_LIBRARY_PATH=${$1_LIBRARY_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)
-
-    # Allow the caller to prevent this auto-check by specifying any 2nd arg
-    AS_IF([test "x$2" = x], [
-       # Check both upper and lower-case variants
-       # If a dev wanted non-stubs libs, this function could take an option
-       # to not use _STUB in the paths below
-       AS_IF([test "x${$1_STUB_LIB_SPEC}" = x],
-           [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
-           [TEA_LOAD_CONFIG_LIB($1_STUB)])
-    ])
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG_LIB --
-#
-#      Helper function to load correct library from another extension's
-#      ${PACKAGE}Config.sh.
-#
-# Results:
-#      Adds to LIBS the appropriate extension library
-#------------------------------------------------------------------------
-AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
-    AC_MSG_CHECKING([For $1 library for LIBS])
-    # This simplifies the use of stub libraries by automatically adding
-    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
-    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
-    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
-    if test "x${$1_LIB_SPEC}" != "x" ; then
-       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-           TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"])
-           AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}])
-       else
-           TEA_ADD_LIBS([${$1_LIB_SPEC}])
-           AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}])
-       fi
-    else
-       AC_MSG_RESULT([file not found])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#      Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#
-#      Requires the following vars to be set:
-#              $1
-#
-# Results:
-#      Substitutes the following vars:
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_EXPORT_CONFIG], [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-       eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
-       eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
-    else
-       eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-       eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
-
-
-#------------------------------------------------------------------------
-# 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}
-           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
-           AC_MSG_RESULT([found $CELIB_DIR])
-       fi
-    fi
-])
-# Local Variables:
-# mode: autoconf
-# End:
similarity index 97%
rename from pkgs/tdbcsqlite3-1.0.2/ChangeLog
rename to pkgs/tdbcsqlite3-1.0.3/ChangeLog
index d1c5bce..ef690a2 100644 (file)
@@ -1,3 +1,11 @@
+2015-01-26  Don Porter  <dgp@users.sourceforge.net>
+
+       * configure.in:
+       * README:
+       * library/tdbcsqlite3.tcl:
+                       Advanced version number to 1.0.3.
+       * configure:    autoconf-2.69
+
 2014-10-23  Don Porter  <dgp@users.sourceforge.net>
 
        * configure.in:
similarity index 96%
rename from pkgs/tdbcsqlite3-1.0.2/README
rename to pkgs/tdbcsqlite3-1.0.3/README
index b85fff3..941a5d6 100644 (file)
@@ -1,6 +1,6 @@
 README: tdbcsqlite3
 
-    This is the 1.0.2 source distribution of the bridge between Tcl
+    This is the 1.0.3 source distribution of the bridge between Tcl
     Database Connectivity (TDBC) and SQLite3, an open-source SQL
     database with an in-process server.
     
similarity index 97%
rename from pkgs/tdbcsqlite3-1.0.2/configure
rename to pkgs/tdbcsqlite3-1.0.3/configure
index 591a7f7..eec032d 100755 (executable)
@@ -1,11 +1,9 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for tdbcsqlite3 1.0.2.
+# Generated by GNU Autoconf 2.69 for tdbcsqlite3 1.0.3.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -134,6 +132,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -211,21 +235,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       # Preserve -v and -x to the replacement shell.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       case $- in # ((((
-         *v*x* | *x*v* ) as_opts=-vx ;;
-         *v* ) as_opts=-v ;;
-         *x* ) as_opts=-x ;;
-         * ) as_opts= ;;
-       esac
-       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -327,6 +355,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -448,6 +484,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # 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 sensitive to this).
@@ -482,16 +522,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -503,28 +543,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -556,8 +576,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tdbcsqlite3'
 PACKAGE_TARNAME='tdbcsqlite3'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='tdbcsqlite3 1.0.2'
+PACKAGE_VERSION='1.0.3'
+PACKAGE_STRING='tdbcsqlite3 1.0.3'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1116,8 +1136,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_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
@@ -1203,7 +1221,7 @@ 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 tdbcsqlite3 1.0.2 to adapt to many kinds of systems.
+\`configure' configures tdbcsqlite3 1.0.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1264,7 +1282,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tdbcsqlite3 1.0.2:";;
+     short | recursive ) echo "Configuration of tdbcsqlite3 1.0.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1350,10 +1368,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tdbcsqlite3 configure 1.0.2
-generated by GNU Autoconf 2.68
+tdbcsqlite3 configure 1.0.3
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1405,8 +1423,8 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tdbcsqlite3 $as_me 1.0.2, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+It was created by tdbcsqlite3 $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -1806,7 +1824,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CYGPATH="cygpath -w"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2085,7 +2103,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2125,7 +2143,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2178,7 +2196,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2219,7 +2237,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_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
@@ -2277,7 +2295,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2321,7 +2339,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2767,8 +2785,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -3805,16 +3822,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -3874,28 +3891,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -3916,8 +3921,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tdbcsqlite3 $as_me 1.0.2, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+This file was extended by tdbcsqlite3 $as_me 1.0.3, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -3969,11 +3974,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tdbcsqlite3 config.status 1.0.2
-configured by $0, generated by GNU Autoconf 2.68,
+tdbcsqlite3 config.status 1.0.3
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -4050,7 +4055,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
similarity index 99%
rename from pkgs/tdbcsqlite3-1.0.2/configure.in
rename to pkgs/tdbcsqlite3-1.0.3/configure.in
index 6aaf824..61ab12e 100755 (executable)
@@ -5,7 +5,7 @@ dnl     to configure the system for the local environment.
 #
 # RCS: @(#) $Id: configure.in,v 1.48 2008/11/05 00:13:00 hobbs Exp $
 
-AC_INIT([tdbcsqlite3], [1.0.2])
+AC_INIT([tdbcsqlite3], [1.0.3])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
@@ -13,7 +13,7 @@
 package require tdbc
 package require sqlite3
 
-package provide tdbc::sqlite3 1.0.2
+package provide tdbc::sqlite3 1.0.3
 
 namespace eval tdbc::sqlite3 {
     namespace export connection
diff --git a/pkgs/tdbcsqlite3-1.0.3/tclconfig/tcl.m4 b/pkgs/tdbcsqlite3-1.0.3/tclconfig/tcl.m4
new file mode 100644 (file)
index 0000000..b0ae59f
--- /dev/null
@@ -0,0 +1,4180 @@
+# 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.
+
+AC_PREREQ(2.57)
+
+dnl TEA extensions pass us the version of TEA they think they
+dnl are compatible with (must be set in TEA_INIT below)
+dnl TEA_VERSION="3.9"
+
+# Possible values for key variables defined:
+#
+# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
+# TEA_PLATFORM        - windows unix
+#
+
+#------------------------------------------------------------------------
+# 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 TEA specific: 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,
+           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 common install locations
+           if test x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
+       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,
+           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tk.framework/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/Tk.framework; 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 ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       ; do
+                   if test -f "$i/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tkconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
+       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:
+#
+#      Substitutes 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([could not find ${TCL_BIN_DIR}/tclConfig.sh])
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tcl was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tcl.framework installed in an arbitrary location.
+       case ${TCL_DEFS} in
+           *TCL_FRAMEWORK*)
+               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
+                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
+                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
+                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
+                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+    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_PATCH_LEVEL)
+    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_MSG_CHECKING([platform])
+    hold_cc=$CC; CC="$TCL_CC"
+    AC_TRY_COMPILE(,[
+           #ifdef _WIN32
+               #error win32
+           #endif
+    ], TEA_PLATFORM="unix",
+           TEA_PLATFORM="windows"
+    )
+    CC=$hold_cc
+    AC_MSG_RESULT($TEA_PLATFORM)
+
+    # The BUILD_$pkg is to define the correct extern storage class
+    # handling when making this package
+    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
+           [Building extension source?])
+    # Do this here as we have fully defined TEA_PLATFORM now
+    if test "${TEA_PLATFORM}" = "windows" ; then
+       EXEEXT=".exe"
+       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
+    fi
+
+    # TEA specific:
+    AC_SUBST(CLEANFILES)
+    AC_SUBST(TCL_LIBS)
+    AC_SUBST(TCL_DEFS)
+    AC_SUBST(TCL_EXTRA_CFLAGS)
+    AC_SUBST(TCL_LD_FLAGS)
+    AC_SUBST(TCL_SHLIB_LD_LIBS)
+])
+
+#------------------------------------------------------------------------
+# 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
+
+    # eval is required to do the TK_DBGX substitution
+    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tk was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tk.framework installed in an arbitrary location.
+       case ${TK_DEFS} in
+           *TK_FRAMEWORK*)
+               if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
+                   for i in "`cd "${TK_BIN_DIR}"; pwd`" \
+                            "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
+                           TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
+                   TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
+                   TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TK_DBGX substitution
+    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+    # TEA specific: Ensure windowingsystem is defined
+    if test "${TEA_PLATFORM}" = "unix" ; then
+       case ${TK_DEFS} in
+           *MAC_OSX_TK*)
+               AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
+               TEA_WINDOWINGSYSTEM="aqua"
+               ;;
+           *)
+               TEA_WINDOWINGSYSTEM="x11"
+               ;;
+       esac
+    elif test "${TEA_PLATFORM}" = "windows" ; then
+       TEA_WINDOWINGSYSTEM="win32"
+    fi
+
+    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)
+
+    # TEA specific:
+    AC_SUBST(TK_LIBS)
+    AC_SUBST(TK_XINCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_TCLSH
+#      Determine the fully qualified path name of the tclsh executable
+#      in the Tcl build directory or the tclsh installed in a bin
+#      directory. This macro will correctly determine the name
+#      of the tclsh executable even if tclsh has not yet been
+#      built in the build directory. The tclsh found is always
+#      associated with a tclConfig.sh file. This tclsh should be used
+#      only for running extension test cases. It should never be
+#      or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Substitutes the following vars:
+#              TCLSH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_TCLSH], [
+    AC_MSG_CHECKING([for tclsh])
+    if test -f "${TCL_BIN_DIR}/Makefile" ; then
+        # tclConfig.sh is in Tcl build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+        fi
+    else
+        # tclConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+        fi
+        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${TCLSH_PROG}" ; then
+                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
+    fi
+    AC_MSG_RESULT([${TCLSH_PROG}])
+    AC_SUBST(TCLSH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_WISH
+#      Determine the fully qualified path name of the wish executable
+#      in the Tk build directory or the wish installed in a bin
+#      directory. This macro will correctly determine the name
+#      of the wish executable even if wish has not yet been
+#      built in the build directory. The wish found is always
+#      associated with a tkConfig.sh file. This wish should be used
+#      only for running extension test cases. It should never be
+#      or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Substitutes the following vars:
+#              WISH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_WISH], [
+    AC_MSG_CHECKING([for wish])
+    if test -f "${TK_BIN_DIR}/Makefile" ; then
+        # tkConfig.sh is in Tk build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+        else
+            WISH_PROG="${TK_BIN_DIR}/wish"
+        fi
+    else
+        # tkConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+        else
+            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
+        fi
+        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${WISH_PROG}" ; then
+                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
+    fi
+    AC_MSG_RESULT([${WISH_PROG}])
+    AC_SUBST(WISH_PROG)
+])
+
+#------------------------------------------------------------------------
+# 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,
+       AC_HELP_STRING([--enable-shared],
+           [build and link with shared libraries (default: on)]),
+       [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, 1, [Is this a 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, "no" means
+#      threads are disabled.  "yes" is the 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.
+#
+#      Note that it is legal to have a thread enabled extension run in a
+#      threaded or non-threaded Tcl core, but a non-threaded extension may
+#      only run in a non-threaded Tcl core.
+#
+# 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
+#              _THREAD_SAFE
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_ENABLE_THREADS], [
+    AC_ARG_ENABLE(threads,
+       AC_HELP_STRING([--enable-threads],
+           [build with threads]),
+       [tcl_ok=$enableval], [tcl_ok=yes])
+
+    if test "${enable_threads+set}" = set; then
+       enableval="$enable_threads"
+       tcl_ok=$enableval
+    else
+       tcl_ok=yes
+    fi
+
+    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:
+
+           # USE_THREAD_ALLOC tells us to try the special thread-based
+           # allocator that significantly reduces lock contention
+           AC_DEFINE(USE_THREAD_ALLOC, 1,
+               [Do we want to use the threaded memory allocator?])
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           if test "`uname -s`" = "SunOS" ; then
+               AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+                       [Do we really want to follow the standard? Yes we do!])
+           fi
+           AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
+           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([Do not know how to find pthread lib on your system - thread support disabled])
+                       fi
+                   fi
+               fi
+           fi
+       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, 1, [Are we building with threads enabled?])
+       AC_MSG_RESULT([yes (default)])
+    else
+       AC_MSG_RESULT([no])
+    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 Tcl
+    that IS thread-enabled.  It is recommended to use --enable-threads.])
+           fi
+           ;;
+       *)
+           if test "${TCL_THREADS}" = "1"; then
+               AC_MSG_WARN([
+    --enable-threads requested, but building against a Tcl that is NOT
+    thread-enabled.  This is an OK configuration that will also run in
+    a thread-enabled core.])
+           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
+#
+#      TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
+#      the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
+#      Requires the following vars to be set in the Makefile:
+#              CFLAGS_DEFAULT
+#              LDFLAGS_DEFAULT
+#
+# 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) -DNDEBUG" 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 TEA specific: Make sure we are initialized
+    AC_REQUIRE([TEA_CONFIG_CFLAGS])
+    AC_MSG_CHECKING([for build with symbols])
+    AC_ARG_ENABLE(symbols,
+       AC_HELP_STRING([--enable-symbols],
+           [build with debugging symbols (default: off)]),
+       [tcl_ok=$enableval], [tcl_ok=no])
+    DBGX=""
+    if test "$tcl_ok" = "no"; then
+       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
+       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
+    # TEA specific:
+    if test "${TEA_PLATFORM}" != "windows" ; then
+       LDFLAGS_DEFAULT="${LDFLAGS}"
+    fi
+    AC_SUBST(CFLAGS_DEFAULT)
+    AC_SUBST(LDFLAGS_DEFAULT)
+    AC_SUBST(TCL_DBGX)
+
+    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+       AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
+    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,
+       AC_HELP_STRING([--enable-langinfo],
+           [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
+       [langinfo_ok=$enableval], [langinfo_ok=yes])
+
+    HAVE_LANGINFO=0
+    if test "$langinfo_ok" = "yes"; then
+       AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
+    fi
+    AC_MSG_CHECKING([whether to use nl_langinfo])
+    if test "$langinfo_ok" = "yes"; then
+       AC_CACHE_VAL(tcl_cv_langinfo_h, [
+           AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
+                   [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
+       AC_MSG_RESULT([$tcl_cv_langinfo_h])
+       if test $tcl_cv_langinfo_h = yes; then
+           AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
+       fi
+    else
+       AC_MSG_RESULT([$langinfo_ok])
+    fi
+])
+
+#--------------------------------------------------------------------
+# TEA_CONFIG_SYSTEM
+#
+#      Determine what the system is (some things cannot be easily checked
+#      on a feature-driven basis, alas). This can usually be done via the
+#      "uname" command.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Defines the following var:
+#
+#      system -        System/platform/version identification code.
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_SYSTEM], [
+    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
+       # TEA specific:
+       if test "${TEA_PLATFORM}" = "windows" ; then
+           tcl_cv_sys_version=windows
+       else
+           tcl_cv_sys_version=`uname -s`-`uname -r`
+           if test "$?" -ne 0 ; then
+               AC_MSG_WARN([can't find uname command])
+               tcl_cv_sys_version=unknown
+           else
+               if test "`uname -s`" = "AIX" ; then
+                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
+               fi
+           fi
+       fi
+    ])
+    system=$tcl_cv_sys_version
+])
+
+#--------------------------------------------------------------------
+# 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 and substitutes the following vars:
+#
+#      DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
+#       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. Could
+#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
+#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/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 defaults to
+#                       "${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.
+#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
+#                       in a static or 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 a shared library needs to have
+#                       a .a extension whereas shared objects for loadable
+#                       extensions have a .so extension.  Defaults to
+#                       ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
+#      CFLAGS_DEBUG -
+#                      Flags used when running the compiler in debug mode
+#      CFLAGS_OPTIMIZE -
+#                      Flags used when running the compiler in optimize mode
+#      CFLAGS -        Additional CFLAGS added as necessary (usually 64-bit)
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_CFLAGS], [
+    dnl TEA specific: Make sure we are initialized
+    AC_REQUIRE([TEA_INIT])
+
+    # Step 0.a: Enable 64 bit support?
+
+    AC_MSG_CHECKING([if 64bit support is requested])
+    AC_ARG_ENABLE(64bit,
+       AC_HELP_STRING([--enable-64bit],
+           [enable 64bit support (default: off)]),
+       [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,
+       AC_HELP_STRING([--enable-64bit-vis],
+           [enable 64bit Sparc VIS support (default: off)]),
+       [do64bitVIS=$enableval], [do64bitVIS=no])
+    AC_MSG_RESULT([$do64bitVIS])
+    # Force 64bit on with VIS
+    AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes])
+
+    # Step 0.c: Check if visibility support is available. Do this here so
+    # that platform specific alternatives can be used below if this fails.
+
+    AC_CACHE_CHECK([if compiler supports visibility "hidden"],
+       tcl_cv_cc_visibility_hidden, [
+       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
+       AC_TRY_LINK([
+           extern __attribute__((__visibility__("hidden"))) void f(void);
+           void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
+           tcl_cv_cc_visibility_hidden=no)
+       CFLAGS=$hold_cflags])
+    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
+       AC_DEFINE(MODULE_SCOPE,
+           [extern __attribute__((__visibility__("hidden")))],
+           [Compiler support for module scope symbols])
+       AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
+    ])
+
+    # Step 0.d: Disable -rpath support?
+
+    AC_MSG_CHECKING([if rpath support is requested])
+    AC_ARG_ENABLE(rpath,
+       AC_HELP_STRING([--disable-rpath],
+           [disable rpath support (default: on)]),
+       [doRpath=$enableval], [doRpath=yes])
+    AC_MSG_RESULT([$doRpath])
+
+    # TEA specific: Cross-compiling options for Windows/CE builds?
+
+    AS_IF([test "${TEA_PLATFORM}" = windows], [
+       AC_MSG_CHECKING([if Windows/CE build is requested])
+       AC_ARG_ENABLE(wince,
+           AC_HELP_STRING([--enable-wince],
+               [enable Win/CE support (where applicable)]),
+           [doWince=$enableval], [doWince=no])
+       AC_MSG_RESULT([$doWince])
+    ])
+
+    # Set the variable "system" to hold the name and version number
+    # for the system.
+
+    TEA_CONFIG_SYSTEM
+
+    # Require ranlib early so we can override it in special cases below.
+
+    AC_REQUIRE([AC_PROG_RANLIB])
+
+    # 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 removed some core-only vars.
+
+    do64bit_ok=no
+    # default to '{$LIBS}' and set to "" on per-platform necessary basis
+    SHLIB_LD_LIBS='${LIBS}'
+    # When ld needs options to work in 64-bit mode, put them in
+    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
+    # is disabled by the user. [Bug 1016796]
+    LDFLAGS_ARCH=""
+    UNSHARED_LIB_SUFFIX=""
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+    TCL_LIB_VERSIONS_OK=ok
+    CFLAGS_DEBUG=-g
+    AS_IF([test "$GCC" = yes], [
+       CFLAGS_OPTIMIZE=-O2
+       CFLAGS_WARNING="-Wall"
+    ], [
+       CFLAGS_OPTIMIZE=-O
+       CFLAGS_WARNING=""
+    ])
+    AC_CHECK_TOOL(AR, ar)
+    STLIB_LD='${AR} cr'
+    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION=""],[SHLIB_VERSION=".$SHLIB_VERSION"])
+    case $system in
+       # TEA specific:
+       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.
+           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+           # MACHINE is IX86 for LINK, but this is used by the manifest,
+           # which requires x86|amd64|ia64.
+           MACHINE="X86"
+           if test "$do64bit" != "no" ; then
+               if test "x${MSSDK}x" = "xx" ; then
+                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
+               fi
+               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
+               PATH64=""
+               case "$do64bit" in
+                   amd64|x64|yes)
+                       MACHINE="AMD64" ; # default to AMD64 64-bit build
+                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+                       ;;
+                   ia64)
+                       MACHINE="IA64"
+                       PATH64="${MSSDK}/Bin/Win64"
+                       ;;
+               esac
+               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
+                   AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
+                   AC_MSG_WARN([Ensure latest Platform SDK is installed])
+                   do64bit="no"
+               else
+                   AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
+                   do64bit_ok="yes"
+               fi
+           fi
+
+           if test "$doWince" != "no" ; then
+               if test "$do64bit" != "no" ; 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
+               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
+               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" != "no" ; then
+                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
+                   CC="\"${PATH64}/cl.exe\""
+                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+                   RC="\"${MSSDK}/bin/rc.exe\""
+                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+                   LINKBIN="\"${PATH64}/link.exe\""
+                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+                   # Avoid 'unresolved external symbol __security_cookie'
+                   # errors, c.f. http://support.microsoft.com/?id=894573
+                   TEA_ADD_LIBS([bufferoverflowU.lib])
+               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, 1, [WinCE def ]$i)
+                   done
+                   AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
+                   AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
+                   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
+               AC_CHECK_TOOL(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}"
+
+               AC_CACHE_CHECK(for cross-compile version of gcc,
+                       ac_cv_cross,
+                       AC_TRY_COMPILE([
+                           #ifdef _WIN32
+                               #error cross-compiler
+                           #endif
+                       ], [],
+                       ac_cv_cross=yes,
+                       ac_cv_cross=no)
+                     )
+                     if test "$ac_cv_cross" = "yes"; then
+                       case "$do64bit" in
+                           amd64|x64|yes)
+                               CC="x86_64-w64-mingw32-gcc"
+                               LD="x86_64-w64-mingw32-ld"
+                               AR="x86_64-w64-mingw32-ar"
+                               RANLIB="x86_64-w64-mingw32-ranlib"
+                               RC="x86_64-w64-mingw32-windres"
+                           ;;
+                           *)
+                               CC="i686-w64-mingw32-gcc"
+                               LD="i686-w64-mingw32-ld"
+                               AR="i686-w64-mingw32-ar"
+                               RANLIB="i686-w64-mingw32-ranlib"
+                               RC="i686-w64-mingw32-windres"
+                           ;;
+                       esac
+               fi
+
+           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
+               # and also
+               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
+               # This essentially turns it all on.
+               LDFLAGS_DEBUG="-debug -debugtype:cv"
+               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_SUFFIX=".dll"
+           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       AIX-*)
+           AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
+               # AIX requires the _r compiler when gcc isn't being used
+               case "${CC}" in
+                   *_r|*_r\ *)
+                       # ok ...
+                       ;;
+                   *)
+                       # Make sure only first arg gets _r
+                       CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
+                       ;;
+               esac
+               AC_MSG_RESULT([Using $CC for compiling with threads])
+           ])
+           LIBS="$LIBS -lc"
+           SHLIB_CFLAGS=""
+           SHLIB_SUFFIX=".so"
+
+           LD_LIBRARY_PATH_VAR="LIBPATH"
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = yes], [
+               AS_IF([test "$GCC" = yes], [
+                   AC_MSG_WARN([64bit mode not supported with GCC on $system])
+               ], [
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS -q64"
+                   LDFLAGS_ARCH="-q64"
+                   RANLIB="${RANLIB} -X64"
+                   AR="${AR} -X64"
+                   SHLIB_LD_FLAGS="-b64"
+               ])
+           ])
+
+           AS_IF([test "`uname -m`" = ia64], [
+               # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               AS_IF([test "$GCC" = yes], [
+                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               ], [
+                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+               ])
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+           ], [
+               AS_IF([test "$GCC" = yes], [
+                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
+               ], [
+                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
+                   LDFLAGS="$LDFLAGS -brtl"
+               ])
+               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ])
+           ;;
+       BeOS*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -nostart'
+           SHLIB_SUFFIX=".so"
+
+           #-----------------------------------------------------------
+           # Check for inet_ntoa in -lbind, for BeOS (which also needs
+           # -lsocket, even if the network functions are in -lnet which
+           # is always linked to, for compatibility.
+           #-----------------------------------------------------------
+           AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
+           ;;
+       BSD/OS-4.*)
+           SHLIB_CFLAGS="-export-dynamic -fPIC"
+           SHLIB_LD='${CC} -shared'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       CYGWIN_*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD='${CC} -shared'
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
+           SHLIB_SUFFIX=".dll"
+           EXEEXT=".exe"
+           do64bit_ok=yes
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       Haiku*)
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+           AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
+           ;;
+       HP-UX-*.11.*)
+           # Use updated header definitions where possible
+           AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
+           # TEA specific: Needed by Tcl, but not most extensions
+           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
+           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
+
+           AS_IF([test "`uname -m`" = ia64], [
+               SHLIB_SUFFIX=".so"
+               # Use newer C++ library for C++ extensions
+               #if test "$GCC" != "yes" ; then
+               #   CPPFLAGS="-AA"
+               #fi
+           ], [
+               SHLIB_SUFFIX=".sl"
+           ])
+           AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
+           AS_IF([test "$tcl_ok" = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-E"
+               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+           ])
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ], [
+               CFLAGS="$CFLAGS -z"
+               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+               #CFLAGS="$CFLAGS +DAportable"
+               SHLIB_CFLAGS="+z"
+               SHLIB_LD="ld -b"
+           ])
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = "yes"], [
+               AS_IF([test "$GCC" = yes], [
+                   case `${CC} -dumpmachine` in
+                       hppa64*)
+                           # 64-bit gcc in use.  Fix flags for GNU ld.
+                           do64bit_ok=yes
+                           SHLIB_LD='${CC} -shared'
+                           AS_IF([test $doRpath = yes], [
+                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+                           ;;
+                       *)
+                           AC_MSG_WARN([64bit mode not supported with GCC on $system])
+                           ;;
+                   esac
+               ], [
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS +DD64"
+                   LDFLAGS_ARCH="+DD64"
+               ])
+           ]) ;;
+       IRIX-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+           AS_IF([test "$GCC" = yes], [
+               CFLAGS="$CFLAGS -mabi=n32"
+               LDFLAGS="$LDFLAGS -mabi=n32"
+           ], [
+               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"
+           ])
+           ;;
+       IRIX64-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+
+           # Check to enable 64-bit flags for compiler/linker
+
+           AS_IF([test "$do64bit" = yes], [
+               AS_IF([test "$GCC" = yes], [
+                   AC_MSG_WARN([64bit mode not supported by gcc])
+               ], [
+                   do64bit_ok=yes
+                   SHLIB_LD="ld -64 -shared -rdata_shared"
+                   CFLAGS="$CFLAGS -64"
+                   LDFLAGS_ARCH="-64"
+               ])
+           ])
+           ;;
+       Linux*|GNU*|NetBSD-Debian)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+
+           # TEA specific:
+           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
+           AS_IF([test $do64bit = yes], [
+               AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
+                   hold_cflags=$CFLAGS
+                   CFLAGS="$CFLAGS -m64"
+                   AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
+                   CFLAGS=$hold_cflags])
+               AS_IF([test $tcl_cv_cc_m64 = yes], [
+                   CFLAGS="$CFLAGS -m64"
+                   do64bit_ok=yes
+               ])
+          ])
+
+           # 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.
+
+           AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
+           ;;
+       Lynx*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           CFLAGS_OPTIMIZE=-02
+           SHLIB_LD='${CC} -shared'
+           LD_FLAGS="-Wl,--export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           ;;
+       OpenBSD-*)
+           arch=`arch -s`
+           case "$arch" in
+           vax)
+               SHLIB_SUFFIX=""
+               SHARED_LIB_SUFFIX=""
+               LDFLAGS=""
+               ;;
+           *)
+               case "$arch" in
+               alpha|sparc64)
+                   SHLIB_CFLAGS="-fPIC"
+                   ;;
+               *)
+                   SHLIB_CFLAGS="-fpic"
+                   ;;
+               esac
+               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+               SHLIB_SUFFIX=".so"
+               AS_IF([test $doRpath = yes], [
+                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
+               LDFLAGS="-Wl,-export-dynamic"
+               ;;
+           esac
+           case "$arch" in
+           vax)
+               CFLAGS_OPTIMIZE="-O1"
+               ;;
+           *)
+               CFLAGS_OPTIMIZE="-O2"
+               ;;
+           esac
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # On OpenBSD:   Compile with -pthread
+               #               Don't link with -lpthread
+               LIBS=`echo $LIBS | sed s/-lpthread//`
+               CFLAGS="$CFLAGS -pthread"
+           ])
+           # OpenBSD doesn't do version numbers with dots.
+           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       NetBSD-*)
+           # NetBSD has ELF and can use 'cc -shared' to build shared libs
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # The -pthread needs to go in the CFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS -pthread"
+               LDFLAGS="$LDFLAGS -pthread"
+           ])
+           ;;
+       FreeBSD-*)
+           # This configuration from FreeBSD Ports.
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD="${CC} -shared"
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
+           SHLIB_SUFFIX=".so"
+           LDFLAGS=""
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # The -pthread needs to go in the LDFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
+           case $system in
+           FreeBSD-3.*)
+               # Version numbers are dot-stripped by system policy.
+               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
+               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+               TCL_LIB_VERSIONS_OK=nodots
+               ;;
+           esac
+           ;;
+       Darwin-*)
+           CFLAGS_OPTIMIZE="-Os"
+           SHLIB_CFLAGS="-fno-common"
+           # To avoid discrepancies between what headers configure sees during
+           # preprocessing tests and compiling tests, move any -isysroot and
+           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
+           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
+           CFLAGS="`echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
+           AS_IF([test $do64bit = yes], [
+               case `arch` in
+                   ppc)
+                       AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
+                               tcl_cv_cc_arch_ppc64, [
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
+                                   tcl_cv_cc_arch_ppc64=no)
+                           CFLAGS=$hold_cflags])
+                       AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           do64bit_ok=yes
+                       ]);;
+                   i386)
+                       AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
+                               tcl_cv_cc_arch_x86_64, [
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
+                                   tcl_cv_cc_arch_x86_64=no)
+                           CFLAGS=$hold_cflags])
+                       AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           do64bit_ok=yes
+                       ]);;
+                   *)
+                       AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
+               esac
+           ], [
+               # Check for combined 32-bit and 64-bit fat build
+               AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
+                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
+                   fat_32_64=yes])
+           ])
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_single_module = yes], [
+               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+           ])
+           # TEA specific: link shlib with current and compatibility version flags
+           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
+           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
+           SHLIB_SUFFIX=".dylib"
+           # Don't use -prebind when building for Mac OS X 10.4 or later only:
+           AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
+               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
+               LDFLAGS="$LDFLAGS -prebind"])
+           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+           AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
+                   tcl_cv_ld_search_paths_first, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
+                       tcl_cv_ld_search_paths_first=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+           ])
+           AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
+               AC_DEFINE(MODULE_SCOPE, [__private_extern__],
+                   [Compiler support for module scope symbols])
+               tcl_cv_cc_visibility_hidden=yes
+           ])
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+           # TEA specific: for combined 32 & 64 bit fat builds of Tk
+           # extensions, verify that 64-bit build is possible.
+           AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
+               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [
+                   AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
+                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
+                       AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();],
+                           tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no)
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done])
+               ])
+               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [
+                   AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
+                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
+                       AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);],
+                           tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no)
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done])
+               ])
+               # remove 64-bit arch flags from CFLAGS et al. if configuration
+               # does not support 64-bit.
+               AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
+                   AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
+                   for v in CFLAGS CPPFLAGS LDFLAGS; do
+                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
+                   done])
+           ])
+           ;;
+       OS/390-*)
+           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
+           AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
+               [Should OS/390 do the right thing with sockets?])
+           ;;
+       OSF1-V*)
+           # Digital OSF/1
+           SHLIB_CFLAGS=""
+           AS_IF([test "$SHARED_BUILD" = 1], [
+               SHLIB_LD='ld -shared -expect_unresolved "*"'
+           ], [
+               SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+           ])
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+           AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
+               CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
+           # see pthread_intro(3) for pthread support on osf1, k.furukawa
+           AS_IF([test "${TCL_THREADS}" = 1], [
+               CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+               CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+               LIBS=`echo $LIBS | sed s/-lpthreads//`
+               AS_IF([test "$GCC" = yes], [
+                   LIBS="$LIBS -lpthread -lmach -lexc"
+               ], [
+                   CFLAGS="$CFLAGS -pthread"
+                   LDFLAGS="$LDFLAGS -pthread"
+               ])
+           ])
+           ;;
+       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"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SCO_SV-3.2*)
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_CFLAGS="-fPIC -melf"
+               LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+           ], [
+               SHLIB_CFLAGS="-Kpic -belf"
+               LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+           ])
+           SHLIB_LD="ld -G"
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SunOS-5.[[0-6]])
+           # Careful to not let 5.10+ fall into this case
+
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+               [Do we really want to follow the standard? Yes we do!])
+
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ], [
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ])
+           ;;
+       SunOS-5*)
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+               [Do we really want to follow the standard? Yes we do!])
+
+           SHLIB_CFLAGS="-KPIC"
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = yes], [
+               arch=`isainfo`
+               AS_IF([test "$arch" = "sparcv9 sparc"], [
+                   AS_IF([test "$GCC" = yes], [
+                       AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
+                           AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
+                       ], [
+                           do64bit_ok=yes
+                           CFLAGS="$CFLAGS -m64 -mcpu=v9"
+                           LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+                           SHLIB_CFLAGS="-fPIC"
+                       ])
+                   ], [
+                       do64bit_ok=yes
+                       AS_IF([test "$do64bitVIS" = yes], [
+                           CFLAGS="$CFLAGS -xarch=v9a"
+                           LDFLAGS_ARCH="-xarch=v9a"
+                       ], [
+                           CFLAGS="$CFLAGS -xarch=v9"
+                           LDFLAGS_ARCH="-xarch=v9"
+                       ])
+                       # Solaris 64 uses this as well
+                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
+                   ])
+               ], [AS_IF([test "$arch" = "amd64 i386"], [
+                   AS_IF([test "$GCC" = yes], [
+                       case $system in
+                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
+                               do64bit_ok=yes
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               AC_MSG_WARN([64bit mode not supported with GCC on $system]);;
+                       esac
+                   ], [
+                       do64bit_ok=yes
+                       case $system in
+                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               CFLAGS="$CFLAGS -xarch=amd64"
+                               LDFLAGS="$LDFLAGS -xarch=amd64";;
+                       esac
+                   ])
+               ], [AC_MSG_WARN([64bit mode not supported for $arch])])])
+           ])
+
+           SHLIB_SUFFIX=".so"
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               AS_IF([test "$do64bit_ok" = yes], [
+                   AS_IF([test "$arch" = "sparcv9 sparc"], [
+                       # 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` | ..."
+                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+                   ], [AS_IF([test "$arch" = "amd64 i386"], [
+                       # JH: static-libgcc is necessary for core Tcl, but may
+                       # not be necessary for extensions.
+                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
+                   ])])
+               ])
+           ], [
+               case $system in
+                   SunOS-5.[[1-9]][[0-9]]*)
+                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
+                   *)
+                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
+               esac
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+           ])
+           ;;
+       UNIX_SV* | UnixWare-5*)
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_LD='${CC} -G'
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
+           # that don't grok the -Bexport option.  Test that it does.
+           AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_Bexport = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+           ])
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+    esac
+
+    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
+       AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
+    ])
+
+dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
+dnl # until the end of configure, as configure's compile and link tests use
+dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
+dnl # preprocessing tests use only CPPFLAGS.
+    AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
+
+    # Add in the arch flags late to ensure it wasn't removed.
+    # Not necessary in TEA, but this is aligned with core
+    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
+
+    # 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.
+
+    AS_IF([test "$GCC" = yes], [
+       case $system in
+           AIX-*) ;;
+           BSD/OS*) ;;
+           CYGWIN_*|MINGW32_*) ;;
+           IRIX*) ;;
+           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
+           Darwin-*) ;;
+           SCO_SV-3.2*) ;;
+           windows) ;;
+           *) SHLIB_CFLAGS="-fPIC" ;;
+       esac])
+
+    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
+       AC_DEFINE(MODULE_SCOPE, [extern],
+           [No Compiler support for module scope symbols])
+    ])
+
+    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
+    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
+
+    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
+       AC_CACHE_CHECK(for SEH support in compiler,
+           tcl_cv_seh,
+       AC_TRY_RUN([
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+           int main(int argc, char** argv) {
+               int a, b = 0;
+               __try {
+                   a = 666 / b;
+               }
+               __except (EXCEPTION_EXECUTE_HANDLER) {
+                   return 0;
+               }
+               return 1;
+           }
+       ],
+           tcl_cv_seh=yes,
+           tcl_cv_seh=no,
+           tcl_cv_seh=no)
+       )
+       if test "$tcl_cv_seh" = "no" ; then
+           AC_DEFINE(HAVE_NO_SEH, 1,
+                   [Defined when mingw does not support SEH])
+       fi
+
+       #
+       # Check to see if the excpt.h include file provided contains the
+       # definition for EXCEPTION_DISPOSITION; if not, which is the case
+       # with Cygwin's version as of 2002-04-10, define it to be int,
+       # sufficient for getting the current code to work.
+       #
+       AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
+           tcl_cv_eh_disposition,
+           AC_TRY_COMPILE([
+#          define WIN32_LEAN_AND_MEAN
+#          include <windows.h>
+#          undef WIN32_LEAN_AND_MEAN
+           ],[
+               EXCEPTION_DISPOSITION x;
+           ],
+               tcl_cv_eh_disposition=yes,
+               tcl_cv_eh_disposition=no)
+       )
+       if test "$tcl_cv_eh_disposition" = "no" ; then
+       AC_DEFINE(EXCEPTION_DISPOSITION, int,
+               [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
+       fi
+
+       # Check to see if winnt.h defines CHAR, SHORT, and LONG
+       # even if VOID has already been #defined. The win32api
+       # used by mingw and cygwin is known to do this.
+
+       AC_CACHE_CHECK(for winnt.h that ignores VOID define,
+           tcl_cv_winnt_ignore_void,
+           AC_TRY_COMPILE([
+#define VOID void
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+           ], [
+               CHAR c;
+               SHORT s;
+               LONG l;
+           ],
+        tcl_cv_winnt_ignore_void=yes,
+        tcl_cv_winnt_ignore_void=no)
+       )
+       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
+           AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
+                   [Defined when cygwin/mingw ignores VOID define in winnt.h])
+       fi
+    fi
+
+       # See if the compiler supports casting to a union type.
+       # This is used to stop gcc from printing a compiler
+       # warning when initializing a union member.
+
+       AC_CACHE_CHECK(for cast to union support,
+           tcl_cv_cast_to_union,
+           AC_TRY_COMPILE([],
+           [
+                 union foo { int i; double d; };
+                 union foo f = (union foo) (int) 0;
+           ],
+           tcl_cv_cast_to_union=yes,
+           tcl_cv_cast_to_union=no)
+       )
+       if test "$tcl_cv_cast_to_union" = "yes"; then
+           AC_DEFINE(HAVE_CAST_TO_UNION, 1,
+                   [Defined when compiler supports casting to union type.])
+       fi
+
+    AC_SUBST(CFLAGS_DEBUG)
+    AC_SUBST(CFLAGS_OPTIMIZE)
+    AC_SUBST(CFLAGS_WARNING)
+
+    AC_SUBST(STLIB_LD)
+    AC_SUBST(SHLIB_LD)
+
+    AC_SUBST(SHLIB_LD_LIBS)
+    AC_SUBST(SHLIB_CFLAGS)
+
+    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_CACHE_CHECK([termios vs. termio vs. sgtty], 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=no, tcl_cv_api_serial=no)
+    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, 1, [Use the termios API for serial lines]);;
+       termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
+       sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
+    esac
+])
+
+#--------------------------------------------------------------------
+# TEA_MISSING_POSIX_HEADERS
+#
+#      Supply substitutes for missing POSIX header files.  Special
+#      notes:
+#          - stdlib.h doesn't define strtol, strtoul, or
+#            strtod in some 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_CACHE_CHECK([dirent.h], tcl_cv_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_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
+
+    if test $tcl_cv_dirent_h = no; then
+       AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
+    fi
+
+    # TEA specific:
+    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
+    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
+    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
+    AC_CHECK_HEADER(limits.h,
+       [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
+       [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <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, 1, [Do we have <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, 1, [Do we have <string.h>?])
+    fi
+
+    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
+    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <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
+#              PKG_LIBS (appends to)
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_X], [
+    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
+       TEA_PATH_UNIX_X
+    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/Xlib.h>], , not_really_there="yes")
+       else
+           if test ! -r $x_includes/X11/Xlib.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])
+       found_xincludes="no"
+       AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
+       if test "$found_xincludes" = "no"; 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/Xlib.h; then
+                   AC_MSG_RESULT([$i])
+                   XINCLUDES=" -I$i"
+                   found_xincludes="yes"
+                   break
+               fi
+           done
+       fi
+    else
+       if test "$x_includes" != ""; then
+           XINCLUDES="-I$x_includes"
+           found_xincludes="yes"
+       fi
+    fi
+    if test "$found_xincludes" = "no"; then
+       AC_MSG_RESULT([couldn't find any!])
+    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 -o -r $i/libX11.dylib; 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
+    # TEA specific:
+    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)
+    TEA_CONFIG_SYSTEM
+    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
+    case $system in
+       OSF*)
+           AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
+           AC_MSG_RESULT([FIONBIO])
+           ;;
+       *)
+           AC_MSG_RESULT([O_NONBLOCK])
+           ;;
+    esac
+])
+
+#--------------------------------------------------------------------
+# TEA_TIME_HANDLER
+#
+#      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_CACHE_CHECK([tm_tzadj in struct tm], 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)])
+    if test $tcl_cv_member_tm_tzadj = yes ; then
+       AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
+    fi
+
+    AC_CACHE_CHECK([tm_gmtoff in struct tm], 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)])
+    if test $tcl_cv_member_tm_gmtoff = yes ; then
+       AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
+    fi
+
+    #
+    # Its important to include time.h in this check, as some systems
+    # (like convex) have timezone functions, etc.
+    #
+    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
+       AC_TRY_COMPILE([#include <time.h>],
+           [extern long timezone;
+           timezone += 1;
+           exit (0);],
+           tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
+    if test $tcl_cv_timezone_long = yes ; then
+       AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+    else
+       #
+       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+       #
+       AC_CACHE_CHECK([time_t timezone variable], 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)])
+       if test $tcl_cv_timezone_time = yes ; then
+           AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+       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_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
+           AC_TRY_RUN([
+               extern double strtod();
+               int main() {
+                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
+                   char *term;
+                   double value;
+                   value = strtod(infString, &term);
+                   if ((term != infString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(nanString, &term);
+                   if ((term != nanString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(spaceString, &term);
+                   if (term == (spaceString+1)) {
+                       exit(1);
+                   }
+                   exit(0);
+               }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
+                   tcl_cv_strtod_buggy=buggy)])
+       if test "$tcl_cv_strtod_buggy" = buggy; then
+           AC_LIBOBJ([fixstrtod])
+           USE_COMPAT=1
+           AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
+       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 (not in TEA, only needed in core)
+#              LIBS
+#              MATH_LIBS
+#
+# Results:
+#
+#      Substitutes the following vars:
+#              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, 1, [Do we 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"])])
+
+    # TEA specific: 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
+#              _LARGEFILE_SOURCE64
+#--------------------------------------------------------------------
+
+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, 1, [Add the ]$1[ flag when building])
+       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);])
+    TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
+       [char *p = (char *)open64;])
+    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, 1, [Are wide integers to be implemented with C 'long's?])
+       AC_MSG_RESULT([using long])
+    elif test "${tcl_cv_type_64bit}" = "__int64" \
+               -a "${TEA_PLATFORM}" = "windows" ; then
+       # TEA specific: 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},
+           [What type should be used to define wide integers?])
+       AC_MSG_RESULT([${tcl_cv_type_64bit}])
+
+       # Now check for auxiliary declarations
+       AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
+           AC_TRY_COMPILE([#include <sys/types.h>
+#include <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, 1, [Is 'struct dirent64' in <sys/types.h>?])
+       fi
+
+       AC_CACHE_CHECK([for struct stat64], 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, 1, [Is 'struct stat64' in <sys/stat.h>?])
+       fi
+
+       AC_CHECK_FUNCS(open64 lseek64)
+       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)])
+       dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
+       dnl functions lseek64 and open64 are defined.
+       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
+               test "x${ac_cv_func_lseek64}" = "xyes" && \
+               test "x${ac_cv_func_open64}" = "xyes" ; then
+           AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
+           AC_MSG_RESULT([yes])
+       else
+           AC_MSG_RESULT([no])
+       fi
+    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_VERSION
+#              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.9"
+
+    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
+
+    # If the user did not set CFLAGS, set it now to keep macros
+    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
+    if test "${CFLAGS+set}" != "set" ; then
+       CFLAGS=""
+    fi
+
+    case "`uname -s`" in
+       *win32*|*WIN32*|*MINGW32_*)
+           AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+           EXEEXT=".exe"
+           TEA_PLATFORM="windows"
+           ;;
+       *CYGWIN_*)
+           CYGPATH=echo
+           EXEEXT=".exe"
+           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
+           ;;
+       *)
+           CYGPATH=echo
+           # Maybe we are cross-compiling....
+           case ${host_alias} in
+               *mingw32*)
+               EXEEXT=".exe"
+               TEA_PLATFORM="windows"
+               ;;
+           *)
+               EXEEXT=""
+               TEA_PLATFORM="unix"
+               ;;
+           esac
+           ;;
+    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_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}])
+
+    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
+               # To add more dirs here (like 'src'), you have to update VPATH
+               # in Makefile.in as well
+               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+                   -a ! -f "${srcdir}/macosx/$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" \
+           -a ! -f "${srcdir}/macosx/$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_ADD_CLEANFILES --
+#
+#      Specify one or more CLEANFILES.
+#
+# Arguments:
+#      one or more file names to clean target
+#
+# Results:
+#
+#      Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_CLEANFILES], [
+    CLEANFILES="$CLEANFILES $@"
+])
+
+#------------------------------------------------------------------------
+# 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.
+
+    AC_PROG_CC
+    AC_PROG_CPP
+
+    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
+    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
+    INSTALL_DATA='${INSTALL} -m 644'
+    INSTALL_PROGRAM='${INSTALL}'
+    INSTALL_SCRIPT='${INSTALL}'
+    INSTALL_LIBRARY='${INSTALL_DATA}'
+
+    AC_SUBST(INSTALL)
+    AC_SUBST(INSTALL_DATA_DIR)
+    AC_SUBST(INSTALL_DATA)
+    AC_SUBST(INSTALL_PROGRAM)
+    AC_SUBST(INSTALL_SCRIPT)
+    AC_SUBST(INSTALL_LIBRARY)
+
+    #--------------------------------------------------------------------
+    # Checks to see if the make program sets the $MAKE variable.
+    #--------------------------------------------------------------------
+
+    AC_PROG_MAKE_SET
+
+    #--------------------------------------------------------------------
+    # Find ranlib
+    #--------------------------------------------------------------------
+
+    AC_CHECK_TOOL(RANLIB, 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_CACHE_CHECK([if the compiler understands -pipe],
+           tcl_cv_cc_pipe, [
+           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+           AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
+           CFLAGS=$hold_cflags])
+       if test $tcl_cv_cc_pipe = yes; then
+           CFLAGS="$CFLAGS -pipe"
+       fi
+    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
+#      VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
+#      VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
+#------------------------------------------------------------------------
+
+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)"
+       AC_EGREP_CPP([manifest needed], [
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+print("manifest needed")
+#endif
+       ], [
+       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
+       VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
+       VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
+       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
+       TEA_ADD_CLEANFILES([*.manifest])
+       ])
+       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
+           if test x"${TK_BIN_DIR}" != x ; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+           fi
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+           if test "$GCC" = "yes"; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
+           fi
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+       else
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           if test "$GCC" = "yes"; then
+               PKG_LIB_FILE=lib${PKG_LIB_FILE}
+           fi
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       if test "$GCC" = "yes"; then
+           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
+       fi
+       # 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_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           RANLIB=:
+       else
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${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)
+    AC_SUBST(VC_MANIFEST_EMBED_DLL)
+    AC_SUBST(VC_MANIFEST_EMBED_EXE)
+])
+
+#------------------------------------------------------------------------
+# 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/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
+           `ls -dr /usr/lib64/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:
+#
+#      Substitutes the following vars:
+#              TCL_TOP_DIR_NATIVE
+#              TCL_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
+    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
+    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
+    AC_MSG_CHECKING([for Tcl private include files])
+
+    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
+    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
+
+    # Check to see if tcl<Plat>Port.h isn't already with the public headers
+    # Don't look for tclInt.h because that resides with tcl.h in the core
+    # sources, but the <plat>Port headers are in a different directory
+    if test "${TEA_PLATFORM}" = "windows" -a \
+       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
+       result="private headers found with public headers"
+    elif test "${TEA_PLATFORM}" = "unix" -a \
+       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
+       result="private headers found with public headers"
+    else
+       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
+       if test "${TEA_PLATFORM}" = "windows"; then
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
+       else
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
+       fi
+       # Overwrite the previous TCL_INCLUDES as this should capture both
+       # public and private headers in the same set.
+       # We want to ensure these are substituted so as not to require
+       # any *_NATIVE vars be defined in the Makefile
+       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+       if test "`uname -s`" = "Darwin"; then
+            # If Tcl was built as a framework, attempt to use
+            # the framework's Headers and PrivateHeaders directories
+            case ${TCL_DEFS} in
+               *TCL_FRAMEWORK*)
+                   if test -d "${TCL_BIN_DIR}/Headers" -a \
+                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
+                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
+                   else
+                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
+                   fi
+                   ;;
+           esac
+           result="Using ${TCL_INCLUDES}"
+       else
+           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
+               AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
+           fi
+           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
+       fi
+    fi
+
+    AC_SUBST(TCL_TOP_DIR_NATIVE)
+
+    AC_SUBST(TCL_INCLUDES)
+    AC_MSG_RESULT([${result}])
+])
+
+#------------------------------------------------------------------------
+# 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.
+#
+#      Substitutes 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
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tcl was built as a framework, attempt to use
+               # the framework's Headers directory
+               case ${TCL_DEFS} in
+                   *TCL_FRAMEWORK*)
+                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tcl is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TCL_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$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`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TCL_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           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:
+#
+#      Substitutes the following vars:
+#              TK_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
+    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
+    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
+    AC_MSG_CHECKING([for Tk private include files])
+
+    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
+    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
+
+    # Check to see if tk<Plat>Port.h isn't already with the public headers
+    # Don't look for tkInt.h because that resides with tk.h in the core
+    # sources, but the <plat>Port headers are in a different directory
+    if test "${TEA_PLATFORM}" = "windows" -a \
+       -f "${ac_cv_c_tkh}/tkWinPort.h"; then
+       result="private headers found with public headers"
+    elif test "${TEA_PLATFORM}" = "unix" -a \
+       -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
+       result="private headers found with public headers"
+    else
+       TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
+       TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
+       if test "${TEA_PLATFORM}" = "windows"; then
+           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
+       else
+           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
+       fi
+       # Overwrite the previous TK_INCLUDES as this should capture both
+       # public and private headers in the same set.
+       # We want to ensure these are substituted so as not to require
+       # any *_NATIVE vars be defined in the Makefile
+       TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
+       # Detect and add ttk subdir
+       if test -d "${TK_SRC_DIR}/generic/ttk"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
+       fi
+       if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
+       fi
+       if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
+       fi
+       if test "`uname -s`" = "Darwin"; then
+           # If Tk was built as a framework, attempt to use
+           # the framework's Headers and PrivateHeaders directories
+           case ${TK_DEFS} in
+               *TK_FRAMEWORK*)
+                       if test -d "${TK_BIN_DIR}/Headers" -a \
+                               -d "${TK_BIN_DIR}/PrivateHeaders"; then
+                           TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
+                       else
+                           TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
+                       fi
+                       ;;
+           esac
+           result="Using ${TK_INCLUDES}"
+       else
+           if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
+              AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
+           fi
+           result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
+       fi
+    fi
+
+    AC_SUBST(TK_TOP_DIR_NATIVE)
+    AC_SUBST(TK_XLIB_DIR_NATIVE)
+
+    AC_SUBST(TK_INCLUDES)
+    AC_MSG_RESULT([${result}])
+])
+
+#------------------------------------------------------------------------
+# 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.
+#
+#      Substitutes 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
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tk was built as a framework, attempt to use
+               # the framework's Headers directory.
+               case ${TK_DEFS} in
+                   *TK_FRAMEWORK*)
+                       list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tk is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TK_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tk's --prefix location,
+           # relative to directory of tkConfig.sh, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$list \
+               `ls -d ${temp_includedir}        2>/dev/null` \
+               `ls -d ${TK_PREFIX}/include      2>/dev/null` \
+               `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
+               `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
+               `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TK_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           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_WINDOWINGSYSTEM}" != "x11"; then
+       # On Windows and Aqua, 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_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 ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 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:
+#
+#      Substitutes 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}
+        $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
+        $1_LIBRARY_PATH=${$1_LIBRARY_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)
+
+    # Allow the caller to prevent this auto-check by specifying any 2nd arg
+    AS_IF([test "x$2" = x], [
+       # Check both upper and lower-case variants
+       # If a dev wanted non-stubs libs, this function could take an option
+       # to not use _STUB in the paths below
+       AS_IF([test "x${$1_STUB_LIB_SPEC}" = x],
+           [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
+           [TEA_LOAD_CONFIG_LIB($1_STUB)])
+    ])
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_CONFIG_LIB --
+#
+#      Helper function to load correct library from another extension's
+#      ${PACKAGE}Config.sh.
+#
+# Results:
+#      Adds to LIBS the appropriate extension library
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
+    AC_MSG_CHECKING([For $1 library for LIBS])
+    # This simplifies the use of stub libraries by automatically adding
+    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
+    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
+    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
+    if test "x${$1_LIB_SPEC}" != "x" ; then
+       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+           TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"])
+           AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}])
+       else
+           TEA_ADD_LIBS([${$1_LIB_SPEC}])
+           AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}])
+       fi
+    else
+       AC_MSG_RESULT([file not found])
+    fi
+])
+
+#------------------------------------------------------------------------
+# TEA_EXPORT_CONFIG --
+#
+#      Define the data to insert into the ${PACKAGE}Config.sh file
+#
+# Arguments:
+#
+#      Requires the following vars to be set:
+#              $1
+#
+# Results:
+#      Substitutes the following vars:
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_EXPORT_CONFIG], [
+    #--------------------------------------------------------------------
+    # These are for $1Config.sh
+    #--------------------------------------------------------------------
+
+    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
+    eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
+    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+       eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
+       eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
+    else
+       eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+       eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+    fi
+    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
+    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
+    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
+    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
+    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
+    $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
+
+    AC_SUBST($1_BUILD_LIB_SPEC)
+    AC_SUBST($1_LIB_SPEC)
+    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
+    AC_SUBST($1_STUB_LIB_SPEC)
+    AC_SUBST($1_BUILD_STUB_LIB_PATH)
+    AC_SUBST($1_STUB_LIB_PATH)
+
+    AC_SUBST(MAJOR_VERSION)
+    AC_SUBST(MINOR_VERSION)
+    AC_SUBST(PATCHLEVEL)
+])
+
+
+#------------------------------------------------------------------------
+# 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}
+           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
+           AC_MSG_RESULT([found $CELIB_DIR])
+       fi
+    fi
+])
+# Local Variables:
+# mode: autoconf
+# End:
diff --git a/pkgs/thread2.7.1/tclconfig/tcl.m4 b/pkgs/thread2.7.1/tclconfig/tcl.m4
deleted file mode 100644 (file)
index 6ff4a2a..0000000
+++ /dev/null
@@ -1,4168 +0,0 @@
-# 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.
-
-AC_PREREQ(2.57)
-
-dnl TEA extensions pass us the version of TEA they think they
-dnl are compatible with (must be set in TEA_INIT below)
-dnl TEA_VERSION="3.9"
-
-# Possible values for key variables defined:
-#
-# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
-# TEA_PLATFORM        - windows unix
-#
-
-#------------------------------------------------------------------------
-# 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 TEA specific: 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,
-           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 common install locations
-           if test x"${ac_cv_c_tclconfig}" = x ; then
-               for i in `ls -d ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
-                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
-       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,
-           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   if test -f "$i/unix/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # on Darwin, check in Framework installation locations
-           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
-               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
-                       `ls -d /Library/Frameworks 2>/dev/null` \
-                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
-                       `ls -d /System/Library/Frameworks 2>/dev/null` \
-                       ; do
-                   if test -f "$i/Tk.framework/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/Tk.framework; 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 ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 2>/dev/null` \
-                       ; do
-                   if test -f "$i/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i; pwd)`"
-                       break
-                   fi
-               done
-           fi
-
-           # TEA specific: on Windows, check in common installation locations
-           if test "${TEA_PLATFORM}" = "windows" \
-               -a x"${ac_cv_c_tkconfig}" = x ; then
-               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
-                       `ls -d C:/Progra~1/Tcl/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 "${TEA_PLATFORM}" = "windows" \
-                           -a -f "$i/win/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
-                       break
-                   fi
-                   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_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
-       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:
-#
-#      Substitutes 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([could not find ${TCL_BIN_DIR}/tclConfig.sh])
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
-    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tcl was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tcl.framework installed in an arbitrary location.
-       case ${TCL_DEFS} in
-           *TCL_FRAMEWORK*)
-               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
-                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
-                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
-                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
-                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
-                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TCL_DBGX substitution
-    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
-    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-    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_PATCH_LEVEL)
-    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_MSG_CHECKING([platform])
-    hold_cc=$CC; CC="$TCL_CC"
-    AC_TRY_COMPILE(,[
-           #ifdef _WIN32
-               #error win32
-           #endif
-    ], TEA_PLATFORM="unix",
-           TEA_PLATFORM="windows"
-    )
-    CC=$hold_cc
-    AC_MSG_RESULT($TEA_PLATFORM)
-
-    # The BUILD_$pkg is to define the correct extern storage class
-    # handling when making this package
-    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
-           [Building extension source?])
-    # Do this here as we have fully defined TEA_PLATFORM now
-    if test "${TEA_PLATFORM}" = "windows" ; then
-       EXEEXT=".exe"
-       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
-    fi
-
-    # TEA specific:
-    AC_SUBST(CLEANFILES)
-    AC_SUBST(TCL_LIBS)
-    AC_SUBST(TCL_DEFS)
-    AC_SUBST(TCL_EXTRA_CFLAGS)
-    AC_SUBST(TCL_LD_FLAGS)
-    AC_SUBST(TCL_SHLIB_LD_LIBS)
-])
-
-#------------------------------------------------------------------------
-# 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
-
-    # eval is required to do the TK_DBGX substitution
-    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
-    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
-
-    # 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}"
-    elif test "`uname -s`" = "Darwin"; then
-       # If Tk was built as a framework, attempt to use the libraries
-       # from the framework at the given location so that linking works
-       # against Tk.framework installed in an arbitrary location.
-       case ${TK_DEFS} in
-           *TK_FRAMEWORK*)
-               if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
-                   for i in "`cd "${TK_BIN_DIR}"; pwd`" \
-                            "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
-                       if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
-                           TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
-                           break
-                       fi
-                   done
-               fi
-               if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
-                   TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
-                   TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
-               fi
-               ;;
-       esac
-    fi
-
-    # eval is required to do the TK_DBGX substitution
-    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
-    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
-    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
-    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
-
-    # TEA specific: Ensure windowingsystem is defined
-    if test "${TEA_PLATFORM}" = "unix" ; then
-       case ${TK_DEFS} in
-           *MAC_OSX_TK*)
-               AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
-               TEA_WINDOWINGSYSTEM="aqua"
-               ;;
-           *)
-               TEA_WINDOWINGSYSTEM="x11"
-               ;;
-       esac
-    elif test "${TEA_PLATFORM}" = "windows" ; then
-       TEA_WINDOWINGSYSTEM="win32"
-    fi
-
-    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)
-
-    # TEA specific:
-    AC_SUBST(TK_LIBS)
-    AC_SUBST(TK_XINCLUDES)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_TCLSH
-#      Determine the fully qualified path name of the tclsh executable
-#      in the Tcl build directory or the tclsh installed in a bin
-#      directory. This macro will correctly determine the name
-#      of the tclsh executable even if tclsh has not yet been
-#      built in the build directory. The tclsh found is always
-#      associated with a tclConfig.sh file. This tclsh should be used
-#      only for running extension test cases. It should never be
-#      or generation of files (like pkgIndex.tcl) at build time.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Substitutes the following vars:
-#              TCLSH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PROG_TCLSH], [
-    AC_MSG_CHECKING([for tclsh])
-    if test -f "${TCL_BIN_DIR}/Makefile" ; then
-        # tclConfig.sh is in Tcl build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
-        fi
-    else
-        # tclConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
-        else
-            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
-        fi
-        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${TCLSH_PROG}" ; then
-                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
-    fi
-    AC_MSG_RESULT([${TCLSH_PROG}])
-    AC_SUBST(TCLSH_PROG)
-])
-
-#------------------------------------------------------------------------
-# TEA_PROG_WISH
-#      Determine the fully qualified path name of the wish executable
-#      in the Tk build directory or the wish installed in a bin
-#      directory. This macro will correctly determine the name
-#      of the wish executable even if wish has not yet been
-#      built in the build directory. The wish found is always
-#      associated with a tkConfig.sh file. This wish should be used
-#      only for running extension test cases. It should never be
-#      or generation of files (like pkgIndex.tcl) at build time.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Substitutes the following vars:
-#              WISH_PROG
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PROG_WISH], [
-    AC_MSG_CHECKING([for wish])
-    if test -f "${TK_BIN_DIR}/Makefile" ; then
-        # tkConfig.sh is in Tk build directory
-        if test "${TEA_PLATFORM}" = "windows"; then
-            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
-        else
-            WISH_PROG="${TK_BIN_DIR}/wish"
-        fi
-    else
-        # tkConfig.sh is in install location
-        if test "${TEA_PLATFORM}" = "windows"; then
-            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
-        else
-            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
-        fi
-        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
-              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
-              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
-        for i in $list ; do
-            if test -f "$i/${WISH_PROG}" ; then
-                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
-                break
-            fi
-        done
-        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
-    fi
-    AC_MSG_RESULT([${WISH_PROG}])
-    AC_SUBST(WISH_PROG)
-])
-
-#------------------------------------------------------------------------
-# 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,
-       AC_HELP_STRING([--enable-shared],
-           [build and link with shared libraries (default: on)]),
-       [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, 1, [Is this a 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, "no" means
-#      threads are disabled.  "yes" is the 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.
-#
-#      Note that it is legal to have a thread enabled extension run in a
-#      threaded or non-threaded Tcl core, but a non-threaded extension may
-#      only run in a non-threaded Tcl core.
-#
-# 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
-#              _THREAD_SAFE
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_ENABLE_THREADS], [
-    AC_ARG_ENABLE(threads,
-       AC_HELP_STRING([--enable-threads],
-           [build with threads]),
-       [tcl_ok=$enableval], [tcl_ok=yes])
-
-    if test "${enable_threads+set}" = set; then
-       enableval="$enable_threads"
-       tcl_ok=$enableval
-    else
-       tcl_ok=yes
-    fi
-
-    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:
-
-           # USE_THREAD_ALLOC tells us to try the special thread-based
-           # allocator that significantly reduces lock contention
-           AC_DEFINE(USE_THREAD_ALLOC, 1,
-               [Do we want to use the threaded memory allocator?])
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           if test "`uname -s`" = "SunOS" ; then
-               AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-                       [Do we really want to follow the standard? Yes we do!])
-           fi
-           AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
-           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([Do not know how to find pthread lib on your system - thread support disabled])
-                       fi
-                   fi
-               fi
-           fi
-       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, 1, [Are we building with threads enabled?])
-       AC_MSG_RESULT([yes (default)])
-    else
-       AC_MSG_RESULT([no])
-    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 Tcl
-    that IS thread-enabled.  It is recommended to use --enable-threads.])
-           fi
-           ;;
-       *)
-           if test "${TCL_THREADS}" = "1"; then
-               AC_MSG_WARN([
-    --enable-threads requested, but building against a Tcl that is NOT
-    thread-enabled.  This is an OK configuration that will also run in
-    a thread-enabled core.])
-           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
-#
-#      TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
-#      the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
-#      Requires the following vars to be set in the Makefile:
-#              CFLAGS_DEFAULT
-#              LDFLAGS_DEFAULT
-#
-# 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) -DNDEBUG" 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 TEA specific: Make sure we are initialized
-    AC_REQUIRE([TEA_CONFIG_CFLAGS])
-    AC_MSG_CHECKING([for build with symbols])
-    AC_ARG_ENABLE(symbols,
-       AC_HELP_STRING([--enable-symbols],
-           [build with debugging symbols (default: off)]),
-       [tcl_ok=$enableval], [tcl_ok=no])
-    DBGX=""
-    if test "$tcl_ok" = "no"; then
-       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
-       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
-    # TEA specific:
-    if test "${TEA_PLATFORM}" != "windows" ; then
-       LDFLAGS_DEFAULT="${LDFLAGS}"
-    fi
-    AC_SUBST(CFLAGS_DEFAULT)
-    AC_SUBST(LDFLAGS_DEFAULT)
-    AC_SUBST(TCL_DBGX)
-
-    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-       AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
-    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,
-       AC_HELP_STRING([--enable-langinfo],
-           [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
-       [langinfo_ok=$enableval], [langinfo_ok=yes])
-
-    HAVE_LANGINFO=0
-    if test "$langinfo_ok" = "yes"; then
-       AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
-    fi
-    AC_MSG_CHECKING([whether to use nl_langinfo])
-    if test "$langinfo_ok" = "yes"; then
-       AC_CACHE_VAL(tcl_cv_langinfo_h, [
-           AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
-                   [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
-       AC_MSG_RESULT([$tcl_cv_langinfo_h])
-       if test $tcl_cv_langinfo_h = yes; then
-           AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
-       fi
-    else
-       AC_MSG_RESULT([$langinfo_ok])
-    fi
-])
-
-#--------------------------------------------------------------------
-# TEA_CONFIG_SYSTEM
-#
-#      Determine what the system is (some things cannot be easily checked
-#      on a feature-driven basis, alas). This can usually be done via the
-#      "uname" command.
-#
-# Arguments:
-#      none
-#
-# Results:
-#      Defines the following var:
-#
-#      system -        System/platform/version identification code.
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_CONFIG_SYSTEM], [
-    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
-       # TEA specific:
-       if test "${TEA_PLATFORM}" = "windows" ; then
-           tcl_cv_sys_version=windows
-       else
-           tcl_cv_sys_version=`uname -s`-`uname -r`
-           if test "$?" -ne 0 ; then
-               AC_MSG_WARN([can't find uname command])
-               tcl_cv_sys_version=unknown
-           else
-               if test "`uname -s`" = "AIX" ; then
-                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
-               fi
-           fi
-       fi
-    ])
-    system=$tcl_cv_sys_version
-])
-
-#--------------------------------------------------------------------
-# 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 and substitutes the following vars:
-#
-#      DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
-#       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. Could
-#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
-#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/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 defaults to
-#                       "${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.
-#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
-#                       in a static or 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 a shared library needs to have
-#                       a .a extension whereas shared objects for loadable
-#                       extensions have a .so extension.  Defaults to
-#                       ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
-#      CFLAGS_DEBUG -
-#                      Flags used when running the compiler in debug mode
-#      CFLAGS_OPTIMIZE -
-#                      Flags used when running the compiler in optimize mode
-#      CFLAGS -        Additional CFLAGS added as necessary (usually 64-bit)
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_CONFIG_CFLAGS], [
-    dnl TEA specific: Make sure we are initialized
-    AC_REQUIRE([TEA_INIT])
-
-    # Step 0.a: Enable 64 bit support?
-
-    AC_MSG_CHECKING([if 64bit support is requested])
-    AC_ARG_ENABLE(64bit,
-       AC_HELP_STRING([--enable-64bit],
-           [enable 64bit support (default: off)]),
-       [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,
-       AC_HELP_STRING([--enable-64bit-vis],
-           [enable 64bit Sparc VIS support (default: off)]),
-       [do64bitVIS=$enableval], [do64bitVIS=no])
-    AC_MSG_RESULT([$do64bitVIS])
-    # Force 64bit on with VIS
-    AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes])
-
-    # Step 0.c: Check if visibility support is available. Do this here so
-    # that platform specific alternatives can be used below if this fails.
-
-    AC_CACHE_CHECK([if compiler supports visibility "hidden"],
-       tcl_cv_cc_visibility_hidden, [
-       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
-       AC_TRY_LINK([
-           extern __attribute__((__visibility__("hidden"))) void f(void);
-           void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
-           tcl_cv_cc_visibility_hidden=no)
-       CFLAGS=$hold_cflags])
-    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
-       AC_DEFINE(MODULE_SCOPE,
-           [extern __attribute__((__visibility__("hidden")))],
-           [Compiler support for module scope symbols])
-       AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
-    ])
-
-    # Step 0.d: Disable -rpath support?
-
-    AC_MSG_CHECKING([if rpath support is requested])
-    AC_ARG_ENABLE(rpath,
-       AC_HELP_STRING([--disable-rpath],
-           [disable rpath support (default: on)]),
-       [doRpath=$enableval], [doRpath=yes])
-    AC_MSG_RESULT([$doRpath])
-
-    # TEA specific: Cross-compiling options for Windows/CE builds?
-
-    AS_IF([test "${TEA_PLATFORM}" = windows], [
-       AC_MSG_CHECKING([if Windows/CE build is requested])
-       AC_ARG_ENABLE(wince,
-           AC_HELP_STRING([--enable-wince],
-               [enable Win/CE support (where applicable)]),
-           [doWince=$enableval], [doWince=no])
-       AC_MSG_RESULT([$doWince])
-    ])
-
-    # Set the variable "system" to hold the name and version number
-    # for the system.
-
-    TEA_CONFIG_SYSTEM
-
-    # Require ranlib early so we can override it in special cases below.
-
-    AC_REQUIRE([AC_PROG_RANLIB])
-
-    # 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 removed some core-only vars.
-
-    do64bit_ok=no
-    # default to '{$LIBS}' and set to "" on per-platform necessary basis
-    SHLIB_LD_LIBS='${LIBS}'
-    # When ld needs options to work in 64-bit mode, put them in
-    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
-    # is disabled by the user. [Bug 1016796]
-    LDFLAGS_ARCH=""
-    UNSHARED_LIB_SUFFIX=""
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
-    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
-    TCL_LIB_VERSIONS_OK=ok
-    CFLAGS_DEBUG=-g
-    AS_IF([test "$GCC" = yes], [
-       CFLAGS_OPTIMIZE=-O2
-       CFLAGS_WARNING="-Wall"
-    ], [
-       CFLAGS_OPTIMIZE=-O
-       CFLAGS_WARNING=""
-    ])
-    AC_CHECK_TOOL(AR, ar)
-    STLIB_LD='${AR} cr'
-    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
-    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION="1.0"])
-    case $system in
-       # TEA specific:
-       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.
-           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
-           # MACHINE is IX86 for LINK, but this is used by the manifest,
-           # which requires x86|amd64|ia64.
-           MACHINE="X86"
-           if test "$do64bit" != "no" ; then
-               if test "x${MSSDK}x" = "xx" ; then
-                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
-               fi
-               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
-               PATH64=""
-               case "$do64bit" in
-                   amd64|x64|yes)
-                       MACHINE="AMD64" ; # default to AMD64 64-bit build
-                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
-                       ;;
-                   ia64)
-                       MACHINE="IA64"
-                       PATH64="${MSSDK}/Bin/Win64"
-                       ;;
-               esac
-               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
-                   AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
-                   AC_MSG_WARN([Ensure latest Platform SDK is installed])
-                   do64bit="no"
-               else
-                   AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
-                   do64bit_ok="yes"
-               fi
-           fi
-
-           if test "$doWince" != "no" ; then
-               if test "$do64bit" != "no" ; 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
-               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
-               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
-               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" != "no" ; then
-                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
-                   CC="\"${PATH64}/cl.exe\""
-                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
-                   RC="\"${MSSDK}/bin/rc.exe\""
-                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
-                   LINKBIN="\"${PATH64}/link.exe\""
-                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
-                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
-                   # Avoid 'unresolved external symbol __security_cookie'
-                   # errors, c.f. http://support.microsoft.com/?id=894573
-                   TEA_ADD_LIBS([bufferoverflowU.lib])
-               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, 1, [WinCE def ]$i)
-                   done
-                   AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
-                   AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
-                   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
-               AC_CHECK_TOOL(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}"
-
-               AC_CACHE_CHECK(for cross-compile version of gcc,
-                       ac_cv_cross,
-                       AC_TRY_COMPILE([
-                           #ifdef _WIN32
-                               #error cross-compiler
-                           #endif
-                       ], [],
-                       ac_cv_cross=yes,
-                       ac_cv_cross=no)
-                     )
-                     if test "$ac_cv_cross" = "yes"; then
-                       case "$do64bit" in
-                           amd64|x64|yes)
-                               CC="x86_64-w64-mingw32-gcc"
-                               LD="x86_64-w64-mingw32-ld"
-                               AR="x86_64-w64-mingw32-ar"
-                               RANLIB="x86_64-w64-mingw32-ranlib"
-                               RC="x86_64-w64-mingw32-windres"
-                           ;;
-                           *)
-                               CC="i686-w64-mingw32-gcc"
-                               LD="i686-w64-mingw32-ld"
-                               AR="i686-w64-mingw32-ar"
-                               RANLIB="i686-w64-mingw32-ranlib"
-                               RC="i686-w64-mingw32-windres"
-                           ;;
-                       esac
-               fi
-
-           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
-               # and also
-               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
-               # This essentially turns it all on.
-               LDFLAGS_DEBUG="-debug -debugtype:cv"
-               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_SUFFIX=".dll"
-           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
-
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       AIX-*)
-           AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
-               # AIX requires the _r compiler when gcc isn't being used
-               case "${CC}" in
-                   *_r|*_r\ *)
-                       # ok ...
-                       ;;
-                   *)
-                       # Make sure only first arg gets _r
-                       CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
-                       ;;
-               esac
-               AC_MSG_RESULT([Using $CC for compiling with threads])
-           ])
-           LIBS="$LIBS -lc"
-           SHLIB_CFLAGS=""
-           SHLIB_SUFFIX=".so"
-
-           LD_LIBRARY_PATH_VAR="LIBPATH"
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = yes], [
-               AS_IF([test "$GCC" = yes], [
-                   AC_MSG_WARN([64bit mode not supported with GCC on $system])
-               ], [
-                   do64bit_ok=yes
-                   CFLAGS="$CFLAGS -q64"
-                   LDFLAGS_ARCH="-q64"
-                   RANLIB="${RANLIB} -X64"
-                   AR="${AR} -X64"
-                   SHLIB_LD_FLAGS="-b64"
-               ])
-           ])
-
-           AS_IF([test "`uname -m`" = ia64], [
-               # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               AS_IF([test "$GCC" = yes], [
-                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               ], [
-                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
-               ])
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-           ], [
-               AS_IF([test "$GCC" = yes], [
-                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
-               ], [
-                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
-                   LDFLAGS="$LDFLAGS -brtl"
-               ])
-               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
-               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ])
-           ;;
-       BeOS*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -nostart'
-           SHLIB_SUFFIX=".so"
-
-           #-----------------------------------------------------------
-           # Check for inet_ntoa in -lbind, for BeOS (which also needs
-           # -lsocket, even if the network functions are in -lnet which
-           # is always linked to, for compatibility.
-           #-----------------------------------------------------------
-           AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
-           ;;
-       BSD/OS-4.*)
-           SHLIB_CFLAGS="-export-dynamic -fPIC"
-           SHLIB_LD='${CC} -shared'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       CYGWIN_*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD='${CC} -shared'
-           SHLIB_SUFFIX=".dll"
-           EXEEXT=".exe"
-           do64bit_ok=yes
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       Haiku*)
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
-           AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
-           ;;
-       HP-UX-*.11.*)
-           # Use updated header definitions where possible
-           AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
-           # TEA specific: Needed by Tcl, but not most extensions
-           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
-           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
-
-           AS_IF([test "`uname -m`" = ia64], [
-               SHLIB_SUFFIX=".so"
-               # Use newer C++ library for C++ extensions
-               #if test "$GCC" != "yes" ; then
-               #   CPPFLAGS="-AA"
-               #fi
-           ], [
-               SHLIB_SUFFIX=".sl"
-           ])
-           AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
-           AS_IF([test "$tcl_ok" = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-E"
-               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
-               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
-               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
-           ])
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ], [
-               CFLAGS="$CFLAGS -z"
-               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
-               #CFLAGS="$CFLAGS +DAportable"
-               SHLIB_CFLAGS="+z"
-               SHLIB_LD="ld -b"
-           ])
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = "yes"], [
-               AS_IF([test "$GCC" = yes], [
-                   case `${CC} -dumpmachine` in
-                       hppa64*)
-                           # 64-bit gcc in use.  Fix flags for GNU ld.
-                           do64bit_ok=yes
-                           SHLIB_LD='${CC} -shared'
-                           AS_IF([test $doRpath = yes], [
-                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-                           ;;
-                       *)
-                           AC_MSG_WARN([64bit mode not supported with GCC on $system])
-                           ;;
-                   esac
-               ], [
-                   do64bit_ok=yes
-                   CFLAGS="$CFLAGS +DD64"
-                   LDFLAGS_ARCH="+DD64"
-               ])
-           ]) ;;
-       IRIX-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-           AS_IF([test "$GCC" = yes], [
-               CFLAGS="$CFLAGS -mabi=n32"
-               LDFLAGS="$LDFLAGS -mabi=n32"
-           ], [
-               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"
-           ])
-           ;;
-       IRIX64-6.*)
-           SHLIB_CFLAGS=""
-           SHLIB_LD="ld -n32 -shared -rdata_shared"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-
-           # Check to enable 64-bit flags for compiler/linker
-
-           AS_IF([test "$do64bit" = yes], [
-               AS_IF([test "$GCC" = yes], [
-                   AC_MSG_WARN([64bit mode not supported by gcc])
-               ], [
-                   do64bit_ok=yes
-                   SHLIB_LD="ld -64 -shared -rdata_shared"
-                   CFLAGS="$CFLAGS -64"
-                   LDFLAGS_ARCH="-64"
-               ])
-           ])
-           ;;
-       Linux*|GNU*|NetBSD-Debian)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-
-           # TEA specific:
-           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
-
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
-           AS_IF([test $do64bit = yes], [
-               AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
-                   hold_cflags=$CFLAGS
-                   CFLAGS="$CFLAGS -m64"
-                   AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
-                   CFLAGS=$hold_cflags])
-               AS_IF([test $tcl_cv_cc_m64 = yes], [
-                   CFLAGS="$CFLAGS -m64"
-                   do64bit_ok=yes
-               ])
-          ])
-
-           # 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.
-
-           AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
-           ;;
-       Lynx*)
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_SUFFIX=".so"
-           CFLAGS_OPTIMIZE=-02
-           SHLIB_LD='${CC} -shared'
-           LD_FLAGS="-Wl,--export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           ;;
-       OpenBSD-*)
-           arch=`arch -s`
-           case "$arch" in
-           vax)
-               SHLIB_SUFFIX=""
-               SHARED_LIB_SUFFIX=""
-               LDFLAGS=""
-               ;;
-           *)
-               SHLIB_CFLAGS="-fPIC"
-               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-               SHLIB_SUFFIX=".so"
-               AS_IF([test $doRpath = yes], [
-                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
-               LDFLAGS="-Wl,-export-dynamic"
-               ;;
-           esac
-           case "$arch" in
-           vax)
-               CFLAGS_OPTIMIZE="-O1"
-               ;;
-           *)
-               CFLAGS_OPTIMIZE="-O2"
-               ;;
-           esac
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # On OpenBSD:   Compile with -pthread
-               #               Don't link with -lpthread
-               LIBS=`echo $LIBS | sed s/-lpthread//`
-               CFLAGS="$CFLAGS -pthread"
-           ])
-           # OpenBSD doesn't do version numbers with dots.
-           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-           TCL_LIB_VERSIONS_OK=nodots
-           ;;
-       NetBSD-*)
-           # NetBSD has ELF and can use 'cc -shared' to build shared libs
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
-           SHLIB_SUFFIX=".so"
-           LDFLAGS="$LDFLAGS -export-dynamic"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # The -pthread needs to go in the CFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS -pthread"
-               LDFLAGS="$LDFLAGS -pthread"
-           ])
-           ;;
-       FreeBSD-*)
-           # This configuration from FreeBSD Ports.
-           SHLIB_CFLAGS="-fPIC"
-           SHLIB_LD="${CC} -shared"
-           TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$[@]"
-           TK_SHLIB_LD_EXTRAS="-Wl,-soname,\$[@]"
-           SHLIB_SUFFIX=".so"
-           LDFLAGS=""
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
-           AS_IF([test "${TCL_THREADS}" = "1"], [
-               # The -pthread needs to go in the LDFLAGS, not LIBS
-               LIBS=`echo $LIBS | sed s/-pthread//`
-               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
-           case $system in
-           FreeBSD-3.*)
-               # Version numbers are dot-stripped by system policy.
-               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
-               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
-               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
-               TCL_LIB_VERSIONS_OK=nodots
-               ;;
-           esac
-           ;;
-       Darwin-*)
-           CFLAGS_OPTIMIZE="-Os"
-           SHLIB_CFLAGS="-fno-common"
-           # To avoid discrepancies between what headers configure sees during
-           # preprocessing tests and compiling tests, move any -isysroot and
-           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
-           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
-           CFLAGS="`echo " ${CFLAGS}" | \
-               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
-               if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
-           AS_IF([test $do64bit = yes], [
-               case `arch` in
-                   ppc)
-                       AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
-                               tcl_cv_cc_arch_ppc64, [
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
-                                   tcl_cv_cc_arch_ppc64=no)
-                           CFLAGS=$hold_cflags])
-                       AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
-                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
-                           do64bit_ok=yes
-                       ]);;
-                   i386)
-                       AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
-                               tcl_cv_cc_arch_x86_64, [
-                           hold_cflags=$CFLAGS
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
-                                   tcl_cv_cc_arch_x86_64=no)
-                           CFLAGS=$hold_cflags])
-                       AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
-                           CFLAGS="$CFLAGS -arch x86_64"
-                           do64bit_ok=yes
-                       ]);;
-                   *)
-                       AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
-               esac
-           ], [
-               # Check for combined 32-bit and 64-bit fat build
-               AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
-                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
-                   fat_32_64=yes])
-           ])
-           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
-           AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_single_module = yes], [
-               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
-           ])
-           # TEA specific: link shlib with current and compatibility version flags
-           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
-           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
-           SHLIB_SUFFIX=".dylib"
-           # Don't use -prebind when building for Mac OS X 10.4 or later only:
-           AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
-               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
-               LDFLAGS="$LDFLAGS -prebind"])
-           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
-           AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
-                   tcl_cv_ld_search_paths_first, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
-                       tcl_cv_ld_search_paths_first=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
-           ])
-           AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
-               AC_DEFINE(MODULE_SCOPE, [__private_extern__],
-                   [Compiler support for module scope symbols])
-               tcl_cv_cc_visibility_hidden=yes
-           ])
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-           # TEA specific: for combined 32 & 64 bit fat builds of Tk
-           # extensions, verify that 64-bit build is possible.
-           AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
-               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [
-                   AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
-                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
-                       AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();],
-                           tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no)
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done])
-               ])
-               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [
-                   AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
-                       done
-                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
-                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
-                       AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);],
-                           tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no)
-                       for v in CFLAGS CPPFLAGS LDFLAGS; do
-                           eval $v'="$hold_'$v'"'
-                       done])
-               ])
-               # remove 64-bit arch flags from CFLAGS et al. if configuration
-               # does not support 64-bit.
-               AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
-                   AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
-                   for v in CFLAGS CPPFLAGS LDFLAGS; do
-                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
-                   done])
-           ])
-           ;;
-       OS/390-*)
-           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
-           AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
-               [Should OS/390 do the right thing with sockets?])
-           ;;
-       OSF1-V*)
-           # Digital OSF/1
-           SHLIB_CFLAGS=""
-           AS_IF([test "$SHARED_BUILD" = 1], [
-               SHLIB_LD='ld -shared -expect_unresolved "*"'
-           ], [
-               SHLIB_LD='ld -non_shared -expect_unresolved "*"'
-           ])
-           SHLIB_SUFFIX=".so"
-           AS_IF([test $doRpath = yes], [
-               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
-           AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
-               CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
-           # see pthread_intro(3) for pthread support on osf1, k.furukawa
-           AS_IF([test "${TCL_THREADS}" = 1], [
-               CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
-               CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
-               LIBS=`echo $LIBS | sed s/-lpthreads//`
-               AS_IF([test "$GCC" = yes], [
-                   LIBS="$LIBS -lpthread -lmach -lexc"
-               ], [
-                   CFLAGS="$CFLAGS -pthread"
-                   LDFLAGS="$LDFLAGS -pthread"
-               ])
-           ])
-           ;;
-       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"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SCO_SV-3.2*)
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_CFLAGS="-fPIC -melf"
-               LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
-           ], [
-               SHLIB_CFLAGS="-Kpic -belf"
-               LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
-           ])
-           SHLIB_LD="ld -G"
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-       SunOS-5.[[0-6]])
-           # Careful to not let 5.10+ fall into this case
-
-           # Note: If _REENTRANT isn't defined, then Solaris
-           # won't define thread-safe library routines.
-
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-               [Do we really want to follow the standard? Yes we do!])
-
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_SUFFIX=".so"
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ], [
-               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
-               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-           ])
-           ;;
-       SunOS-5*)
-           # Note: If _REENTRANT isn't defined, then Solaris
-           # won't define thread-safe library routines.
-
-           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
-           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
-               [Do we really want to follow the standard? Yes we do!])
-
-           SHLIB_CFLAGS="-KPIC"
-
-           # Check to enable 64-bit flags for compiler/linker
-           AS_IF([test "$do64bit" = yes], [
-               arch=`isainfo`
-               AS_IF([test "$arch" = "sparcv9 sparc"], [
-                   AS_IF([test "$GCC" = yes], [
-                       AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
-                           AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
-                       ], [
-                           do64bit_ok=yes
-                           CFLAGS="$CFLAGS -m64 -mcpu=v9"
-                           LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
-                           SHLIB_CFLAGS="-fPIC"
-                       ])
-                   ], [
-                       do64bit_ok=yes
-                       AS_IF([test "$do64bitVIS" = yes], [
-                           CFLAGS="$CFLAGS -xarch=v9a"
-                           LDFLAGS_ARCH="-xarch=v9a"
-                       ], [
-                           CFLAGS="$CFLAGS -xarch=v9"
-                           LDFLAGS_ARCH="-xarch=v9"
-                       ])
-                       # Solaris 64 uses this as well
-                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
-                   ])
-               ], [AS_IF([test "$arch" = "amd64 i386"], [
-                   AS_IF([test "$GCC" = yes], [
-                       case $system in
-                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
-                               do64bit_ok=yes
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               AC_MSG_WARN([64bit mode not supported with GCC on $system]);;
-                       esac
-                   ], [
-                       do64bit_ok=yes
-                       case $system in
-                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
-                               CFLAGS="$CFLAGS -m64"
-                               LDFLAGS="$LDFLAGS -m64";;
-                           *)
-                               CFLAGS="$CFLAGS -xarch=amd64"
-                               LDFLAGS="$LDFLAGS -xarch=amd64";;
-                       esac
-                   ])
-               ], [AC_MSG_WARN([64bit mode not supported for $arch])])])
-           ])
-
-           SHLIB_SUFFIX=".so"
-           AS_IF([test "$GCC" = yes], [
-               SHLIB_LD='${CC} -shared'
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-               AS_IF([test "$do64bit_ok" = yes], [
-                   AS_IF([test "$arch" = "sparcv9 sparc"], [
-                       # 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` | ..."
-                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
-                   ], [AS_IF([test "$arch" = "amd64 i386"], [
-                       # JH: static-libgcc is necessary for core Tcl, but may
-                       # not be necessary for extensions.
-                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
-                   ])])
-               ])
-           ], [
-               case $system in
-                   SunOS-5.[[1-9]][[0-9]]*)
-                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
-                   *)
-                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
-               esac
-               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
-           ])
-           ;;
-       UNIX_SV* | UnixWare-5*)
-           SHLIB_CFLAGS="-KPIC"
-           SHLIB_LD='${CC} -G'
-           SHLIB_LD_LIBS=""
-           SHLIB_SUFFIX=".so"
-           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
-           # that don't grok the -Bexport option.  Test that it does.
-           AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
-               hold_ldflags=$LDFLAGS
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-               AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
-               LDFLAGS=$hold_ldflags])
-           AS_IF([test $tcl_cv_ld_Bexport = yes], [
-               LDFLAGS="$LDFLAGS -Wl,-Bexport"
-           ])
-           CC_SEARCH_FLAGS=""
-           LD_SEARCH_FLAGS=""
-           ;;
-    esac
-
-    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
-       AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
-    ])
-
-dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
-dnl # until the end of configure, as configure's compile and link tests use
-dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
-dnl # preprocessing tests use only CPPFLAGS.
-    AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
-
-    # Add in the arch flags late to ensure it wasn't removed.
-    # Not necessary in TEA, but this is aligned with core
-    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
-
-    # 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.
-
-    AS_IF([test "$GCC" = yes], [
-       case $system in
-           AIX-*) ;;
-           BSD/OS*) ;;
-           CYGWIN_*|MINGW32_*) ;;
-           IRIX*) ;;
-           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
-           Darwin-*) ;;
-           SCO_SV-3.2*) ;;
-           windows) ;;
-           *) SHLIB_CFLAGS="-fPIC" ;;
-       esac])
-
-    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
-       AC_DEFINE(MODULE_SCOPE, [extern],
-           [No Compiler support for module scope symbols])
-    ])
-
-    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
-    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
-    # TEA specific: use PACKAGE_VERSION instead of VERSION
-    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
-
-    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
-       AC_CACHE_CHECK(for SEH support in compiler,
-           tcl_cv_seh,
-       AC_TRY_RUN([
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-           int main(int argc, char** argv) {
-               int a, b = 0;
-               __try {
-                   a = 666 / b;
-               }
-               __except (EXCEPTION_EXECUTE_HANDLER) {
-                   return 0;
-               }
-               return 1;
-           }
-       ],
-           tcl_cv_seh=yes,
-           tcl_cv_seh=no,
-           tcl_cv_seh=no)
-       )
-       if test "$tcl_cv_seh" = "no" ; then
-           AC_DEFINE(HAVE_NO_SEH, 1,
-                   [Defined when mingw does not support SEH])
-       fi
-
-       #
-       # Check to see if the excpt.h include file provided contains the
-       # definition for EXCEPTION_DISPOSITION; if not, which is the case
-       # with Cygwin's version as of 2002-04-10, define it to be int,
-       # sufficient for getting the current code to work.
-       #
-       AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
-           tcl_cv_eh_disposition,
-           AC_TRY_COMPILE([
-#          define WIN32_LEAN_AND_MEAN
-#          include <windows.h>
-#          undef WIN32_LEAN_AND_MEAN
-           ],[
-               EXCEPTION_DISPOSITION x;
-           ],
-               tcl_cv_eh_disposition=yes,
-               tcl_cv_eh_disposition=no)
-       )
-       if test "$tcl_cv_eh_disposition" = "no" ; then
-       AC_DEFINE(EXCEPTION_DISPOSITION, int,
-               [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
-       fi
-
-       # Check to see if winnt.h defines CHAR, SHORT, and LONG
-       # even if VOID has already been #defined. The win32api
-       # used by mingw and cygwin is known to do this.
-
-       AC_CACHE_CHECK(for winnt.h that ignores VOID define,
-           tcl_cv_winnt_ignore_void,
-           AC_TRY_COMPILE([
-#define VOID void
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-           ], [
-               CHAR c;
-               SHORT s;
-               LONG l;
-           ],
-        tcl_cv_winnt_ignore_void=yes,
-        tcl_cv_winnt_ignore_void=no)
-       )
-       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
-           AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
-                   [Defined when cygwin/mingw ignores VOID define in winnt.h])
-       fi
-    fi
-
-       # See if the compiler supports casting to a union type.
-       # This is used to stop gcc from printing a compiler
-       # warning when initializing a union member.
-
-       AC_CACHE_CHECK(for cast to union support,
-           tcl_cv_cast_to_union,
-           AC_TRY_COMPILE([],
-           [
-                 union foo { int i; double d; };
-                 union foo f = (union foo) (int) 0;
-           ],
-           tcl_cv_cast_to_union=yes,
-           tcl_cv_cast_to_union=no)
-       )
-       if test "$tcl_cv_cast_to_union" = "yes"; then
-           AC_DEFINE(HAVE_CAST_TO_UNION, 1,
-                   [Defined when compiler supports casting to union type.])
-       fi
-
-    AC_SUBST(CFLAGS_DEBUG)
-    AC_SUBST(CFLAGS_OPTIMIZE)
-    AC_SUBST(CFLAGS_WARNING)
-
-    AC_SUBST(STLIB_LD)
-    AC_SUBST(SHLIB_LD)
-
-    AC_SUBST(SHLIB_LD_LIBS)
-    AC_SUBST(SHLIB_CFLAGS)
-
-    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_CACHE_CHECK([termios vs. termio vs. sgtty], 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=no, tcl_cv_api_serial=no)
-    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, 1, [Use the termios API for serial lines]);;
-       termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
-       sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_MISSING_POSIX_HEADERS
-#
-#      Supply substitutes for missing POSIX header files.  Special
-#      notes:
-#          - stdlib.h doesn't define strtol, strtoul, or
-#            strtod in some 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_CACHE_CHECK([dirent.h], tcl_cv_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_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
-
-    if test $tcl_cv_dirent_h = no; then
-       AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
-    fi
-
-    # TEA specific:
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
-    AC_CHECK_HEADER(limits.h,
-       [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
-       [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <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, 1, [Do we have <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, 1, [Do we have <string.h>?])
-    fi
-
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <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
-#              PKG_LIBS (appends to)
-#--------------------------------------------------------------------
-
-AC_DEFUN([TEA_PATH_X], [
-    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
-       TEA_PATH_UNIX_X
-    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/Xlib.h>], , not_really_there="yes")
-       else
-           if test ! -r $x_includes/X11/Xlib.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])
-       found_xincludes="no"
-       AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
-       if test "$found_xincludes" = "no"; 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/Xlib.h; then
-                   AC_MSG_RESULT([$i])
-                   XINCLUDES=" -I$i"
-                   found_xincludes="yes"
-                   break
-               fi
-           done
-       fi
-    else
-       if test "$x_includes" != ""; then
-           XINCLUDES="-I$x_includes"
-           found_xincludes="yes"
-       fi
-    fi
-    if test "$found_xincludes" = "no"; then
-       AC_MSG_RESULT([couldn't find any!])
-    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 -o -r $i/libX11.dylib; 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
-    # TEA specific:
-    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)
-    TEA_CONFIG_SYSTEM
-    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
-    case $system in
-       OSF*)
-           AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
-           AC_MSG_RESULT([FIONBIO])
-           ;;
-       *)
-           AC_MSG_RESULT([O_NONBLOCK])
-           ;;
-    esac
-])
-
-#--------------------------------------------------------------------
-# TEA_TIME_HANDLER
-#
-#      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_CACHE_CHECK([tm_tzadj in struct tm], 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)])
-    if test $tcl_cv_member_tm_tzadj = yes ; then
-       AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
-    fi
-
-    AC_CACHE_CHECK([tm_gmtoff in struct tm], 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)])
-    if test $tcl_cv_member_tm_gmtoff = yes ; then
-       AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
-    fi
-
-    #
-    # Its important to include time.h in this check, as some systems
-    # (like convex) have timezone functions, etc.
-    #
-    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
-       AC_TRY_COMPILE([#include <time.h>],
-           [extern long timezone;
-           timezone += 1;
-           exit (0);],
-           tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
-    if test $tcl_cv_timezone_long = yes ; then
-       AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
-    else
-       #
-       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
-       #
-       AC_CACHE_CHECK([time_t timezone variable], 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)])
-       if test $tcl_cv_timezone_time = yes ; then
-           AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
-       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_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
-           AC_TRY_RUN([
-               extern double strtod();
-               int main() {
-                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
-                   char *term;
-                   double value;
-                   value = strtod(infString, &term);
-                   if ((term != infString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(nanString, &term);
-                   if ((term != nanString) && (term[-1] == 0)) {
-                       exit(1);
-                   }
-                   value = strtod(spaceString, &term);
-                   if (term == (spaceString+1)) {
-                       exit(1);
-                   }
-                   exit(0);
-               }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
-                   tcl_cv_strtod_buggy=buggy)])
-       if test "$tcl_cv_strtod_buggy" = buggy; then
-           AC_LIBOBJ([fixstrtod])
-           USE_COMPAT=1
-           AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
-       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 (not in TEA, only needed in core)
-#              LIBS
-#              MATH_LIBS
-#
-# Results:
-#
-#      Substitutes the following vars:
-#              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, 1, [Do we 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"])])
-
-    # TEA specific: 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
-#              _LARGEFILE_SOURCE64
-#--------------------------------------------------------------------
-
-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, 1, [Add the ]$1[ flag when building])
-       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);])
-    TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
-       [char *p = (char *)open64;])
-    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, 1, [Are wide integers to be implemented with C 'long's?])
-       AC_MSG_RESULT([using long])
-    elif test "${tcl_cv_type_64bit}" = "__int64" \
-               -a "${TEA_PLATFORM}" = "windows" ; then
-       # TEA specific: 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},
-           [What type should be used to define wide integers?])
-       AC_MSG_RESULT([${tcl_cv_type_64bit}])
-
-       # Now check for auxiliary declarations
-       AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
-           AC_TRY_COMPILE([#include <sys/types.h>
-#include <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, 1, [Is 'struct dirent64' in <sys/types.h>?])
-       fi
-
-       AC_CACHE_CHECK([for struct stat64], 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, 1, [Is 'struct stat64' in <sys/stat.h>?])
-       fi
-
-       AC_CHECK_FUNCS(open64 lseek64)
-       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)])
-       dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
-       dnl functions lseek64 and open64 are defined.
-       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
-               test "x${ac_cv_func_lseek64}" = "xyes" && \
-               test "x${ac_cv_func_open64}" = "xyes" ; then
-           AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
-           AC_MSG_RESULT([yes])
-       else
-           AC_MSG_RESULT([no])
-       fi
-    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_VERSION
-#              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.9"
-
-    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
-
-    # If the user did not set CFLAGS, set it now to keep macros
-    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
-    if test "${CFLAGS+set}" != "set" ; then
-       CFLAGS=""
-    fi
-
-    case "`uname -s`" in
-       *win32*|*WIN32*|*MINGW32_*)
-           AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
-           EXEEXT=".exe"
-           TEA_PLATFORM="windows"
-           ;;
-       *CYGWIN_*)
-           CYGPATH=echo
-           EXEEXT=".exe"
-           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
-           ;;
-       *)
-           CYGPATH=echo
-           # Maybe we are cross-compiling....
-           case ${host_alias} in
-               *mingw32*)
-               EXEEXT=".exe"
-               TEA_PLATFORM="windows"
-               ;;
-           *)
-               EXEEXT=""
-               TEA_PLATFORM="unix"
-               ;;
-           esac
-           ;;
-    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_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}])
-
-    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
-               # To add more dirs here (like 'src'), you have to update VPATH
-               # in Makefile.in as well
-               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
-                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
-                   -a ! -f "${srcdir}/macosx/$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" \
-           -a ! -f "${srcdir}/macosx/$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_ADD_CLEANFILES --
-#
-#      Specify one or more CLEANFILES.
-#
-# Arguments:
-#      one or more file names to clean target
-#
-# Results:
-#
-#      Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG
-#------------------------------------------------------------------------
-AC_DEFUN([TEA_ADD_CLEANFILES], [
-    CLEANFILES="$CLEANFILES $@"
-])
-
-#------------------------------------------------------------------------
-# 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.
-
-    AC_PROG_CC
-    AC_PROG_CPP
-
-    INSTALL="\$(SHELL) \$(srcdir)/tclconfig/install-sh -c"
-    AC_SUBST(INSTALL)
-    INSTALL_DATA="\${INSTALL} -m 644"
-    AC_SUBST(INSTALL_DATA)
-    INSTALL_PROGRAM="\${INSTALL}"
-    AC_SUBST(INSTALL_PROGRAM)
-    INSTALL_SCRIPT="\${INSTALL}"
-    AC_SUBST(INSTALL_SCRIPT)
-
-    #--------------------------------------------------------------------
-    # Checks to see if the make program sets the $MAKE variable.
-    #--------------------------------------------------------------------
-
-    AC_PROG_MAKE_SET
-
-    #--------------------------------------------------------------------
-    # Find ranlib
-    #--------------------------------------------------------------------
-
-    AC_CHECK_TOOL(RANLIB, 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_CACHE_CHECK([if the compiler understands -pipe],
-           tcl_cv_cc_pipe, [
-           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
-           AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
-           CFLAGS=$hold_cflags])
-       if test $tcl_cv_cc_pipe = yes; then
-           CFLAGS="$CFLAGS -pipe"
-       fi
-    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
-#      VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
-#      VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
-#------------------------------------------------------------------------
-
-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)"
-       AC_EGREP_CPP([manifest needed], [
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-print("manifest needed")
-#endif
-       ], [
-       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
-       VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
-       VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
-       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
-       TEA_ADD_CLEANFILES([*.manifest])
-       ])
-       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
-           if test x"${TK_BIN_DIR}" != x ; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
-           fi
-           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
-           if test "$GCC" = "yes"; then
-               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
-           fi
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-       else
-           eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-           if test "$GCC" = "yes"; then
-               PKG_LIB_FILE=lib${PKG_LIB_FILE}
-           fi
-       fi
-       # Some packages build their own stubs libraries
-       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
-       if test "$GCC" = "yes"; then
-           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
-       fi
-       # 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 their 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)
-    AC_SUBST(VC_MANIFEST_EMBED_DLL)
-    AC_SUBST(VC_MANIFEST_EMBED_EXE)
-])
-
-#------------------------------------------------------------------------
-# 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/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
-           `ls -dr /usr/lib64/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:
-#
-#      Substitutes the following vars:
-#              TCL_TOP_DIR_NATIVE
-#              TCL_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
-    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
-    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
-    AC_MSG_CHECKING([for Tcl private include files])
-
-    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
-    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
-
-    # Check to see if tcl<Plat>Port.h isn't already with the public headers
-    # Don't look for tclInt.h because that resides with tcl.h in the core
-    # sources, but the <plat>Port headers are in a different directory
-    if test "${TEA_PLATFORM}" = "windows" -a \
-       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
-       result="private headers found with public headers"
-    elif test "${TEA_PLATFORM}" = "unix" -a \
-       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
-       result="private headers found with public headers"
-    else
-       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
-       if test "${TEA_PLATFORM}" = "windows"; then
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
-       else
-           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
-       fi
-       # Overwrite the previous TCL_INCLUDES as this should capture both
-       # public and private headers in the same set.
-       # We want to ensure these are substituted so as not to require
-       # any *_NATIVE vars be defined in the Makefile
-       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
-       if test "`uname -s`" = "Darwin"; then
-            # If Tcl was built as a framework, attempt to use
-            # the framework's Headers and PrivateHeaders directories
-            case ${TCL_DEFS} in
-               *TCL_FRAMEWORK*)
-                   if test -d "${TCL_BIN_DIR}/Headers" -a \
-                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
-                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
-                   else
-                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
-                   fi
-                   ;;
-           esac
-           result="Using ${TCL_INCLUDES}"
-       else
-           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
-               AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
-           fi
-           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
-       fi
-    fi
-
-    AC_SUBST(TCL_TOP_DIR_NATIVE)
-
-    AC_SUBST(TCL_INCLUDES)
-    AC_MSG_RESULT([${result}])
-])
-
-#------------------------------------------------------------------------
-# 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.
-#
-#      Substitutes 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
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tcl was built as a framework, attempt to use
-               # the framework's Headers directory
-               case ${TCL_DEFS} in
-                   *TCL_FRAMEWORK*)
-                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tcl is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TCL_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$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`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TCL_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           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:
-#
-#      Substitutes the following vars:
-#              TK_INCLUDES
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
-    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
-    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
-    AC_MSG_CHECKING([for Tk private include files])
-
-    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
-    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
-
-    # Check to see if tk<Plat>Port.h isn't already with the public headers
-    # Don't look for tkInt.h because that resides with tk.h in the core
-    # sources, but the <plat>Port headers are in a different directory
-    if test "${TEA_PLATFORM}" = "windows" -a \
-       -f "${ac_cv_c_tkh}/tkWinPort.h"; then
-       result="private headers found with public headers"
-    elif test "${TEA_PLATFORM}" = "unix" -a \
-       -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
-       result="private headers found with public headers"
-    else
-       TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
-       TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
-       if test "${TEA_PLATFORM}" = "windows"; then
-           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
-       else
-           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
-       fi
-       # Overwrite the previous TK_INCLUDES as this should capture both
-       # public and private headers in the same set.
-       # We want to ensure these are substituted so as not to require
-       # any *_NATIVE vars be defined in the Makefile
-       TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
-       # Detect and add ttk subdir
-       if test -d "${TK_SRC_DIR}/generic/ttk"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
-       fi
-       if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
-       fi
-       if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
-          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
-       fi
-       if test "`uname -s`" = "Darwin"; then
-           # If Tk was built as a framework, attempt to use
-           # the framework's Headers and PrivateHeaders directories
-           case ${TK_DEFS} in
-               *TK_FRAMEWORK*)
-                       if test -d "${TK_BIN_DIR}/Headers" -a \
-                               -d "${TK_BIN_DIR}/PrivateHeaders"; then
-                           TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
-                       else
-                           TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
-                       fi
-                       ;;
-           esac
-           result="Using ${TK_INCLUDES}"
-       else
-           if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
-              AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
-           fi
-           result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
-       fi
-    fi
-
-    AC_SUBST(TK_TOP_DIR_NATIVE)
-    AC_SUBST(TK_XLIB_DIR_NATIVE)
-
-    AC_SUBST(TK_INCLUDES)
-    AC_MSG_RESULT([${result}])
-])
-
-#------------------------------------------------------------------------
-# 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.
-#
-#      Substitutes 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
-           list=""
-           if test "`uname -s`" = "Darwin"; then
-               # If Tk was built as a framework, attempt to use
-               # the framework's Headers directory.
-               case ${TK_DEFS} in
-                   *TK_FRAMEWORK*)
-                       list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
-                       ;;
-               esac
-           fi
-
-           # Look in the source dir only if Tk is not installed,
-           # and in that situation, look there before installed locations.
-           if test -f "${TK_BIN_DIR}/Makefile" ; then
-               list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
-           fi
-
-           # Check order: pkg --prefix location, Tk's --prefix location,
-           # relative to directory of tkConfig.sh, Tcl's --prefix location,
-           # relative to directory of tclConfig.sh.
-
-           eval "temp_includedir=${includedir}"
-           list="$list \
-               `ls -d ${temp_includedir}        2>/dev/null` \
-               `ls -d ${TK_PREFIX}/include      2>/dev/null` \
-               `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
-               `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
-               `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
-           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
-               list="$list /usr/local/include /usr/include"
-               if test x"${TK_INCLUDE_SPEC}" != x ; then
-                   d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
-                   list="$list `ls -d ${d} 2>/dev/null`"
-               fi
-           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_WINDOWINGSYSTEM}" != "x11"; then
-       # On Windows and Aqua, 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_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 ${libdir} 2>/dev/null` \
-                       `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` \
-                       `ls -d /usr/lib64 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:
-#
-#      Substitutes 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}
-        $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
-        $1_LIBRARY_PATH=${$1_LIBRARY_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)
-
-    # Allow the caller to prevent this auto-check by specifying any 2nd arg
-    AS_IF([test "x$2" = x], [
-       # Check both upper and lower-case variants
-       # If a dev wanted non-stubs libs, this function could take an option
-       # to not use _STUB in the paths below
-       AS_IF([test "x${$1_STUB_LIB_SPEC}" = x],
-           [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
-           [TEA_LOAD_CONFIG_LIB($1_STUB)])
-    ])
-])
-
-#------------------------------------------------------------------------
-# TEA_LOAD_CONFIG_LIB --
-#
-#      Helper function to load correct library from another extension's
-#      ${PACKAGE}Config.sh.
-#
-# Results:
-#      Adds to LIBS the appropriate extension library
-#------------------------------------------------------------------------
-AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
-    AC_MSG_CHECKING([For $1 library for LIBS])
-    # This simplifies the use of stub libraries by automatically adding
-    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
-    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
-    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
-    if test "x${$1_LIB_SPEC}" != "x" ; then
-       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
-           TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"])
-           AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}])
-       else
-           TEA_ADD_LIBS([${$1_LIB_SPEC}])
-           AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}])
-       fi
-    else
-       AC_MSG_RESULT([file not found])
-    fi
-])
-
-#------------------------------------------------------------------------
-# TEA_EXPORT_CONFIG --
-#
-#      Define the data to insert into the ${PACKAGE}Config.sh file
-#
-# Arguments:
-#
-#      Requires the following vars to be set:
-#              $1
-#
-# Results:
-#      Substitutes the following vars:
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_EXPORT_CONFIG], [
-    #--------------------------------------------------------------------
-    # These are for $1Config.sh
-    #--------------------------------------------------------------------
-
-    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
-    eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
-    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-       eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
-       eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
-    else
-       eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-       eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
-    fi
-    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
-    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
-    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
-    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
-    $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
-
-    AC_SUBST($1_BUILD_LIB_SPEC)
-    AC_SUBST($1_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
-    AC_SUBST($1_STUB_LIB_SPEC)
-    AC_SUBST($1_BUILD_STUB_LIB_PATH)
-    AC_SUBST($1_STUB_LIB_PATH)
-
-    AC_SUBST(MAJOR_VERSION)
-    AC_SUBST(MINOR_VERSION)
-    AC_SUBST(PATCHLEVEL)
-])
-
-
-#------------------------------------------------------------------------
-# 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}
-           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
-           AC_MSG_RESULT([found $CELIB_DIR])
-       fi
-    fi
-])
-# Local Variables:
-# mode: autoconf
-# End:
similarity index 97%
rename from pkgs/thread2.7.1/Makefile.in
rename to pkgs/thread2.7.2/Makefile.in
index c088be9..9fe11f9 100644 (file)
@@ -86,12 +86,12 @@ pkgincludedir       = $(includedir)/$(PKG_DIR)
 top_builddir   = .
 
 INSTALL_OPTIONS        =
-INSTALL                = $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS}
-INSTALL_DATA_DIR = ${INSTALL} -d -m 755
-INSTALL_PROGRAM        = ${INSTALL} -m 755
-INSTALL_DATA   = ${INSTALL} -m 644
-INSTALL_SCRIPT = ${INSTALL_PROGRAM}
-INSTALL_LIBRARY        = ${INSTALL_DATA}
+INSTALL                = @INSTALL@ ${INSTALL_OPTIONS}
+INSTALL_DATA_DIR = @INSTALL_DATA_DIR@
+INSTALL_DATA   = @INSTALL_DATA@
+INSTALL_PROGRAM        = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_LIBRARY        = @INSTALL_LIBRARY@
 
 PACKAGE_NAME   = @PACKAGE_NAME@
 PACKAGE_VERSION        = @PACKAGE_VERSION@
@@ -313,11 +313,10 @@ dist-clean:
 dist: dist-clean
        $(INSTALL_DATA_DIR) $(DIST_DIR)
        cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license.terms \
-               $(srcdir)/aclocal.m4 $(srcdir)/naviserver.m4 $(srcdir)/configure \
-        $(srcdir)/*.in \
-               $(DIST_DIR)/
+       $(srcdir)/aclocal.m4 $(srcdir)/naviserver.m4 $(srcdir)/configure \
+        $(srcdir)/*.in $(srcdir)/configure.ac $(DIST_DIR)/
        chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
-       chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
+       chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.ac
 
        $(INSTALL_DATA_DIR) $(DIST_DIR)/tclconfig
        cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
similarity index 99%
rename from pkgs/thread2.7.1/configure
rename to pkgs/thread2.7.2/configure
index 613d3c4..6d186fe 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for thread 2.7.1.
+# Generated by GNU Autoconf 2.59 for thread 2.7.2.
 #
 # Copyright (C) 2003 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
@@ -267,8 +267,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='thread'
 PACKAGE_TARNAME='thread'
-PACKAGE_VERSION='2.7.1'
-PACKAGE_STRING='thread 2.7.1'
+PACKAGE_VERSION='2.7.2'
+PACKAGE_STRING='thread 2.7.2'
 PACKAGE_BUGREPORT=''
 
 # Factoring default headers for most tests.
@@ -308,7 +308,7 @@ ac_includes_default="\
 # 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 TCL_VERSION TCL_PATCH_LEVEL 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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CLEANFILES TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CPP INSTALL INSTALL_DATA INSTALL_PROGRAM INSTALL_SCRIPT SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS TCL_INCLUDES TCL_THREADS SHARED_BUILD AR ac_ct_AR CELIB_DIR RC ac_ct_RC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_DBGX MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB VC_MANIFEST_EMBED_DLL VC_MANIFEST_EMBED_EXE TCLSH_PROG LIBOBJS LTLIBOBJS'
+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 TCL_VERSION TCL_PATCH_LEVEL 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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CLEANFILES TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CPP INSTALL INSTALL_DATA_DIR INSTALL_DATA INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_LIBRARY SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS TCL_INCLUDES TCL_THREADS SHARED_BUILD AR ac_ct_AR CELIB_DIR RC ac_ct_RC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_DBGX MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB VC_MANIFEST_EMBED_DLL VC_MANIFEST_EMBED_EXE TCLSH_PROG LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -777,7 +777,7 @@ 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 thread 2.7.1 to adapt to many kinds of systems.
+\`configure' configures thread 2.7.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -834,7 +834,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of thread 2.7.1:";;
+     short | recursive ) echo "Configuration of thread 2.7.2:";;
    esac
   cat <<\_ACEOF
 
@@ -966,7 +966,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-thread configure 2.7.1
+thread configure 2.7.2
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -980,7 +980,7 @@ 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 thread $as_me 2.7.1, which was
+It was created by thread $as_me 2.7.2, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -3739,13 +3739,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-    INSTALL="\$(SHELL) \$(srcdir)/tclconfig/install-sh -c"
+    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
+    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
+    INSTALL_DATA='${INSTALL} -m 644'
+    INSTALL_PROGRAM='${INSTALL}'
+    INSTALL_SCRIPT='${INSTALL}'
+    INSTALL_LIBRARY='${INSTALL_DATA}'
+
+
+
 
-    INSTALL_DATA="\${INSTALL} -m 644"
 
-    INSTALL_PROGRAM="\${INSTALL}"
 
-    INSTALL_SCRIPT="\${INSTALL}"
 
 
     #--------------------------------------------------------------------
@@ -8868,6 +8873,7 @@ fi
        CYGWIN_*)
            SHLIB_CFLAGS=""
            SHLIB_LD='${CC} -shared'
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
            SHLIB_SUFFIX=".dll"
            EXEEXT=".exe"
            do64bit_ok=yes
@@ -9290,7 +9296,14 @@ fi
                LDFLAGS=""
                ;;
            *)
-               SHLIB_CFLAGS="-fPIC"
+               case "$arch" in
+               alpha|sparc64)
+                   SHLIB_CFLAGS="-fPIC"
+                   ;;
+               *)
+                   SHLIB_CFLAGS="-fpic"
+                   ;;
+               esac
                SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
                SHLIB_SUFFIX=".so"
                if test $doRpath = yes; then
@@ -9350,8 +9363,7 @@ fi
            # This configuration from FreeBSD Ports.
            SHLIB_CFLAGS="-fPIC"
            SHLIB_LD="${CC} -shared"
-           TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$@"
-           TK_SHLIB_LD_EXTRAS="-Wl,-soname,\$@"
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
            SHLIB_SUFFIX=".so"
            LDFLAGS=""
            if test $doRpath = yes; then
@@ -11956,7 +11968,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by thread $as_me 2.7.1, which was
+This file was extended by thread $as_me 2.7.2, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -12011,7 +12023,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-thread config.status 2.7.1
+thread config.status 2.7.2
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -12233,9 +12245,11 @@ s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
 s,@CPP@,$CPP,;t t
 s,@INSTALL@,$INSTALL,;t t
+s,@INSTALL_DATA_DIR@,$INSTALL_DATA_DIR,;t t
 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_LIBRARY@,$INSTALL_LIBRARY,;t t
 s,@SET_MAKE@,$SET_MAKE,;t t
 s,@RANLIB@,$RANLIB,;t t
 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
similarity index 99%
rename from pkgs/thread2.7.1/configure.in
rename to pkgs/thread2.7.2/configure.ac
index 975491c..fc22b73 100755 (executable)
@@ -17,7 +17,7 @@ dnl   to configure the system for the local environment.
 # so you can encode the package version directly into the source files.
 #-----------------------------------------------------------------------
 
-AC_INIT([thread], [2.7.1])
+AC_INIT([thread], [2.7.2])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
similarity index 81%
rename from pkgs/thread2.7.1/generic/tclThreadInt.h
rename to pkgs/thread2.7.2/generic/tclThreadInt.h
index 1aa106f..2416e8f 100644 (file)
 #include <string.h> /* For memset and friends */
 
 /*
+ * Used to tag functions that are only to be visible within the module being
+ * built and not outside it (where this is supported by the linker).
+ */
+
+#ifndef MODULE_SCOPE
+#   ifdef __cplusplus
+#      define MODULE_SCOPE extern "C"
+#   else
+#      define MODULE_SCOPE extern
+#   endif
+#endif
+
+/*
  * For linking against NaviServer/AOLserver require V4 at least
  */
 
@@ -136,4 +149,18 @@ typedef struct {
 #endif
 
 
+/* 8.5, 8.4, or less - Emulate access to the error-line information
+ * This is TIP 336, unrelated to 285 (async cancellation).  When doing
+ * a static link of the thread package (use case: basekits, tclkits,
+ * ...)  and the core Tcl is < 8.6 we cannot use TCL_TIP285 to get
+ * things done, because USE_TCL_STUBS is not set for static builds,
+ * causing the check in threadCmd.c to bomb.
+ */
+
+#ifndef TCL_TIP285
+# if (TCL_MAJOR_VERSION < 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6))
+#   define Tcl_GetErrorLine(interp) (((tclInterpType *)(interp))->errorLine)
+# endif
+#endif
+
 #endif /* _TCL_THREAD_INT_H_ */
similarity index 98%
rename from pkgs/thread2.7.1/generic/tclXkeylist.h
rename to pkgs/thread2.7.2/generic/tclXkeylist.h
index 33ae2f6..8abfac9 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef _KEYLIST_H_
 #define _KEYLIST_H_
 
+#include "tclThreadInt.h"
+
 /*
  * Keyed list object interface commands
  */
similarity index 99%
rename from pkgs/thread2.7.1/generic/threadCmd.c
rename to pkgs/thread2.7.2/generic/threadCmd.c
index 5a20d85..8019c66 100644 (file)
 
 #include "tclThreadInt.h"
 
+#ifndef PACKAGE_VERSION
+#define PACKAGE_VERSION "2.7.1"
+#endif
+
 /*
  * Check if this is Tcl 8.5 or higher.  In that case, we will have the TIP
  * #143 APIs (i.e. interpreter resource limiting) available.
similarity index 99%
rename from pkgs/thread2.7.1/generic/threadSpCmd.h
rename to pkgs/thread2.7.2/generic/threadSpCmd.h
index c82d5aa..e2c7c07 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _SP_H_
 #define _SP_H_
 
-#include <tcl.h>
+#include "tclThreadInt.h"
 
 /*
  * The following structure defines a locking bucket. A locking
similarity index 99%
rename from pkgs/thread2.7.1/generic/threadSvCmd.c
rename to pkgs/thread2.7.2/generic/threadSvCmd.c
index 1250af1..b8d90c0 100644 (file)
@@ -1478,7 +1478,7 @@ SvUnsetObjCmd(
 
 static int
 SvNamesObjCmd(
-              ClientData arg,                     /* Pointer to object container. */
+              ClientData arg,                     /* != NULL if aolSpecial */
               Tcl_Interp *interp,                 /* Current interpreter. */
               int objc,                           /* Number of arguments. */
               Tcl_Obj *const objv[])              /* Argument objects. */
@@ -1488,7 +1488,6 @@ SvNamesObjCmd(
     Tcl_HashEntry *hPtr;
     Tcl_HashSearch search;
     Tcl_Obj *resObj;
-    Container *svObj = (Container*)arg;
 
     if (objc > 2) {
         Tcl_WrongNumArgs(interp, 1, objv, "?pattern?");
@@ -1506,7 +1505,7 @@ SvNamesObjCmd(
         hPtr = Tcl_FirstHashEntry(&bucketPtr->arrays, &search);
         while (hPtr) {
             char *key = Tcl_GetHashKey(&bucketPtr->arrays, hPtr);
-            if ((!svObj->aolSpecial || (*key != '.')) /* Hide .<name> arrays for AOL*/ &&
+            if ((arg==NULL || (*key != '.')) /* Hide .<name> arrays for AOL*/ &&
                 (pattern == NULL || Tcl_StringMatch(key, pattern))) {
                 Tcl_ListObjAppendElement(interp, resObj,
                         Tcl_NewStringObj(key, -1));
@@ -9,6 +9,8 @@
 #ifndef _KEYLISTCMDS_H_
 #define _KEYLISTCMDS_H_
 
+#include "tclThreadInt.h"
+
 MODULE_SCOPE void Sv_RegisterKeylistCommands(void);
 MODULE_SCOPE void TclX_KeyedListInit(Tcl_Interp *interp);
 
similarity index 99%
rename from pkgs/thread2.7.1/lib/ttrace.tcl
rename to pkgs/thread2.7.2/lib/ttrace.tcl
index 88b431b..f25f5ff 100644 (file)
@@ -73,7 +73,7 @@ namespace eval ttrace {
     }
 
     # Keep in sync with the Thread package
-    package provide Ttrace 2.7.1
+    package provide Ttrace 2.7.2
 
     # Package variables
     variable resolvers ""     ; # List of registered resolvers
diff --git a/pkgs/thread2.7.2/tclconfig/tcl.m4 b/pkgs/thread2.7.2/tclconfig/tcl.m4
new file mode 100644 (file)
index 0000000..b0ae59f
--- /dev/null
@@ -0,0 +1,4180 @@
+# 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.
+
+AC_PREREQ(2.57)
+
+dnl TEA extensions pass us the version of TEA they think they
+dnl are compatible with (must be set in TEA_INIT below)
+dnl TEA_VERSION="3.9"
+
+# Possible values for key variables defined:
+#
+# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
+# TEA_PLATFORM        - windows unix
+#
+
+#------------------------------------------------------------------------
+# 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 TEA specific: 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,
+           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 common install locations
+           if test x"${ac_cv_c_tclconfig}" = x ; then
+               for i in `ls -d ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.6 2>/dev/null` \
+                       `ls -d /usr/lib/tcl8.5 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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
+       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,
+           AC_HELP_STRING([--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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   if test -f "$i/unix/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # on Darwin, check in Framework installation locations
+           if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
+               for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+                       `ls -d /Library/Frameworks 2>/dev/null` \
+                       `ls -d /Network/Library/Frameworks 2>/dev/null` \
+                       `ls -d /System/Library/Frameworks 2>/dev/null` \
+                       ; do
+                   if test -f "$i/Tk.framework/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/Tk.framework; 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 ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 2>/dev/null` \
+                       ; do
+                   if test -f "$i/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i; pwd)`"
+                       break
+                   fi
+               done
+           fi
+
+           # TEA specific: on Windows, check in common installation locations
+           if test "${TEA_PLATFORM}" = "windows" \
+               -a x"${ac_cv_c_tkconfig}" = x ; then
+               for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+                       `ls -d C:/Progra~1/Tcl/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 "${TEA_PLATFORM}" = "windows" \
+                           -a -f "$i/win/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
+                       break
+                   fi
+                   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_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
+       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:
+#
+#      Substitutes 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([could not find ${TCL_BIN_DIR}/tclConfig.sh])
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tcl was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tcl.framework installed in an arbitrary location.
+       case ${TCL_DEFS} in
+           *TCL_FRAMEWORK*)
+               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
+                   for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
+                            "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+                           TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
+                   TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
+                   TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TCL_DBGX substitution
+    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+    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_PATCH_LEVEL)
+    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_MSG_CHECKING([platform])
+    hold_cc=$CC; CC="$TCL_CC"
+    AC_TRY_COMPILE(,[
+           #ifdef _WIN32
+               #error win32
+           #endif
+    ], TEA_PLATFORM="unix",
+           TEA_PLATFORM="windows"
+    )
+    CC=$hold_cc
+    AC_MSG_RESULT($TEA_PLATFORM)
+
+    # The BUILD_$pkg is to define the correct extern storage class
+    # handling when making this package
+    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
+           [Building extension source?])
+    # Do this here as we have fully defined TEA_PLATFORM now
+    if test "${TEA_PLATFORM}" = "windows" ; then
+       EXEEXT=".exe"
+       CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
+    fi
+
+    # TEA specific:
+    AC_SUBST(CLEANFILES)
+    AC_SUBST(TCL_LIBS)
+    AC_SUBST(TCL_DEFS)
+    AC_SUBST(TCL_EXTRA_CFLAGS)
+    AC_SUBST(TCL_LD_FLAGS)
+    AC_SUBST(TCL_SHLIB_LD_LIBS)
+])
+
+#------------------------------------------------------------------------
+# 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
+
+    # eval is required to do the TK_DBGX substitution
+    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+
+    # 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}"
+    elif test "`uname -s`" = "Darwin"; then
+       # If Tk was built as a framework, attempt to use the libraries
+       # from the framework at the given location so that linking works
+       # against Tk.framework installed in an arbitrary location.
+       case ${TK_DEFS} in
+           *TK_FRAMEWORK*)
+               if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
+                   for i in "`cd "${TK_BIN_DIR}"; pwd`" \
+                            "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
+                       if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
+                           TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
+                           break
+                       fi
+                   done
+               fi
+               if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
+                   TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
+                   TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
+               fi
+               ;;
+       esac
+    fi
+
+    # eval is required to do the TK_DBGX substitution
+    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+    # TEA specific: Ensure windowingsystem is defined
+    if test "${TEA_PLATFORM}" = "unix" ; then
+       case ${TK_DEFS} in
+           *MAC_OSX_TK*)
+               AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
+               TEA_WINDOWINGSYSTEM="aqua"
+               ;;
+           *)
+               TEA_WINDOWINGSYSTEM="x11"
+               ;;
+       esac
+    elif test "${TEA_PLATFORM}" = "windows" ; then
+       TEA_WINDOWINGSYSTEM="win32"
+    fi
+
+    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)
+
+    # TEA specific:
+    AC_SUBST(TK_LIBS)
+    AC_SUBST(TK_XINCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_TCLSH
+#      Determine the fully qualified path name of the tclsh executable
+#      in the Tcl build directory or the tclsh installed in a bin
+#      directory. This macro will correctly determine the name
+#      of the tclsh executable even if tclsh has not yet been
+#      built in the build directory. The tclsh found is always
+#      associated with a tclConfig.sh file. This tclsh should be used
+#      only for running extension test cases. It should never be
+#      or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Substitutes the following vars:
+#              TCLSH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_TCLSH], [
+    AC_MSG_CHECKING([for tclsh])
+    if test -f "${TCL_BIN_DIR}/Makefile" ; then
+        # tclConfig.sh is in Tcl build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+        fi
+    else
+        # tclConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+        else
+            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+        fi
+        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${TCLSH_PROG}" ; then
+                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
+    fi
+    AC_MSG_RESULT([${TCLSH_PROG}])
+    AC_SUBST(TCLSH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_WISH
+#      Determine the fully qualified path name of the wish executable
+#      in the Tk build directory or the wish installed in a bin
+#      directory. This macro will correctly determine the name
+#      of the wish executable even if wish has not yet been
+#      built in the build directory. The wish found is always
+#      associated with a tkConfig.sh file. This wish should be used
+#      only for running extension test cases. It should never be
+#      or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Substitutes the following vars:
+#              WISH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_WISH], [
+    AC_MSG_CHECKING([for wish])
+    if test -f "${TK_BIN_DIR}/Makefile" ; then
+        # tkConfig.sh is in Tk build directory
+        if test "${TEA_PLATFORM}" = "windows"; then
+            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+        else
+            WISH_PROG="${TK_BIN_DIR}/wish"
+        fi
+    else
+        # tkConfig.sh is in install location
+        if test "${TEA_PLATFORM}" = "windows"; then
+            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+        else
+            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
+        fi
+        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
+              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
+              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
+        for i in $list ; do
+            if test -f "$i/${WISH_PROG}" ; then
+                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
+                break
+            fi
+        done
+        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
+    fi
+    AC_MSG_RESULT([${WISH_PROG}])
+    AC_SUBST(WISH_PROG)
+])
+
+#------------------------------------------------------------------------
+# 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,
+       AC_HELP_STRING([--enable-shared],
+           [build and link with shared libraries (default: on)]),
+       [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, 1, [Is this a 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, "no" means
+#      threads are disabled.  "yes" is the 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.
+#
+#      Note that it is legal to have a thread enabled extension run in a
+#      threaded or non-threaded Tcl core, but a non-threaded extension may
+#      only run in a non-threaded Tcl core.
+#
+# 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
+#              _THREAD_SAFE
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_ENABLE_THREADS], [
+    AC_ARG_ENABLE(threads,
+       AC_HELP_STRING([--enable-threads],
+           [build with threads]),
+       [tcl_ok=$enableval], [tcl_ok=yes])
+
+    if test "${enable_threads+set}" = set; then
+       enableval="$enable_threads"
+       tcl_ok=$enableval
+    else
+       tcl_ok=yes
+    fi
+
+    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:
+
+           # USE_THREAD_ALLOC tells us to try the special thread-based
+           # allocator that significantly reduces lock contention
+           AC_DEFINE(USE_THREAD_ALLOC, 1,
+               [Do we want to use the threaded memory allocator?])
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           if test "`uname -s`" = "SunOS" ; then
+               AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+                       [Do we really want to follow the standard? Yes we do!])
+           fi
+           AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
+           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([Do not know how to find pthread lib on your system - thread support disabled])
+                       fi
+                   fi
+               fi
+           fi
+       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, 1, [Are we building with threads enabled?])
+       AC_MSG_RESULT([yes (default)])
+    else
+       AC_MSG_RESULT([no])
+    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 Tcl
+    that IS thread-enabled.  It is recommended to use --enable-threads.])
+           fi
+           ;;
+       *)
+           if test "${TCL_THREADS}" = "1"; then
+               AC_MSG_WARN([
+    --enable-threads requested, but building against a Tcl that is NOT
+    thread-enabled.  This is an OK configuration that will also run in
+    a thread-enabled core.])
+           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
+#
+#      TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
+#      the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
+#      Requires the following vars to be set in the Makefile:
+#              CFLAGS_DEFAULT
+#              LDFLAGS_DEFAULT
+#
+# 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) -DNDEBUG" 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 TEA specific: Make sure we are initialized
+    AC_REQUIRE([TEA_CONFIG_CFLAGS])
+    AC_MSG_CHECKING([for build with symbols])
+    AC_ARG_ENABLE(symbols,
+       AC_HELP_STRING([--enable-symbols],
+           [build with debugging symbols (default: off)]),
+       [tcl_ok=$enableval], [tcl_ok=no])
+    DBGX=""
+    if test "$tcl_ok" = "no"; then
+       CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
+       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
+    # TEA specific:
+    if test "${TEA_PLATFORM}" != "windows" ; then
+       LDFLAGS_DEFAULT="${LDFLAGS}"
+    fi
+    AC_SUBST(CFLAGS_DEFAULT)
+    AC_SUBST(LDFLAGS_DEFAULT)
+    AC_SUBST(TCL_DBGX)
+
+    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+       AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
+    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,
+       AC_HELP_STRING([--enable-langinfo],
+           [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
+       [langinfo_ok=$enableval], [langinfo_ok=yes])
+
+    HAVE_LANGINFO=0
+    if test "$langinfo_ok" = "yes"; then
+       AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
+    fi
+    AC_MSG_CHECKING([whether to use nl_langinfo])
+    if test "$langinfo_ok" = "yes"; then
+       AC_CACHE_VAL(tcl_cv_langinfo_h, [
+           AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
+                   [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
+       AC_MSG_RESULT([$tcl_cv_langinfo_h])
+       if test $tcl_cv_langinfo_h = yes; then
+           AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
+       fi
+    else
+       AC_MSG_RESULT([$langinfo_ok])
+    fi
+])
+
+#--------------------------------------------------------------------
+# TEA_CONFIG_SYSTEM
+#
+#      Determine what the system is (some things cannot be easily checked
+#      on a feature-driven basis, alas). This can usually be done via the
+#      "uname" command.
+#
+# Arguments:
+#      none
+#
+# Results:
+#      Defines the following var:
+#
+#      system -        System/platform/version identification code.
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_SYSTEM], [
+    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
+       # TEA specific:
+       if test "${TEA_PLATFORM}" = "windows" ; then
+           tcl_cv_sys_version=windows
+       else
+           tcl_cv_sys_version=`uname -s`-`uname -r`
+           if test "$?" -ne 0 ; then
+               AC_MSG_WARN([can't find uname command])
+               tcl_cv_sys_version=unknown
+           else
+               if test "`uname -s`" = "AIX" ; then
+                   tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
+               fi
+           fi
+       fi
+    ])
+    system=$tcl_cv_sys_version
+])
+
+#--------------------------------------------------------------------
+# 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 and substitutes the following vars:
+#
+#      DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
+#       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. Could
+#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
+#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/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 defaults to
+#                       "${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.
+#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
+#                       in a static or 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 a shared library needs to have
+#                       a .a extension whereas shared objects for loadable
+#                       extensions have a .so extension.  Defaults to
+#                       ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
+#      CFLAGS_DEBUG -
+#                      Flags used when running the compiler in debug mode
+#      CFLAGS_OPTIMIZE -
+#                      Flags used when running the compiler in optimize mode
+#      CFLAGS -        Additional CFLAGS added as necessary (usually 64-bit)
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_CFLAGS], [
+    dnl TEA specific: Make sure we are initialized
+    AC_REQUIRE([TEA_INIT])
+
+    # Step 0.a: Enable 64 bit support?
+
+    AC_MSG_CHECKING([if 64bit support is requested])
+    AC_ARG_ENABLE(64bit,
+       AC_HELP_STRING([--enable-64bit],
+           [enable 64bit support (default: off)]),
+       [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,
+       AC_HELP_STRING([--enable-64bit-vis],
+           [enable 64bit Sparc VIS support (default: off)]),
+       [do64bitVIS=$enableval], [do64bitVIS=no])
+    AC_MSG_RESULT([$do64bitVIS])
+    # Force 64bit on with VIS
+    AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes])
+
+    # Step 0.c: Check if visibility support is available. Do this here so
+    # that platform specific alternatives can be used below if this fails.
+
+    AC_CACHE_CHECK([if compiler supports visibility "hidden"],
+       tcl_cv_cc_visibility_hidden, [
+       hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
+       AC_TRY_LINK([
+           extern __attribute__((__visibility__("hidden"))) void f(void);
+           void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
+           tcl_cv_cc_visibility_hidden=no)
+       CFLAGS=$hold_cflags])
+    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
+       AC_DEFINE(MODULE_SCOPE,
+           [extern __attribute__((__visibility__("hidden")))],
+           [Compiler support for module scope symbols])
+       AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
+    ])
+
+    # Step 0.d: Disable -rpath support?
+
+    AC_MSG_CHECKING([if rpath support is requested])
+    AC_ARG_ENABLE(rpath,
+       AC_HELP_STRING([--disable-rpath],
+           [disable rpath support (default: on)]),
+       [doRpath=$enableval], [doRpath=yes])
+    AC_MSG_RESULT([$doRpath])
+
+    # TEA specific: Cross-compiling options for Windows/CE builds?
+
+    AS_IF([test "${TEA_PLATFORM}" = windows], [
+       AC_MSG_CHECKING([if Windows/CE build is requested])
+       AC_ARG_ENABLE(wince,
+           AC_HELP_STRING([--enable-wince],
+               [enable Win/CE support (where applicable)]),
+           [doWince=$enableval], [doWince=no])
+       AC_MSG_RESULT([$doWince])
+    ])
+
+    # Set the variable "system" to hold the name and version number
+    # for the system.
+
+    TEA_CONFIG_SYSTEM
+
+    # Require ranlib early so we can override it in special cases below.
+
+    AC_REQUIRE([AC_PROG_RANLIB])
+
+    # 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 removed some core-only vars.
+
+    do64bit_ok=no
+    # default to '{$LIBS}' and set to "" on per-platform necessary basis
+    SHLIB_LD_LIBS='${LIBS}'
+    # When ld needs options to work in 64-bit mode, put them in
+    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
+    # is disabled by the user. [Bug 1016796]
+    LDFLAGS_ARCH=""
+    UNSHARED_LIB_SUFFIX=""
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+    TCL_LIB_VERSIONS_OK=ok
+    CFLAGS_DEBUG=-g
+    AS_IF([test "$GCC" = yes], [
+       CFLAGS_OPTIMIZE=-O2
+       CFLAGS_WARNING="-Wall"
+    ], [
+       CFLAGS_OPTIMIZE=-O
+       CFLAGS_WARNING=""
+    ])
+    AC_CHECK_TOOL(AR, ar)
+    STLIB_LD='${AR} cr'
+    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION=""],[SHLIB_VERSION=".$SHLIB_VERSION"])
+    case $system in
+       # TEA specific:
+       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.
+           # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+           # MACHINE is IX86 for LINK, but this is used by the manifest,
+           # which requires x86|amd64|ia64.
+           MACHINE="X86"
+           if test "$do64bit" != "no" ; then
+               if test "x${MSSDK}x" = "xx" ; then
+                   MSSDK="C:/Progra~1/Microsoft Platform SDK"
+               fi
+               MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
+               PATH64=""
+               case "$do64bit" in
+                   amd64|x64|yes)
+                       MACHINE="AMD64" ; # default to AMD64 64-bit build
+                       PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+                       ;;
+                   ia64)
+                       MACHINE="IA64"
+                       PATH64="${MSSDK}/Bin/Win64"
+                       ;;
+               esac
+               if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
+                   AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
+                   AC_MSG_WARN([Ensure latest Platform SDK is installed])
+                   do64bit="no"
+               else
+                   AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
+                   do64bit_ok="yes"
+               fi
+           fi
+
+           if test "$doWince" != "no" ; then
+               if test "$do64bit" != "no" ; 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
+               WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+               SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
+               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" != "no" ; then
+                   # All this magic is necessary for the Win64 SDK RC1 - hobbs
+                   CC="\"${PATH64}/cl.exe\""
+                   CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+                   RC="\"${MSSDK}/bin/rc.exe\""
+                   lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+                   LINKBIN="\"${PATH64}/link.exe\""
+                   CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+                   CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+                   # Avoid 'unresolved external symbol __security_cookie'
+                   # errors, c.f. http://support.microsoft.com/?id=894573
+                   TEA_ADD_LIBS([bufferoverflowU.lib])
+               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, 1, [WinCE def ]$i)
+                   done
+                   AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
+                   AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
+                   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
+               AC_CHECK_TOOL(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}"
+
+               AC_CACHE_CHECK(for cross-compile version of gcc,
+                       ac_cv_cross,
+                       AC_TRY_COMPILE([
+                           #ifdef _WIN32
+                               #error cross-compiler
+                           #endif
+                       ], [],
+                       ac_cv_cross=yes,
+                       ac_cv_cross=no)
+                     )
+                     if test "$ac_cv_cross" = "yes"; then
+                       case "$do64bit" in
+                           amd64|x64|yes)
+                               CC="x86_64-w64-mingw32-gcc"
+                               LD="x86_64-w64-mingw32-ld"
+                               AR="x86_64-w64-mingw32-ar"
+                               RANLIB="x86_64-w64-mingw32-ranlib"
+                               RC="x86_64-w64-mingw32-windres"
+                           ;;
+                           *)
+                               CC="i686-w64-mingw32-gcc"
+                               LD="i686-w64-mingw32-ld"
+                               AR="i686-w64-mingw32-ar"
+                               RANLIB="i686-w64-mingw32-ranlib"
+                               RC="i686-w64-mingw32-windres"
+                           ;;
+                       esac
+               fi
+
+           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
+               # and also
+               # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
+               # This essentially turns it all on.
+               LDFLAGS_DEBUG="-debug -debugtype:cv"
+               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_SUFFIX=".dll"
+           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       AIX-*)
+           AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
+               # AIX requires the _r compiler when gcc isn't being used
+               case "${CC}" in
+                   *_r|*_r\ *)
+                       # ok ...
+                       ;;
+                   *)
+                       # Make sure only first arg gets _r
+                       CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
+                       ;;
+               esac
+               AC_MSG_RESULT([Using $CC for compiling with threads])
+           ])
+           LIBS="$LIBS -lc"
+           SHLIB_CFLAGS=""
+           SHLIB_SUFFIX=".so"
+
+           LD_LIBRARY_PATH_VAR="LIBPATH"
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = yes], [
+               AS_IF([test "$GCC" = yes], [
+                   AC_MSG_WARN([64bit mode not supported with GCC on $system])
+               ], [
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS -q64"
+                   LDFLAGS_ARCH="-q64"
+                   RANLIB="${RANLIB} -X64"
+                   AR="${AR} -X64"
+                   SHLIB_LD_FLAGS="-b64"
+               ])
+           ])
+
+           AS_IF([test "`uname -m`" = ia64], [
+               # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               AS_IF([test "$GCC" = yes], [
+                   CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               ], [
+                   CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+               ])
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+           ], [
+               AS_IF([test "$GCC" = yes], [
+                   SHLIB_LD='${CC} -shared -Wl,-bexpall'
+               ], [
+                   SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
+                   LDFLAGS="$LDFLAGS -brtl"
+               ])
+               SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+               CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ])
+           ;;
+       BeOS*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -nostart'
+           SHLIB_SUFFIX=".so"
+
+           #-----------------------------------------------------------
+           # Check for inet_ntoa in -lbind, for BeOS (which also needs
+           # -lsocket, even if the network functions are in -lnet which
+           # is always linked to, for compatibility.
+           #-----------------------------------------------------------
+           AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
+           ;;
+       BSD/OS-4.*)
+           SHLIB_CFLAGS="-export-dynamic -fPIC"
+           SHLIB_LD='${CC} -shared'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       CYGWIN_*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD='${CC} -shared'
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
+           SHLIB_SUFFIX=".dll"
+           EXEEXT=".exe"
+           do64bit_ok=yes
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       Haiku*)
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+           AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
+           ;;
+       HP-UX-*.11.*)
+           # Use updated header definitions where possible
+           AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
+           # TEA specific: Needed by Tcl, but not most extensions
+           #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
+           #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
+
+           AS_IF([test "`uname -m`" = ia64], [
+               SHLIB_SUFFIX=".so"
+               # Use newer C++ library for C++ extensions
+               #if test "$GCC" != "yes" ; then
+               #   CPPFLAGS="-AA"
+               #fi
+           ], [
+               SHLIB_SUFFIX=".sl"
+           ])
+           AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
+           AS_IF([test "$tcl_ok" = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-E"
+               CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+               LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+               LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+           ])
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ], [
+               CFLAGS="$CFLAGS -z"
+               # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+               #CFLAGS="$CFLAGS +DAportable"
+               SHLIB_CFLAGS="+z"
+               SHLIB_LD="ld -b"
+           ])
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = "yes"], [
+               AS_IF([test "$GCC" = yes], [
+                   case `${CC} -dumpmachine` in
+                       hppa64*)
+                           # 64-bit gcc in use.  Fix flags for GNU ld.
+                           do64bit_ok=yes
+                           SHLIB_LD='${CC} -shared'
+                           AS_IF([test $doRpath = yes], [
+                               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+                           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+                           ;;
+                       *)
+                           AC_MSG_WARN([64bit mode not supported with GCC on $system])
+                           ;;
+                   esac
+               ], [
+                   do64bit_ok=yes
+                   CFLAGS="$CFLAGS +DD64"
+                   LDFLAGS_ARCH="+DD64"
+               ])
+           ]) ;;
+       IRIX-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+           AS_IF([test "$GCC" = yes], [
+               CFLAGS="$CFLAGS -mabi=n32"
+               LDFLAGS="$LDFLAGS -mabi=n32"
+           ], [
+               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"
+           ])
+           ;;
+       IRIX64-6.*)
+           SHLIB_CFLAGS=""
+           SHLIB_LD="ld -n32 -shared -rdata_shared"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+
+           # Check to enable 64-bit flags for compiler/linker
+
+           AS_IF([test "$do64bit" = yes], [
+               AS_IF([test "$GCC" = yes], [
+                   AC_MSG_WARN([64bit mode not supported by gcc])
+               ], [
+                   do64bit_ok=yes
+                   SHLIB_LD="ld -64 -shared -rdata_shared"
+                   CFLAGS="$CFLAGS -64"
+                   LDFLAGS_ARCH="-64"
+               ])
+           ])
+           ;;
+       Linux*|GNU*|NetBSD-Debian)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+
+           # TEA specific:
+           CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
+           AS_IF([test $do64bit = yes], [
+               AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
+                   hold_cflags=$CFLAGS
+                   CFLAGS="$CFLAGS -m64"
+                   AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
+                   CFLAGS=$hold_cflags])
+               AS_IF([test $tcl_cv_cc_m64 = yes], [
+                   CFLAGS="$CFLAGS -m64"
+                   do64bit_ok=yes
+               ])
+          ])
+
+           # 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.
+
+           AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
+           ;;
+       Lynx*)
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_SUFFIX=".so"
+           CFLAGS_OPTIMIZE=-02
+           SHLIB_LD='${CC} -shared'
+           LD_FLAGS="-Wl,--export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           ;;
+       OpenBSD-*)
+           arch=`arch -s`
+           case "$arch" in
+           vax)
+               SHLIB_SUFFIX=""
+               SHARED_LIB_SUFFIX=""
+               LDFLAGS=""
+               ;;
+           *)
+               case "$arch" in
+               alpha|sparc64)
+                   SHLIB_CFLAGS="-fPIC"
+                   ;;
+               *)
+                   SHLIB_CFLAGS="-fpic"
+                   ;;
+               esac
+               SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+               SHLIB_SUFFIX=".so"
+               AS_IF([test $doRpath = yes], [
+                   CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
+               LDFLAGS="-Wl,-export-dynamic"
+               ;;
+           esac
+           case "$arch" in
+           vax)
+               CFLAGS_OPTIMIZE="-O1"
+               ;;
+           *)
+               CFLAGS_OPTIMIZE="-O2"
+               ;;
+           esac
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # On OpenBSD:   Compile with -pthread
+               #               Don't link with -lpthread
+               LIBS=`echo $LIBS | sed s/-lpthread//`
+               CFLAGS="$CFLAGS -pthread"
+           ])
+           # OpenBSD doesn't do version numbers with dots.
+           UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+           TCL_LIB_VERSIONS_OK=nodots
+           ;;
+       NetBSD-*)
+           # NetBSD has ELF and can use 'cc -shared' to build shared libs
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
+           SHLIB_SUFFIX=".so"
+           LDFLAGS="$LDFLAGS -export-dynamic"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # The -pthread needs to go in the CFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS -pthread"
+               LDFLAGS="$LDFLAGS -pthread"
+           ])
+           ;;
+       FreeBSD-*)
+           # This configuration from FreeBSD Ports.
+           SHLIB_CFLAGS="-fPIC"
+           SHLIB_LD="${CC} -shared"
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
+           SHLIB_SUFFIX=".so"
+           LDFLAGS=""
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+           AS_IF([test "${TCL_THREADS}" = "1"], [
+               # The -pthread needs to go in the LDFLAGS, not LIBS
+               LIBS=`echo $LIBS | sed s/-pthread//`
+               CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+               LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
+           case $system in
+           FreeBSD-3.*)
+               # Version numbers are dot-stripped by system policy.
+               TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
+               UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+               SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+               TCL_LIB_VERSIONS_OK=nodots
+               ;;
+           esac
+           ;;
+       Darwin-*)
+           CFLAGS_OPTIMIZE="-Os"
+           SHLIB_CFLAGS="-fno-common"
+           # To avoid discrepancies between what headers configure sees during
+           # preprocessing tests and compiling tests, move any -isysroot and
+           # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
+           CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
+           CFLAGS="`echo " ${CFLAGS}" | \
+               awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+               if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
+           AS_IF([test $do64bit = yes], [
+               case `arch` in
+                   ppc)
+                       AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
+                               tcl_cv_cc_arch_ppc64, [
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
+                                   tcl_cv_cc_arch_ppc64=no)
+                           CFLAGS=$hold_cflags])
+                       AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
+                           CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+                           do64bit_ok=yes
+                       ]);;
+                   i386)
+                       AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
+                               tcl_cv_cc_arch_x86_64, [
+                           hold_cflags=$CFLAGS
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
+                                   tcl_cv_cc_arch_x86_64=no)
+                           CFLAGS=$hold_cflags])
+                       AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
+                           CFLAGS="$CFLAGS -arch x86_64"
+                           do64bit_ok=yes
+                       ]);;
+                   *)
+                       AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
+               esac
+           ], [
+               # Check for combined 32-bit and 64-bit fat build
+               AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
+                   && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
+                   fat_32_64=yes])
+           ])
+           # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+           SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
+           AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_single_module = yes], [
+               SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+           ])
+           # TEA specific: link shlib with current and compatibility version flags
+           vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
+           SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
+           SHLIB_SUFFIX=".dylib"
+           # Don't use -prebind when building for Mac OS X 10.4 or later only:
+           AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
+               "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
+               LDFLAGS="$LDFLAGS -prebind"])
+           LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+           AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
+                   tcl_cv_ld_search_paths_first, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
+                       tcl_cv_ld_search_paths_first=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+           ])
+           AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
+               AC_DEFINE(MODULE_SCOPE, [__private_extern__],
+                   [Compiler support for module scope symbols])
+               tcl_cv_cc_visibility_hidden=yes
+           ])
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+           # TEA specific: for combined 32 & 64 bit fat builds of Tk
+           # extensions, verify that 64-bit build is possible.
+           AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
+               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [
+                   AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
+                       LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
+                       AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();],
+                           tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no)
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done])
+               ])
+               AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [
+                   AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+                       done
+                       CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
+                       LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
+                       AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);],
+                           tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no)
+                       for v in CFLAGS CPPFLAGS LDFLAGS; do
+                           eval $v'="$hold_'$v'"'
+                       done])
+               ])
+               # remove 64-bit arch flags from CFLAGS et al. if configuration
+               # does not support 64-bit.
+               AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
+                   AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
+                   for v in CFLAGS CPPFLAGS LDFLAGS; do
+                       eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
+                   done])
+           ])
+           ;;
+       OS/390-*)
+           CFLAGS_OPTIMIZE=""          # Optimizer is buggy
+           AC_DEFINE(_OE_SOCKETS, 1,   # needed in sys/socket.h
+               [Should OS/390 do the right thing with sockets?])
+           ;;
+       OSF1-V*)
+           # Digital OSF/1
+           SHLIB_CFLAGS=""
+           AS_IF([test "$SHARED_BUILD" = 1], [
+               SHLIB_LD='ld -shared -expect_unresolved "*"'
+           ], [
+               SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+           ])
+           SHLIB_SUFFIX=".so"
+           AS_IF([test $doRpath = yes], [
+               CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+           AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
+               CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
+           # see pthread_intro(3) for pthread support on osf1, k.furukawa
+           AS_IF([test "${TCL_THREADS}" = 1], [
+               CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+               CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+               LIBS=`echo $LIBS | sed s/-lpthreads//`
+               AS_IF([test "$GCC" = yes], [
+                   LIBS="$LIBS -lpthread -lmach -lexc"
+               ], [
+                   CFLAGS="$CFLAGS -pthread"
+                   LDFLAGS="$LDFLAGS -pthread"
+               ])
+           ])
+           ;;
+       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"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SCO_SV-3.2*)
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_CFLAGS="-fPIC -melf"
+               LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+           ], [
+               SHLIB_CFLAGS="-Kpic -belf"
+               LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+           ])
+           SHLIB_LD="ld -G"
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+       SunOS-5.[[0-6]])
+           # Careful to not let 5.10+ fall into this case
+
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+               [Do we really want to follow the standard? Yes we do!])
+
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_SUFFIX=".so"
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ], [
+               SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+               CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+           ])
+           ;;
+       SunOS-5*)
+           # Note: If _REENTRANT isn't defined, then Solaris
+           # won't define thread-safe library routines.
+
+           AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+           AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+               [Do we really want to follow the standard? Yes we do!])
+
+           SHLIB_CFLAGS="-KPIC"
+
+           # Check to enable 64-bit flags for compiler/linker
+           AS_IF([test "$do64bit" = yes], [
+               arch=`isainfo`
+               AS_IF([test "$arch" = "sparcv9 sparc"], [
+                   AS_IF([test "$GCC" = yes], [
+                       AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
+                           AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
+                       ], [
+                           do64bit_ok=yes
+                           CFLAGS="$CFLAGS -m64 -mcpu=v9"
+                           LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+                           SHLIB_CFLAGS="-fPIC"
+                       ])
+                   ], [
+                       do64bit_ok=yes
+                       AS_IF([test "$do64bitVIS" = yes], [
+                           CFLAGS="$CFLAGS -xarch=v9a"
+                           LDFLAGS_ARCH="-xarch=v9a"
+                       ], [
+                           CFLAGS="$CFLAGS -xarch=v9"
+                           LDFLAGS_ARCH="-xarch=v9"
+                       ])
+                       # Solaris 64 uses this as well
+                       #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
+                   ])
+               ], [AS_IF([test "$arch" = "amd64 i386"], [
+                   AS_IF([test "$GCC" = yes], [
+                       case $system in
+                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
+                               do64bit_ok=yes
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               AC_MSG_WARN([64bit mode not supported with GCC on $system]);;
+                       esac
+                   ], [
+                       do64bit_ok=yes
+                       case $system in
+                           SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
+                               CFLAGS="$CFLAGS -m64"
+                               LDFLAGS="$LDFLAGS -m64";;
+                           *)
+                               CFLAGS="$CFLAGS -xarch=amd64"
+                               LDFLAGS="$LDFLAGS -xarch=amd64";;
+                       esac
+                   ])
+               ], [AC_MSG_WARN([64bit mode not supported for $arch])])])
+           ])
+
+           SHLIB_SUFFIX=".so"
+           AS_IF([test "$GCC" = yes], [
+               SHLIB_LD='${CC} -shared'
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+               AS_IF([test "$do64bit_ok" = yes], [
+                   AS_IF([test "$arch" = "sparcv9 sparc"], [
+                       # 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` | ..."
+                       #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+                   ], [AS_IF([test "$arch" = "amd64 i386"], [
+                       # JH: static-libgcc is necessary for core Tcl, but may
+                       # not be necessary for extensions.
+                       SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
+                   ])])
+               ])
+           ], [
+               case $system in
+                   SunOS-5.[[1-9]][[0-9]]*)
+                       # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+                       SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
+                   *)
+                       SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
+               esac
+               CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+               LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+           ])
+           ;;
+       UNIX_SV* | UnixWare-5*)
+           SHLIB_CFLAGS="-KPIC"
+           SHLIB_LD='${CC} -G'
+           SHLIB_LD_LIBS=""
+           SHLIB_SUFFIX=".so"
+           # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
+           # that don't grok the -Bexport option.  Test that it does.
+           AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
+               hold_ldflags=$LDFLAGS
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+               AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
+               LDFLAGS=$hold_ldflags])
+           AS_IF([test $tcl_cv_ld_Bexport = yes], [
+               LDFLAGS="$LDFLAGS -Wl,-Bexport"
+           ])
+           CC_SEARCH_FLAGS=""
+           LD_SEARCH_FLAGS=""
+           ;;
+    esac
+
+    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
+       AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
+    ])
+
+dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
+dnl # until the end of configure, as configure's compile and link tests use
+dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
+dnl # preprocessing tests use only CPPFLAGS.
+    AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
+
+    # Add in the arch flags late to ensure it wasn't removed.
+    # Not necessary in TEA, but this is aligned with core
+    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
+
+    # 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.
+
+    AS_IF([test "$GCC" = yes], [
+       case $system in
+           AIX-*) ;;
+           BSD/OS*) ;;
+           CYGWIN_*|MINGW32_*) ;;
+           IRIX*) ;;
+           NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
+           Darwin-*) ;;
+           SCO_SV-3.2*) ;;
+           windows) ;;
+           *) SHLIB_CFLAGS="-fPIC" ;;
+       esac])
+
+    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
+       AC_DEFINE(MODULE_SCOPE, [extern],
+           [No Compiler support for module scope symbols])
+    ])
+
+    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
+    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
+    # TEA specific: use PACKAGE_VERSION instead of VERSION
+    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
+
+    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
+       AC_CACHE_CHECK(for SEH support in compiler,
+           tcl_cv_seh,
+       AC_TRY_RUN([
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+           int main(int argc, char** argv) {
+               int a, b = 0;
+               __try {
+                   a = 666 / b;
+               }
+               __except (EXCEPTION_EXECUTE_HANDLER) {
+                   return 0;
+               }
+               return 1;
+           }
+       ],
+           tcl_cv_seh=yes,
+           tcl_cv_seh=no,
+           tcl_cv_seh=no)
+       )
+       if test "$tcl_cv_seh" = "no" ; then
+           AC_DEFINE(HAVE_NO_SEH, 1,
+                   [Defined when mingw does not support SEH])
+       fi
+
+       #
+       # Check to see if the excpt.h include file provided contains the
+       # definition for EXCEPTION_DISPOSITION; if not, which is the case
+       # with Cygwin's version as of 2002-04-10, define it to be int,
+       # sufficient for getting the current code to work.
+       #
+       AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
+           tcl_cv_eh_disposition,
+           AC_TRY_COMPILE([
+#          define WIN32_LEAN_AND_MEAN
+#          include <windows.h>
+#          undef WIN32_LEAN_AND_MEAN
+           ],[
+               EXCEPTION_DISPOSITION x;
+           ],
+               tcl_cv_eh_disposition=yes,
+               tcl_cv_eh_disposition=no)
+       )
+       if test "$tcl_cv_eh_disposition" = "no" ; then
+       AC_DEFINE(EXCEPTION_DISPOSITION, int,
+               [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
+       fi
+
+       # Check to see if winnt.h defines CHAR, SHORT, and LONG
+       # even if VOID has already been #defined. The win32api
+       # used by mingw and cygwin is known to do this.
+
+       AC_CACHE_CHECK(for winnt.h that ignores VOID define,
+           tcl_cv_winnt_ignore_void,
+           AC_TRY_COMPILE([
+#define VOID void
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+           ], [
+               CHAR c;
+               SHORT s;
+               LONG l;
+           ],
+        tcl_cv_winnt_ignore_void=yes,
+        tcl_cv_winnt_ignore_void=no)
+       )
+       if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
+           AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
+                   [Defined when cygwin/mingw ignores VOID define in winnt.h])
+       fi
+    fi
+
+       # See if the compiler supports casting to a union type.
+       # This is used to stop gcc from printing a compiler
+       # warning when initializing a union member.
+
+       AC_CACHE_CHECK(for cast to union support,
+           tcl_cv_cast_to_union,
+           AC_TRY_COMPILE([],
+           [
+                 union foo { int i; double d; };
+                 union foo f = (union foo) (int) 0;
+           ],
+           tcl_cv_cast_to_union=yes,
+           tcl_cv_cast_to_union=no)
+       )
+       if test "$tcl_cv_cast_to_union" = "yes"; then
+           AC_DEFINE(HAVE_CAST_TO_UNION, 1,
+                   [Defined when compiler supports casting to union type.])
+       fi
+
+    AC_SUBST(CFLAGS_DEBUG)
+    AC_SUBST(CFLAGS_OPTIMIZE)
+    AC_SUBST(CFLAGS_WARNING)
+
+    AC_SUBST(STLIB_LD)
+    AC_SUBST(SHLIB_LD)
+
+    AC_SUBST(SHLIB_LD_LIBS)
+    AC_SUBST(SHLIB_CFLAGS)
+
+    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_CACHE_CHECK([termios vs. termio vs. sgtty], 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=no, tcl_cv_api_serial=no)
+    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, 1, [Use the termios API for serial lines]);;
+       termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
+       sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
+    esac
+])
+
+#--------------------------------------------------------------------
+# TEA_MISSING_POSIX_HEADERS
+#
+#      Supply substitutes for missing POSIX header files.  Special
+#      notes:
+#          - stdlib.h doesn't define strtol, strtoul, or
+#            strtod in some 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_CACHE_CHECK([dirent.h], tcl_cv_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_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
+
+    if test $tcl_cv_dirent_h = no; then
+       AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
+    fi
+
+    # TEA specific:
+    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
+    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
+    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
+    AC_CHECK_HEADER(limits.h,
+       [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
+       [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <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, 1, [Do we have <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, 1, [Do we have <string.h>?])
+    fi
+
+    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
+    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <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
+#              PKG_LIBS (appends to)
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_X], [
+    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
+       TEA_PATH_UNIX_X
+    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/Xlib.h>], , not_really_there="yes")
+       else
+           if test ! -r $x_includes/X11/Xlib.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])
+       found_xincludes="no"
+       AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
+       if test "$found_xincludes" = "no"; 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/Xlib.h; then
+                   AC_MSG_RESULT([$i])
+                   XINCLUDES=" -I$i"
+                   found_xincludes="yes"
+                   break
+               fi
+           done
+       fi
+    else
+       if test "$x_includes" != ""; then
+           XINCLUDES="-I$x_includes"
+           found_xincludes="yes"
+       fi
+    fi
+    if test "$found_xincludes" = "no"; then
+       AC_MSG_RESULT([couldn't find any!])
+    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 -o -r $i/libX11.dylib; 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
+    # TEA specific:
+    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)
+    TEA_CONFIG_SYSTEM
+    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
+    case $system in
+       OSF*)
+           AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
+           AC_MSG_RESULT([FIONBIO])
+           ;;
+       *)
+           AC_MSG_RESULT([O_NONBLOCK])
+           ;;
+    esac
+])
+
+#--------------------------------------------------------------------
+# TEA_TIME_HANDLER
+#
+#      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_CACHE_CHECK([tm_tzadj in struct tm], 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)])
+    if test $tcl_cv_member_tm_tzadj = yes ; then
+       AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
+    fi
+
+    AC_CACHE_CHECK([tm_gmtoff in struct tm], 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)])
+    if test $tcl_cv_member_tm_gmtoff = yes ; then
+       AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
+    fi
+
+    #
+    # Its important to include time.h in this check, as some systems
+    # (like convex) have timezone functions, etc.
+    #
+    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
+       AC_TRY_COMPILE([#include <time.h>],
+           [extern long timezone;
+           timezone += 1;
+           exit (0);],
+           tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
+    if test $tcl_cv_timezone_long = yes ; then
+       AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+    else
+       #
+       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+       #
+       AC_CACHE_CHECK([time_t timezone variable], 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)])
+       if test $tcl_cv_timezone_time = yes ; then
+           AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+       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_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
+           AC_TRY_RUN([
+               extern double strtod();
+               int main() {
+                   char *infString="Inf", *nanString="NaN", *spaceString=" ";
+                   char *term;
+                   double value;
+                   value = strtod(infString, &term);
+                   if ((term != infString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(nanString, &term);
+                   if ((term != nanString) && (term[-1] == 0)) {
+                       exit(1);
+                   }
+                   value = strtod(spaceString, &term);
+                   if (term == (spaceString+1)) {
+                       exit(1);
+                   }
+                   exit(0);
+               }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
+                   tcl_cv_strtod_buggy=buggy)])
+       if test "$tcl_cv_strtod_buggy" = buggy; then
+           AC_LIBOBJ([fixstrtod])
+           USE_COMPAT=1
+           AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
+       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 (not in TEA, only needed in core)
+#              LIBS
+#              MATH_LIBS
+#
+# Results:
+#
+#      Substitutes the following vars:
+#              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, 1, [Do we 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"])])
+
+    # TEA specific: 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
+#              _LARGEFILE_SOURCE64
+#--------------------------------------------------------------------
+
+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, 1, [Add the ]$1[ flag when building])
+       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);])
+    TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
+       [char *p = (char *)open64;])
+    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, 1, [Are wide integers to be implemented with C 'long's?])
+       AC_MSG_RESULT([using long])
+    elif test "${tcl_cv_type_64bit}" = "__int64" \
+               -a "${TEA_PLATFORM}" = "windows" ; then
+       # TEA specific: 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},
+           [What type should be used to define wide integers?])
+       AC_MSG_RESULT([${tcl_cv_type_64bit}])
+
+       # Now check for auxiliary declarations
+       AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
+           AC_TRY_COMPILE([#include <sys/types.h>
+#include <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, 1, [Is 'struct dirent64' in <sys/types.h>?])
+       fi
+
+       AC_CACHE_CHECK([for struct stat64], 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, 1, [Is 'struct stat64' in <sys/stat.h>?])
+       fi
+
+       AC_CHECK_FUNCS(open64 lseek64)
+       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)])
+       dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
+       dnl functions lseek64 and open64 are defined.
+       if test "x${tcl_cv_type_off64_t}" = "xyes" && \
+               test "x${ac_cv_func_lseek64}" = "xyes" && \
+               test "x${ac_cv_func_open64}" = "xyes" ; then
+           AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
+           AC_MSG_RESULT([yes])
+       else
+           AC_MSG_RESULT([no])
+       fi
+    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_VERSION
+#              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.9"
+
+    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
+
+    # If the user did not set CFLAGS, set it now to keep macros
+    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
+    if test "${CFLAGS+set}" != "set" ; then
+       CFLAGS=""
+    fi
+
+    case "`uname -s`" in
+       *win32*|*WIN32*|*MINGW32_*)
+           AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+           EXEEXT=".exe"
+           TEA_PLATFORM="windows"
+           ;;
+       *CYGWIN_*)
+           CYGPATH=echo
+           EXEEXT=".exe"
+           # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
+           ;;
+       *)
+           CYGPATH=echo
+           # Maybe we are cross-compiling....
+           case ${host_alias} in
+               *mingw32*)
+               EXEEXT=".exe"
+               TEA_PLATFORM="windows"
+               ;;
+           *)
+               EXEEXT=""
+               TEA_PLATFORM="unix"
+               ;;
+           esac
+           ;;
+    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_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}])
+
+    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
+               # To add more dirs here (like 'src'), you have to update VPATH
+               # in Makefile.in as well
+               if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+                   -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+                   -a ! -f "${srcdir}/macosx/$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" \
+           -a ! -f "${srcdir}/macosx/$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_ADD_CLEANFILES --
+#
+#      Specify one or more CLEANFILES.
+#
+# Arguments:
+#      one or more file names to clean target
+#
+# Results:
+#
+#      Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_CLEANFILES], [
+    CLEANFILES="$CLEANFILES $@"
+])
+
+#------------------------------------------------------------------------
+# 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.
+
+    AC_PROG_CC
+    AC_PROG_CPP
+
+    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
+    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
+    INSTALL_DATA='${INSTALL} -m 644'
+    INSTALL_PROGRAM='${INSTALL}'
+    INSTALL_SCRIPT='${INSTALL}'
+    INSTALL_LIBRARY='${INSTALL_DATA}'
+
+    AC_SUBST(INSTALL)
+    AC_SUBST(INSTALL_DATA_DIR)
+    AC_SUBST(INSTALL_DATA)
+    AC_SUBST(INSTALL_PROGRAM)
+    AC_SUBST(INSTALL_SCRIPT)
+    AC_SUBST(INSTALL_LIBRARY)
+
+    #--------------------------------------------------------------------
+    # Checks to see if the make program sets the $MAKE variable.
+    #--------------------------------------------------------------------
+
+    AC_PROG_MAKE_SET
+
+    #--------------------------------------------------------------------
+    # Find ranlib
+    #--------------------------------------------------------------------
+
+    AC_CHECK_TOOL(RANLIB, 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_CACHE_CHECK([if the compiler understands -pipe],
+           tcl_cv_cc_pipe, [
+           hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+           AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
+           CFLAGS=$hold_cflags])
+       if test $tcl_cv_cc_pipe = yes; then
+           CFLAGS="$CFLAGS -pipe"
+       fi
+    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
+#      VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
+#      VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
+#------------------------------------------------------------------------
+
+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)"
+       AC_EGREP_CPP([manifest needed], [
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+print("manifest needed")
+#endif
+       ], [
+       # Could do a CHECK_PROG for mt, but should always be with MSVC8+
+       VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
+       VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
+       MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
+       TEA_ADD_CLEANFILES([*.manifest])
+       ])
+       MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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.
+           if test x"${TK_BIN_DIR}" != x ; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+           fi
+           SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+           if test "$GCC" = "yes"; then
+               SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
+           fi
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+       else
+           eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+           if test "$GCC" = "yes"; then
+               PKG_LIB_FILE=lib${PKG_LIB_FILE}
+           fi
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+       if test "$GCC" = "yes"; then
+           PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
+       fi
+       # 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_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+           RANLIB=:
+       else
+           eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+       fi
+       # Some packages build their own stubs libraries
+       eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${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)
+    AC_SUBST(VC_MANIFEST_EMBED_DLL)
+    AC_SUBST(VC_MANIFEST_EMBED_EXE)
+])
+
+#------------------------------------------------------------------------
+# 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/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
+           `ls -dr /usr/lib64/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:
+#
+#      Substitutes the following vars:
+#              TCL_TOP_DIR_NATIVE
+#              TCL_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
+    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
+    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
+    AC_MSG_CHECKING([for Tcl private include files])
+
+    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
+    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
+
+    # Check to see if tcl<Plat>Port.h isn't already with the public headers
+    # Don't look for tclInt.h because that resides with tcl.h in the core
+    # sources, but the <plat>Port headers are in a different directory
+    if test "${TEA_PLATFORM}" = "windows" -a \
+       -f "${ac_cv_c_tclh}/tclWinPort.h"; then
+       result="private headers found with public headers"
+    elif test "${TEA_PLATFORM}" = "unix" -a \
+       -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
+       result="private headers found with public headers"
+    else
+       TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
+       if test "${TEA_PLATFORM}" = "windows"; then
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
+       else
+           TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
+       fi
+       # Overwrite the previous TCL_INCLUDES as this should capture both
+       # public and private headers in the same set.
+       # We want to ensure these are substituted so as not to require
+       # any *_NATIVE vars be defined in the Makefile
+       TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+       if test "`uname -s`" = "Darwin"; then
+            # If Tcl was built as a framework, attempt to use
+            # the framework's Headers and PrivateHeaders directories
+            case ${TCL_DEFS} in
+               *TCL_FRAMEWORK*)
+                   if test -d "${TCL_BIN_DIR}/Headers" -a \
+                           -d "${TCL_BIN_DIR}/PrivateHeaders"; then
+                       TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
+                   else
+                       TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
+                   fi
+                   ;;
+           esac
+           result="Using ${TCL_INCLUDES}"
+       else
+           if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
+               AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
+           fi
+           result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
+       fi
+    fi
+
+    AC_SUBST(TCL_TOP_DIR_NATIVE)
+
+    AC_SUBST(TCL_INCLUDES)
+    AC_MSG_RESULT([${result}])
+])
+
+#------------------------------------------------------------------------
+# 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.
+#
+#      Substitutes 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
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tcl was built as a framework, attempt to use
+               # the framework's Headers directory
+               case ${TCL_DEFS} in
+                   *TCL_FRAMEWORK*)
+                       list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tcl is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TCL_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$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`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TCL_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           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:
+#
+#      Substitutes the following vars:
+#              TK_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
+    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
+    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
+    AC_MSG_CHECKING([for Tk private include files])
+
+    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
+    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
+
+    # Check to see if tk<Plat>Port.h isn't already with the public headers
+    # Don't look for tkInt.h because that resides with tk.h in the core
+    # sources, but the <plat>Port headers are in a different directory
+    if test "${TEA_PLATFORM}" = "windows" -a \
+       -f "${ac_cv_c_tkh}/tkWinPort.h"; then
+       result="private headers found with public headers"
+    elif test "${TEA_PLATFORM}" = "unix" -a \
+       -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
+       result="private headers found with public headers"
+    else
+       TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
+       TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
+       if test "${TEA_PLATFORM}" = "windows"; then
+           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
+       else
+           TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
+       fi
+       # Overwrite the previous TK_INCLUDES as this should capture both
+       # public and private headers in the same set.
+       # We want to ensure these are substituted so as not to require
+       # any *_NATIVE vars be defined in the Makefile
+       TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
+       # Detect and add ttk subdir
+       if test -d "${TK_SRC_DIR}/generic/ttk"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
+       fi
+       if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
+       fi
+       if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+          TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
+       fi
+       if test "`uname -s`" = "Darwin"; then
+           # If Tk was built as a framework, attempt to use
+           # the framework's Headers and PrivateHeaders directories
+           case ${TK_DEFS} in
+               *TK_FRAMEWORK*)
+                       if test -d "${TK_BIN_DIR}/Headers" -a \
+                               -d "${TK_BIN_DIR}/PrivateHeaders"; then
+                           TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
+                       else
+                           TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
+                       fi
+                       ;;
+           esac
+           result="Using ${TK_INCLUDES}"
+       else
+           if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
+              AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
+           fi
+           result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
+       fi
+    fi
+
+    AC_SUBST(TK_TOP_DIR_NATIVE)
+    AC_SUBST(TK_XLIB_DIR_NATIVE)
+
+    AC_SUBST(TK_INCLUDES)
+    AC_MSG_RESULT([${result}])
+])
+
+#------------------------------------------------------------------------
+# 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.
+#
+#      Substitutes 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
+           list=""
+           if test "`uname -s`" = "Darwin"; then
+               # If Tk was built as a framework, attempt to use
+               # the framework's Headers directory.
+               case ${TK_DEFS} in
+                   *TK_FRAMEWORK*)
+                       list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
+                       ;;
+               esac
+           fi
+
+           # Look in the source dir only if Tk is not installed,
+           # and in that situation, look there before installed locations.
+           if test -f "${TK_BIN_DIR}/Makefile" ; then
+               list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
+           fi
+
+           # Check order: pkg --prefix location, Tk's --prefix location,
+           # relative to directory of tkConfig.sh, Tcl's --prefix location,
+           # relative to directory of tclConfig.sh.
+
+           eval "temp_includedir=${includedir}"
+           list="$list \
+               `ls -d ${temp_includedir}        2>/dev/null` \
+               `ls -d ${TK_PREFIX}/include      2>/dev/null` \
+               `ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
+               `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
+               `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
+           if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+               list="$list /usr/local/include /usr/include"
+               if test x"${TK_INCLUDE_SPEC}" != x ; then
+                   d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+                   list="$list `ls -d ${d} 2>/dev/null`"
+               fi
+           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_WINDOWINGSYSTEM}" != "x11"; then
+       # On Windows and Aqua, 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_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 ${libdir} 2>/dev/null` \
+                       `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` \
+                       `ls -d /usr/lib64 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:
+#
+#      Substitutes 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}
+        $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
+        $1_LIBRARY_PATH=${$1_LIBRARY_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)
+
+    # Allow the caller to prevent this auto-check by specifying any 2nd arg
+    AS_IF([test "x$2" = x], [
+       # Check both upper and lower-case variants
+       # If a dev wanted non-stubs libs, this function could take an option
+       # to not use _STUB in the paths below
+       AS_IF([test "x${$1_STUB_LIB_SPEC}" = x],
+           [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
+           [TEA_LOAD_CONFIG_LIB($1_STUB)])
+    ])
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_CONFIG_LIB --
+#
+#      Helper function to load correct library from another extension's
+#      ${PACKAGE}Config.sh.
+#
+# Results:
+#      Adds to LIBS the appropriate extension library
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
+    AC_MSG_CHECKING([For $1 library for LIBS])
+    # This simplifies the use of stub libraries by automatically adding
+    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
+    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
+    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
+    if test "x${$1_LIB_SPEC}" != "x" ; then
+       if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+           TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"])
+           AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}])
+       else
+           TEA_ADD_LIBS([${$1_LIB_SPEC}])
+           AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}])
+       fi
+    else
+       AC_MSG_RESULT([file not found])
+    fi
+])
+
+#------------------------------------------------------------------------
+# TEA_EXPORT_CONFIG --
+#
+#      Define the data to insert into the ${PACKAGE}Config.sh file
+#
+# Arguments:
+#
+#      Requires the following vars to be set:
+#              $1
+#
+# Results:
+#      Substitutes the following vars:
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_EXPORT_CONFIG], [
+    #--------------------------------------------------------------------
+    # These are for $1Config.sh
+    #--------------------------------------------------------------------
+
+    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
+    eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
+    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+       eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
+       eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
+    else
+       eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+       eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
+    fi
+    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
+    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
+    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
+    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
+    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
+    $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
+
+    AC_SUBST($1_BUILD_LIB_SPEC)
+    AC_SUBST($1_LIB_SPEC)
+    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
+    AC_SUBST($1_STUB_LIB_SPEC)
+    AC_SUBST($1_BUILD_STUB_LIB_PATH)
+    AC_SUBST($1_STUB_LIB_PATH)
+
+    AC_SUBST(MAJOR_VERSION)
+    AC_SUBST(MINOR_VERSION)
+    AC_SUBST(PATCHLEVEL)
+])
+
+
+#------------------------------------------------------------------------
+# 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}
+           CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
+           AC_MSG_RESULT([found $CELIB_DIR])
+       fi
+    fi
+])
+# Local Variables:
+# mode: autoconf
+# End:
similarity index 81%
rename from pkgs/thread2.7.1/win/pkg.vc
rename to pkgs/thread2.7.2/win/pkg.vc
index cad9d82..6c9e10d 100644 (file)
@@ -3,4 +3,4 @@
 
 PACKAGE_MAJOR  = 2
 PACKAGE_MINOR  = 7
-PACKAGE_VERSION        = "2.7.1"
+PACKAGE_VERSION        = "2.7.2"
index 69c6381..8fa4e61 100644 (file)
@@ -292,6 +292,23 @@ test append-9.3 {bug 3057639, append direct eval, read trace on non-existing env
 } -cleanup {
     unset -nocomplain ::env(__DUMMY__)
 } -result {0 {new value}}
+
+test append-10.1 {Bug 214cc0eb22: lappend with no values} {
+    set lst "# 1 2 3"
+    [subst lappend] lst
+} "# 1 2 3"
+test append-10.2 {Bug 214cc0eb22: lappend with no values} -body {
+    set lst "1 \{ 2"
+    [subst lappend] lst
+} -returnCodes error -result {unmatched open brace in list}
+test append-10.3 {Bug 214cc0eb22: expanded lappend with no values} {
+    set lst "# 1 2 3"
+    [subst lappend] lst {*}[list]
+} "# 1 2 3"
+test append-10.4 {Bug 214cc0eb22: expanded lappend with no values} -body {
+    set lst "1 \{ 2"
+    [subst lappend] lst {*}[list]
+} -returnCodes error -result {unmatched open brace in list}
 \f
 unset -nocomplain i x result y
 catch {rename foo ""}
index f85c3ba..bbf5f9c 100644 (file)
@@ -438,6 +438,27 @@ test appendComp-9.3 {bug 3057639, append direct eval, read trace on non-existing
 } -cleanup {
     unset -nocomplain ::env(__DUMMY__)
 } -result {0 {new value}}
+
+test appendComp-10.1 {Bug 214cc0eb22: lappend with no values} {
+    apply {lst {
+       lappend lst
+    }} "# 1 2 3"
+} "# 1 2 3"
+test appendComp-10.2 {Bug 214cc0eb22: lappend with no values} -body {
+    apply {lst {
+       lappend lst
+    }} "1 \{ 2"
+} -returnCodes error -result {unmatched open brace in list}
+test appendComp-10.3 {Bug 214cc0eb22: expanded lappend with no values} {
+    apply {lst {
+       lappend lst {*}[list]
+    }} "# 1 2 3"
+} "# 1 2 3"
+test appendComp-10.4 {Bug 214cc0eb22: expanded lappend with no values} -body {
+    apply {lst {
+       lappend lst {*}[list]
+    }} "1 \{ 2"
+} -returnCodes error -result {unmatched open brace in list}
 \f
 catch {unset i x result y}
 catch {rename foo ""}
index 22ebc7d..d4a31d4 100644 (file)
@@ -455,14 +455,22 @@ test compile-13.1 {testing underestimate of maxStackSize in list cmd} {exec} {
     list [catch {exec [interpreter] << $script} msg] $msg
 } {0 OK}
 
-# Special test for compiling tokens from a copy of the source string. [Bug
-# 599788]
+# Tests compile-14.* for [Bug 599788] [Bug 0c043a175a47da8c2342]
 test compile-14.1 {testing errors in element name; segfault?} {} {
      catch {set a([error])} msg1
      catch {set bubba([join $abba $jubba]) $vol} msg2
      list $msg1 $msg2
 } {{wrong # args: should be "error message ?errorInfo? ?errorCode?"} {can't read "abba": no such variable}}
 
+test compile-14.2 {testing element name "$"} -body {
+    unset -nocomplain a
+    set a() 1
+    set a(1) 2 
+    set a($) 3
+    list [set a()] [set a(1)] [set a($)] [unset a() a(1); lindex [array names a] 0]
+} -cleanup {unset a} -result [list 1 2 3 {$}]
+
+
 # Tests compile-15.* cover Tcl Bug 633204
 test compile-15.1 {proper TCL_RETURN code from [return]} {
     apply {{} {catch return}}
index b09d55a..06ae81d 100644 (file)
@@ -7900,6 +7900,44 @@ test io-53.16 {[ed29c4da21] MBRead: fblocked seen as error} -setup {
     close $c
     removeFile out
 } -result 100
+test io-53.17 {[7c187a3773] MBWrite: proper inQueueTail handling} -setup {
+    proc driver {cmd args} {
+        variable buffer
+        variable index
+        set chan [lindex $args 0]
+        switch -- $cmd {
+            initialize {
+                set index($chan) 0
+                set buffer($chan) [encoding convertto utf-8 \
+                        line\n[string repeat a 100]line\n]
+                return {initialize finalize watch read}
+            }
+            finalize {
+                unset index($chan) buffer($chan)
+                return
+            }
+            watch {}
+            read {
+                set n [lindex $args 1]
+                set new [expr {$index($chan) + $n}]
+                set result [string range $buffer($chan) $index($chan) $new-1]
+                set index($chan) $new
+                return $result
+            }
+        }
+    }
+    set c [chan create read [namespace which driver]]
+    chan configure $c -encoding utf-8 -translation lf -buffersize 107
+    set out [makeFile {} out]
+    set outChan [open $out w]
+    chan configure $outChan -encoding utf-8 -translation lf
+} -body {
+    list [gets $c] [chan copy $c $outChan -size 100] [gets $c]
+} -cleanup {
+    close $outChan
+    close $c
+    removeFile out
+} -result {line 100 line}
 
 test io-54.1 {Recursive channel events} {socket fileevent} {
     # This test checks to see if file events are delivered during recursive
@@ -8485,6 +8523,25 @@ test io-73.3 {[5adc350683] [gets] after EOF} -setup {
     removeFile io-73.3
 } -result {1 1 {more data} 0 {} 1}
 
+test io-73.4 {[5adc350683] [read] after EOF} -setup {
+    set fn [makeFile {} io-73.4]
+    set rfd [open $fn r]
+    set wfd [open $fn a]
+    chan configure $wfd -buffering line
+    read $rfd
+} -body {
+    set result [eof $rfd]
+    puts $wfd "more data"
+    lappend result [eof $rfd]
+    lappend result [read $rfd]
+    lappend result [eof $rfd]
+} -cleanup {
+    close $wfd
+    close $rfd
+    removeFile io-73.4
+} -result {1 1 {more data
+} 1}
+
 # ### ### ### ######### ######### #########
 
 # cleanup
index 57f8d47..4fbc380 100644 (file)
@@ -294,7 +294,7 @@ test iocmd-8.15.1 {fconfigure command / tcp channel} -constraints {socket unixOr
     close $srv
     unset cli srv port
     rename iocmdSRV {}
-} -returnCodes error -result {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -peername, or -sockname}
+} -returnCodes error -result {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -connecting, -peername, or -sockname}
 test iocmd-8.16 {fconfigure command / tcp channel} -constraints socket -setup {
     set srv [socket -server iocmdSRV -myaddr 127.0.0.1 0]
     set port [lindex [fconfigure $srv -sockname] 2]
index 164d65e..d8049cd 100644 (file)
@@ -29,7 +29,7 @@ MODIFICATIONS.
 
 GOVERNMENT USE: If you are acquiring this software on behalf of the
 U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal 
+in the software and related documentation as defined in the Federal
 Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
 are acquiring the software on behalf of the Department of Defense, the
 software shall be classified as "Commercial Computer Software" and the
@@ -37,4 +37,4 @@ Government shall have only "Restricted Rights" as defined in Clause
 252.227-7014 (b) (3) of DFARs.  Notwithstanding the foregoing, the
 authors grant the U.S. Government and others acting in its behalf
 permission to use and distribute the software in accordance with the
-terms specified in this license. 
+terms specified in this license.
index b976788..d1319c6 100644 (file)
@@ -137,6 +137,15 @@ test lreplace-4.1 {Bug ccc2c2cc98: lreplace edge case} {
 test lreplace-4.2 {Bug ccc2c2cc98: lreplace edge case} {
     lreplace { } 1 1
 } {}
+test lreplace-4.3 {lreplace edge case} {
+    lreplace {1 2 3} 2 0
+} {1 2 3}
+test lreplace-4.4 {lreplace edge case} {
+    lreplace {1 2 3 4 5} 3 1
+} {1 2 3 4 5}
+test lreplace-4.5 {lreplace edge case} {
+    lreplace {1 2 3 4 5} 3 0 _
+} {1 2 3 _ 4 5}
 \f
 # cleanup
 catch {unset foo}
index 5d8afeb..d73c725 100644 (file)
@@ -663,6 +663,9 @@ test parse-12.24 {Tcl_ParseVarName procedure, missing close paren in array refer
 test parse-12.25 {Tcl_ParseVarName procedure, nested array reference} testparser {
     testparser {$x(a$y(b$z))} 0
 } {- {$x(a$y(b$z))} 1 word {$x(a$y(b$z))} 8 variable {$x(a$y(b$z))} 7 text x 0 text a 0 variable {$y(b$z)} 4 text y 0 text b 0 variable {$z} 1 text z 0 {}}
+test parse-12.26 {Tcl_ParseVarName [d2ffcca163] non-ascii} testparser {
+    testparser "$\u0433" -1
+} "- {$\u0433} 1 word {$\u0433} 2 text {$} 0 text \u0433 0 {}"
 
 test parse-13.1 {Tcl_ParseVar procedure} testparsevar {
     set abc 24
index 5c7986a..ef05454 100644 (file)
@@ -1064,6 +1064,15 @@ test parseExpr-22.18 {Bug 3401704} -constraints testexprparser -body {
     dict get $o -errorcode
 } -result {TCL PARSE EXPR BADNUMBER BINARY}
 
+test parseExpr-22.19 {Bug d2ffcca163} -constraints testexprparser -body {
+    testexprparser \u0433 -1
+} -returnCodes error -match glob -result {*invalid character*}
+test parseExpr-22.20 {Bug d2ffcca163} -constraints testexprparser -body {
+    testexprparser \u043f -1
+} -returnCodes error -match glob -result {*invalid character*}
+test parseExpr-22.21 {Bug d2ffcca163} -constraints testexprparser -body {
+    testexprparser in\u0433(0) -1
+} -returnCodes error -match glob -result {missing operand*}
 
 # cleanup
 cleanupTests
index eeea044..4f90e51 100644 (file)
@@ -2343,6 +2343,24 @@ test socket-14.17 {empty -sockname while [socket -async] connecting} \
         catch {close $client}
     } -result {}
 
+# test for bug c6ed4acfd8: running async socket connect with other connect
+# established will block tcl as it goes in an infinite loop in vwait
+test socket-14.18 {bug c6ed4acfd8: running async socket connect made other connect block} \
+    -constraints {socket} \
+    -body {
+        proc accept {channel address port} {}
+        set port [randport]
+        set ssock [socket -server accept $port]
+        set csock1 [socket -async localhost [randport]]
+        set csock2 [socket localhost $port]
+        after 1000 {set done ok}
+        vwait done
+} -cleanup {
+        catch {close $ssock}
+        catch {close $csock1}
+        catch {close $csock2}
+    } -result {}
+
 set num 0
 
 set x {localhost {socket} 127.0.0.1 {supported_inet} ::1 {supported_inet6}}
index f9f6bda..a66525e 100644 (file)
@@ -720,6 +720,14 @@ test stringComp-14.2 {Bug 82e7f67325} memory {
        }} {a b}
     }
 } {0}
+test stringComp-14.3 {Bug 0dca3bfa8f} {
+    apply {arg {
+       set argCopy $arg
+       set arg [string replace $arg 1 2 aa]
+       # Crashes in comparison before fix
+       expr {$arg ne $argCopy}
+    }} abcde
+} 1
 
 ## string tolower
 ## not yet bc
index ab675d7..a808c82 100644 (file)
@@ -1314,14 +1314,14 @@ test winFCmd-18.1.2 {Windows reserved path names} -constraints win -body {
     file pathtype com4
 } -result "absolute"
 test winFCmd-18.1.3 {Windows reserved path names} -constraints win -body {
-    file pathtype com5
-} -result "relative"
+    file pathtype com9
+} -result "absolute"
 test winFCmd-18.1.4 {Windows reserved path names} -constraints win -body {
     file pathtype lpt3
 } -result "absolute"
 test winFCmd-18.1.5 {Windows reserved path names} -constraints win -body {
-    file pathtype lpt4
-} -result "relative"
+    file pathtype lpt9
+} -result "absolute"
 test winFCmd-18.1.6 {Windows reserved path names} -constraints win -body {
     file pathtype nul
 } -result "absolute"
@@ -1423,6 +1423,11 @@ test winFCmd-19.8 {Windows extended path names} -constraints nt -setup {
     catch {file delete $tmpfile}
 } -result [list 0 {} [list "tcl[pid].tmp "]]
 
+test winFCmd-19.9 {Windows devices path names} -constraints nt -body {
+    file normalize //./com1
+} -result //./com1
+
+
 # This block of code used to occur after the "return" call, so I'm
 # commenting it out and assuming that this code is still under construction.
 #foreach source {tef ted tnf tnd "" nul com1} {
index 89e8e5c..1ceceb9 100755 (executable)
@@ -667,7 +667,11 @@ try {
 
            # ... but try to extract (name, version) from subdir contents
            try {
-               set f [open [file join $pkgsDir $dir configure.in]]
+               try {
+                   set f [open [file join $pkgsDir $dir configure.in]]
+               } trap {POSIX ENOENT} {} {
+                   set f [open [file join $pkgsDir $dir configure.ac]]
+               }
                foreach line [split [read $f] \n] {
                    if {2 == [scan $line \
                            { AC_INIT ( [%[^]]] , [%[^]]] ) } n v]} {
index a9837d9..6f5311c 100755 (executable)
@@ -1335,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 TCL_VERSION=8.6
 TCL_MAJOR_VERSION=8
 TCL_MINOR_VERSION=6
-TCL_PATCH_LEVEL=".3"
+TCL_PATCH_LEVEL=".4"
 VERSION=${TCL_VERSION}
 
 EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
index e44d554..c7b0edc 100755 (executable)
@@ -25,7 +25,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
 TCL_VERSION=8.6
 TCL_MAJOR_VERSION=8
 TCL_MINOR_VERSION=6
-TCL_PATCH_LEVEL=".3"
+TCL_PATCH_LEVEL=".4"
 VERSION=${TCL_VERSION}
 
 EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
index 51b2995..f115ea8 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# 
+#
 # ldAix ldCmd ldArg ldArg ...
 #
 # This shell script provides a wrapper for ld under AIX in order to
@@ -40,8 +40,8 @@ rm -f lib.exp
 echo "#! $outputFile" >lib.exp
 /usr/ccs/bin/nm $nmopts $ofiles | sed -e '/:$/d' -e '/ U /d' -e 's/^\.//' -e 's/[      |].*//' | sort | uniq >>lib.exp
 
-# If we're linking a .a file, then link all the objects together into a 
-# single file "shr.o" and then put that into the archive.  Otherwise link 
+# If we're linking a .a file, then link all the objects together into a
+# single file "shr.o" and then put that into the archive.  Otherwise link
 # the object files directly into the .a file.
 
 noDotA=`echo $outputFile | sed -e '/\.a$/d'`
index d660f74..1b8693f 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:          tcl
 Summary:       Tcl scripting language development environment
-Version:       8.6.3
+Version:       8.6.4
 Release:       2
 License:       BSD
 Group:         Development/Languages
@@ -30,7 +30,7 @@ CFLAGS="%optflags" ./configure \
        --prefix=%{directory} \
        --exec-prefix=%{directory} \
        --libdir=%{directory}/%{_lib}
-make 
+make
 
 %install
 cd unix
index e55dcd0..10ae12f 100644 (file)
@@ -4,9 +4,6 @@
     #ifndef _TCLCONFIG
     #define _TCLCONFIG
 
-/* Define if building universal (internal helper macro) */
-#undef AC_APPLE_UNIVERSAL_BUILD
-
 /* Is gettimeofday() actually declared in <sys/time.h>? */
 #undef GETTOD_NOT_DECLARED
 
 /* Is 'struct stat64' in <sys/stat.h>? */
 #undef HAVE_STRUCT_STAT64
 
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
-/* Define to 1 if `st_blocks' is member of `struct stat'. */
+/* Define to 1 if `st_blocks' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLOCKS
 
 /* Define to 1 if you have the <sys/filio.h> header file. */
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
 /* Should we use vfork() instead of fork()? */
 #undef USE_VFORK
 
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-#  undef WORDS_BIGENDIAN
-# endif
-#endif
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
 
 /* Are Darwin SUSv3 extensions available? */
 #undef _DARWIN_C_SOURCE
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t
 
-/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* Define to `unsigned' if <sys/types.h> does not define. */
 #undef size_t
 
 /* Define as int if socklen_t is not available */
index 2eca714..a1fe090 100644 (file)
@@ -792,7 +792,7 @@ TtySetOptionProc(
  *
  * Results:
  *     A standard Tcl result. Also sets the supplied DString to the string
- *     value of the option(s) returned.  Sets error message if needed 
+ *     value of the option(s) returned.  Sets error message if needed
  *     (by calling Tcl_BadChannelOption).
  *
  *----------------------------------------------------------------------
@@ -1201,7 +1201,7 @@ TtyParseMode(
     char parity;
     const char *bad = "bad value for -mode";
 
-    i = sscanf(mode, "%d,%c,%d,%d%n", 
+    i = sscanf(mode, "%d,%c,%d,%d%n",
            &ttyPtr->baud,
            &parity,
            &ttyPtr->data,
@@ -1292,7 +1292,7 @@ TtyInit(
            || iostate.c_lflag != 0
            || iostate.c_cflag & CREAD
            || iostate.c_cc[VMIN] != 1
-           || iostate.c_cc[VTIME] != 0) 
+           || iostate.c_cc[VTIME] != 0)
     {
        iostate.c_iflag = IGNBRK;
        iostate.c_oflag = 0;
@@ -1824,7 +1824,7 @@ TclUnixWaitForFile(
            if (FD_ISSET(fd, &writableMask)) {
                SET_BITS(result, TCL_WRITABLE);
            }
-           if (FD_ISSET(fd, &exceptionMask)) { 
+           if (FD_ISSET(fd, &exceptionMask)) {
                SET_BITS(result, TCL_EXCEPTION);
            }
            result &= mask;
index 1617cba..520c8e5 100644 (file)
@@ -768,7 +768,7 @@ TclpSetVariables(
      */
 
     CFLocaleRef localeRef;
-    
+
     if (CFLocaleCopyCurrent != NULL && CFLocaleGetIdentifier != NULL &&
            (localeRef = CFLocaleCopyCurrent())) {
        CFStringRef locale = CFLocaleGetIdentifier(localeRef);
index 95bc8d1..8b26694 100644 (file)
@@ -261,7 +261,7 @@ TclpTempFileName(void)
  *
  * On Unix, it works to load a shared object from a file of any name, so this
  * function is merely a thin wrapper around TclpTempFileName().
- *     
+ *
  *----------------------------------------------------------------------------
  */
 
@@ -969,7 +969,7 @@ PipeClose2Proc(
            pipePtr->outFile = NULL;
        }
     }
-    
+
     /*
      * If half-closing, stop here.
      */
index d06e7f1..9c5cd4b 100644 (file)
@@ -438,11 +438,11 @@ WaitForConnect(
     /*
      * Check if an async connect is running. If not return ok
      */
-     
+
     if (!(statePtr->flags & TCP_ASYNC_PENDING)) {
        return 0;
     }
-    
+
     if (errorCodePtr == NULL || (statePtr->flags & TCP_NONBLOCKING)) {
         timeout = 0;
     } else {
@@ -601,7 +601,7 @@ TcpCloseProc(
      * handlers are already deleted in the generic IO channel closing code
      * that called this function, so we do not have to delete them here.
      */
-    
+
     for (fds = &statePtr->fds; fds != NULL; fds = fds->next) {
        if (fds->fd < 0) {
            continue;
@@ -610,7 +610,7 @@ TcpCloseProc(
        if (close(fds->fd) < 0) {
            errorCode = errno;
        }
-    
+
     }
     fds = statePtr->fds.next;
     while (fds != NULL) {
@@ -905,7 +905,7 @@ TcpGetOptionProc(
     }
 
     if (len > 0) {
-       return Tcl_BadChannelOption(interp, optionName, "peername sockname");
+       return Tcl_BadChannelOption(interp, optionName, "connecting peername sockname");
     }
 
     return TCL_OK;
@@ -974,7 +974,7 @@ TcpWatchProc(
          */
        return;
     }
-     
+
     if (statePtr->flags & TCP_ASYNC_PENDING) {
         /* Async sockets use a FileHandler internally while connecting, so we
          * need to cache this request until the connection has succeeded. */
@@ -1111,7 +1111,7 @@ TcpConnect(
         for (statePtr->myaddr = statePtr->myaddrlist; statePtr->myaddr != NULL;
                 statePtr->myaddr = statePtr->myaddr->ai_next) {
             int reuseaddr = 1;
-            
+
            /*
             * No need to try combinations of local and remote addresses of
             * different families.
@@ -1141,15 +1141,15 @@ TcpConnect(
             * Set the close-on-exec flag so that the socket will not get
             * inherited by child processes.
             */
-           
+
            fcntl(statePtr->fds.fd, F_SETFD, FD_CLOEXEC);
-           
+
            /*
             * Set kernel space buffering
             */
-           
+
            TclSockMinimumBuffers(INT2PTR(statePtr->fds.fd), SOCKET_BUFSIZE);
-    
+
            if (async) {
                 ret = TclUnixSetBlockingMode(statePtr->fds.fd,TCL_MODE_NONBLOCKING);
                 if (ret < 0) {
@@ -1160,7 +1160,7 @@ TcpConnect(
             /* Gotta reset the error variable here, before we use it for the
              * first time in this iteration. */
             error = 0;
-            
+
             (void) setsockopt(statePtr->fds.fd, SOL_SOCKET, SO_REUSEADDR,
                     (char *) &reuseaddr, sizeof(reuseaddr));
             ret = bind(statePtr->fds.fd, statePtr->myaddr->ai_addr,
@@ -1176,7 +1176,7 @@ TcpConnect(
             * will set up a file handler on the socket if she is interested
             * in being informed when the connect completes.
             */
-           
+
            ret = connect(statePtr->fds.fd, statePtr->addr->ai_addr,
                         statePtr->addr->ai_addrlen);
             if (ret < 0) error = errno;
@@ -1459,28 +1459,28 @@ Tcl_OpenTcpServer(
            }
            continue;
        }
-       
+
        /*
         * Set the close-on-exec flag so that the socket will not get
         * inherited by child processes.
         */
-       
+
        fcntl(sock, F_SETFD, FD_CLOEXEC);
-       
+
        /*
         * Set kernel space buffering
         */
-       
+
        TclSockMinimumBuffers(INT2PTR(sock), SOCKET_BUFSIZE);
-       
+
        /*
         * Set up to reuse server addresses automatically and bind to the
         * specified port.
         */
-       
-       (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, 
+
+       (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
                (char *) &reuseaddr, sizeof(reuseaddr));
-       
+
         /*
          * Make sure we use the same port number when opening two server
          * sockets for IPv4 and IPv6 on a random port.
@@ -1509,7 +1509,7 @@ Tcl_OpenTcpServer(
            if (howfar < BIND) {
                howfar = BIND;
                my_errno = errno;
-           }       
+           }
             close(sock);
             sock = -1;
             continue;
@@ -1541,7 +1541,7 @@ Tcl_OpenTcpServer(
             /*
              * Allocate a new TcpState for this socket.
              */
-            
+
             statePtr = ckalloc(sizeof(TcpState));
             memset(statePtr, 0, sizeof(TcpState));
             statePtr->acceptProc = acceptProc;
@@ -1556,12 +1556,12 @@ Tcl_OpenTcpServer(
         newfds->fd = sock;
         newfds->statePtr = statePtr;
         fds = newfds;
-       
+
         /*
          * Set up the callback mechanism for accepting connections from new
          * clients.
          */
-        
+
         Tcl_CreateFileHandler(sock, TCL_READABLE, TcpAccept, fds);
     }
 
@@ -1620,7 +1620,7 @@ TcpAccept(
     socklen_t len;             /* For accept interface */
     char channelName[SOCK_CHAN_LENGTH];
     char host[NI_MAXHOST], port[NI_MAXSERV];
-    
+
     len = sizeof(addr);
     newsock = accept(fds->fd, &addr.sa, &len);
     if (newsock < 0) {
index 6a73132..f03b530 100644 (file)
@@ -8,7 +8,7 @@
  * See the file "license.terms" for information on usage and redistribution
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  */
+
 #ifndef _TCLUNIXTHRD
 #define _TCLUNIXTHRD
 
index 4452022..315bcf9 100644 (file)
@@ -199,7 +199,7 @@ TclpWideClicksToNanoseconds(
 #ifdef MAC_OSX_TCL
        static mach_timebase_info_data_t tb;
        static uint64_t maxClicksForUInt64;
-       
+
        if (!tb.denom) {
            mach_timebase_info(&tb);
            maxClicksForUInt64 = UINT64_MAX / tb.numer;
index 1a2d501..5e060ef 100644 (file)
@@ -79,7 +79,7 @@ Use the Makefile "install" target to install Tcl.  It will install it
 according to the prefix options you provided in the correct directory
 structure.
 
-Note that in order to run tclsh85.exe, you must ensure that tcl85.dll is
+Note that in order to run tclsh86.exe, you must ensure that tcl86.dll is
 on your path, in the system directory, or in the directory containing
 tclsh86.exe.
 
index b270648..bdfa908 100755 (executable)
@@ -1311,7 +1311,7 @@ SHELL=/bin/sh
 TCL_VERSION=8.6
 TCL_MAJOR_VERSION=8
 TCL_MINOR_VERSION=6
-TCL_PATCH_LEVEL=".3"
+TCL_PATCH_LEVEL=".4"
 VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
 
 TCL_DDE_VERSION=1.4
index 1bf901a..99d78f2 100644 (file)
@@ -14,7 +14,7 @@ SHELL=/bin/sh
 TCL_VERSION=8.6
 TCL_MAJOR_VERSION=8
 TCL_MINOR_VERSION=6
-TCL_PATCH_LEVEL=".3"
+TCL_PATCH_LEVEL=".4"
 VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
 
 TCL_DDE_VERSION=1.4
index 164d65e..d8049cd 100644 (file)
@@ -29,7 +29,7 @@ MODIFICATIONS.
 
 GOVERNMENT USE: If you are acquiring this software on behalf of the
 U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal 
+in the software and related documentation as defined in the Federal
 Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
 are acquiring the software on behalf of the Department of Defense, the
 software shall be classified as "Commercial Computer Software" and the
@@ -37,4 +37,4 @@ Government shall have only "Restricted Rights" as defined in Clause
 252.227-7014 (b) (3) of DFARs.  Notwithstanding the foregoing, the
 authors grant the U.S. Government and others acting in its behalf
 permission to use and distribute the software in accordance with the
-terms specified in this license. 
+terms specified in this license.
index 00a8790..75324b2 100644 (file)
@@ -1,5 +1,5 @@
 # tclConfig.sh --
-# 
+#
 # This shell script (for sh) is generated automatically by Tcl's
 # configure script.  It will create shell variables for most of
 # the configuration options discovered by the configure script.
index 2d6c42c..cca0dab 100644 (file)
@@ -971,7 +971,7 @@ TclpOpenFileChannel(
     switch (FileGetType(handle)) {
     case FILE_TYPE_SERIAL:
        /*
-        * Natively named serial ports "com1-9", "\\\\.\\comXX" are 
+        * Natively named serial ports "com1-9", "\\\\.\\comXX" are
         * already done with the code above.
         * Here we handle all other serial port names.
         *
@@ -1525,12 +1525,11 @@ FileGetType(
  * NativeIsComPort --
  *
  *     Determines if a path refers to a Windows serial port.
- *     A simple and efficient solution is to use a "name hint" to detect 
- *      COM ports by their filename instead of resorting to a syscall 
+ *     A simple and efficient solution is to use a "name hint" to detect
+ *      COM ports by their filename instead of resorting to a syscall
  *     to detect serialness after the fact.
  *     The following patterns cover common serial port names:
- *         COM[1-9]:?
- *         //./COM[0-9]+
+ *         COM[1-9]
  *         \\.\COM[0-9]+
  *
  * Results:
@@ -1550,33 +1549,26 @@ NativeIsComPort(
      * 1. Look for com[1-9]:?
      */
 
-    if ( (len >= 4) && (len <= 5) 
-           && (_wcsnicmp(p, L"com", 3) == 0) ) {
+    if ( (len == 4) && (_wcsnicmp(p, L"com", 3) == 0) ) {
        /*
-       * The 4th character must be a digit 1..9 optionally followed by a ":"
+       * The 4th character must be a digit 1..9
        */
-       
+
        if ( (p[3] < L'1') || (p[3] > L'9') ) {
            return 0;
        }
-       if ( (len == 5) && (p[4] != L':') ) {
-           return 0;
-       }
        return 1;
     }
-    
+
     /*
-     * 2. Look for //./com[0-9]+ or \\.\com[0-9]+
+     * 2. Look for \\.\com[0-9]+
      */
-    
-    if ( (len >= 8) && ( 
-              (_wcsnicmp(p, L"//./com", 7) == 0)
-           || (_wcsnicmp(p, L"\\\\.\\com", 7) == 0) ) )
-    {
+
+    if ((len >= 8) && (_wcsnicmp(p, L"\\\\.\\com", 7) == 0)) {
        /*
        * Charaters 8..end must be a digits 0..9
        */
-    
+
        for ( i=7; i<len; i++ ) {
            if ( (p[i] < '0') || (p[i] > '9') ) {
                return 0;
index 6630083..63150ef 100644 (file)
@@ -761,7 +761,7 @@ ConsoleInputProc(
         * by the caller.  In practice this is harmless, since all writes
         * are into ChannelBuffers, and those have padding, but still
         * ought to remove this, unless some Windows wizard can give
-        * a reason not to.  
+        * a reason not to.
         */
        buf[count] = '\0';
        return count;
index 4cd042a..d6ca348 100644 (file)
@@ -1262,9 +1262,9 @@ WinIsReserved(
     } else if ((path[0] == 'l' || path[0] == 'L')
            && (path[1] == 'p' || path[1] == 'P')
            && (path[2] == 't' || path[2] == 'T')) {
-       if (path[3] >= '1' && path[3] <= '3') {
+       if (path[3] >= '1' && path[3] <= '9') {
            /*
-            * May have match for 'lpt[1-3]:?'
+            * May have match for 'lpt[1-9]:?'
             */
 
            if (path[4] == '\0') {
index 6487fe4..0730a46 100644 (file)
@@ -1415,7 +1415,7 @@ SerialWriterThread(
  *     Opens or Reopens the serial port with the OVERLAPPED FLAG set
  *
  * Results:
- *     Returns the new handle, or INVALID_HANDLE_VALUE. 
+ *     Returns the new handle, or INVALID_HANDLE_VALUE.
  *     If an existing channel is specified it is closed and reopened.
  *
  * Side effects:
index 66df291..a022ed5 100644 (file)
@@ -596,7 +596,7 @@ WaitForConnect(
     /*
      * Check if an async connect is running. If not return ok
      */
-     
+
     if (!(statePtr->flags & TCP_ASYNC_CONNECT)) {
        return 0;
     }
@@ -616,7 +616,7 @@ WaitForConnect(
        /* get statePtr lock */
         tsdPtr = TclThreadDataKeyGet(&dataKey);
        WaitForSingleObject(tsdPtr->socketListLock, INFINITE);
-       
+
        /* Check for connect event */
        if (statePtr->readyEvents & FD_CONNECT) {
 
@@ -1250,7 +1250,7 @@ TcpGetOptionProc(
        return TCL_ERROR;
     }
 
-    /* 
+    /*
      * Go one step in async connect
      * If any error is thrown save it as backround error to report eventually below
      */
@@ -1501,9 +1501,9 @@ TcpGetOptionProc(
     if (len > 0) {
 #ifdef TCL_FEATURE_KEEPALIVE_NAGLE
        return Tcl_BadChannelOption(interp, optionName,
-               "peername sockname keepalive nagle");
+               "connecting peername sockname keepalive nagle");
 #else
-       return Tcl_BadChannelOption(interp, optionName, "peername sockname");
+       return Tcl_BadChannelOption(interp, optionName, "connecting peername sockname");
 #endif /*TCL_FEATURE_KEEPALIVE_NAGLE*/
     }
 
@@ -1647,14 +1647,14 @@ TcpConnect(
     /* We were called by the event procedure and continue our loop */
     int async_callback = statePtr->flags & TCP_ASYNC_PENDING;
     ThreadSpecificData *tsdPtr = TclThreadDataKeyGet(&dataKey);
-    
+
     if (async_callback) {
         goto reenter;
     }
-    
+
     for (statePtr->addr = statePtr->addrlist; statePtr->addr != NULL;
         statePtr->addr = statePtr->addr->ai_next) {
-       
+
         for (statePtr->myaddr = statePtr->myaddrlist; statePtr->myaddr != NULL;
             statePtr->myaddr = statePtr->myaddr->ai_next) {
 
@@ -1670,7 +1670,7 @@ TcpConnect(
             /*
              * Close the socket if it is still open from the last unsuccessful
              * iteration.
-             */            
+             */
            if (statePtr->sockets->fd != INVALID_SOCKET) {
                closesocket(statePtr->sockets->fd);
            }
@@ -1683,9 +1683,9 @@ TcpConnect(
             */
            statePtr->notifierConnectError = 0;
            Tcl_SetErrno(0);
-           
+
            statePtr->sockets->fd = socket(statePtr->myaddr->ai_family, SOCK_STREAM, 0);
-           
+
            /* Free list lock */
            SetEvent(tsdPtr->socketListLock);
 
@@ -1739,7 +1739,7 @@ TcpConnect(
                 */
 
                for (statePtr2 = tsdPtr->socketList; statePtr2 != NULL;
-                       statePtr2 = statePtr->nextPtr) {
+                       statePtr2 = statePtr2->nextPtr) {
                    if (statePtr2 == statePtr) {
                        in_socket_list = 1;
                        break;
@@ -1754,7 +1754,7 @@ TcpConnect(
                 * thread.
                 */
                statePtr->selectEvents |= FD_CONNECT;
-               
+
                /*
                 * Free list lock
                 */
@@ -1768,7 +1768,7 @@ TcpConnect(
            /*
             * Attempt to connect to the remote socket.
             */
-           
+
            connect(statePtr->sockets->fd, statePtr->addr->ai_addr,
                    statePtr->addr->ai_addrlen);
 
@@ -1809,7 +1809,7 @@ TcpConnect(
             * the FD_CONNECT asyncroneously
             */
            tsdPtr->pendingTcpState = NULL;
-           
+
            if (Tcl_GetErrno() == 0) {
                goto out;
            }
@@ -1835,12 +1835,12 @@ out:
         * Set up the select mask for read/write events.
         */
        statePtr->selectEvents = FD_READ | FD_WRITE | FD_CLOSE;
-        
+
        /*
         * Register for interest in events in the select mask. Note that this
         * automatically places the socket into non-blocking mode.
         */
-        
+
        SendMessage(tsdPtr->hwnd, SOCKET_SELECT, (WPARAM) SELECT,
                    (LPARAM) statePtr);
     } else {
@@ -2092,20 +2092,20 @@ Tcl_OpenTcpServer(
            TclWinConvertError((DWORD) WSAGetLastError());
            continue;
        }
-       
+
        /*
         * Win-NT has a misfeature that sockets are inherited in child
         * processes by default. Turn off the inherit bit.
         */
-       
+
        SetHandleInformation((HANDLE) sock, HANDLE_FLAG_INHERIT, 0);
-       
+
        /*
         * Set kernel space buffering
         */
-       
+
        TclSockMinimumBuffers((void *)sock, TCP_BUFFER_SIZE);
-       
+
        /*
         * Make sure we use the same port when opening two server sockets
         * for IPv4 and IPv6.
@@ -2113,12 +2113,12 @@ Tcl_OpenTcpServer(
         * As sockaddr_in6 uses the same offset and size for the port
         * member as sockaddr_in, we can handle both through the IPv4 API.
         */
-       
+
        if (port == 0 && chosenport != 0) {
            ((struct sockaddr_in *) addrPtr->ai_addr)->sin_port =
                htons(chosenport);
        }
-       
+
        /*
         * Bind to the specified port. Note that we must not call
         * setsockopt with SO_REUSEADDR because Microsoft allows addresses
@@ -2128,7 +2128,7 @@ Tcl_OpenTcpServer(
         * set into nonblocking mode. If there is trouble, this is one
         * place to look for bugs.
         */
-       
+
        if (bind(sock, addrPtr->ai_addr, addrPtr->ai_addrlen)
            == SOCKET_ERROR) {
            TclWinConvertError((DWORD) WSAGetLastError());
@@ -2138,29 +2138,29 @@ Tcl_OpenTcpServer(
        if (port == 0 && chosenport == 0) {
            address sockname;
            socklen_t namelen = sizeof(sockname);
-           
+
            /*
             * Synchronize port numbers when binding to port 0 of multiple
             * addresses.
             */
-           
+
            if (getsockname(sock, &sockname.sa, &namelen) >= 0) {
                chosenport = ntohs(sockname.sa4.sin_port);
            }
        }
-       
+
        /*
         * Set the maximum number of pending connect requests to the max
         * value allowed on each platform (Win32 and Win32s may be
         * different, and there may be differences between TCP/IP stacks).
         */
-       
+
        if (listen(sock, SOMAXCONN) == SOCKET_ERROR) {
            TclWinConvertError((DWORD) WSAGetLastError());
            closesocket(sock);
            continue;
        }
-       
+
        if (statePtr == NULL) {
            /*
             * Add this socket to the global list of sockets.
@@ -2186,9 +2186,9 @@ error:
        /*
         * Set up the select mask for connection request events.
         */
-       
+
        statePtr->selectEvents = FD_ACCEPT;
-       
+
        /*
         * Register for interest in events in the select mask. Note that this
         * automatically places the socket into non-blocking mode.
@@ -2652,7 +2652,7 @@ SocketEventProc(
            WaitForConnect(statePtr,NULL);
 
        } else {
-           
+
            /*
             * No async connect reenter pending. Just clear event.
             */
@@ -2681,7 +2681,7 @@ SocketEventProc(
             * network stack conditions that can result in FD_ACCEPT but a subsequent
             * failure on accept() by the time we get around to it.
             * Access to sockets (acceptEventCount, readyEvents) in socketList
-            * is still protected by the lock (prevents reintroduction of 
+            * is still protected by the lock (prevents reintroduction of
             * SF Tcl Bug 3056775.
             */
 
@@ -2713,9 +2713,9 @@ SocketEventProc(
            return 1;
        }
 
-       /* Loop terminated with no sockets accepted; clear the ready mask so 
-        * we can detect the next connection request. Note that connection 
-        * requests are level triggered, so if there is a request already 
+       /* Loop terminated with no sockets accepted; clear the ready mask so
+        * we can detect the next connection request. Note that connection
+        * requests are level triggered, so if there is a request already
         * pending, a new event will be generated.
         */
        statePtr->acceptEventCount = 0;
@@ -2758,7 +2758,7 @@ SocketEventProc(
        if ( statePtr->flags & TCP_ASYNC_FAILED ) {
 
            mask |= TCL_READABLE;
-           
+
        } else {
            fd_set readFds;
            struct timeval timeout;
@@ -2796,11 +2796,11 @@ SocketEventProc(
     if (events & FD_WRITE) {
        mask |= TCL_WRITABLE;
     }
-    
+
     /*
      * Call registered event procedures
      */
-     
+
     if (mask) {
        Tcl_NotifyChannel(statePtr->channel, mask);
     }
@@ -2812,7 +2812,7 @@ SocketEventProc(
  *
  * AddSocketInfoFd --
  *
- *     This function adds a SOCKET file descriptor to the 'sockets' linked 
+ *     This function adds a SOCKET file descriptor to the 'sockets' linked
  *     list of a TcpState structure.
  *
  * Results:
@@ -2826,7 +2826,7 @@ SocketEventProc(
 
 static void
 AddSocketInfoFd(
-    TcpState *statePtr, 
+    TcpState *statePtr,
     SOCKET socket)
 {
     TcpFdList *fds = statePtr->sockets;
@@ -2840,7 +2840,7 @@ AddSocketInfoFd(
        while ( fds->next != NULL ) {
            fds = fds->next;
        }
-    
+
        fds->next = ckalloc(sizeof(TcpFdList));
        fds = fds->next;
     }
@@ -2851,7 +2851,7 @@ AddSocketInfoFd(
     fds->next = NULL;
 }
 
-    
+
 /*
  *----------------------------------------------------------------------
  *
@@ -2935,7 +2935,7 @@ WaitForSocketEvent(
 
        /* get statePtr lock */
        WaitForSingleObject(tsdPtr->socketListLock, INFINITE);
-       
+
        /* Check if event occured */
        event_found = (statePtr->readyEvents & events);
 
@@ -2946,7 +2946,7 @@ WaitForSocketEvent(
        if (event_found) {
            break;
        }
-       
+
        /* Exit loop if event did not occur but this is a non-blocking channel */
        if (statePtr->flags & TCP_NONBLOCKING) {
            *errorCodePtr = EWOULDBLOCK;
@@ -3313,11 +3313,11 @@ TcpThreadActionProc(
        WaitForSingleObject(tsdPtr->socketListLock, INFINITE);
        statePtr->nextPtr = tsdPtr->socketList;
        tsdPtr->socketList = statePtr;
-       
+
        if (statePtr == tsdPtr->pendingTcpState) {
            tsdPtr->pendingTcpState = NULL;
        }
-       
+
        SetEvent(tsdPtr->socketListLock);
 
        notifyCmd = SELECT;