tdbc::postgres

Check-in [74c6b9a6bf]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:REFACTOR REPOSITORY: remove local tclconfig in favour of nested checkout
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 74c6b9a6bf5e75cf9f1099f6c936af2c0c1710b3
User & Date: 200002852 2012-11-14 17:20:26
Context
2012-11-14
17:26
REFACTOR REPOSITORY : move tdbcpostgres/ to the main directory check-in: dd7e65bd1f user: 200002852 tags: trunk
17:20
REFACTOR REPOSITORY: remove local tclconfig in favour of nested checkout check-in: 74c6b9a6bf user: 200002852 tags: trunk
17:18
REFACTOR REPOSITORY : remove all but the tdbcpostgres module check-in: 0bdbe1135b user: 200002852 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Deleted tdbcpostgres/tclconfig/ChangeLog.

     1         -2012-08-07  Stuart Cassoff  <[email protected]>
     2         -
     3         -	* tcl.m4: Added "-DNDEBUG" to CFLAGS_DEFAULT
     4         -	when building with --disable-symbols.
     5         -
     6         -2012-08-07  Stuart Cassoff  <[email protected]>
     7         -
     8         -	* tcl.m4: [Bug 3555058]: Checkin [30736d63f0] broke
     9         -	CFLAGS_DEFAULT, LDFLAGS_DEFAULT
    10         -
    11         -2012-08-07  Stuart Cassoff  <[email protected]>
    12         -
    13         -	* tcl.m4: [Bug 3511806]: Checkin [30736d63f0] broke CFLAGS
    14         -
    15         -2012-08-07  Jan Nijtmans  <[email protected]>
    16         -
    17         -	* tcl.m4: [Bug 3511806]: Checkin [30736d63f0] broke CFLAGS
    18         -
    19         -2012-07-25  Jan Nijtmans  <[email protected]>
    20         -
    21         -	* tcl.m4: My previous commit (2012-04-03) broke the ActiveTcl
    22         -	build for AMD64, because of the quotes in "C:/<path>/AMD64/cl.exe".
    23         -	It turns out that the AC_TRY_COMPILE macro cannot handle that.
    24         -
    25         -2012-07-22  Stuart Cassoff  <[email protected]>
    26         -
    27         -	* tcl.m4: Tidy: consistency, spelling, phrasing, whitespace.
    28         -	No functional change.
    29         -
    30         -2012-04-03  Jan Nijtmans  <[email protected]>
    31         -
    32         -	* tcl.m4: [Bug 3511806] Compiler checks too early
    33         -	This change allows to build the cygwin and mingw32 ports of
    34         -	Tcl/Tk extensions to build out-of-the-box using a native or
    35         -	cross-compiler, e.g. on Cygwin, Linux or Darwin.
    36         -
    37         -2011-04-02  Jan Nijtmans  <[email protected]>
    38         -
    39         -	* install-sh: Fix issue with library stripping in install-sh
    40         -	 (backported from kevin_walzer's patch from Tcl 8.6 trunk)
    41         -
    42         -2011-04-05  Andreas Kupries  <[email protected]>
    43         -
    44         -	* tcl.m4: Applied patch by Jeff Lawson. Nicer error message when
    45         -	  tclConfig.sh was not found.
    46         -
    47         -2010-12-15  Stuart Cassoff  <[email protected]>
    48         -
    49         -	* install-sh: Upgrade to newer install-sh and use it.
    50         -	* tcl.m4:
    51         -
    52         -2010-12-14  Stuart Cassoff  <[email protected]>
    53         -
    54         -	* tcl.m4: Better building on OpenBSD.
    55         -
    56         -2010-12-14  Jan Nijtmans  <[email protected]>
    57         -
    58         -	* tcl.m4: when using gcc, don't try to determine Win64 SDK
    59         -
    60         -2010-12-12  Jan Nijtmans  <[email protected]>
    61         -
    62         -	* tcl.m4: Determine correctly a cross-compiler-windres
    63         -
    64         -2010-11-23  Jan Nijtmans  <[email protected]>
    65         -
    66         -	* tcl.m4: add some cross-compile support, borrowed from Tcl 8.6
    67         -
    68         -2010-09-16  Jeff Hobbs  <[email protected]>
    69         -
    70         -	* tcl.m4: correct HP-UX LDFLAGS (only used when building big shell)
    71         -
    72         -2010-09-14  Jeff Hobbs  <[email protected]>
    73         -
    74         -	* tcl.m4: add extra if check for .manifest file generation
    75         -	Add notice about package name and version being built.
    76         -
    77         -2010-09-09  Jan Nijtmans  <[email protected]>
    78         -
    79         -	* tcl.m4: [FREQ #3058486] TEA_LOAD_CONFIG doesn't set all BUILD_ vars
    80         -	Slightly related: defining BUILD_$1 on all platforms - not only win -
    81         -	allows the -fvisibility feature to be used in extensions as well, at
    82         -	least if you compile against tcl >= 8.5.
    83         -
    84         -2010-08-26  Jeff Hobbs  <[email protected]>
    85         -
    86         -	* tcl.m4: ensure safe quoting for autoheader usage
    87         -
    88         -2010-08-19  Jeff Hobbs  <[email protected]>
    89         -
    90         -	* tcl.m4: add TEA_ADD_CLEANFILES macro to make adding cleanfiles
    91         -	easier, and add *.exp to CLEANFILES Windows default.
    92         -	(TEA_MAKE_LIB): Enhanced to check for MSVC that requires manifests
    93         -	and auto-embed it into proj DLL via MAKE_SHARED_LIB.  Also define
    94         -	VC_MANIFEST_EMBED_DLL and VC_MANIFEST_EMBED_EXE that do the same
    95         -	magic in case it is needed for extended TEA projects.
    96         -
    97         -2010-08-16  Jeff Hobbs  <[email protected]>
    98         -
    99         -	*** Bump to TEA_VERSION 3.9 ***
   100         -	If upgrading from TEA_VERSION 3.8, copy over tcl.m4, change
   101         -	TEA_INIT to use 3.9 and reconfigure (ac-2.59+).
   102         -	BUILD_${PACKAGE_NAME} will be auto-defined on Windows for
   103         -	correct setting of TCL_STORAGE_CLASS.
   104         -	TEA_LOAD_CONFIG users should remove the SHLIB_LD_LIBS setting done
   105         -	in configure.in (LIBS will be automagically populated by
   106         -	TEA_LOAD_CONFIG).
   107         -	TEA_EXPORT_CONFIG has been added for ${pkg}Config.sh creators
   108         -	SHLIB_LD_FLAGS was deprecated a while ago, remove it if it is
   109         -	still in your Makefile.in.
   110         -
   111         -	* tcl.m4: add /usr/lib64 to set of auto-search dirs. [Bug 1230554]
   112         -	Auto-define BUILD_$PACKAGE_NAME so users don't need to.  This
   113         -	needs to correspond with $pkg.h define magic for TCL_STORAGE_CLASS.
   114         -	Auto-define CLEANFILES.  Users can expand it.
   115         -	(SHLIB_LD_LIBS): define to '${LIBS}' default and change it only if
   116         -	necessary.  Platforms not using this may simply not work or have
   117         -	very funky linkers.
   118         -	(TEA_LOAD_CONFIG): When loading config for another extension,
   119         -	auto-add stub libraries found with TEA_ADD_LIBS.  Eases
   120         -	configure.in for modules like itk and img::*.
   121         -	(TEA_EXPORT_CONFIG): Add standardized function for exporting a
   122         -	${pkg}Config.sh.  See use by img::* and itcl.
   123         -
   124         -2010-08-12  Jeff Hobbs  <[email protected]>
   125         -
   126         -	*** Bump to TEA_VERSION 3.8 ***
   127         -	If upgrading from TEA_VERSION 3.7, copy over tcl.m4, change
   128         -	TEA_INIT to use 3.8 and reconfigure (ac-2.59+).
   129         -	No other changes should be necessary.
   130         -
   131         -	* tcl.m4: remove more vestigial bits from removed platforms.
   132         -	Add back SCO_SV-3.2*.
   133         -	Remove use of DL_LIBS and DL_OBJS and related baggage - these are
   134         -	only needed by the core to support 'load'.
   135         -	Allow for macosx in TEA_ADD_SOURCES.
   136         -	Correct check for found_xincludes=no in TEA_PATH_UNIX_X.
   137         -
   138         -2010-08-11  Jeff Hobbs  <[email protected]>
   139         -
   140         -	* tcl.m4: remove the following old platform configurations:
   141         -	UNIX_SV*|UnixWare-5*, SunOS-4.*, SINIX*5.4*, SCO_SV-3.2*<readded>,
   142         -	OSF1-1.*, NEXTSTEP-*, NetBSD-1.*|FreeBSD-[[1-2]].*, MP-RAS-*,
   143         -	IRIX-5.*, HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*, dgux*,
   144         -	BSD/OS-2.1*|BSD/OS-3*
   145         -	(AIX): drop AIX-pre4 support and use of ldAix, use -bexpall/-brtl
   146         -
   147         -2010-07-05  Jan Nijtmans  <[email protected]>
   148         -
   149         -	* tcl.m4: [Patch #1055668] removal of exported internals from
   150         -	tclInt.h (EXTERN macro)
   151         -
   152         -2010-04-14  Jan Nijtmans  <[email protected]>
   153         -
   154         -	* tcl.m4    - Backport a lot of quoting fixes from tcl8.6/unix/tcl.m4
   155         -	            - Fix determination of CYGPATH for CYGWIN
   156         -	  With those fixes, itcl and tdbc compile fine with CYGWIN
   157         -
   158         -2010-04-06  Jan Nijtmans  <[email protected]>
   159         -
   160         -	* install-sh         [Bug 2982540] configure and install* script files
   161         -	                     should always have LF
   162         -
   163         -2010-02-19  Stuart Cassoff  <[email protected]>
   164         -
   165         -	* tcl.m4: Correct compiler/linker flags for threaded builds on
   166         -	OpenBSD.
   167         -
   168         -2010-01-19  Jan Nijtmans  <[email protected]>
   169         -
   170         -	* tcl.m4: Detect CYGWIN variant: win32 or unix
   171         -
   172         -2010-01-03  Donal K. Fellows  <[email protected]>
   173         -
   174         -	* unix/tcl.m4 (TEA_CONFIG_CFLAGS): [Tcl Bug 1636685]: Use the
   175         -	configuration for modern FreeBSD suggested by the FreeBSD porter.
   176         -
   177         -2009-10-22  Jan Nijtmans  <[email protected]>
   178         -
   179         -	* tcl.m4: [Tcl Patch #2883533] tcl.m4 support for Haiku OS
   180         -
   181         -2009-04-27  Jeff Hobbs  <[email protected]>
   182         -
   183         -	* tcl.m4 (TEA_CONFIG_CFLAGS): harden the check to add _r to CC on
   184         -	AIX with threads.
   185         -
   186         -2009-04-10  Daniel Steffen  <[email protected]>
   187         -
   188         -	* tcl.m4 (Darwin): check for 64-bit TkAqua.
   189         -
   190         -2009-03-26  Jan Nijtmans  <[email protected]>
   191         -
   192         -	* tclconfig/tcl.m4: Adapt LDFLAGS and LD_SEARCH_FLAGS
   193         -	together with SHLIB_LD definition to unbreak building on HPUX.
   194         -
   195         -2009-03-20  Andreas Kupries  <[email protected]>
   196         -
   197         -	* tclconfig/tcl.m4: Changed SHLIB_LD definition to unbreak
   198         -	building on HPUX.
   199         -
   200         -2009-03-16  Joe English  <[email protected]>
   201         -
   202         -	* tcl.m4(TEA_PUBLIC_TK_HEADERS): Look at ${TK_INCLUDE_SPEC}
   203         -	(found in tkConfig.sh) when trying to guess where tk.h might be
   204         -	[Patch 1960628].
   205         -
   206         -2009-03-11  Joe English  <[email protected]>
   207         -
   208         -	* tcl.m4: Allow ${SHLIB_SUFFIX} to be overridden at
   209         -	configure-time [Patch 1960628].  Also fix some comment typos,
   210         -	and an uninitialized variable bug-waiting-to-happen.
   211         -
   212         -2008-12-21  Jan Nijtmans  <[email protected]>
   213         -
   214         -	* tcl.m4: [Bug 2073255] Tcl_GetString(NULL) doesn't crash on HP-UX
   215         -	          (this bug report was for Tcl, but holds for TEA as well.)
   216         -
   217         -2008-12-20  Daniel Steffen  <[email protected]>
   218         -
   219         -	* tcl.m4: sync with tdbc tcl.m4 changes
   220         -	(SunOS-5.11): Sun cc SHLIB_LD: use LDFLAGS_DEFAULT instead of LDFLAGS
   221         -
   222         -2008-12-02  Jeff Hobbs  <[email protected]>
   223         -
   224         -	*** Bump to TEA_VERSION 3.7 ***
   225         -
   226         -	* tcl.m4: in private header check, check for <plat>Port.h instead
   227         -	of Int.h to ensure all private headers are available.
   228         -
   229         -2008-11-04  Daniel Steffen  <[email protected]>
   230         -
   231         -	* tcl.m4 (Darwin): sync TEA_PRIVATE_TK_HEADERS handling of
   232         -	Tk.framework PrivateHeaders with TEA_PRIVATE_TCL_HEADERS.
   233         -
   234         -2008-11-04  Jeff Hobbs  <[email protected]>
   235         -
   236         -	* tcl.m4 (TEA_PATH_TCLCONFIG, TEA_PATH_TKCONFIG): exit with error
   237         -	when tclConfig.sh cannot be found. [Bug #1997760]
   238         -	(TEA_PRIVATE_TCL_HEADERS, TEA_PRIVATE_TK_HEADERS): allow for
   239         -	finding the headers installed in the public areas, e.g. a result of
   240         -	make install-private-headers. [Bug #1631922]
   241         -
   242         -2008-08-12  Daniel Steffen  <[email protected]>
   243         -
   244         -	* tcl.m4 (Darwin): link shlib with current and compatiblity version
   245         -	flags; look for libX11.dylib when searching for X11 libraries.
   246         -
   247         -2008-06-12  Daniel Steffen  <[email protected]>
   248         -
   249         -	* tcl.m4 (SunOS-5.11): fix 64bit amd64 support with gcc & Sun cc.
   250         -
   251         -2008-03-27  Daniel Steffen  <[email protected]>
   252         -
   253         -	* tcl.m4 (SunOS-5.1x): fix 64bit support for Sun cc. [Bug 1921166]
   254         -
   255         -2008-02-01  Donal K. Fellows  <[email protected]>
   256         -
   257         -	* tcl.m4 (TEA_CONFIG_CFLAGS): Updated to work at least in part with
   258         -	more modern VC versions. Currently just made the linker flags more
   259         -	flexible; more work may be needed.
   260         -
   261         -2007-10-26  Daniel Steffen  <[email protected]>
   262         -
   263         -	* tcl.m4 (Darwin): add support for 64-bit X11.
   264         -
   265         -2007-10-23  Jeff Hobbs  <[email protected]>
   266         -
   267         -	*** Tagged tea-3-branch to start TEA 4 development on HEAD ***
   268         -
   269         -2007-09-17  Joe English  <[email protected]>
   270         -
   271         -	* tcl.m4: use '${CC} -shared' instead of 'ld -Bshareable'
   272         -	to build shared libraries on current NetBSDs [Bug 1749251].
   273         -
   274         -2007-09-15  Daniel Steffen  <[email protected]>
   275         -
   276         -	* tcl.m4: 	replace all direct references to compiler by ${CC} to
   277         -			enable CC overriding at configure & make time.
   278         -	(SunOS-5.1x):	replace direct use of '/usr/ccs/bin/ld' in SHLIB_LD by
   279         -			'cc' compiler driver.
   280         -
   281         -2007-08-08  Jeff Hobbs  <[email protected]>
   282         -
   283         -	* tcl.m4: check Ttk dir for Tk private headers (8.5).
   284         -	Add some comments to other bits.
   285         -
   286         -2007-06-25  Jeff Hobbs  <[email protected]>
   287         -
   288         -	* tcl.m4 (TEA_PROG_TCLSH, TEA_PROG_WISH): move where / is added.
   289         -
   290         -2007-06-13  Jeff Hobbs  <[email protected]>
   291         -
   292         -	* tcl.m4: fix --with-tkinclude alignment. [Bug 1506111]
   293         -
   294         -2007-06-06  Daniel Steffen  <[email protected]>
   295         -
   296         -	* tcl.m4 (Darwin): fix 64bit arch removal in fat 32&64bit builds.
   297         -
   298         -2007-05-18  Donal K. Fellows  <[email protected]>
   299         -
   300         -	* tcl.m4: Added quoting so that paths with spaces cause fewer
   301         -	problems.
   302         -
   303         -2007-03-07  Daniel Steffen  <[email protected]>
   304         -
   305         -	* tcl.m4 (Darwin): s/CFLAGS/CPPFLAGS/ in -mmacosx-version-min check.
   306         -
   307         -2007-02-15  Jeff Hobbs  <[email protected]>
   308         -
   309         -	* tcl.m4: correct private header check to search in generic subdir
   310         -
   311         -2007-02-09  Jeff Hobbs  <[email protected]e.com>
   312         -
   313         -	*** Bump to TEA_VERSION 3.6 ***
   314         -
   315         -	* tcl.m4: correct -d to -f
   316         -	(TEA_CONFIG_CFLAGS): SHLIB_SUFFIX is .so on HP ia64 [Bug 1615058]
   317         -
   318         -2007-02-08  Jeff Hobbs  <[email protected]>
   319         -
   320         -	* tcl.m4 (TEA_PRIVATE_TCL_HEADERS, TEA_PRIVATE_TK_HEADERS): check
   321         -	that the dirs actually have private headers. [Bug 1631922]
   322         -
   323         -2007-02-04  Daniel Steffen  <[email protected]>
   324         -
   325         -	* tcl.m4: add caching to -pipe check.
   326         -
   327         -2007-01-25  Daniel Steffen  <[email protected]>
   328         -
   329         -	* tcl.m4: integrate CPPFLAGS into CFLAGS as late as possible and
   330         -	move (rather than duplicate) -isysroot flags from CFLAGS to CPPFLAGS to
   331         -	avoid errors about multiple -isysroot flags from some older gcc builds.
   332         -
   333         -2006-01-19  Daniel Steffen  <[email protected]>
   334         -
   335         -	* tcl.m4: ensure CPPFLAGS env var is used when set. [Bug 1586861]
   336         -	(Darwin): add -isysroot and -mmacosx-version-min flags to CPPFLAGS when
   337         -	present in CFLAGS to avoid discrepancies between what headers configure
   338         -	sees during preprocessing tests and compiling tests.
   339         -
   340         -2006-12-19  Daniel Steffen  <[email protected]>
   341         -
   342         -	* tcl.m4 (Darwin): --enable-64bit: verify linking with 64bit -arch flag
   343         -	succeeds before enabling 64bit build.
   344         -
   345         -2006-12-16  Daniel Steffen  <[email protected]>
   346         -
   347         -	* tcl.m4 (Linux): fix previous change to use makefile variable
   348         -	LDFLAGS_DEFAULT instead of LDFLAGS in SHLIB_LD, to ensure linker
   349         -	flags in sampleextension Makefile are picked up.
   350         -
   351         -2006-11-26  Daniel Steffen  <[email protected]>
   352         -
   353         -	* tcl.m4 (Linux): --enable-64bit support. [Patch 1597389], [Bug 1230558]
   354         -
   355         -2006-08-18  Daniel Steffen  <[email protected]>
   356         -
   357         -	* tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for
   358         -	universal builds including x86_64 and for use of -mmacosx-version-min
   359         -	instead of MACOSX_DEPLOYMENT_TARGET. For Tk extensions, remove 64-bit
   360         -	arch flags from CFLAGS like in the Tk configure, as neither TkAqua nor
   361         -	TkX11 can be built for 64-bit at present.
   362         -
   363         -2006-03-28  Jeff Hobbs  <[email protected]>
   364         -
   365         -	* tcl.m4: []-quote AC_DEFUN functions.
   366         -	(TEA_PATH_TKCONFIG): Fixed Windows-specific check for tkConfig.sh.
   367         -	(TEA_MAKE_LIB): Prepend 'lib' for Windows-gcc configs.
   368         -
   369         -2006-03-07  Joe English  <[email protected]>
   370         -
   371         -	* tcl.m4: Set SHLIB_LD_FLAGS='${LIBS}' on NetBSD,
   372         -	as per the other *BSD variants [Bug 1334613].
   373         -
   374         -2006-01-25  Jeff Hobbs  <[email protected]>
   375         -
   376         -	*** Bump to TEA version 3.5 ***
   377         -
   378         -	* tcl.m4: keep LD_SEARCH_FLAGS and CC_SEARCH_FLAGS synchronous
   379         -	with core tcl.m4 meaning.
   380         -
   381         -2006-01-24  Daniel Steffen  <[email protected]>
   382         -
   383         -	* tcl.m4 (Darwin): use makefile variable LDFLAGS_DEFAULT instead of
   384         -	LDFLAGS in SHLIB_LD, to ensure linker flags in sampleextension Makefile
   385         -	are picked up. [Bug 1403343]
   386         -
   387         -2006-01-23  Jeff Hobbs  <[email protected]>
   388         -
   389         -	* tcl.m4: add C:/Tcl/lib and C:/Progra~1/Tcl/lib dirs to check for
   390         -	*Config.sh on Windows. [Bug 1407544]
   391         -
   392         -2006-01-23  Daniel Steffen  <[email protected]>
   393         -
   394         -	* tcl.m4 (Darwin): for Tk extensions, remove -arch ppc64 from CFLAGS
   395         -	like in the Tk configure, as neither TkAqua nor TkX11 can be built for
   396         -	64bit at present (no 64bit GUI libraries).
   397         -
   398         -2006-01-22  Jeff Hobbs  <[email protected]>
   399         -
   400         -	* tcl.m4: restore system=windows on Windows.
   401         -	Remove error if 'ar' isn't found (it may not be on Windows).
   402         -	Do not add -lxnet or define _XOPEN_SOURCE on HP-UX by default.
   403         -	Ensure the C|LDFLAGS_DEFAULT gets the fully sub'd value at
   404         -	configure time.
   405         -
   406         -2006-01-10  Daniel Steffen  <[email protected]>
   407         -
   408         -	* tcl.m4: add caching, use AC_CACHE_CHECK instead of AC_CACHE_VAL
   409         -	where possible, consistent message quoting, sync relevant
   410         -	tcl/unix/tcl.m4 HEAD changes and gratuitous formatting differences
   411         -	(notably sunc removal of support for for ancient BSD's, IRIX 4,
   412         -	RISCos and Ultrix by kennykb), Darwin improvements to
   413         -	TEA_LOAD_*CONFIG to make linking work against Tcl/Tk frameworks
   414         -	installed in arbitrary location, change TEA_PROG_* search order
   415         -	(look in *_BIN_DIR parents before *_PREFIX).
   416         -
   417         -2006-01-05  Jeff Hobbs  <[email protected]>
   418         -
   419         -	* tcl.m4: add dkf's system config refactor
   420         -
   421         -2006-01-04  Jeff Hobbs  <[email protected]>
   422         -
   423         -	* tcl.m4: remove extraneous ' that causes bash 3.1 to choke
   424         -
   425         -2005-12-19  Joe English  <[email protected]>
   426         -
   427         -	* tcl.m4 (TEA_PATH_TCLCONFIG &c): Look for tclConfig.sh &c
   428         -	in ${libdir}, where they are installed by default [Patch #1377407].
   429         -
   430         -2005-12-05  Don Porter  <[email protected]>
   431         -
   432         -	* tcl.m4 (TEA_PUBLIC_*_HEADERS):	Better support for finding
   433         -	header files for uninstalled Tcl and Tk.
   434         -
   435         -2005-12-02  Jeff Hobbs  <[email protected]>
   436         -
   437         -	* tcl.m4: correctly bump TEA_VERSION var to 3.4
   438         -
   439         -2005-12-01  Daniel Steffen  <[email protected]>
   440         -
   441         -	* unix/tcl.m4 (Darwin): fixed error when MACOSX_DEPLOYMENT_TARGET unset
   442         -
   443         -2005-11-29  Jeff Hobbs  <[email protected]>
   444         -
   445         -	* tcl.m4:  *** Bump to TEA version 3.4 ***
   446         -	Add Windows x64 build support.
   447         -	Remove TEA_PATH_NOSPACE and handle the problem with ""s where
   448         -	necessary - the macro relied on TCLSH_PROG which didn't work for
   449         -	cross-compiles.
   450         -
   451         -2005-11-27  Daniel Steffen  <[email protected]>
   452         -
   453         -	* tcl.m4 (Darwin): add 64bit support, add CFLAGS to SHLIB_LD to
   454         -	support passing -isysroot in env(CFLAGS) to configure (flag can't
   455         -	be present twice, so can't be in both CFLAGS and LDFLAGS during
   456         -	configure), don't use -prebind when deploying on 10.4.
   457         -	(TEA_ENABLE_LANGINFO, TEA_TIME_HANDLER): add/fix caching.
   458         -
   459         -2005-10-30  Daniel Steffen  <[email protected]>
   460         -
   461         -	* tcl.m4: fixed two tests for TEA_WINDOWINGSYSTEM = "aqua" that
   462         -	should have been for `uname -s` = "Darwin" instead; added some
   463         -	missing quoting.
   464         -	(TEA_PROG_TCLSH, TEA_PROG_WISH): fix incorrect assumption that
   465         -	install location of tclConfig.sh/tkConfig.sh allows to determine
   466         -	the tclsh/wish install dir via ../bin. Indeed tcl/tk can be
   467         -	configured with arbitrary --libdir and --bindir (independent of
   468         -	prefix) and such a configuration is in fact standard with Darwin
   469         -	framework builds. At least now also check ${TCL_PREFIX}/bin
   470         -	resp. ${TK_PREFIX}/bin for presence of tclsh resp. wish (if tcl/tk
   471         -	have been configured with arbitrary --bindir, this will still not
   472         -	find them, for a general solution *Config.sh would need to contain
   473         -	the values of bindir/libdir/includedir passed to configure).
   474         -
   475         -2005-10-07  Jeff Hobbs  <[email protected]>
   476         -
   477         -	* tcl.m4: Fix Solaris 5.10 check and Solaris AMD64 64-bit builds.
   478         -
   479         -2005-10-04  Jeff Hobbs  <[email protected]>
   480         -
   481         -	* tcl.m4 (TEA_PRIVATE_TCL_HEADERS): add / to finish sed macro
   482         -	(TEA_ENABLE_THREADS): don't check for pthread_attr_setstacksize func
   483         -
   484         -2005-09-13  Jeff Hobbs  <[email protected]>
   485         -
   486         -	* tcl.m4: *** Update to TEA version 3.3 ***
   487         -	define TEA_WINDOWINGSYSTEM in TEA_LOAD_TKCONFIG.
   488         -	Make --enable-threads the default (users can --disable-threads).
   489         -	Improve AIX ${CC}_r fix to better check existing ${CC} value.
   490         -	Do the appropriate evals to not require the *TOP_DIR_NATIVE vars
   491         -	be set for extensions that use private headers.
   492         -	Make aqua check for Xlib compat headers the same as win32.
   493         -
   494         -2005-07-26  Mo DeJong  <[email protected]>
   495         -
   496         -	* tcl.m4 (TEA_PROG_TCLSH, TEA_BUILD_TCLSH,
   497         -	TEA_PROG_WISH, TEA_BUILD_WISH): Remove
   498         -	TEA_BUILD_TCLSH and TEA_BUILD_WISH because
   499         -	of complaints that it broke the build when
   500         -	only an installed version of Tcl was available
   501         -	at extension build time. The TEA_PROG_TCLSH and
   502         -	TEA_PROG_WISH macros will no longer search the
   503         -	path at all. The build tclsh or installed
   504         -	tclsh shell will now be found by TEA_PROG_TCLSH.
   505         -
   506         -2005-07-24  Mo DeJong  <[email protected]>
   507         -
   508         -	* tcl.m4 (TEA_PROG_TCLSH, TEA_BUILD_TCLSH,
   509         -	TEA_PROG_WISH, TEA_BUILD_WISH):
   510         -	Split confused search for tclsh on PATH and
   511         -	build and install locations into two macros.
   512         -	TEA_PROG_TCLSH and TEA_PROG_WISH search the
   513         -	system PATH for an installed tclsh or wish.
   514         -	The TEA_BUILD_TCLSH and TEA_BUILD_WISH
   515         -	macros determine the name of tclsh or
   516         -	wish in the Tcl or Tk build directory even
   517         -	if tclsh or wish has not yet been built.
   518         -	[Tcl bug 1160114]
   519         -	[Tcl patch 1244153]
   520         -
   521         -2005-06-23  Daniel Steffen  <[email protected]>
   522         -
   523         -	* tcl.m4 (TEA_PRIVATE_TK_HEADERS): add ${TK_SRC_DIR}/macosx to
   524         -	TK_INCLUDES when building against TkAqua.
   525         -
   526         -	* tcl.m4 (TEA_PATH_X): fixed missing comma in AC_DEFINE
   527         -
   528         -	* tcl.m4: changes to better support framework builds of Tcl and Tk out
   529         -	of the box: search framework install locations for *Config.sh, and if in
   530         -	presence of a framework build, use the framework's Headers and
   531         -	PrivateHeaders directories for public and private includes. [FR 947735]
   532         -
   533         -2005-06-18  Daniel Steffen  <[email protected]>
   534         -
   535         -	* tcl.m4 (Darwin): add -headerpad_max_install_names to LDFLAGS to
   536         -	ensure we can always relocate binaries with install_name_tool.
   537         -
   538         -2005-06-04  Daniel Steffen  <[email protected]>
   539         -
   540         -	* tcl.m4 (TEA_PATH_X): for TEA_WINDOWINGSYSTEM == aqua, check if xlib
   541         -	compat headers are available in tkheaders location, otherwise add xlib
   542         -	sourcedir to TK_XINCLUDES.
   543         -
   544         -2005-04-25  Daniel Steffen  <[email protected]>
   545         -
   546         -	* tcl.m4: added AC_DEFINE* descriptions (from core tcl.m4) to allow
   547         -	use with autoheader.
   548         -	(Darwin): added configure checks for recently added linker flags
   549         -	-single_module and -search_paths_first to allow building with older
   550         -	tools (and on Mac OS X 10.1), use -single_module in SHLIB_LD.
   551         -	(TEA_MISSING_POSIX_HEADERS): added caching of dirent.h check.
   552         -	(TEA_BUGGY_STRTOD): added caching (sync with core tcl.m4).
   553         -
   554         -2005-03-24  Jeff Hobbs  <[email protected]>
   555         -
   556         -	* tcl.m4 (TEA_TCL_64BIT_FLAGS): use Tcl header defaults for wide
   557         -	int type only on Windows when __int64 is detected as valid.
   558         -
   559         -2005-03-24  Don Porter  <[email protected]>
   560         -
   561         -	* README.txt:	Update reference to "SC_* macros" to "TEA_* macros".
   562         -	* tcl.m4:	Incorporated recent improvements in SC_PATH_TCLCONFIG
   563         -	and SC_PATH_TKCONFIG into TEA_PATH_TCLCONFIG and TEA_PATH_TKCONFIG.
   564         -	Corrected search path in TEA_PATH_CONFIG and added
   565         -	AC_SUBST($1_BIN_DIR) to TEA_LOAD_CONFIG so that packages that load
   566         -	the configuration of another package can know where they loaded
   567         -	it from.
   568         -
   569         -2005-03-18  Jeff Hobbs  <[email protected]>
   570         -
   571         -	* tcl.m4 (TEA_CONFIG_CFLAGS): correct 2005-03-17 change to have
   572         -	variant LD_SEARCH_FLAGS for gcc and cc builds.
   573         -
   574         -	* tcl.m4 (TEA_PROG_TCLSH, TEA_PROG_WISH): correct x-compile check.
   575         -
   576         -2005-03-17  Jeff Hobbs  <[email protected]>
   577         -
   578         -	* tcl.m4: Correct gcc build and HP-UX-11.
   579         -
   580         -2005-02-08  Jeff Hobbs  <[email protected]>
   581         -
   582         -	* tcl.m4 (TEA_ADD_LIBS): don't touch lib args starting with -.
   583         -	(TEA_CONFIG_CFLAGS): only define _DLL for CE in shared build.
   584         -	(TEA_MAKE_LIB): set RANLIB* to : on Windows (it's not needed).
   585         -
   586         -2005-02-01  Jeff Hobbs  <[email protected]>
   587         -
   588         -	* tcl.m4: redo of 2005-01-27 changes to correctly handle paths
   589         -	with spaces.  Win/CE and Win/64 builds now require a prebuilt
   590         -	tclsh to handle conversion to short pathnames.  This is done in
   591         -	the new TEA_PATH_NOSPACE macro.  For Win/CE|64, make CC just the
   592         -	compiler and move the necessary includes to CFLAGS.
   593         -	(TEA_CONFIG_CFLAGS): Add Solaris 64-bit gcc build support.
   594         -	(TEA_PROG_TCLSH, TEA_PROG_WISH): Allow TCLSH_PROG and WISH_PROG to
   595         -	be set in the env and prevent resetting.
   596         -	(TEA_ADD_LIBS): On Windows using GCC (mingw), convert foo.lib
   597         -	args to -lfoo, for use with mingw.
   598         -		*** POTENTIAL INCOMPATABILITY ***
   599         -	(TEA_CONFIG_CFLAGS): Fix AIX gcc builds to work out-of-box.
   600         -	Bumped TEA to 3.2.
   601         -
   602         -2005-01-27  Jeff Hobbs  <[email protected]>
   603         -
   604         -	* tcl.m4: remove cygpath calls to support msys.
   605         -	Update base CE build assumption to "420,ARMV4,ARM,Pocket PC 2003".
   606         -	Make STLIB_LD use $LINKBIN -lib.
   607         -
   608         -2005-01-25  Daniel Steffen  <[email protected]>
   609         -
   610         -	* tcl.m4 (Darwin): fixed bug with static build linking to dynamic
   611         -	library in /usr/lib etc instead of linking to static library earlier
   612         -	in search path. [Tcl Bug 956908]
   613         -	Removed obsolete references to Rhapsody.
   614         -
   615         -2004-12-29  Jeff Hobbs  <[email protected]>
   616         -
   617         -	* tcl.m4: Updates for VC7 compatibility, fixing CFLAGS and LDFLAGS
   618         -	options, using better default -O levels. [Bug 1092952, 1091967]
   619         -
   620         -2004-12-29  Joe English  <[email protected]>
   621         -
   622         -	* tcl.m4: Do not use ${DBGX} suffix when building
   623         -	shared libraries [patch #1081595, TIP #34]
   624         -
   625         -2004-09-07  Jeff Hobbs  <[email protected]>
   626         -
   627         -	* tcl.m4 (TEA_CONFIG_CFLAGS): support eVC4 Win/CE builds
   628         -
   629         -2004-08-10  Jeff Hobbs  <[email protected]>
   630         -
   631         -	* tcl.m4 (TEA_INIT, TEA_PREFIX): update handling of exec_prefix to
   632         -	work around subdir configures since autoconf only propagates the
   633         -	prefix (not exec_prefix).
   634         -
   635         -2004-07-23  Daniel Steffen  <[email protected]>
   636         -
   637         -	* tcl.m4 (TEA_CONFIG_CFLAGS): Darwin section: brought inline with
   638         -	Tcl 8.5 HEAD config, removed core specific & obsolete settings.
   639         -
   640         -2004-07-22  Jeff Hobbs  <[email protected]>
   641         -
   642         -	* tcl.m4 (TEA_PATH_X): check in TK_DEFS for MAC_OSX_TK to see if
   643         -	we are compiling on Aqua.  Add TEA_WINDOWINGSYSTEM var that
   644         -	reflects 'tk windowingsystem' value.
   645         -
   646         -2004-07-16  Jeff Hobbs  <[email protected]>
   647         -
   648         -	* tcl.m4 (TEA_ENABLE_THREADS): force a threaded build when
   649         -	building against a threaded core.
   650         -	(CFLAGS_WARNING): Remove -Wconversion for gcc builds
   651         -	(TEA_CONFIG_CFLAGS): Reorder configure.in for better 64-bit build
   652         -	configuration, replacing EXTRA_CFLAGS with CFLAGS.  [Bug #874058]
   653         -	Update to latest Tcl 8.5 head config settings.
   654         -	Call this TEA version 3.1.
   655         -
   656         -2004-04-29  Jeff Hobbs  <[email protected]>
   657         -
   658         -	* tcl.m4 (TEA_TCL_64BIT_FLAGS): replace AC_TRY_RUN test with
   659         -	AC_TRY_COMPILE for the long vs. long long check. (kenny)
   660         -
   661         -2004-04-26  Jeff Hobbs  <[email protected]>
   662         -
   663         -	* tcl.m4 (TEA_TCL_64BIT_FLAGS): update against core tcl.m4 to
   664         -	define TCL_WIDE_INT_IS_LONG if 'using long'.
   665         -
   666         -2004-03-19  Jeff Hobbs  <[email protected]>
   667         -
   668         -	* tcl.m4: correct Windows builds getting LDFLAGS info in MAKE_LIB
   669         -
   670         -2004-02-11  Jeff Hobbs  <[email protected]>
   671         -
   672         -	* tcl.m4: correct TCL_INCLUDES for private headers on Windows - it
   673         -	doesn't need the eval.
   674         -
   675         -2004-02-10  Jeff Hobbs  <[email protected]>
   676         -
   677         -	* tcl.m4: don't require TK_INCLUDES and TCL_INCLUDES to have the
   678         -	DIR_NATIVE vars defined when using private headers on unix.
   679         -	Allow $... to TEA_ADD_SOURCES for constructs like
   680         -	TEA_ADD_SOURCES([\$(WIN_OBJECTS)]), that allow the developer to
   681         -	place more in the Makefile.in.
   682         -	tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and
   683         -	CHECK on limits.h
   684         -
   685         -2003-12-10  Jeff Hobbs  <[email protected]>
   686         -
   687         -	* Makefile.in:      added TEA_ADD_LIBS, TEA_ADD_INCLUDES and
   688         -	* configure:        TEA_ADD_CFLAGS to configurable parameters with
   689         -	* configure.in:     PKG_* equivs in the Makefile.  This allows the
   690         -	* tclconfig/tcl.m4: user to worry less about actual magic VAR names.
   691         -	Corrected Makefile.in to note that TEA_ADD_TCL_SOURCES requires
   692         -	exact file names.
   693         -
   694         -2003-12-09  Jeff Hobbs  <[email protected]>
   695         -
   696         -	* tcl.m4: updated OpenBSD support based on [Patch #775246] (cassoff)
   697         -
   698         -2003-12-05  Jeff Hobbs  <[email protected]>
   699         -
   700         -	* configure:
   701         -	* configure.in:
   702         -	* Makefile.in (VPATH): readd $(srcdir) to front of VPATH as the
   703         -	first part of VPATH can get chopped off.
   704         -	Change .c.$(OBJEXT) rule to [email protected]@ to support more makes.
   705         -	* tclconfig/tcl.m4: add TEA_ADD_STUB_SOURCES to support libstub
   706         -	generation and TEA_ADD_TCL_SOURCES to replace RUNTIME_SOURCES as
   707         -	the way the user specifies library files.
   708         -
   709         -2003-12-03  Jeff Hobbs  <[email protected]>
   710         -
   711         -	* configure:           Update of TEA spec to (hopefully) simplify
   712         -	* configure.in:        some aspects of TEA by making use of more
   713         -	* Makefile.in:         AC 2.5x features.  Use PACKAGE_NAME (instead
   714         -	* generic/tclsample.c: of PACKAGE) and PACKAGE_VERSION (instead of
   715         -	* tclconfig/tcl.m4:    VERSION) arguments to AC_INIT as the TEA
   716         -	package name and version.
   717         -	Provide a version argument to TEA_INIT - starting with 3.0.
   718         -	Drop all use of interior shell substs that older makefiles didn't
   719         -	like.  Use PKG_* naming convention instead.
   720         -	Move specification of source files and public headers into
   721         -	configure.in with TEA_ADD_SOURCES and TEA_ADD_HEADERS.  These will
   722         -	be munged during ./configure into the right obj file names (no
   723         -	$(SOURCES:.c=.obj) needed).
   724         -	There is almost nothing that should be touched in Makefile.in now
   725         -	for the developer.  May want to add a TEA_ADD_TCL_SOURCES for the
   726         -	RUNTIME_SOURCES that remains.
   727         -	Use SHLID_LD_FLAGS (instead of SHLID_LDFLAGS) as Tcl does.
   728         -	Only specify the user requested LDFLAGS/CFLAGS in the Makefile,
   729         -	don't mention the _OPTIMIZE/_DEBUG variants.
   730         -
   731         -2003-10-15  Jeff Hobbs  <[email protected]>
   732         -
   733         -	* tcl.m4: create a TEA_SETUP_COMPILER_CC the precedes the
   734         -	TEA_SETUP_COMPILER macro.  They are split so the check for CC
   735         -	occurs before any use of CC.  Also add AC_PROG_CPP to the compiler
   736         -	checks.
   737         -
   738         -2003-10-06  Jeff Hobbs  <[email protected]>
   739         -
   740         -	* tcl.m4: Updated for autoconf 2.5x prereq.
   741         -	Where TCL_WIDE_INT_TYPE would be __int64, defer to the code checks
   742         -	in tcl.h, which also handles TCL_LL_MODIFIER* properly.
   743         -
   744         -2003-04-22  Jeff Hobbs  <[email protected]>
   745         -
   746         -	* tcl.m4: correct default setting of ARCH for WinCE builds.
   747         -	Correct \ escaping for CE sed macros.
   748         -
   749         -2003-04-10  Jeff Hobbs  <[email protected]>
   750         -
   751         -	* tcl.m4: replace $(syscal) construct with older `syscall` for
   752         -	systems where sh != bash.
   753         -
   754         -2003-04-09  Jeff Hobbs  <[email protected]>
   755         -
   756         -	* tcl.m4 (TEA_WITH_CELIB): add --enable-wince and --with-celib
   757         -	options for Windows/CE compilation support.  Requires the
   758         -	Microsoft eMbedded SDK and Keuchel's celib emulation layer.
   759         -
   760         -2003-02-18  Jeff Hobbs  <[email protected]>
   761         -
   762         -	* tcl.m4 (TEA_ENABLE_THREADS): Make sure -lpthread gets passed on
   763         -	the link line when checking for the pthread_attr_setstacksize
   764         -	symbol. (dejong)
   765         -
   766         -	* tcl.m4 (TEA_SETUP_COMPILER): added default calls to
   767         -	TEA_TCL_EARLY_FLAGS, TEA_TCL_64BIT_FLAGS,
   768         -	TEA_MISSING_POSIX_HEADERS and TEA_BUGGY_STRTOD.
   769         -
   770         -2003-02-14  Jeff Hobbs  <[email protected]>
   771         -
   772         -	* tcl.m4: correct HP-UX ia64 --enable-64bit build flags
   773         -
   774         -2003-01-29  Jeff Hobbs  <[email protected]>
   775         -
   776         -	* tcl.m4: check $prefix/lib as well as $exec_prefix/lib when
   777         -	looking for tcl|tkConfig.sh, as this check is done before we would
   778         -	set exec_prefix when the user does not define it.
   779         -
   780         -2003-01-21  Mo DeJong  <[email protected]>
   781         -
   782         -	* tcl.m4 (TEA_CONFIG_CFLAGS): Fix build support
   783         -	for mingw, the previous implementation would
   784         -	use VC++ when compiling with mingw gcc. Don't
   785         -	pass -fPIC since gcc always compiles pic code
   786         -	under win32. Change some hard coded cases
   787         -	of gcc to ${CC}.
   788         -
   789         -2002-10-15  Jeff Hobbs  <[email protected]>
   790         -
   791         -	* tcl.m4: move the CFLAGS definition from TEA_ENABLE_SHARED to
   792         -	TEA_MAKE_LIB because setting too early confuses other AC_* macros.
   793         -	Correct the HP-11 SHLIB_LD_LIBS setting.
   794         -
   795         -	* tcl.m4: add the CFLAGS definition into TEA_ENABLE_SHARED and
   796         -	make it pick up the env CFLAGS at configure time.
   797         -
   798         -2002-10-09  Jeff Hobbs  <[email protected]>
   799         -
   800         -	* tcl.m4: add --enable-symbols=mem option to enable TCL_MEM_DEBUG.
   801         -	Improved AIX 64-bit build support, allow it on AIX-4 as well.
   802         -	Enable 64-bit HP-11 compilation with gcc.
   803         -	Enable 64-bit IRIX64-6 cc build support.
   804         -	Correct FreeBSD thread library linkage.
   805         -	Add OSF1 static build support.
   806         -	Improve SunOS-5 shared build SHLIB_LD macro.
   807         -
   808         -2002-07-20  Zoran Vasiljevic  <[email protected]>
   809         -
   810         -	* tcl.m4: Added MINGW32 to list of systems checked for Windows build.
   811         -	Also, fixes some indentation issues with "--with-XXX" options.
   812         -
   813         -2002-04-23  Jeff Hobbs  <[email protected]>
   814         -
   815         -	* tcl.m4 (TEA_ENABLE_THREADS): added USE_THREAD_ALLOC define to
   816         -	use new threaded allocatory by default on Unix for Tcl 8.4.
   817         -	(TEA_CONFIG_CFLAGS): corrected LD_SEARCH_FLAGS for FreeBSD-3+.
   818         -
   819         -2002-04-22  Jeff Hobbs  <[email protected]>
   820         -
   821         -	* tcl.m4 (TEA_SETUP_COMPILER): removed call to AC_CYGWIN so that
   822         -	we can use autoconf 2.5x as well as 2.13.  This prevents us from
   823         -	being able to warn against the use of cygwin gcc at configure
   824         -	time, but allows autoconf 2.5x, which is what is shipped with most
   825         -	newer systems.
   826         -
   827         -2002-04-11  Jeff Hobbs  <[email protected]>
   828         -
   829         -	* tcl.m4: Enabled COFF as well as CV style debug info with
   830         -	--enable-symbols to allow Dr. Watson users to see function info.
   831         -	More info on debugging levels can be obtained at:
   832         -	http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
   833         -
   834         -2002-04-03  Jeff Hobbs  <[email protected]>
   835         -
   836         -	* tcl.m4: change all SC_* macros to TEA_*.  The SC_ was for
   837         -	Scriptics, which is no more.  TEA represents a better, independent
   838         -	prefix that won't need changing.
   839         -	Added preliminary mingw gcc support. [Patch #538772]
   840         -	Added TEA_PREFIX macro that handles defaulting the prefix and
   841         -	exec_prefix vars to those used by Tcl if none were specified.
   842         -	Added TEA_SETUP_COMPILER macro that encompasses the AC_PROG_CC
   843         -	check and several other basic AC_PROG checks needed for making
   844         -	executables.  This greatly simplifies user's configure.in files.
   845         -	Collapsed AIX-5 defines into AIX-* with extra checks for doing the
   846         -	ELF stuff on AIX-5-ia64.
   847         -	Updated TEA_ENABLE_THREADS to take an optional arg to allow
   848         -	switching it on by default (for Thread) and add sanity checking to
   849         -	warn the user if configuring threads incompatibly.
   850         -
   851         -2002-03-29  Jeff Hobbs  <[email protected]>
   852         -
   853         -	* tcl.m4: made sure that SHLIB_LDFLAGS was set to LDFLAGS_DEFAULT.
   854         -	Removed --enable-64bit support for AIX-4 because it wasn't correct.
   855         -	Added -MT or -MD Windows linker switches to properly support
   856         -	symbols-enabled builds.
   857         -
   858         -2002-03-28  Jeff Hobbs  <[email protected]>
   859         -
   860         -	* tcl.m4: called AC_MSG_ERROR when SC_TEA_INIT wasn't called first
   861         -	instead of calling it as that inlines it each time in shell code.
   862         -	Changed Windows CFLAGS_OPTIMIZE to use -O2 instead of -Oti.
   863         -	Noted TCL_LIB_VERSIONS_OK=nodots for Windows builds.
   864         -	A few changes to support itcl (and perhaps others):
   865         -	Added support for making your own stub libraries to SC_MAKE_LIB.
   866         -	New SC_PATH_CONFIG and SC_LOAD_CONFIG that take a package name arg
   867         -	and find that ${pkg}Config.sh file.  itk uses this for itcl.
   868         -
   869         -2002-03-27  Jeff Hobbs  <[email protected]>
   870         -
   871         -	* tcl.m4: made SC_LOAD_TKCONFIG recognize when working with a Tk
   872         -	build dir setup.
   873         -	Added EXTRA_CFLAGS and SHLIB_LD_LIBS substs to SC_CONFIG_CFLAGS.
   874         -	Added XLIBSW onto LIBS when it is defined.
   875         -	Remove TCL_LIBS from MAKE_LIB and correctly use SHLIB_LD_LIBS
   876         -	instead to not rely as much on tclConfig.sh cached info.
   877         -	Add TK_BIN_DIR to paths to find wish in SC_PROG_WISH.
   878         -	These move towards making TEA much more independent of *Config.sh.
   879         -
   880         -2002-03-19  Jeff Hobbs  <[email protected]>
   881         -
   882         -	* tcl.m4: corrected forgotten (UN)SHARED_LIB_SUFFIX and
   883         -	SHLIB_SUFFIX defines for Win.
   884         -	(SC_PATH_X): made this only do the check on unix platforms.
   885         -
   886         -2002-03-12  Jeff Hobbs  <[email protected]>
   887         -
   888         -	* README.txt: updated to reflect fewer files
   889         -
   890         -2002-03-06  Jeff Hobbs  <[email protected]>
   891         -
   892         -	* config.guess (removed):
   893         -	* config.sub (removed): removed unnecessary files
   894         -
   895         -	* installFile.tcl (removed):
   896         -	* mkinstalldirs (removed): these aren't really necessary for
   897         -	making TEA work
   898         -
   899         -	* tcl.m4 (SC_PUBLIC_TCL_HEADERS, SC_PUBLIC_TK_HEADERS): don't
   900         -	check /usr(/local)/include for includes on Windows when not using
   901         -	gcc
   902         -
   903         -2002-03-05  Jeff Hobbs  <[email protected]>
   904         -
   905         -	* tcl.m4: added warnings on Windows, removed RELPATH define and
   906         -	added TCL_LIBS to MAKE_LIB macro.
   907         -
   908         -	This import represents 2.0.0, or a new start at attempting to
   909         -	make TEA much easier for C extension developers.
   910         -
   911         -	**** moved from tclpro project to core tcl project, ****
   912         -	**** renamed to 'tclconfig'                         ****
   913         -
   914         -2001-03-15    Karl Lehenbauer <[email protected]>
   915         -
   916         -	* installFile.tcl: Added updating of the modification time of
   917         -	  the target file whether we overwrote it or decided that it
   918         -	  hadn't changed.  This was necessary for us to be able to
   919         -	  determine whether or not a module install touched the file.
   920         -
   921         -2001-03-08    Karl Lehenbauer <[email protected]>
   922         -
   923         -	* installFile.tcl: Added support for converting new-style (1.1+)
   924         -	  Cygnus drive paths to Tcl-style.
   925         -
   926         -2001-01-15    <[email protected]>
   927         -
   928         -	* tcl.m4: Added FreeBSD clause.
   929         -
   930         -2001-01-03    <[email protected]>
   931         -
   932         -	* tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking
   933         -	for exec-prefix.
   934         -
   935         -2000-12-01    <[email protected]>
   936         -
   937         -	* tcl.m4: Concatenated most of the Ajuba acsite.m4 file
   938         -	so we don't need to modify the autoconf installation.
   939         -	* config.guess:
   940         -	* config.sub:
   941         -	* installFile.tcl:
   942         -	Added files from the itcl config subdirectory,
   943         -	which should go away.
   944         -
   945         -2000-7-29    <[email protected]>
   946         -
   947         -	* Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within
   948         -	TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent
   949         -	change from $(srcdir) to $(srcdir)/..

Deleted tdbcpostgres/tclconfig/README.txt.

     1         -These files comprise the basic building blocks for a Tcl Extension
     2         -Architecture (TEA) extension.  For more information on TEA see:
     3         -
     4         -	http://www.tcl.tk/doc/tea/
     5         -
     6         -This package is part of the Tcl project at SourceForge, and latest
     7         -sources should be available there:
     8         -
     9         -	http://tcl.sourceforge.net/
    10         -
    11         -This package is a freely available open source package.  You can do
    12         -virtually anything you like with it, such as modifying it, redistributing
    13         -it, and selling it either in whole or in part.
    14         -
    15         -CONTENTS
    16         -========
    17         -The following is a short description of the files you will find in
    18         -the sample extension.
    19         -
    20         -README.txt	This file
    21         -
    22         -install-sh	Program used for copying binaries and script files
    23         -		to their install locations.
    24         -
    25         -tcl.m4		Collection of Tcl autoconf macros.  Included by a package's
    26         -		aclocal.m4 to define TEA_* macros.

Deleted tdbcpostgres/tclconfig/install-sh.

     1         -#!/bin/sh
     2         -# install - install a program, script, or datafile
     3         -
     4         -scriptversion=2011-04-20.01; # UTC
     5         -
     6         -# This originates from X11R5 (mit/util/scripts/install.sh), which was
     7         -# later released in X11R6 (xc/config/util/install.sh) with the
     8         -# following copyright and license.
     9         -#
    10         -# Copyright (C) 1994 X Consortium
    11         -#
    12         -# Permission is hereby granted, free of charge, to any person obtaining a copy
    13         -# of this software and associated documentation files (the "Software"), to
    14         -# deal in the Software without restriction, including without limitation the
    15         -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    16         -# sell copies of the Software, and to permit persons to whom the Software is
    17         -# furnished to do so, subject to the following conditions:
    18         -#
    19         -# The above copyright notice and this permission notice shall be included in
    20         -# all copies or substantial portions of the Software.
    21         -#
    22         -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    23         -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    24         -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
    25         -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
    26         -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
    27         -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    28         -#
    29         -# Except as contained in this notice, the name of the X Consortium shall not
    30         -# be used in advertising or otherwise to promote the sale, use or other deal-
    31         -# ings in this Software without prior written authorization from the X Consor-
    32         -# tium.
    33         -#
    34         -#
    35         -# FSF changes to this file are in the public domain.
    36         -#
    37         -# Calling this script install-sh is preferred over install.sh, to prevent
    38         -# `make' implicit rules from creating a file called install from it
    39         -# when there is no Makefile.
    40         -#
    41         -# This script is compatible with the BSD install script, but was written
    42         -# from scratch.
    43         -
    44         -nl='
    45         -'
    46         -IFS=" ""	$nl"
    47         -
    48         -# set DOITPROG to echo to test this script
    49         -
    50         -# Don't use :- since 4.3BSD and earlier shells don't like it.
    51         -doit=${DOITPROG-}
    52         -if test -z "$doit"; then
    53         -  doit_exec=exec
    54         -else
    55         -  doit_exec=$doit
    56         -fi
    57         -
    58         -# Put in absolute file names if you don't have them in your path;
    59         -# or use environment vars.
    60         -
    61         -chgrpprog=${CHGRPPROG-chgrp}
    62         -chmodprog=${CHMODPROG-chmod}
    63         -chownprog=${CHOWNPROG-chown}
    64         -cmpprog=${CMPPROG-cmp}
    65         -cpprog=${CPPROG-cp}
    66         -mkdirprog=${MKDIRPROG-mkdir}
    67         -mvprog=${MVPROG-mv}
    68         -rmprog=${RMPROG-rm}
    69         -stripprog=${STRIPPROG-strip}
    70         -
    71         -posix_glob='?'
    72         -initialize_posix_glob='
    73         -  test "$posix_glob" != "?" || {
    74         -    if (set -f) 2>/dev/null; then
    75         -      posix_glob=
    76         -    else
    77         -      posix_glob=:
    78         -    fi
    79         -  }
    80         -'
    81         -
    82         -posix_mkdir=
    83         -
    84         -# Desired mode of installed file.
    85         -mode=0755
    86         -
    87         -chgrpcmd=
    88         -chmodcmd=$chmodprog
    89         -chowncmd=
    90         -mvcmd=$mvprog
    91         -rmcmd="$rmprog -f"
    92         -stripcmd=
    93         -
    94         -src=
    95         -dst=
    96         -dir_arg=
    97         -dst_arg=
    98         -
    99         -copy_on_change=false
   100         -no_target_directory=
   101         -
   102         -usage="\
   103         -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
   104         -   or: $0 [OPTION]... SRCFILES... DIRECTORY
   105         -   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
   106         -   or: $0 [OPTION]... -d DIRECTORIES...
   107         -
   108         -In the 1st form, copy SRCFILE to DSTFILE.
   109         -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
   110         -In the 4th, create DIRECTORIES.
   111         -
   112         -Options:
   113         -     --help     display this help and exit.
   114         -     --version  display version info and exit.
   115         -
   116         -  -c            (ignored)
   117         -  -C            install only if different (preserve the last data modification time)
   118         -  -d            create directories instead of installing files.
   119         -  -g GROUP      $chgrpprog installed files to GROUP.
   120         -  -m MODE       $chmodprog installed files to MODE.
   121         -  -o USER       $chownprog installed files to USER.
   122         -  -s            $stripprog installed files.
   123         -  -S            $stripprog installed files.
   124         -  -t DIRECTORY  install into DIRECTORY.
   125         -  -T            report an error if DSTFILE is a directory.
   126         -
   127         -Environment variables override the default commands:
   128         -  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
   129         -  RMPROG STRIPPROG
   130         -"
   131         -
   132         -while test $# -ne 0; do
   133         -  case $1 in
   134         -    -c) ;;
   135         -
   136         -    -C) copy_on_change=true;;
   137         -
   138         -    -d) dir_arg=true;;
   139         -
   140         -    -g) chgrpcmd="$chgrpprog $2"
   141         -	shift;;
   142         -
   143         -    --help) echo "$usage"; exit $?;;
   144         -
   145         -    -m) mode=$2
   146         -	case $mode in
   147         -	  *' '* | *'	'* | *'
   148         -'*	  | *'*'* | *'?'* | *'['*)
   149         -	    echo "$0: invalid mode: $mode" >&2
   150         -	    exit 1;;
   151         -	esac
   152         -	shift;;
   153         -
   154         -    -o) chowncmd="$chownprog $2"
   155         -	shift;;
   156         -
   157         -    -s) stripcmd=$stripprog;;
   158         -
   159         -    -S) stripcmd="$stripprog $2"
   160         -	shift;;
   161         -
   162         -    -t) dst_arg=$2
   163         -	shift;;
   164         -
   165         -    -T) no_target_directory=true;;
   166         -
   167         -    --version) echo "$0 $scriptversion"; exit $?;;
   168         -
   169         -    --)	shift
   170         -	break;;
   171         -
   172         -    -*)	echo "$0: invalid option: $1" >&2
   173         -	exit 1;;
   174         -
   175         -    *)  break;;
   176         -  esac
   177         -  shift
   178         -done
   179         -
   180         -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   181         -  # When -d is used, all remaining arguments are directories to create.
   182         -  # When -t is used, the destination is already specified.
   183         -  # Otherwise, the last argument is the destination.  Remove it from [email protected]
   184         -  for arg
   185         -  do
   186         -    if test -n "$dst_arg"; then
   187         -      # [email protected] is not empty: it contains at least $arg.
   188         -      set fnord "[email protected]" "$dst_arg"
   189         -      shift # fnord
   190         -    fi
   191         -    shift # arg
   192         -    dst_arg=$arg
   193         -  done
   194         -fi
   195         -
   196         -if test $# -eq 0; then
   197         -  if test -z "$dir_arg"; then
   198         -    echo "$0: no input file specified." >&2
   199         -    exit 1
   200         -  fi
   201         -  # It's OK to call `install-sh -d' without argument.
   202         -  # This can happen when creating conditional directories.
   203         -  exit 0
   204         -fi
   205         -
   206         -if test -z "$dir_arg"; then
   207         -  do_exit='(exit $ret); exit $ret'
   208         -  trap "ret=129; $do_exit" 1
   209         -  trap "ret=130; $do_exit" 2
   210         -  trap "ret=141; $do_exit" 13
   211         -  trap "ret=143; $do_exit" 15
   212         -
   213         -  # Set umask so as not to create temps with too-generous modes.
   214         -  # However, 'strip' requires both read and write access to temps.
   215         -  case $mode in
   216         -    # Optimize common cases.
   217         -    *644) cp_umask=133;;
   218         -    *755) cp_umask=22;;
   219         -
   220         -    *[0-7])
   221         -      if test -z "$stripcmd"; then
   222         -	u_plus_rw=
   223         -      else
   224         -	u_plus_rw='% 200'
   225         -      fi
   226         -      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
   227         -    *)
   228         -      if test -z "$stripcmd"; then
   229         -	u_plus_rw=
   230         -      else
   231         -	u_plus_rw=,u+rw
   232         -      fi
   233         -      cp_umask=$mode$u_plus_rw;;
   234         -  esac
   235         -fi
   236         -
   237         -for src
   238         -do
   239         -  # Protect names starting with `-'.
   240         -  case $src in
   241         -    -*) src=./$src;;
   242         -  esac
   243         -
   244         -  if test -n "$dir_arg"; then
   245         -    dst=$src
   246         -    dstdir=$dst
   247         -    test -d "$dstdir"
   248         -    dstdir_status=$?
   249         -  else
   250         -
   251         -    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
   252         -    # might cause directories to be created, which would be especially bad
   253         -    # if $src (and thus $dsttmp) contains '*'.
   254         -    if test ! -f "$src" && test ! -d "$src"; then
   255         -      echo "$0: $src does not exist." >&2
   256         -      exit 1
   257         -    fi
   258         -
   259         -    if test -z "$dst_arg"; then
   260         -      echo "$0: no destination specified." >&2
   261         -      exit 1
   262         -    fi
   263         -
   264         -    dst=$dst_arg
   265         -    # Protect names starting with `-'.
   266         -    case $dst in
   267         -      -*) dst=./$dst;;
   268         -    esac
   269         -
   270         -    # If destination is a directory, append the input filename; won't work
   271         -    # if double slashes aren't ignored.
   272         -    if test -d "$dst"; then
   273         -      if test -n "$no_target_directory"; then
   274         -	echo "$0: $dst_arg: Is a directory" >&2
   275         -	exit 1
   276         -      fi
   277         -      dstdir=$dst
   278         -      dst=$dstdir/`basename "$src"`
   279         -      dstdir_status=0
   280         -    else
   281         -      # Prefer dirname, but fall back on a substitute if dirname fails.
   282         -      dstdir=`
   283         -	(dirname "$dst") 2>/dev/null ||
   284         -	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
   285         -	     X"$dst" : 'X\(//\)[^/]' \| \
   286         -	     X"$dst" : 'X\(//\)$' \| \
   287         -	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
   288         -	echo X"$dst" |
   289         -	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
   290         -		   s//\1/
   291         -		   q
   292         -		 }
   293         -		 /^X\(\/\/\)[^/].*/{
   294         -		   s//\1/
   295         -		   q
   296         -		 }
   297         -		 /^X\(\/\/\)$/{
   298         -		   s//\1/
   299         -		   q
   300         -		 }
   301         -		 /^X\(\/\).*/{
   302         -		   s//\1/
   303         -		   q
   304         -		 }
   305         -		 s/.*/./; q'
   306         -      `
   307         -
   308         -      test -d "$dstdir"
   309         -      dstdir_status=$?
   310         -    fi
   311         -  fi
   312         -
   313         -  obsolete_mkdir_used=false
   314         -
   315         -  if test $dstdir_status != 0; then
   316         -    case $posix_mkdir in
   317         -      '')
   318         -	# Create intermediate dirs using mode 755 as modified by the umask.
   319         -	# This is like FreeBSD 'install' as of 1997-10-28.
   320         -	umask=`umask`
   321         -	case $stripcmd.$umask in
   322         -	  # Optimize common cases.
   323         -	  *[2367][2367]) mkdir_umask=$umask;;
   324         -	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
   325         -
   326         -	  *[0-7])
   327         -	    mkdir_umask=`expr $umask + 22 \
   328         -	      - $umask % 100 % 40 + $umask % 20 \
   329         -	      - $umask % 10 % 4 + $umask % 2
   330         -	    `;;
   331         -	  *) mkdir_umask=$umask,go-w;;
   332         -	esac
   333         -
   334         -	# With -d, create the new directory with the user-specified mode.
   335         -	# Otherwise, rely on $mkdir_umask.
   336         -	if test -n "$dir_arg"; then
   337         -	  mkdir_mode=-m$mode
   338         -	else
   339         -	  mkdir_mode=
   340         -	fi
   341         -
   342         -	posix_mkdir=false
   343         -	case $umask in
   344         -	  *[123567][0-7][0-7])
   345         -	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
   346         -	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
   347         -	    ;;
   348         -	  *)
   349         -	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
   350         -	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
   351         -
   352         -	    if (umask $mkdir_umask &&
   353         -		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
   354         -	    then
   355         -	      if test -z "$dir_arg" || {
   356         -		   # Check for POSIX incompatibilities with -m.
   357         -		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
   358         -		   # other-writeable bit of parent directory when it shouldn't.
   359         -		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
   360         -		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
   361         -		   case $ls_ld_tmpdir in
   362         -		     d????-?r-*) different_mode=700;;
   363         -		     d????-?--*) different_mode=755;;
   364         -		     *) false;;
   365         -		   esac &&
   366         -		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
   367         -		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
   368         -		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
   369         -		   }
   370         -		 }
   371         -	      then posix_mkdir=:
   372         -	      fi
   373         -	      rmdir "$tmpdir/d" "$tmpdir"
   374         -	    else
   375         -	      # Remove any dirs left behind by ancient mkdir implementations.
   376         -	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
   377         -	    fi
   378         -	    trap '' 0;;
   379         -	esac;;
   380         -    esac
   381         -
   382         -    if
   383         -      $posix_mkdir && (
   384         -	umask $mkdir_umask &&
   385         -	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
   386         -      )
   387         -    then :
   388         -    else
   389         -
   390         -      # The umask is ridiculous, or mkdir does not conform to POSIX,
   391         -      # or it failed possibly due to a race condition.  Create the
   392         -      # directory the slow way, step by step, checking for races as we go.
   393         -
   394         -      case $dstdir in
   395         -	/*) prefix='/';;
   396         -	-*) prefix='./';;
   397         -	*)  prefix='';;
   398         -      esac
   399         -
   400         -      eval "$initialize_posix_glob"
   401         -
   402         -      oIFS=$IFS
   403         -      IFS=/
   404         -      $posix_glob set -f
   405         -      set fnord $dstdir
   406         -      shift
   407         -      $posix_glob set +f
   408         -      IFS=$oIFS
   409         -
   410         -      prefixes=
   411         -
   412         -      for d
   413         -      do
   414         -	test -z "$d" && continue
   415         -
   416         -	prefix=$prefix$d
   417         -	if test -d "$prefix"; then
   418         -	  prefixes=
   419         -	else
   420         -	  if $posix_mkdir; then
   421         -	    (umask=$mkdir_umask &&
   422         -	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
   423         -	    # Don't fail if two instances are running concurrently.
   424         -	    test -d "$prefix" || exit 1
   425         -	  else
   426         -	    case $prefix in
   427         -	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
   428         -	      *) qprefix=$prefix;;
   429         -	    esac
   430         -	    prefixes="$prefixes '$qprefix'"
   431         -	  fi
   432         -	fi
   433         -	prefix=$prefix/
   434         -      done
   435         -
   436         -      if test -n "$prefixes"; then
   437         -	# Don't fail if two instances are running concurrently.
   438         -	(umask $mkdir_umask &&
   439         -	 eval "\$doit_exec \$mkdirprog $prefixes") ||
   440         -	  test -d "$dstdir" || exit 1
   441         -	obsolete_mkdir_used=true
   442         -      fi
   443         -    fi
   444         -  fi
   445         -
   446         -  if test -n "$dir_arg"; then
   447         -    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
   448         -    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
   449         -    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
   450         -      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
   451         -  else
   452         -
   453         -    # Make a couple of temp file names in the proper directory.
   454         -    dsttmp=$dstdir/_inst.$$_
   455         -    rmtmp=$dstdir/_rm.$$_
   456         -
   457         -    # Trap to clean up those temp files at exit.
   458         -    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
   459         -
   460         -    # Copy the file name to the temp name.
   461         -    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
   462         -
   463         -    # and set any options; do chmod last to preserve setuid bits.
   464         -    #
   465         -    # If any of these fail, we abort the whole thing.  If we want to
   466         -    # ignore errors from any of these, just make sure not to ignore
   467         -    # errors from the above "$doit $cpprog $src $dsttmp" command.
   468         -    #
   469         -    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
   470         -    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
   471         -    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
   472         -    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
   473         -
   474         -    # If -C, don't bother to copy if it wouldn't change the file.
   475         -    if $copy_on_change &&
   476         -       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
   477         -       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
   478         -
   479         -       eval "$initialize_posix_glob" &&
   480         -       $posix_glob set -f &&
   481         -       set X $old && old=:$2:$4:$5:$6 &&
   482         -       set X $new && new=:$2:$4:$5:$6 &&
   483         -       $posix_glob set +f &&
   484         -
   485         -       test "$old" = "$new" &&
   486         -       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
   487         -    then
   488         -      rm -f "$dsttmp"
   489         -    else
   490         -      # Rename the file to the real destination.
   491         -      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
   492         -
   493         -      # The rename failed, perhaps because mv can't rename something else
   494         -      # to itself, or perhaps because mv is so ancient that it does not
   495         -      # support -f.
   496         -      {
   497         -	# Now remove or move aside any old file at destination location.
   498         -	# We try this two ways since rm can't unlink itself on some
   499         -	# systems and the destination file might be busy for other
   500         -	# reasons.  In this case, the final cleanup might fail but the new
   501         -	# file should still install successfully.
   502         -	{
   503         -	  test ! -f "$dst" ||
   504         -	  $doit $rmcmd -f "$dst" 2>/dev/null ||
   505         -	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
   506         -	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
   507         -	  } ||
   508         -	  { echo "$0: cannot unlink or rename $dst" >&2
   509         -	    (exit 1); exit 1
   510         -	  }
   511         -	} &&
   512         -
   513         -	# Now rename the file to the real destination.
   514         -	$doit $mvcmd "$dsttmp" "$dst"
   515         -      }
   516         -    fi || exit 1
   517         -
   518         -    trap '' 0
   519         -  fi
   520         -done
   521         -
   522         -# Local variables:
   523         -# eval: (add-hook 'write-file-hooks 'time-stamp)
   524         -# time-stamp-start: "scriptversion="
   525         -# time-stamp-format: "%:y-%02m-%02d.%02H"
   526         -# time-stamp-time-zone: "UTC"
   527         -# time-stamp-end: "; # UTC"
   528         -# End:

Deleted tdbcpostgres/tclconfig/tcl.m4.

     1         -# tcl.m4 --
     2         -#
     3         -#	This file provides a set of autoconf macros to help TEA-enable
     4         -#	a Tcl extension.
     5         -#
     6         -# Copyright (c) 1999-2000 Ajuba Solutions.
     7         -# Copyright (c) 2002-2005 ActiveState Corporation.
     8         -#
     9         -# See the file "license.terms" for information on usage and redistribution
    10         -# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    11         -
    12         -AC_PREREQ(2.57)
    13         -
    14         -dnl TEA extensions pass us the version of TEA they think they
    15         -dnl are compatible with (must be set in TEA_INIT below)
    16         -dnl TEA_VERSION="3.9"
    17         -
    18         -# Possible values for key variables defined:
    19         -#
    20         -# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
    21         -# TEA_PLATFORM        - windows unix
    22         -#
    23         -
    24         -#------------------------------------------------------------------------
    25         -# TEA_PATH_TCLCONFIG --
    26         -#
    27         -#	Locate the tclConfig.sh file and perform a sanity check on
    28         -#	the Tcl compile flags
    29         -#
    30         -# Arguments:
    31         -#	none
    32         -#
    33         -# Results:
    34         -#
    35         -#	Adds the following arguments to configure:
    36         -#		--with-tcl=...
    37         -#
    38         -#	Defines the following vars:
    39         -#		TCL_BIN_DIR	Full path to the directory containing
    40         -#				the tclConfig.sh file
    41         -#------------------------------------------------------------------------
    42         -
    43         -AC_DEFUN([TEA_PATH_TCLCONFIG], [
    44         -    dnl TEA specific: Make sure we are initialized
    45         -    AC_REQUIRE([TEA_INIT])
    46         -    #
    47         -    # Ok, lets find the tcl configuration
    48         -    # First, look for one uninstalled.
    49         -    # the alternative search directory is invoked by --with-tcl
    50         -    #
    51         -
    52         -    if test x"${no_tcl}" = x ; then
    53         -	# we reset no_tcl in case something fails here
    54         -	no_tcl=true
    55         -	AC_ARG_WITH(tcl,
    56         -	    AC_HELP_STRING([--with-tcl],
    57         -		[directory containing tcl configuration (tclConfig.sh)]),
    58         -	    with_tclconfig="${withval}")
    59         -	AC_MSG_CHECKING([for Tcl configuration])
    60         -	AC_CACHE_VAL(ac_cv_c_tclconfig,[
    61         -
    62         -	    # First check to see if --with-tcl was specified.
    63         -	    if test x"${with_tclconfig}" != x ; then
    64         -		case "${with_tclconfig}" in
    65         -		    */tclConfig.sh )
    66         -			if test -f "${with_tclconfig}"; then
    67         -			    AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself])
    68         -			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
    69         -			fi ;;
    70         -		esac
    71         -		if test -f "${with_tclconfig}/tclConfig.sh" ; then
    72         -		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
    73         -		else
    74         -		    AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
    75         -		fi
    76         -	    fi
    77         -
    78         -	    # then check for a private Tcl installation
    79         -	    if test x"${ac_cv_c_tclconfig}" = x ; then
    80         -		for i in \
    81         -			../tcl \
    82         -			`ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
    83         -			`ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
    84         -			`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
    85         -			../../tcl \
    86         -			`ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
    87         -			`ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
    88         -			`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
    89         -			../../../tcl \
    90         -			`ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
    91         -			`ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
    92         -			`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
    93         -		    if test "${TEA_PLATFORM}" = "windows" \
    94         -			    -a -f "$i/win/tclConfig.sh" ; then
    95         -			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
    96         -			break
    97         -		    fi
    98         -		    if test -f "$i/unix/tclConfig.sh" ; then
    99         -			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
   100         -			break
   101         -		    fi
   102         -		done
   103         -	    fi
   104         -
   105         -	    # on Darwin, check in Framework installation locations
   106         -	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
   107         -		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
   108         -			`ls -d /Library/Frameworks 2>/dev/null` \
   109         -			`ls -d /Network/Library/Frameworks 2>/dev/null` \
   110         -			`ls -d /System/Library/Frameworks 2>/dev/null` \
   111         -			; do
   112         -		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
   113         -			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
   114         -			break
   115         -		    fi
   116         -		done
   117         -	    fi
   118         -
   119         -	    # TEA specific: on Windows, check in common installation locations
   120         -	    if test "${TEA_PLATFORM}" = "windows" \
   121         -		-a x"${ac_cv_c_tclconfig}" = x ; then
   122         -		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
   123         -			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
   124         -			; do
   125         -		    if test -f "$i/tclConfig.sh" ; then
   126         -			ac_cv_c_tclconfig="`(cd $i; pwd)`"
   127         -			break
   128         -		    fi
   129         -		done
   130         -	    fi
   131         -
   132         -	    # check in a few common install locations
   133         -	    if test x"${ac_cv_c_tclconfig}" = x ; then
   134         -		for i in `ls -d ${libdir} 2>/dev/null` \
   135         -			`ls -d ${exec_prefix}/lib 2>/dev/null` \
   136         -			`ls -d ${prefix}/lib 2>/dev/null` \
   137         -			`ls -d /usr/local/lib 2>/dev/null` \
   138         -			`ls -d /usr/contrib/lib 2>/dev/null` \
   139         -			`ls -d /usr/lib 2>/dev/null` \
   140         -			`ls -d /usr/lib64 2>/dev/null` \
   141         -			; do
   142         -		    if test -f "$i/tclConfig.sh" ; then
   143         -			ac_cv_c_tclconfig="`(cd $i; pwd)`"
   144         -			break
   145         -		    fi
   146         -		done
   147         -	    fi
   148         -
   149         -	    # check in a few other private locations
   150         -	    if test x"${ac_cv_c_tclconfig}" = x ; then
   151         -		for i in \
   152         -			${srcdir}/../tcl \
   153         -			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
   154         -			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
   155         -			`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
   156         -		    if test "${TEA_PLATFORM}" = "windows" \
   157         -			    -a -f "$i/win/tclConfig.sh" ; then
   158         -			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
   159         -			break
   160         -		    fi
   161         -		    if test -f "$i/unix/tclConfig.sh" ; then
   162         -			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
   163         -			break
   164         -		    fi
   165         -		done
   166         -	    fi
   167         -	])
   168         -
   169         -	if test x"${ac_cv_c_tclconfig}" = x ; then
   170         -	    TCL_BIN_DIR="# no Tcl configs found"
   171         -	    AC_MSG_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
   172         -	else
   173         -	    no_tcl=
   174         -	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
   175         -	    AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh])
   176         -	fi
   177         -    fi
   178         -])
   179         -
   180         -#------------------------------------------------------------------------
   181         -# TEA_PATH_TKCONFIG --
   182         -#
   183         -#	Locate the tkConfig.sh file
   184         -#
   185         -# Arguments:
   186         -#	none
   187         -#
   188         -# Results:
   189         -#
   190         -#	Adds the following arguments to configure:
   191         -#		--with-tk=...
   192         -#
   193         -#	Defines the following vars:
   194         -#		TK_BIN_DIR	Full path to the directory containing
   195         -#				the tkConfig.sh file
   196         -#------------------------------------------------------------------------
   197         -
   198         -AC_DEFUN([TEA_PATH_TKCONFIG], [
   199         -    #
   200         -    # Ok, lets find the tk configuration
   201         -    # First, look for one uninstalled.
   202         -    # the alternative search directory is invoked by --with-tk
   203         -    #
   204         -
   205         -    if test x"${no_tk}" = x ; then
   206         -	# we reset no_tk in case something fails here
   207         -	no_tk=true
   208         -	AC_ARG_WITH(tk,
   209         -	    AC_HELP_STRING([--with-tk],
   210         -		[directory containing tk configuration (tkConfig.sh)]),
   211         -	    with_tkconfig="${withval}")
   212         -	AC_MSG_CHECKING([for Tk configuration])
   213         -	AC_CACHE_VAL(ac_cv_c_tkconfig,[
   214         -
   215         -	    # First check to see if --with-tkconfig was specified.
   216         -	    if test x"${with_tkconfig}" != x ; then
   217         -		case "${with_tkconfig}" in
   218         -		    */tkConfig.sh )
   219         -			if test -f "${with_tkconfig}"; then
   220         -			    AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
   221         -			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
   222         -			fi ;;
   223         -		esac
   224         -		if test -f "${with_tkconfig}/tkConfig.sh" ; then
   225         -		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
   226         -		else
   227         -		    AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
   228         -		fi
   229         -	    fi
   230         -
   231         -	    # then check for a private Tk library
   232         -	    if test x"${ac_cv_c_tkconfig}" = x ; then
   233         -		for i in \
   234         -			../tk \
   235         -			`ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
   236         -			`ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \
   237         -			`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
   238         -			../../tk \
   239         -			`ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
   240         -			`ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \
   241         -			`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
   242         -			../../../tk \
   243         -			`ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
   244         -			`ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \
   245         -			`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
   246         -		    if test "${TEA_PLATFORM}" = "windows" \
   247         -			    -a -f "$i/win/tkConfig.sh" ; then
   248         -			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
   249         -			break
   250         -		    fi
   251         -		    if test -f "$i/unix/tkConfig.sh" ; then
   252         -			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
   253         -			break
   254         -		    fi
   255         -		done
   256         -	    fi
   257         -
   258         -	    # on Darwin, check in Framework installation locations
   259         -	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
   260         -		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
   261         -			`ls -d /Library/Frameworks 2>/dev/null` \
   262         -			`ls -d /Network/Library/Frameworks 2>/dev/null` \
   263         -			`ls -d /System/Library/Frameworks 2>/dev/null` \
   264         -			; do
   265         -		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
   266         -			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
   267         -			break
   268         -		    fi
   269         -		done
   270         -	    fi
   271         -
   272         -	    # check in a few common install locations
   273         -	    if test x"${ac_cv_c_tkconfig}" = x ; then
   274         -		for i in `ls -d ${libdir} 2>/dev/null` \
   275         -			`ls -d ${exec_prefix}/lib 2>/dev/null` \
   276         -			`ls -d ${prefix}/lib 2>/dev/null` \
   277         -			`ls -d /usr/local/lib 2>/dev/null` \
   278         -			`ls -d /usr/contrib/lib 2>/dev/null` \
   279         -			`ls -d /usr/lib 2>/dev/null` \
   280         -			`ls -d /usr/lib64 2>/dev/null` \
   281         -			; do
   282         -		    if test -f "$i/tkConfig.sh" ; then
   283         -			ac_cv_c_tkconfig="`(cd $i; pwd)`"
   284         -			break
   285         -		    fi
   286         -		done
   287         -	    fi
   288         -
   289         -	    # TEA specific: on Windows, check in common installation locations
   290         -	    if test "${TEA_PLATFORM}" = "windows" \
   291         -		-a x"${ac_cv_c_tkconfig}" = x ; then
   292         -		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
   293         -			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
   294         -			; do
   295         -		    if test -f "$i/tkConfig.sh" ; then
   296         -			ac_cv_c_tkconfig="`(cd $i; pwd)`"
   297         -			break
   298         -		    fi
   299         -		done
   300         -	    fi
   301         -
   302         -	    # check in a few other private locations
   303         -	    if test x"${ac_cv_c_tkconfig}" = x ; then
   304         -		for i in \
   305         -			${srcdir}/../tk \
   306         -			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
   307         -			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \
   308         -			`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
   309         -		    if test "${TEA_PLATFORM}" = "windows" \
   310         -			    -a -f "$i/win/tkConfig.sh" ; then
   311         -			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
   312         -			break
   313         -		    fi
   314         -		    if test -f "$i/unix/tkConfig.sh" ; then
   315         -			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
   316         -			break
   317         -		    fi
   318         -		done
   319         -	    fi
   320         -	])
   321         -
   322         -	if test x"${ac_cv_c_tkconfig}" = x ; then
   323         -	    TK_BIN_DIR="# no Tk configs found"
   324         -	    AC_MSG_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
   325         -	else
   326         -	    no_tk=
   327         -	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
   328         -	    AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh])
   329         -	fi
   330         -    fi
   331         -])
   332         -
   333         -#------------------------------------------------------------------------
   334         -# TEA_LOAD_TCLCONFIG --
   335         -#
   336         -#	Load the tclConfig.sh file
   337         -#
   338         -# Arguments:
   339         -#
   340         -#	Requires the following vars to be set:
   341         -#		TCL_BIN_DIR
   342         -#
   343         -# Results:
   344         -#
   345         -#	Substitutes the following vars:
   346         -#		TCL_BIN_DIR
   347         -#		TCL_SRC_DIR
   348         -#		TCL_LIB_FILE
   349         -#------------------------------------------------------------------------
   350         -
   351         -AC_DEFUN([TEA_LOAD_TCLCONFIG], [
   352         -    AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh])
   353         -
   354         -    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
   355         -        AC_MSG_RESULT([loading])
   356         -	. "${TCL_BIN_DIR}/tclConfig.sh"
   357         -    else
   358         -        AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh])
   359         -    fi
   360         -
   361         -    # eval is required to do the TCL_DBGX substitution
   362         -    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
   363         -    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
   364         -
   365         -    # If the TCL_BIN_DIR is the build directory (not the install directory),
   366         -    # then set the common variable name to the value of the build variables.
   367         -    # For example, the variable TCL_LIB_SPEC will be set to the value
   368         -    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
   369         -    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
   370         -    # installed and uninstalled version of Tcl.
   371         -    if test -f "${TCL_BIN_DIR}/Makefile" ; then
   372         -        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
   373         -        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
   374         -        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
   375         -    elif test "`uname -s`" = "Darwin"; then
   376         -	# If Tcl was built as a framework, attempt to use the libraries
   377         -	# from the framework at the given location so that linking works
   378         -	# against Tcl.framework installed in an arbitrary location.
   379         -	case ${TCL_DEFS} in
   380         -	    *TCL_FRAMEWORK*)
   381         -		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
   382         -		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
   383         -			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
   384         -			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
   385         -			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
   386         -			    break
   387         -			fi
   388         -		    done
   389         -		fi
   390         -		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
   391         -		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
   392         -		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
   393         -		fi
   394         -		;;
   395         -	esac
   396         -    fi
   397         -
   398         -    # eval is required to do the TCL_DBGX substitution
   399         -    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
   400         -    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
   401         -    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
   402         -    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
   403         -
   404         -    AC_SUBST(TCL_VERSION)
   405         -    AC_SUBST(TCL_PATCH_LEVEL)
   406         -    AC_SUBST(TCL_BIN_DIR)
   407         -    AC_SUBST(TCL_SRC_DIR)
   408         -
   409         -    AC_SUBST(TCL_LIB_FILE)
   410         -    AC_SUBST(TCL_LIB_FLAG)
   411         -    AC_SUBST(TCL_LIB_SPEC)
   412         -
   413         -    AC_SUBST(TCL_STUB_LIB_FILE)
   414         -    AC_SUBST(TCL_STUB_LIB_FLAG)
   415         -    AC_SUBST(TCL_STUB_LIB_SPEC)
   416         -
   417         -    AC_MSG_CHECKING([platform])
   418         -    hold_cc=$CC; CC="$TCL_CC"
   419         -    AC_TRY_COMPILE(,[
   420         -	    #ifdef _WIN32
   421         -		#error win32
   422         -	    #endif
   423         -    ], TEA_PLATFORM="unix",
   424         -	    TEA_PLATFORM="windows"
   425         -    )
   426         -    CC=$hold_cc
   427         -    AC_MSG_RESULT($TEA_PLATFORM)
   428         -
   429         -    # The BUILD_$pkg is to define the correct extern storage class
   430         -    # handling when making this package
   431         -    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
   432         -	    [Building extension source?])
   433         -    # Do this here as we have fully defined TEA_PLATFORM now
   434         -    if test "${TEA_PLATFORM}" = "windows" ; then
   435         -	EXEEXT=".exe"
   436         -	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
   437         -    fi
   438         -
   439         -    # TEA specific:
   440         -    AC_SUBST(CLEANFILES)
   441         -    AC_SUBST(TCL_LIBS)
   442         -    AC_SUBST(TCL_DEFS)
   443         -    AC_SUBST(TCL_EXTRA_CFLAGS)
   444         -    AC_SUBST(TCL_LD_FLAGS)
   445         -    AC_SUBST(TCL_SHLIB_LD_LIBS)
   446         -])
   447         -
   448         -#------------------------------------------------------------------------
   449         -# TEA_LOAD_TKCONFIG --
   450         -#
   451         -#	Load the tkConfig.sh file
   452         -#
   453         -# Arguments:
   454         -#
   455         -#	Requires the following vars to be set:
   456         -#		TK_BIN_DIR
   457         -#
   458         -# Results:
   459         -#
   460         -#	Sets the following vars that should be in tkConfig.sh:
   461         -#		TK_BIN_DIR
   462         -#------------------------------------------------------------------------
   463         -
   464         -AC_DEFUN([TEA_LOAD_TKCONFIG], [
   465         -    AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
   466         -
   467         -    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
   468         -        AC_MSG_RESULT([loading])
   469         -	. "${TK_BIN_DIR}/tkConfig.sh"
   470         -    else
   471         -        AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
   472         -    fi
   473         -
   474         -    # eval is required to do the TK_DBGX substitution
   475         -    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
   476         -    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
   477         -
   478         -    # If the TK_BIN_DIR is the build directory (not the install directory),
   479         -    # then set the common variable name to the value of the build variables.
   480         -    # For example, the variable TK_LIB_SPEC will be set to the value
   481         -    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
   482         -    # instead of TK_BUILD_LIB_SPEC since it will work with both an
   483         -    # installed and uninstalled version of Tcl.
   484         -    if test -f "${TK_BIN_DIR}/Makefile" ; then
   485         -        TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
   486         -        TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
   487         -        TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
   488         -    elif test "`uname -s`" = "Darwin"; then
   489         -	# If Tk was built as a framework, attempt to use the libraries
   490         -	# from the framework at the given location so that linking works
   491         -	# against Tk.framework installed in an arbitrary location.
   492         -	case ${TK_DEFS} in
   493         -	    *TK_FRAMEWORK*)
   494         -		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
   495         -		    for i in "`cd "${TK_BIN_DIR}"; pwd`" \
   496         -			     "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
   497         -			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
   498         -			    TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
   499         -			    break
   500         -			fi
   501         -		    done
   502         -		fi
   503         -		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
   504         -		    TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
   505         -		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
   506         -		fi
   507         -		;;
   508         -	esac
   509         -    fi
   510         -
   511         -    # eval is required to do the TK_DBGX substitution
   512         -    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
   513         -    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
   514         -    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
   515         -    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
   516         -
   517         -    # TEA specific: Ensure windowingsystem is defined
   518         -    if test "${TEA_PLATFORM}" = "unix" ; then
   519         -	case ${TK_DEFS} in
   520         -	    *MAC_OSX_TK*)
   521         -		AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
   522         -		TEA_WINDOWINGSYSTEM="aqua"
   523         -		;;
   524         -	    *)
   525         -		TEA_WINDOWINGSYSTEM="x11"
   526         -		;;
   527         -	esac
   528         -    elif test "${TEA_PLATFORM}" = "windows" ; then
   529         -	TEA_WINDOWINGSYSTEM="win32"
   530         -    fi
   531         -
   532         -    AC_SUBST(TK_VERSION)
   533         -    AC_SUBST(TK_BIN_DIR)
   534         -    AC_SUBST(TK_SRC_DIR)
   535         -
   536         -    AC_SUBST(TK_LIB_FILE)
   537         -    AC_SUBST(TK_LIB_FLAG)
   538         -    AC_SUBST(TK_LIB_SPEC)
   539         -
   540         -    AC_SUBST(TK_STUB_LIB_FILE)
   541         -    AC_SUBST(TK_STUB_LIB_FLAG)
   542         -    AC_SUBST(TK_STUB_LIB_SPEC)
   543         -
   544         -    # TEA specific:
   545         -    AC_SUBST(TK_LIBS)
   546         -    AC_SUBST(TK_XINCLUDES)
   547         -])
   548         -
   549         -#------------------------------------------------------------------------
   550         -# TEA_PROG_TCLSH
   551         -#	Determine the fully qualified path name of the tclsh executable
   552         -#	in the Tcl build directory or the tclsh installed in a bin
   553         -#	directory. This macro will correctly determine the name
   554         -#	of the tclsh executable even if tclsh has not yet been
   555         -#	built in the build directory. The tclsh found is always
   556         -#	associated with a tclConfig.sh file. This tclsh should be used
   557         -#	only for running extension test cases. It should never be
   558         -#	or generation of files (like pkgIndex.tcl) at build time.
   559         -#
   560         -# Arguments:
   561         -#	none
   562         -#
   563         -# Results:
   564         -#	Substitutes the following vars:
   565         -#		TCLSH_PROG
   566         -#------------------------------------------------------------------------
   567         -
   568         -AC_DEFUN([TEA_PROG_TCLSH], [
   569         -    AC_MSG_CHECKING([for tclsh])
   570         -    if test -f "${TCL_BIN_DIR}/Makefile" ; then
   571         -        # tclConfig.sh is in Tcl build directory
   572         -        if test "${TEA_PLATFORM}" = "windows"; then
   573         -            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
   574         -        else
   575         -            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
   576         -        fi
   577         -    else
   578         -        # tclConfig.sh is in install location
   579         -        if test "${TEA_PLATFORM}" = "windows"; then
   580         -            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
   581         -        else
   582         -            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
   583         -        fi
   584         -        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
   585         -              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
   586         -              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
   587         -        for i in $list ; do
   588         -            if test -f "$i/${TCLSH_PROG}" ; then
   589         -                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
   590         -                break
   591         -            fi
   592         -        done
   593         -        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
   594         -    fi
   595         -    AC_MSG_RESULT([${TCLSH_PROG}])
   596         -    AC_SUBST(TCLSH_PROG)
   597         -])
   598         -
   599         -#------------------------------------------------------------------------
   600         -# TEA_PROG_WISH
   601         -#	Determine the fully qualified path name of the wish executable
   602         -#	in the Tk build directory or the wish installed in a bin
   603         -#	directory. This macro will correctly determine the name
   604         -#	of the wish executable even if wish has not yet been
   605         -#	built in the build directory. The wish found is always
   606         -#	associated with a tkConfig.sh file. This wish should be used
   607         -#	only for running extension test cases. It should never be
   608         -#	or generation of files (like pkgIndex.tcl) at build time.
   609         -#
   610         -# Arguments:
   611         -#	none
   612         -#
   613         -# Results:
   614         -#	Substitutes the following vars:
   615         -#		WISH_PROG
   616         -#------------------------------------------------------------------------
   617         -
   618         -AC_DEFUN([TEA_PROG_WISH], [
   619         -    AC_MSG_CHECKING([for wish])
   620         -    if test -f "${TK_BIN_DIR}/Makefile" ; then
   621         -        # tkConfig.sh is in Tk build directory
   622         -        if test "${TEA_PLATFORM}" = "windows"; then
   623         -            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
   624         -        else
   625         -            WISH_PROG="${TK_BIN_DIR}/wish"
   626         -        fi
   627         -    else
   628         -        # tkConfig.sh is in install location
   629         -        if test "${TEA_PLATFORM}" = "windows"; then
   630         -            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
   631         -        else
   632         -            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
   633         -        fi
   634         -        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
   635         -              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
   636         -              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
   637         -        for i in $list ; do
   638         -            if test -f "$i/${WISH_PROG}" ; then
   639         -                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
   640         -                break
   641         -            fi
   642         -        done
   643         -        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
   644         -    fi
   645         -    AC_MSG_RESULT([${WISH_PROG}])
   646         -    AC_SUBST(WISH_PROG)
   647         -])
   648         -
   649         -#------------------------------------------------------------------------
   650         -# TEA_ENABLE_SHARED --
   651         -#
   652         -#	Allows the building of shared libraries
   653         -#
   654         -# Arguments:
   655         -#	none
   656         -#
   657         -# Results:
   658         -#
   659         -#	Adds the following arguments to configure:
   660         -#		--enable-shared=yes|no
   661         -#
   662         -#	Defines the following vars:
   663         -#		STATIC_BUILD	Used for building import/export libraries
   664         -#				on Windows.
   665         -#
   666         -#	Sets the following vars:
   667         -#		SHARED_BUILD	Value of 1 or 0
   668         -#------------------------------------------------------------------------
   669         -
   670         -AC_DEFUN([TEA_ENABLE_SHARED], [
   671         -    AC_MSG_CHECKING([how to build libraries])
   672         -    AC_ARG_ENABLE(shared,
   673         -	AC_HELP_STRING([--enable-shared],
   674         -	    [build and link with shared libraries (default: on)]),
   675         -	[tcl_ok=$enableval], [tcl_ok=yes])
   676         -
   677         -    if test "${enable_shared+set}" = set; then
   678         -	enableval="$enable_shared"
   679         -	tcl_ok=$enableval
   680         -    else
   681         -	tcl_ok=yes
   682         -    fi
   683         -
   684         -    if test "$tcl_ok" = "yes" ; then
   685         -	AC_MSG_RESULT([shared])
   686         -	SHARED_BUILD=1
   687         -    else
   688         -	AC_MSG_RESULT([static])
   689         -	SHARED_BUILD=0
   690         -	AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?])
   691         -    fi
   692         -    AC_SUBST(SHARED_BUILD)
   693         -])
   694         -
   695         -#------------------------------------------------------------------------
   696         -# TEA_ENABLE_THREADS --
   697         -#
   698         -#	Specify if thread support should be enabled.  If "yes" is specified
   699         -#	as an arg (optional), threads are enabled by default, "no" means
   700         -#	threads are disabled.  "yes" is the default.
   701         -#
   702         -#	TCL_THREADS is checked so that if you are compiling an extension
   703         -#	against a threaded core, your extension must be compiled threaded
   704         -#	as well.
   705         -#
   706         -#	Note that it is legal to have a thread enabled extension run in a
   707         -#	threaded or non-threaded Tcl core, but a non-threaded extension may
   708         -#	only run in a non-threaded Tcl core.
   709         -#
   710         -# Arguments:
   711         -#	none
   712         -#
   713         -# Results:
   714         -#
   715         -#	Adds the following arguments to configure:
   716         -#		--enable-threads
   717         -#
   718         -#	Sets the following vars:
   719         -#		THREADS_LIBS	Thread library(s)
   720         -#
   721         -#	Defines the following vars:
   722         -#		TCL_THREADS
   723         -#		_REENTRANT
   724         -#		_THREAD_SAFE
   725         -#------------------------------------------------------------------------
   726         -
   727         -AC_DEFUN([TEA_ENABLE_THREADS], [
   728         -    AC_ARG_ENABLE(threads,
   729         -	AC_HELP_STRING([--enable-threads],
   730         -	    [build with threads]),
   731         -	[tcl_ok=$enableval], [tcl_ok=yes])
   732         -
   733         -    if test "${enable_threads+set}" = set; then
   734         -	enableval="$enable_threads"
   735         -	tcl_ok=$enableval
   736         -    else
   737         -	tcl_ok=yes
   738         -    fi
   739         -
   740         -    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
   741         -	TCL_THREADS=1
   742         -
   743         -	if test "${TEA_PLATFORM}" != "windows" ; then
   744         -	    # We are always OK on Windows, so check what this platform wants:
   745         -
   746         -	    # USE_THREAD_ALLOC tells us to try the special thread-based
   747         -	    # allocator that significantly reduces lock contention
   748         -	    AC_DEFINE(USE_THREAD_ALLOC, 1,
   749         -		[Do we want to use the threaded memory allocator?])
   750         -	    AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
   751         -	    if test "`uname -s`" = "SunOS" ; then
   752         -		AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
   753         -			[Do we really want to follow the standard? Yes we do!])
   754         -	    fi
   755         -	    AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
   756         -	    AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
   757         -	    if test "$tcl_ok" = "no"; then
   758         -		# Check a little harder for __pthread_mutex_init in the same
   759         -		# library, as some systems hide it there until pthread.h is
   760         -		# defined.  We could alternatively do an AC_TRY_COMPILE with
   761         -		# pthread.h, but that will work with libpthread really doesn't
   762         -		# exist, like AIX 4.2.  [Bug: 4359]
   763         -		AC_CHECK_LIB(pthread, __pthread_mutex_init,
   764         -		    tcl_ok=yes, tcl_ok=no)
   765         -	    fi
   766         -
   767         -	    if test "$tcl_ok" = "yes"; then
   768         -		# The space is needed
   769         -		THREADS_LIBS=" -lpthread"
   770         -	    else
   771         -		AC_CHECK_LIB(pthreads, pthread_mutex_init,
   772         -		    tcl_ok=yes, tcl_ok=no)
   773         -		if test "$tcl_ok" = "yes"; then
   774         -		    # The space is needed
   775         -		    THREADS_LIBS=" -lpthreads"
   776         -		else
   777         -		    AC_CHECK_LIB(c, pthread_mutex_init,
   778         -			tcl_ok=yes, tcl_ok=no)
   779         -		    if test "$tcl_ok" = "no"; then
   780         -			AC_CHECK_LIB(c_r, pthread_mutex_init,
   781         -			    tcl_ok=yes, tcl_ok=no)
   782         -			if test "$tcl_ok" = "yes"; then
   783         -			    # The space is needed
   784         -			    THREADS_LIBS=" -pthread"
   785         -			else
   786         -			    TCL_THREADS=0
   787         -			    AC_MSG_WARN([Do not know how to find pthread lib on your system - thread support disabled])
   788         -			fi
   789         -		    fi
   790         -		fi
   791         -	    fi
   792         -	fi
   793         -    else
   794         -	TCL_THREADS=0
   795         -    fi
   796         -    # Do checking message here to not mess up interleaved configure output
   797         -    AC_MSG_CHECKING([for building with threads])
   798         -    if test "${TCL_THREADS}" = 1; then
   799         -	AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?])
   800         -	AC_MSG_RESULT([yes (default)])
   801         -    else
   802         -	AC_MSG_RESULT([no])
   803         -    fi
   804         -    # TCL_THREADS sanity checking.  See if our request for building with
   805         -    # threads is the same as the way Tcl was built.  If not, warn the user.
   806         -    case ${TCL_DEFS} in
   807         -	*THREADS=1*)
   808         -	    if test "${TCL_THREADS}" = "0"; then
   809         -		AC_MSG_WARN([
   810         -    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
   811         -    that IS thread-enabled.  It is recommended to use --enable-threads.])
   812         -	    fi
   813         -	    ;;
   814         -	*)
   815         -	    if test "${TCL_THREADS}" = "1"; then
   816         -		AC_MSG_WARN([
   817         -    --enable-threads requested, but building against a Tcl that is NOT
   818         -    thread-enabled.  This is an OK configuration that will also run in
   819         -    a thread-enabled core.])
   820         -	    fi
   821         -	    ;;
   822         -    esac
   823         -    AC_SUBST(TCL_THREADS)
   824         -])
   825         -
   826         -#------------------------------------------------------------------------
   827         -# TEA_ENABLE_SYMBOLS --
   828         -#
   829         -#	Specify if debugging symbols should be used.
   830         -#	Memory (TCL_MEM_DEBUG) debugging can also be enabled.
   831         -#
   832         -# Arguments:
   833         -#	none
   834         -#
   835         -#	TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
   836         -#	the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
   837         -#	Requires the following vars to be set in the Makefile:
   838         -#		CFLAGS_DEFAULT
   839         -#		LDFLAGS_DEFAULT
   840         -#
   841         -# Results:
   842         -#
   843         -#	Adds the following arguments to configure:
   844         -#		--enable-symbols
   845         -#
   846         -#	Defines the following vars:
   847         -#		CFLAGS_DEFAULT	Sets to $(CFLAGS_DEBUG) if true
   848         -#				Sets to "$(CFLAGS_OPTIMIZE) -DNDEBUG" if false
   849         -#		LDFLAGS_DEFAULT	Sets to $(LDFLAGS_DEBUG) if true
   850         -#				Sets to $(LDFLAGS_OPTIMIZE) if false
   851         -#		DBGX		Formerly used as debug library extension;
   852         -#				always blank now.
   853         -#------------------------------------------------------------------------
   854         -
   855         -AC_DEFUN([TEA_ENABLE_SYMBOLS], [
   856         -    dnl TEA specific: Make sure we are initialized
   857         -    AC_REQUIRE([TEA_CONFIG_CFLAGS])
   858         -    AC_MSG_CHECKING([for build with symbols])
   859         -    AC_ARG_ENABLE(symbols,
   860         -	AC_HELP_STRING([--enable-symbols],
   861         -	    [build with debugging symbols (default: off)]),
   862         -	[tcl_ok=$enableval], [tcl_ok=no])
   863         -    DBGX=""
   864         -    if test "$tcl_ok" = "no"; then
   865         -	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
   866         -	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
   867         -	AC_MSG_RESULT([no])
   868         -    else
   869         -	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
   870         -	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
   871         -	if test "$tcl_ok" = "yes"; then
   872         -	    AC_MSG_RESULT([yes (standard debugging)])
   873         -	fi
   874         -    fi
   875         -    # TEA specific:
   876         -    if test "${TEA_PLATFORM}" != "windows" ; then
   877         -	LDFLAGS_DEFAULT="${LDFLAGS}"
   878         -    fi
   879         -    AC_SUBST(CFLAGS_DEFAULT)
   880         -    AC_SUBST(LDFLAGS_DEFAULT)
   881         -    AC_SUBST(TCL_DBGX)
   882         -
   883         -    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
   884         -	AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
   885         -    fi
   886         -
   887         -    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
   888         -	if test "$tcl_ok" = "all"; then
   889         -	    AC_MSG_RESULT([enabled symbols mem debugging])
   890         -	else
   891         -	    AC_MSG_RESULT([enabled $tcl_ok debugging])
   892         -	fi
   893         -    fi
   894         -])
   895         -
   896         -#------------------------------------------------------------------------
   897         -# TEA_ENABLE_LANGINFO --
   898         -#
   899         -#	Allows use of modern nl_langinfo check for better l10n.
   900         -#	This is only relevant for Unix.
   901         -#
   902         -# Arguments:
   903         -#	none
   904         -#
   905         -# Results:
   906         -#
   907         -#	Adds the following arguments to configure:
   908         -#		--enable-langinfo=yes|no (default is yes)
   909         -#
   910         -#	Defines the following vars:
   911         -#		HAVE_LANGINFO	Triggers use of nl_langinfo if defined.
   912         -#------------------------------------------------------------------------
   913         -
   914         -AC_DEFUN([TEA_ENABLE_LANGINFO], [
   915         -    AC_ARG_ENABLE(langinfo,
   916         -	AC_HELP_STRING([--enable-langinfo],
   917         -	    [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
   918         -	[langinfo_ok=$enableval], [langinfo_ok=yes])
   919         -
   920         -    HAVE_LANGINFO=0
   921         -    if test "$langinfo_ok" = "yes"; then
   922         -	AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
   923         -    fi
   924         -    AC_MSG_CHECKING([whether to use nl_langinfo])
   925         -    if test "$langinfo_ok" = "yes"; then
   926         -	AC_CACHE_VAL(tcl_cv_langinfo_h, [
   927         -	    AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
   928         -		    [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
   929         -	AC_MSG_RESULT([$tcl_cv_langinfo_h])
   930         -	if test $tcl_cv_langinfo_h = yes; then
   931         -	    AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
   932         -	fi
   933         -    else
   934         -	AC_MSG_RESULT([$langinfo_ok])
   935         -    fi
   936         -])
   937         -
   938         -#--------------------------------------------------------------------
   939         -# TEA_CONFIG_SYSTEM
   940         -#
   941         -#	Determine what the system is (some things cannot be easily checked
   942         -#	on a feature-driven basis, alas). This can usually be done via the
   943         -#	"uname" command.
   944         -#
   945         -# Arguments:
   946         -#	none
   947         -#
   948         -# Results:
   949         -#	Defines the following var:
   950         -#
   951         -#	system -	System/platform/version identification code.
   952         -#--------------------------------------------------------------------
   953         -
   954         -AC_DEFUN([TEA_CONFIG_SYSTEM], [
   955         -    AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
   956         -	# TEA specific:
   957         -	if test "${TEA_PLATFORM}" = "windows" ; then
   958         -	    tcl_cv_sys_version=windows
   959         -	else
   960         -	    tcl_cv_sys_version=`uname -s`-`uname -r`
   961         -	    if test "$?" -ne 0 ; then
   962         -		AC_MSG_WARN([can't find uname command])
   963         -		tcl_cv_sys_version=unknown
   964         -	    else
   965         -		if test "`uname -s`" = "AIX" ; then
   966         -		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
   967         -		fi
   968         -	    fi
   969         -	fi
   970         -    ])
   971         -    system=$tcl_cv_sys_version
   972         -])
   973         -
   974         -#--------------------------------------------------------------------
   975         -# TEA_CONFIG_CFLAGS
   976         -#
   977         -#	Try to determine the proper flags to pass to the compiler
   978         -#	for building shared libraries and other such nonsense.
   979         -#
   980         -# Arguments:
   981         -#	none
   982         -#
   983         -# Results:
   984         -#
   985         -#	Defines and substitutes the following vars:
   986         -#
   987         -#	DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
   988         -#       LDFLAGS -      Flags to pass to the compiler when linking object
   989         -#                       files into an executable application binary such
   990         -#                       as tclsh.
   991         -#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
   992         -#                       that tell the run-time dynamic linker where to look
   993         -#                       for shared libraries such as libtcl.so.  Depends on
   994         -#                       the variable LIB_RUNTIME_DIR in the Makefile. Could
   995         -#                       be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
   996         -#       CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/usr/local/tcl/lib",
   997         -#                       that tell the run-time dynamic linker where to look
   998         -#                       for shared libraries such as libtcl.so.  Depends on
   999         -#                       the variable LIB_RUNTIME_DIR in the Makefile.
  1000         -#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
  1001         -#                       of a shared library (may request position-independent
  1002         -#                       code, among other things).
  1003         -#       SHLIB_LD -      Base command to use for combining object files
  1004         -#                       into a shared library.
  1005         -#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
  1006         -#                       creating shared libraries.  This symbol typically
  1007         -#                       goes at the end of the "ld" commands that build
  1008         -#                       shared libraries. The value of the symbol defaults to
  1009         -#                       "${LIBS}" if all of the dependent libraries should
  1010         -#                       be specified when creating a shared library.  If
  1011         -#                       dependent libraries should not be specified (as on
  1012         -#                       SunOS 4.x, where they cause the link to fail, or in
  1013         -#                       general if Tcl and Tk aren't themselves shared
  1014         -#                       libraries), then this symbol has an empty string
  1015         -#                       as its value.
  1016         -#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
  1017         -#                       extensions.  An empty string means we don't know how
  1018         -#                       to use shared libraries on this platform.
  1019         -#       LIB_SUFFIX -    Specifies everything that comes after the "libfoo"
  1020         -#                       in a static or shared library name, using the $VERSION variable
  1021         -#                       to put the version in the right place.  This is used
  1022         -#                       by platforms that need non-standard library names.
  1023         -#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
  1024         -#                       to have a version after the .so, and ${VERSION}.a
  1025         -#                       on AIX, since a shared library needs to have
  1026         -#                       a .a extension whereas shared objects for loadable
  1027         -#                       extensions have a .so extension.  Defaults to
  1028         -#                       ${VERSION}${SHLIB_SUFFIX}.
  1029         -#	CFLAGS_DEBUG -
  1030         -#			Flags used when running the compiler in debug mode
  1031         -#	CFLAGS_OPTIMIZE -
  1032         -#			Flags used when running the compiler in optimize mode
  1033         -#	CFLAGS -	Additional CFLAGS added as necessary (usually 64-bit)
  1034         -#--------------------------------------------------------------------
  1035         -
  1036         -AC_DEFUN([TEA_CONFIG_CFLAGS], [
  1037         -    dnl TEA specific: Make sure we are initialized
  1038         -    AC_REQUIRE([TEA_INIT])
  1039         -
  1040         -    # Step 0.a: Enable 64 bit support?
  1041         -
  1042         -    AC_MSG_CHECKING([if 64bit support is requested])
  1043         -    AC_ARG_ENABLE(64bit,
  1044         -	AC_HELP_STRING([--enable-64bit],
  1045         -	    [enable 64bit support (default: off)]),
  1046         -	[do64bit=$enableval], [do64bit=no])
  1047         -    AC_MSG_RESULT([$do64bit])
  1048         -
  1049         -    # Step 0.b: Enable Solaris 64 bit VIS support?
  1050         -
  1051         -    AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
  1052         -    AC_ARG_ENABLE(64bit-vis,
  1053         -	AC_HELP_STRING([--enable-64bit-vis],
  1054         -	    [enable 64bit Sparc VIS support (default: off)]),
  1055         -	[do64bitVIS=$enableval], [do64bitVIS=no])
  1056         -    AC_MSG_RESULT([$do64bitVIS])
  1057         -    # Force 64bit on with VIS
  1058         -    AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes])
  1059         -
  1060         -    # Step 0.c: Check if visibility support is available. Do this here so
  1061         -    # that platform specific alternatives can be used below if this fails.
  1062         -
  1063         -    AC_CACHE_CHECK([if compiler supports visibility "hidden"],
  1064         -	tcl_cv_cc_visibility_hidden, [
  1065         -	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
  1066         -	AC_TRY_LINK([
  1067         -	    extern __attribute__((__visibility__("hidden"))) void f(void);
  1068         -	    void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes,
  1069         -	    tcl_cv_cc_visibility_hidden=no)
  1070         -	CFLAGS=$hold_cflags])
  1071         -    AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
  1072         -	AC_DEFINE(MODULE_SCOPE,
  1073         -	    [extern __attribute__((__visibility__("hidden")))],
  1074         -	    [Compiler support for module scope symbols])
  1075         -    ])
  1076         -
  1077         -    # Step 0.d: Disable -rpath support?
  1078         -
  1079         -    AC_MSG_CHECKING([if rpath support is requested])
  1080         -    AC_ARG_ENABLE(rpath,
  1081         -	AC_HELP_STRING([--disable-rpath],
  1082         -	    [disable rpath support (default: on)]),
  1083         -	[doRpath=$enableval], [doRpath=yes])
  1084         -    AC_MSG_RESULT([$doRpath])
  1085         -
  1086         -    # TEA specific: Cross-compiling options for Windows/CE builds?
  1087         -
  1088         -    AS_IF([test "${TEA_PLATFORM}" = windows], [
  1089         -	AC_MSG_CHECKING([if Windows/CE build is requested])
  1090         -	AC_ARG_ENABLE(wince,
  1091         -	    AC_HELP_STRING([--enable-wince],
  1092         -		[enable Win/CE support (where applicable)]),
  1093         -	    [doWince=$enableval], [doWince=no])
  1094         -	AC_MSG_RESULT([$doWince])
  1095         -    ])
  1096         -
  1097         -    # Set the variable "system" to hold the name and version number
  1098         -    # for the system.
  1099         -
  1100         -    TEA_CONFIG_SYSTEM
  1101         -
  1102         -    # Require ranlib early so we can override it in special cases below.
  1103         -
  1104         -    AC_REQUIRE([AC_PROG_RANLIB])
  1105         -
  1106         -    # Set configuration options based on system name and version.
  1107         -    # This is similar to Tcl's unix/tcl.m4 except that we've added a
  1108         -    # "windows" case and removed some core-only vars.
  1109         -
  1110         -    do64bit_ok=no
  1111         -    # default to '{$LIBS}' and set to "" on per-platform necessary basis
  1112         -    SHLIB_LD_LIBS='${LIBS}'
  1113         -    # When ld needs options to work in 64-bit mode, put them in
  1114         -    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
  1115         -    # is disabled by the user. [Bug 1016796]
  1116         -    LDFLAGS_ARCH=""
  1117         -    UNSHARED_LIB_SUFFIX=""
  1118         -    # TEA specific: use PACKAGE_VERSION instead of VERSION
  1119         -    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
  1120         -    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
  1121         -    TCL_LIB_VERSIONS_OK=ok
  1122         -    CFLAGS_DEBUG=-g
  1123         -    AS_IF([test "$GCC" = yes], [
  1124         -	CFLAGS_OPTIMIZE=-O2
  1125         -	CFLAGS_WARNING="-Wall"
  1126         -    ], [
  1127         -	CFLAGS_OPTIMIZE=-O
  1128         -	CFLAGS_WARNING=""
  1129         -    ])
  1130         -    AC_CHECK_TOOL(AR, ar)
  1131         -    STLIB_LD='${AR} cr'
  1132         -    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1133         -    AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION="1.0"])
  1134         -    case $system in
  1135         -	# TEA specific:
  1136         -	windows)
  1137         -	    # This is a 2-stage check to make sure we have the 64-bit SDK
  1138         -	    # We have to know where the SDK is installed.
  1139         -	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
  1140         -	    # MACHINE is IX86 for LINK, but this is used by the manifest,
  1141         -	    # which requires x86|amd64|ia64.
  1142         -	    MACHINE="X86"
  1143         -	    if test "$do64bit" != "no" ; then
  1144         -		if test "x${MSSDK}x" = "xx" ; then
  1145         -		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
  1146         -		fi
  1147         -		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
  1148         -		PATH64=""
  1149         -		case "$do64bit" in
  1150         -		    amd64|x64|yes)
  1151         -			MACHINE="AMD64" ; # default to AMD64 64-bit build
  1152         -			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
  1153         -			;;
  1154         -		    ia64)
  1155         -			MACHINE="IA64"
  1156         -			PATH64="${MSSDK}/Bin/Win64"
  1157         -			;;
  1158         -		esac
  1159         -		if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
  1160         -		    AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
  1161         -		    AC_MSG_WARN([Ensure latest Platform SDK is installed])
  1162         -		    do64bit="no"
  1163         -		else
  1164         -		    AC_MSG_RESULT([   Using 64-bit $MACHINE mode])
  1165         -		    do64bit_ok="yes"
  1166         -		fi
  1167         -	    fi
  1168         -
  1169         -	    if test "$doWince" != "no" ; then
  1170         -		if test "$do64bit" != "no" ; then
  1171         -		    AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible])
  1172         -		fi
  1173         -		if test "$GCC" = "yes" ; then
  1174         -		    AC_MSG_ERROR([Windows/CE and GCC builds incompatible])
  1175         -		fi
  1176         -		TEA_PATH_CELIB
  1177         -		# Set defaults for common evc4/PPC2003 setup
  1178         -		# Currently Tcl requires 300+, possibly 420+ for sockets
  1179         -		CEVERSION=420; 		# could be 211 300 301 400 420 ...
  1180         -		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
  1181         -		ARCH=ARM;		# could be ARM MIPS X86EM ...
  1182         -		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
  1183         -		if test "$doWince" != "yes"; then
  1184         -		    # If !yes then the user specified something
  1185         -		    # Reset ARCH to allow user to skip specifying it
  1186         -		    ARCH=
  1187         -		    eval `echo $doWince | awk -F, '{ \
  1188         -	    if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \
  1189         -	    if ([$]1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
  1190         -	    if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \
  1191         -	    if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \
  1192         -	    if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \
  1193         -		    }'`
  1194         -		    if test "x${ARCH}" = "x" ; then
  1195         -			ARCH=$TARGETCPU;
  1196         -		    fi
  1197         -		fi
  1198         -		OSVERSION=WCE$CEVERSION;
  1199         -	    	if test "x${WCEROOT}" = "x" ; then
  1200         -			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
  1201         -		    if test ! -d "${WCEROOT}" ; then
  1202         -			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
  1203         -		    fi
  1204         -		fi
  1205         -		if test "x${SDKROOT}" = "x" ; then
  1206         -		    SDKROOT="C:/Program Files/Windows CE Tools"
  1207         -		    if test ! -d "${SDKROOT}" ; then
  1208         -			SDKROOT="C:/Windows CE Tools"
  1209         -		    fi
  1210         -		fi
  1211         -		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
  1212         -		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
  1213         -		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
  1214         -		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
  1215         -		    AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]])
  1216         -		    doWince="no"
  1217         -		else
  1218         -		    # We could PATH_NOSPACE these, but that's not important,
  1219         -		    # as long as we quote them when used.
  1220         -		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
  1221         -		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
  1222         -			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
  1223         -		    fi
  1224         -		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
  1225         -    		fi
  1226         -	    fi
  1227         -
  1228         -	    if test "$GCC" != "yes" ; then
  1229         -	        if test "${SHARED_BUILD}" = "0" ; then
  1230         -		    runtime=-MT
  1231         -	        else
  1232         -		    runtime=-MD
  1233         -	        fi
  1234         -
  1235         -                if test "$do64bit" != "no" ; then
  1236         -		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
  1237         -		    CC="\"${PATH64}/cl.exe\""
  1238         -		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
  1239         -		    RC="\"${MSSDK}/bin/rc.exe\""
  1240         -		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
  1241         -		    LINKBIN="\"${PATH64}/link.exe\""
  1242         -		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
  1243         -		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
  1244         -		    # Avoid 'unresolved external symbol __security_cookie'
  1245         -		    # errors, c.f. http://support.microsoft.com/?id=894573
  1246         -		    TEA_ADD_LIBS([bufferoverflowU.lib])
  1247         -		elif test "$doWince" != "no" ; then
  1248         -		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
  1249         -		    if test "${TARGETCPU}" = "X86"; then
  1250         -			CC="\"${CEBINROOT}/cl.exe\""
  1251         -		    else
  1252         -			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
  1253         -		    fi
  1254         -		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
  1255         -		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
  1256         -		    arch=`echo ${ARCH} | awk '{print tolower([$]0)}'`
  1257         -		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
  1258         -		    if test "${SHARED_BUILD}" = "1" ; then
  1259         -			# Static CE builds require static celib as well
  1260         -		    	defs="${defs} _DLL"
  1261         -		    fi
  1262         -		    for i in $defs ; do
  1263         -			AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i)
  1264         -		    done
  1265         -		    AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
  1266         -		    AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
  1267         -		    CFLAGS_DEBUG="-nologo -Zi -Od"
  1268         -		    CFLAGS_OPTIMIZE="-nologo -Ox"
  1269         -		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
  1270         -		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
  1271         -		    LINKBIN="\"${CEBINROOT}/link.exe\""
  1272         -		    AC_SUBST(CELIB_DIR)
  1273         -		else
  1274         -		    RC="rc"
  1275         -		    lflags="-nologo"
  1276         -    		    LINKBIN="link"
  1277         -		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
  1278         -		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
  1279         -		fi
  1280         -	    fi
  1281         -
  1282         -	    if test "$GCC" = "yes"; then
  1283         -		# mingw gcc mode
  1284         -		AC_CHECK_TOOL(RC, windres)
  1285         -		CFLAGS_DEBUG="-g"
  1286         -		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
  1287         -		SHLIB_LD='${CC} -shared'
  1288         -		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
  1289         -		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
  1290         -		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
  1291         -
  1292         -		AC_CACHE_CHECK(for cross-compile version of gcc,
  1293         -			ac_cv_cross,
  1294         -			AC_TRY_COMPILE([
  1295         -			    #ifdef __WIN32__
  1296         -				#error cross-compiler
  1297         -			    #endif
  1298         -			], [],
  1299         -			ac_cv_cross=yes,
  1300         -			ac_cv_cross=no)
  1301         -		      )
  1302         -		      if test "$ac_cv_cross" = "yes"; then
  1303         -			case "$do64bit" in
  1304         -			    amd64|x64|yes)
  1305         -				CC="x86_64-w64-mingw32-gcc"
  1306         -				LD="x86_64-w64-mingw32-ld"
  1307         -				AR="x86_64-w64-mingw32-ar"
  1308         -				RANLIB="x86_64-w64-mingw32-ranlib"
  1309         -				RC="x86_64-w64-mingw32-windres"
  1310         -			    ;;
  1311         -			    *)
  1312         -				CC="i686-w64-mingw32-gcc"
  1313         -				LD="i686-w64-mingw32-ld"
  1314         -				AR="i686-w64-mingw32-ar"
  1315         -				RANLIB="i686-w64-mingw32-ranlib"
  1316         -				RC="i686-w64-mingw32-windres"
  1317         -			    ;;
  1318         -			esac
  1319         -		fi
  1320         -
  1321         -	    else
  1322         -		SHLIB_LD="${LINKBIN} -dll ${lflags}"
  1323         -		# link -lib only works when -lib is the first arg
  1324         -		STLIB_LD="${LINKBIN} -lib ${lflags}"
  1325         -		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
  1326         -		PATHTYPE=-w
  1327         -		# For information on what debugtype is most useful, see:
  1328         -		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
  1329         -		# and also
  1330         -		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
  1331         -		# This essentially turns it all on.
  1332         -		LDFLAGS_DEBUG="-debug -debugtype:cv"
  1333         -		LDFLAGS_OPTIMIZE="-release"
  1334         -		if test "$doWince" != "no" ; then
  1335         -		    LDFLAGS_CONSOLE="-link ${lflags}"
  1336         -		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
  1337         -		else
  1338         -		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
  1339         -		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
  1340         -		fi
  1341         -	    fi
  1342         -
  1343         -	    SHLIB_SUFFIX=".dll"
  1344         -	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
  1345         -
  1346         -	    TCL_LIB_VERSIONS_OK=nodots
  1347         -    	    ;;
  1348         -	AIX-*)
  1349         -	    AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
  1350         -		# AIX requires the _r compiler when gcc isn't being used
  1351         -		case "${CC}" in
  1352         -		    *_r|*_r\ *)
  1353         -			# ok ...
  1354         -			;;
  1355         -		    *)
  1356         -			# Make sure only first arg gets _r
  1357         -		    	CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
  1358         -			;;
  1359         -		esac
  1360         -		AC_MSG_RESULT([Using $CC for compiling with threads])
  1361         -	    ])
  1362         -	    LIBS="$LIBS -lc"
  1363         -	    SHLIB_CFLAGS=""
  1364         -	    SHLIB_SUFFIX=".so"
  1365         -
  1366         -	    LD_LIBRARY_PATH_VAR="LIBPATH"
  1367         -
  1368         -	    # Check to enable 64-bit flags for compiler/linker
  1369         -	    AS_IF([test "$do64bit" = yes], [
  1370         -		AS_IF([test "$GCC" = yes], [
  1371         -		    AC_MSG_WARN([64bit mode not supported with GCC on $system])
  1372         -		], [
  1373         -		    do64bit_ok=yes
  1374         -		    CFLAGS="$CFLAGS -q64"
  1375         -		    LDFLAGS_ARCH="-q64"
  1376         -		    RANLIB="${RANLIB} -X64"
  1377         -		    AR="${AR} -X64"
  1378         -		    SHLIB_LD_FLAGS="-b64"
  1379         -		])
  1380         -	    ])
  1381         -
  1382         -	    AS_IF([test "`uname -m`" = ia64], [
  1383         -		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
  1384         -		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1385         -		AS_IF([test "$GCC" = yes], [
  1386         -		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1387         -		], [
  1388         -		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
  1389         -		])
  1390         -		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1391         -	    ], [
  1392         -		AS_IF([test "$GCC" = yes], [
  1393         -		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
  1394         -		], [
  1395         -		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
  1396         -		    LDFLAGS="$LDFLAGS -brtl"
  1397         -		])
  1398         -		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
  1399         -		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1400         -		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1401         -	    ])
  1402         -	    ;;
  1403         -	BeOS*)
  1404         -	    SHLIB_CFLAGS="-fPIC"
  1405         -	    SHLIB_LD='${CC} -nostart'
  1406         -	    SHLIB_SUFFIX=".so"
  1407         -
  1408         -	    #-----------------------------------------------------------
  1409         -	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
  1410         -	    # -lsocket, even if the network functions are in -lnet which
  1411         -	    # is always linked to, for compatibility.
  1412         -	    #-----------------------------------------------------------
  1413         -	    AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
  1414         -	    ;;
  1415         -	BSD/OS-4.*)
  1416         -	    SHLIB_CFLAGS="-export-dynamic -fPIC"
  1417         -	    SHLIB_LD='${CC} -shared'
  1418         -	    SHLIB_SUFFIX=".so"
  1419         -	    LDFLAGS="$LDFLAGS -export-dynamic"
  1420         -	    CC_SEARCH_FLAGS=""
  1421         -	    LD_SEARCH_FLAGS=""
  1422         -	    ;;
  1423         -	CYGWIN_*)
  1424         -	    SHLIB_CFLAGS=""
  1425         -	    SHLIB_LD='${CC} -shared'
  1426         -	    SHLIB_SUFFIX=".dll"
  1427         -	    EXEEXT=".exe"
  1428         -	    CC_SEARCH_FLAGS=""
  1429         -	    LD_SEARCH_FLAGS=""
  1430         -	    ;;
  1431         -	Haiku*)
  1432         -	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  1433         -	    SHLIB_CFLAGS="-fPIC"
  1434         -	    SHLIB_SUFFIX=".so"
  1435         -	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
  1436         -	    AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
  1437         -	    ;;
  1438         -	HP-UX-*.11.*)
  1439         -	    # Use updated header definitions where possible
  1440         -	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
  1441         -	    # TEA specific: Needed by Tcl, but not most extensions
  1442         -	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
  1443         -	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
  1444         -
  1445         -	    AS_IF([test "`uname -m`" = ia64], [
  1446         -		SHLIB_SUFFIX=".so"
  1447         -		# Use newer C++ library for C++ extensions
  1448         -		#if test "$GCC" != "yes" ; then
  1449         -		#   CPPFLAGS="-AA"
  1450         -		#fi
  1451         -	    ], [
  1452         -		SHLIB_SUFFIX=".sl"
  1453         -	    ])
  1454         -	    AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
  1455         -	    AS_IF([test "$tcl_ok" = yes], [
  1456         -		LDFLAGS="$LDFLAGS -Wl,-E"
  1457         -		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
  1458         -		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
  1459         -		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
  1460         -	    ])
  1461         -	    AS_IF([test "$GCC" = yes], [
  1462         -		SHLIB_LD='${CC} -shared'
  1463         -		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1464         -	    ], [
  1465         -		CFLAGS="$CFLAGS -z"
  1466         -		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
  1467         -		#CFLAGS="$CFLAGS +DAportable"
  1468         -		SHLIB_CFLAGS="+z"
  1469         -		SHLIB_LD="ld -b"
  1470         -	    ])
  1471         -
  1472         -	    # Check to enable 64-bit flags for compiler/linker
  1473         -	    AS_IF([test "$do64bit" = "yes"], [
  1474         -		AS_IF([test "$GCC" = yes], [
  1475         -		    case `${CC} -dumpmachine` in
  1476         -			hppa64*)
  1477         -			    # 64-bit gcc in use.  Fix flags for GNU ld.
  1478         -			    do64bit_ok=yes
  1479         -			    SHLIB_LD='${CC} -shared'
  1480         -			    AS_IF([test $doRpath = yes], [
  1481         -				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
  1482         -			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1483         -			    ;;
  1484         -			*)
  1485         -			    AC_MSG_WARN([64bit mode not supported with GCC on $system])
  1486         -			    ;;
  1487         -		    esac
  1488         -		], [
  1489         -		    do64bit_ok=yes
  1490         -		    CFLAGS="$CFLAGS +DD64"
  1491         -		    LDFLAGS_ARCH="+DD64"
  1492         -		])
  1493         -	    ]) ;;
  1494         -	IRIX-6.*)
  1495         -	    SHLIB_CFLAGS=""
  1496         -	    SHLIB_LD="ld -n32 -shared -rdata_shared"
  1497         -	    SHLIB_SUFFIX=".so"
  1498         -	    AS_IF([test $doRpath = yes], [
  1499         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1500         -		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
  1501         -	    AS_IF([test "$GCC" = yes], [
  1502         -		CFLAGS="$CFLAGS -mabi=n32"
  1503         -		LDFLAGS="$LDFLAGS -mabi=n32"
  1504         -	    ], [
  1505         -		case $system in
  1506         -		    IRIX-6.3)
  1507         -			# Use to build 6.2 compatible binaries on 6.3.
  1508         -			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
  1509         -			;;
  1510         -		    *)
  1511         -			CFLAGS="$CFLAGS -n32"
  1512         -			;;
  1513         -		esac
  1514         -		LDFLAGS="$LDFLAGS -n32"
  1515         -	    ])
  1516         -	    ;;
  1517         -	IRIX64-6.*)
  1518         -	    SHLIB_CFLAGS=""
  1519         -	    SHLIB_LD="ld -n32 -shared -rdata_shared"
  1520         -	    SHLIB_SUFFIX=".so"
  1521         -	    AS_IF([test $doRpath = yes], [
  1522         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1523         -		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
  1524         -
  1525         -	    # Check to enable 64-bit flags for compiler/linker
  1526         -
  1527         -	    AS_IF([test "$do64bit" = yes], [
  1528         -	        AS_IF([test "$GCC" = yes], [
  1529         -	            AC_MSG_WARN([64bit mode not supported by gcc])
  1530         -	        ], [
  1531         -	            do64bit_ok=yes
  1532         -	            SHLIB_LD="ld -64 -shared -rdata_shared"
  1533         -	            CFLAGS="$CFLAGS -64"
  1534         -	            LDFLAGS_ARCH="-64"
  1535         -	        ])
  1536         -	    ])
  1537         -	    ;;
  1538         -	Linux*)
  1539         -	    SHLIB_CFLAGS="-fPIC"
  1540         -	    SHLIB_SUFFIX=".so"
  1541         -
  1542         -	    # TEA specific:
  1543         -	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
  1544         -
  1545         -	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
  1546         -	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
  1547         -	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  1548         -	    AS_IF([test $doRpath = yes], [
  1549         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
  1550         -	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1551         -	    AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
  1552         -	    AS_IF([test $do64bit = yes], [
  1553         -		AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
  1554         -		    hold_cflags=$CFLAGS
  1555         -		    CFLAGS="$CFLAGS -m64"
  1556         -		    AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no)
  1557         -		    CFLAGS=$hold_cflags])
  1558         -		AS_IF([test $tcl_cv_cc_m64 = yes], [
  1559         -		    CFLAGS="$CFLAGS -m64"
  1560         -		    do64bit_ok=yes
  1561         -		])
  1562         -	   ])
  1563         -
  1564         -	    # The combo of gcc + glibc has a bug related to inlining of
  1565         -	    # functions like strtod(). The -fno-builtin flag should address
  1566         -	    # this problem but it does not work. The -fno-inline flag is kind
  1567         -	    # of overkill but it works. Disable inlining only when one of the
  1568         -	    # files in compat/*.c is being linked in.
  1569         -
  1570         -	    AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
  1571         -
  1572         -	    ;;
  1573         -	GNU*)
  1574         -	    SHLIB_CFLAGS="-fPIC"
  1575         -	    SHLIB_SUFFIX=".so"
  1576         -
  1577         -	    SHLIB_LD='${CC} -shared'
  1578         -	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  1579         -	    CC_SEARCH_FLAGS=""
  1580         -	    LD_SEARCH_FLAGS=""
  1581         -	    AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
  1582         -	    ;;
  1583         -	Lynx*)
  1584         -	    SHLIB_CFLAGS="-fPIC"
  1585         -	    SHLIB_SUFFIX=".so"
  1586         -	    CFLAGS_OPTIMIZE=-02
  1587         -	    SHLIB_LD='${CC} -shared'
  1588         -	    LD_FLAGS="-Wl,--export-dynamic"
  1589         -	    AS_IF([test $doRpath = yes], [
  1590         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1591         -		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
  1592         -	    ;;
  1593         -	OpenBSD-*)
  1594         -	    arch=`arch -s`
  1595         -	    case "$arch" in
  1596         -	    m88k|vax)
  1597         -		SHLIB_SUFFIX=""
  1598         -		SHARED_LIB_SUFFIX=""
  1599         -		;;
  1600         -	    *)
  1601         -		SHLIB_CFLAGS="-fPIC"
  1602         -		SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
  1603         -		SHLIB_SUFFIX=".so"
  1604         -		AS_IF([test $doRpath = yes], [
  1605         -		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
  1606         -		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1607         -		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
  1608         -		;;
  1609         -	    esac
  1610         -	    case "$arch" in
  1611         -	    m88k|vax)
  1612         -		CFLAGS_OPTIMIZE="-O1"
  1613         -		;;
  1614         -	    *)
  1615         -		CFLAGS_OPTIMIZE="-O2"
  1616         -		;;
  1617         -	    esac
  1618         -	    AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
  1619         -		AC_EGREP_CPP(yes, [
  1620         -#ifdef __ELF__
  1621         -	yes
  1622         -#endif
  1623         -		], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
  1624         -	    AS_IF([test $tcl_cv_ld_elf = yes], [
  1625         -		LDFLAGS=-Wl,-export-dynamic
  1626         -	    ], [LDFLAGS=""])
  1627         -	    AS_IF([test "${TCL_THREADS}" = "1"], [
  1628         -		# On OpenBSD:	Compile with -pthread
  1629         -		#		Don't link with -lpthread
  1630         -		LIBS=`echo $LIBS | sed s/-lpthread//`
  1631         -		CFLAGS="$CFLAGS -pthread"
  1632         -	    ])
  1633         -	    # OpenBSD doesn't do version numbers with dots.
  1634         -	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
  1635         -	    TCL_LIB_VERSIONS_OK=nodots
  1636         -	    ;;
  1637         -	NetBSD-*|FreeBSD-[[3-4]].*)
  1638         -	    # FreeBSD 3.* and greater have ELF.
  1639         -	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
  1640         -	    SHLIB_CFLAGS="-fPIC"
  1641         -	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
  1642         -	    SHLIB_SUFFIX=".so"
  1643         -	    LDFLAGS="$LDFLAGS -export-dynamic"
  1644         -	    AS_IF([test $doRpath = yes], [
  1645         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
  1646         -	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1647         -	    AS_IF([test "${TCL_THREADS}" = "1"], [
  1648         -		# The -pthread needs to go in the CFLAGS, not LIBS
  1649         -		LIBS=`echo $LIBS | sed s/-pthread//`
  1650         -		CFLAGS="$CFLAGS -pthread"
  1651         -	    	LDFLAGS="$LDFLAGS -pthread"
  1652         -	    ])
  1653         -	    case $system in
  1654         -	    FreeBSD-3.*)
  1655         -	    	# FreeBSD-3 doesn't handle version numbers with dots.
  1656         -	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
  1657         -	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
  1658         -	    	TCL_LIB_VERSIONS_OK=nodots
  1659         -		;;
  1660         -	    esac
  1661         -	    ;;
  1662         -	FreeBSD-*)
  1663         -	    # This configuration from FreeBSD Ports.
  1664         -	    SHLIB_CFLAGS="-fPIC"
  1665         -	    SHLIB_LD="${CC} -shared"
  1666         -	    TCL_SHLIB_LD_EXTRAS="-soname \$[@]"
  1667         -	    SHLIB_SUFFIX=".so"
  1668         -	    LDFLAGS=""
  1669         -	    AS_IF([test $doRpath = yes], [
  1670         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1671         -		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
  1672         -	    AS_IF([test "${TCL_THREADS}" = "1"], [
  1673         -		# The -pthread needs to go in the LDFLAGS, not LIBS
  1674         -		LIBS=`echo $LIBS | sed s/-pthread//`
  1675         -		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  1676         -		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
  1677         -	    # Version numbers are dot-stripped by system policy.
  1678         -	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
  1679         -	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
  1680         -	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
  1681         -	    TCL_LIB_VERSIONS_OK=nodots
  1682         -	    ;;
  1683         -	Darwin-*)
  1684         -	    CFLAGS_OPTIMIZE="-Os"
  1685         -	    SHLIB_CFLAGS="-fno-common"
  1686         -	    # To avoid discrepancies between what headers configure sees during
  1687         -	    # preprocessing tests and compiling tests, move any -isysroot and
  1688         -	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
  1689         -	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
  1690         -		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
  1691         -		if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
  1692         -	    CFLAGS="`echo " ${CFLAGS}" | \
  1693         -		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
  1694         -		if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
  1695         -	    AS_IF([test $do64bit = yes], [
  1696         -		case `arch` in
  1697         -		    ppc)
  1698         -			AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
  1699         -				tcl_cv_cc_arch_ppc64, [
  1700         -			    hold_cflags=$CFLAGS
  1701         -			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
  1702         -			    AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes,
  1703         -				    tcl_cv_cc_arch_ppc64=no)
  1704         -			    CFLAGS=$hold_cflags])
  1705         -			AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [
  1706         -			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
  1707         -			    do64bit_ok=yes
  1708         -			]);;
  1709         -		    i386)
  1710         -			AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
  1711         -				tcl_cv_cc_arch_x86_64, [
  1712         -			    hold_cflags=$CFLAGS
  1713         -			    CFLAGS="$CFLAGS -arch x86_64"
  1714         -			    AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes,
  1715         -				    tcl_cv_cc_arch_x86_64=no)
  1716         -			    CFLAGS=$hold_cflags])
  1717         -			AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [
  1718         -			    CFLAGS="$CFLAGS -arch x86_64"
  1719         -			    do64bit_ok=yes
  1720         -			]);;
  1721         -		    *)
  1722         -			AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
  1723         -		esac
  1724         -	    ], [
  1725         -		# Check for combined 32-bit and 64-bit fat build
  1726         -		AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
  1727         -		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
  1728         -		    fat_32_64=yes])
  1729         -	    ])
  1730         -	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
  1731         -	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
  1732         -	    AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
  1733         -		hold_ldflags=$LDFLAGS
  1734         -		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
  1735         -		AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
  1736         -		LDFLAGS=$hold_ldflags])
  1737         -	    AS_IF([test $tcl_cv_ld_single_module = yes], [
  1738         -		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
  1739         -	    ])
  1740         -	    # TEA specific: link shlib with current and compatibility version flags
  1741         -	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
  1742         -	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
  1743         -	    SHLIB_SUFFIX=".dylib"
  1744         -	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
  1745         -	    AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
  1746         -		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [
  1747         -		LDFLAGS="$LDFLAGS -prebind"])
  1748         -	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
  1749         -	    AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
  1750         -		    tcl_cv_ld_search_paths_first, [
  1751         -		hold_ldflags=$LDFLAGS
  1752         -		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
  1753         -		AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes,
  1754         -			tcl_cv_ld_search_paths_first=no)
  1755         -		LDFLAGS=$hold_ldflags])
  1756         -	    AS_IF([test $tcl_cv_ld_search_paths_first = yes], [
  1757         -		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
  1758         -	    ])
  1759         -	    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
  1760         -		AC_DEFINE(MODULE_SCOPE, [__private_extern__],
  1761         -		    [Compiler support for module scope symbols])
  1762         -		tcl_cv_cc_visibility_hidden=yes
  1763         -	    ])
  1764         -	    CC_SEARCH_FLAGS=""
  1765         -	    LD_SEARCH_FLAGS=""
  1766         -	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  1767         -	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
  1768         -	    # extensions, verify that 64-bit build is possible.
  1769         -	    AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
  1770         -		AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [
  1771         -		    AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
  1772         -			for v in CFLAGS CPPFLAGS LDFLAGS; do
  1773         -			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
  1774         -			done
  1775         -			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
  1776         -			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
  1777         -			AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();],
  1778         -			    tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no)
  1779         -			for v in CFLAGS CPPFLAGS LDFLAGS; do
  1780         -			    eval $v'="$hold_'$v'"'
  1781         -			done])
  1782         -		])
  1783         -		AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [
  1784         -		    AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
  1785         -			for v in CFLAGS CPPFLAGS LDFLAGS; do
  1786         -			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
  1787         -			done
  1788         -			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
  1789         -			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
  1790         -			AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);],
  1791         -			    tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no)
  1792         -			for v in CFLAGS CPPFLAGS LDFLAGS; do
  1793         -			    eval $v'="$hold_'$v'"'
  1794         -			done])
  1795         -		])
  1796         -		# remove 64-bit arch flags from CFLAGS et al. if configuration
  1797         -		# does not support 64-bit.
  1798         -		AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
  1799         -		    AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
  1800         -		    for v in CFLAGS CPPFLAGS LDFLAGS; do
  1801         -			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
  1802         -		    done])
  1803         -	    ])
  1804         -	    ;;
  1805         -	OS/390-*)
  1806         -	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
  1807         -	    AC_DEFINE(_OE_SOCKETS, 1,	# needed in sys/socket.h
  1808         -		[Should OS/390 do the right thing with sockets?])
  1809         -	    ;;
  1810         -	OSF1-V*)
  1811         -	    # Digital OSF/1
  1812         -	    SHLIB_CFLAGS=""
  1813         -	    AS_IF([test "$SHARED_BUILD" = 1], [
  1814         -	        SHLIB_LD='ld -shared -expect_unresolved "*"'
  1815         -	    ], [
  1816         -	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
  1817         -	    ])
  1818         -	    SHLIB_SUFFIX=".so"
  1819         -	    AS_IF([test $doRpath = yes], [
  1820         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1821         -		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
  1822         -	    AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
  1823         -		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
  1824         -	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
  1825         -	    AS_IF([test "${TCL_THREADS}" = 1], [
  1826         -		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
  1827         -		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
  1828         -		LIBS=`echo $LIBS | sed s/-lpthreads//`
  1829         -		AS_IF([test "$GCC" = yes], [
  1830         -		    LIBS="$LIBS -lpthread -lmach -lexc"
  1831         -		], [
  1832         -		    CFLAGS="$CFLAGS -pthread"
  1833         -		    LDFLAGS="$LDFLAGS -pthread"
  1834         -		])
  1835         -	    ])
  1836         -	    ;;
  1837         -	QNX-6*)
  1838         -	    # QNX RTP
  1839         -	    # This may work for all QNX, but it was only reported for v6.
  1840         -	    SHLIB_CFLAGS="-fPIC"
  1841         -	    SHLIB_LD="ld -Bshareable -x"
  1842         -	    SHLIB_LD_LIBS=""
  1843         -	    SHLIB_SUFFIX=".so"
  1844         -	    CC_SEARCH_FLAGS=""
  1845         -	    LD_SEARCH_FLAGS=""
  1846         -	    ;;
  1847         -	SCO_SV-3.2*)
  1848         -	    AS_IF([test "$GCC" = yes], [
  1849         -		SHLIB_CFLAGS="-fPIC -melf"
  1850         -		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
  1851         -	    ], [
  1852         -	       SHLIB_CFLAGS="-Kpic -belf"
  1853         -	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
  1854         -	    ])
  1855         -	    SHLIB_LD="ld -G"
  1856         -	    SHLIB_LD_LIBS=""
  1857         -	    SHLIB_SUFFIX=".so"
  1858         -	    CC_SEARCH_FLAGS=""
  1859         -	    LD_SEARCH_FLAGS=""
  1860         -	    ;;
  1861         -	SunOS-5.[[0-6]])
  1862         -	    # Careful to not let 5.10+ fall into this case
  1863         -
  1864         -	    # Note: If _REENTRANT isn't defined, then Solaris
  1865         -	    # won't define thread-safe library routines.
  1866         -
  1867         -	    AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
  1868         -	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
  1869         -		[Do we really want to follow the standard? Yes we do!])
  1870         -
  1871         -	    SHLIB_CFLAGS="-KPIC"
  1872         -	    SHLIB_SUFFIX=".so"
  1873         -	    AS_IF([test "$GCC" = yes], [
  1874         -		SHLIB_LD='${CC} -shared'
  1875         -		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1876         -		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1877         -	    ], [
  1878         -		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1879         -		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1880         -		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1881         -	    ])
  1882         -	    ;;
  1883         -	SunOS-5*)
  1884         -	    # Note: If _REENTRANT isn't defined, then Solaris
  1885         -	    # won't define thread-safe library routines.
  1886         -
  1887         -	    AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
  1888         -	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
  1889         -		[Do we really want to follow the standard? Yes we do!])
  1890         -
  1891         -	    SHLIB_CFLAGS="-KPIC"
  1892         -
  1893         -	    # Check to enable 64-bit flags for compiler/linker
  1894         -	    AS_IF([test "$do64bit" = yes], [
  1895         -		arch=`isainfo`
  1896         -		AS_IF([test "$arch" = "sparcv9 sparc"], [
  1897         -		    AS_IF([test "$GCC" = yes], [
  1898         -			AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
  1899         -			    AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
  1900         -			], [
  1901         -			    do64bit_ok=yes
  1902         -			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
  1903         -			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
  1904         -			    SHLIB_CFLAGS="-fPIC"
  1905         -			])
  1906         -		    ], [
  1907         -			do64bit_ok=yes
  1908         -			AS_IF([test "$do64bitVIS" = yes], [
  1909         -			    CFLAGS="$CFLAGS -xarch=v9a"
  1910         -			    LDFLAGS_ARCH="-xarch=v9a"
  1911         -			], [
  1912         -			    CFLAGS="$CFLAGS -xarch=v9"
  1913         -			    LDFLAGS_ARCH="-xarch=v9"
  1914         -			])
  1915         -			# Solaris 64 uses this as well
  1916         -			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
  1917         -		    ])
  1918         -		], [AS_IF([test "$arch" = "amd64 i386"], [
  1919         -		    AS_IF([test "$GCC" = yes], [
  1920         -			case $system in
  1921         -			    SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
  1922         -				do64bit_ok=yes
  1923         -				CFLAGS="$CFLAGS -m64"
  1924         -				LDFLAGS="$LDFLAGS -m64";;
  1925         -			    *)
  1926         -				AC_MSG_WARN([64bit mode not supported with GCC on $system]);;
  1927         -			esac
  1928         -		    ], [
  1929         -			do64bit_ok=yes
  1930         -			case $system in
  1931         -			    SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
  1932         -				CFLAGS="$CFLAGS -m64"
  1933         -				LDFLAGS="$LDFLAGS -m64";;
  1934         -			    *)
  1935         -				CFLAGS="$CFLAGS -xarch=amd64"
  1936         -				LDFLAGS="$LDFLAGS -xarch=amd64";;
  1937         -			esac
  1938         -		    ])
  1939         -		], [AC_MSG_WARN([64bit mode not supported for $arch])])])
  1940         -	    ])
  1941         -
  1942         -	    SHLIB_SUFFIX=".so"
  1943         -	    AS_IF([test "$GCC" = yes], [
  1944         -		SHLIB_LD='${CC} -shared'
  1945         -		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1946         -		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1947         -		AS_IF([test "$do64bit_ok" = yes], [
  1948         -		    AS_IF([test "$arch" = "sparcv9 sparc"], [
  1949         -			# We need to specify -static-libgcc or we need to
  1950         -			# add the path to the sparv9 libgcc.
  1951         -			# JH: static-libgcc is necessary for core Tcl, but may
  1952         -			# not be necessary for extensions.
  1953         -			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
  1954         -			# for finding sparcv9 libgcc, get the regular libgcc
  1955         -			# path, remove so name and append 'sparcv9'
  1956         -			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
  1957         -			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
  1958         -		    ], [AS_IF([test "$arch" = "amd64 i386"], [
  1959         -			# JH: static-libgcc is necessary for core Tcl, but may
  1960         -			# not be necessary for extensions.
  1961         -			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
  1962         -		    ])])
  1963         -		])
  1964         -	    ], [
  1965         -		case $system in
  1966         -		    SunOS-5.[[1-9]][[0-9]]*)
  1967         -			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
  1968         -			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
  1969         -		    *)
  1970         -			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
  1971         -		esac
  1972         -		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1973         -		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1974         -	    ])
  1975         -	    ;;
  1976         -    esac
  1977         -
  1978         -    AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
  1979         -	AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
  1980         -    ])
  1981         -
  1982         -dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
  1983         -dnl # until the end of configure, as configure's compile and link tests use
  1984         -dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
  1985         -dnl # preprocessing tests use only CPPFLAGS.
  1986         -    AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
  1987         -
  1988         -    # Add in the arch flags late to ensure it wasn't removed.
  1989         -    # Not necessary in TEA, but this is aligned with core
  1990         -    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
  1991         -
  1992         -    # If we're running gcc, then change the C flags for compiling shared
  1993         -    # libraries to the right flags for gcc, instead of those for the
  1994         -    # standard manufacturer compiler.
  1995         -
  1996         -    AS_IF([test "$GCC" = yes], [
  1997         -	case $system in
  1998         -	    AIX-*) ;;
  1999         -	    BSD/OS*) ;;
  2000         -	    CYGWIN_*) ;;
  2001         -	    IRIX*) ;;
  2002         -	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
  2003         -	    Darwin-*) ;;
  2004         -	    SCO_SV-3.2*) ;;
  2005         -	    windows) ;;
  2006         -	    *) SHLIB_CFLAGS="-fPIC" ;;
  2007         -	esac])
  2008         -
  2009         -    AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
  2010         -	AC_DEFINE(MODULE_SCOPE, [extern],
  2011         -	    [No Compiler support for module scope symbols])
  2012         -	AC_DEFINE(NO_VIZ, [], [No visibility hidden passed to zlib?])
  2013         -    ])
  2014         -
  2015         -    AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
  2016         -    # TEA specific: use PACKAGE_VERSION instead of VERSION
  2017         -    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
  2018         -    AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
  2019         -    # TEA specific: use PACKAGE_VERSION instead of VERSION
  2020         -    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
  2021         -
  2022         -    if test "${GCC}" = "yes" ; then
  2023         -	AC_CACHE_CHECK(for SEH support in compiler,
  2024         -	    tcl_cv_seh,
  2025         -	AC_TRY_RUN([
  2026         -	    #define WIN32_LEAN_AND_MEAN
  2027         -	    #include <windows.h>
  2028         -	    #undef WIN32_LEAN_AND_MEAN
  2029         -
  2030         -	    int main(int argc, char** argv) {
  2031         -		int a, b = 0;
  2032         -		__try {
  2033         -		    a = 666 / b;
  2034         -		}
  2035         -		__except (EXCEPTION_EXECUTE_HANDLER) {
  2036         -		    return 0;
  2037         -		}
  2038         -		return 1;
  2039         -	    }
  2040         -	],
  2041         -	    tcl_cv_seh=yes,
  2042         -	    tcl_cv_seh=no,
  2043         -	    tcl_cv_seh=no)
  2044         -	)
  2045         -	if test "$tcl_cv_seh" = "no" ; then
  2046         -	    AC_DEFINE(HAVE_NO_SEH, 1,
  2047         -		    [Defined when mingw does not support SEH])
  2048         -	fi
  2049         -
  2050         -	#
  2051         -	# Check to see if the excpt.h include file provided contains the
  2052         -	# definition for EXCEPTION_DISPOSITION; if not, which is the case
  2053         -	# with Cygwin's version as of 2002-04-10, define it to be int,
  2054         -	# sufficient for getting the current code to work.
  2055         -	#
  2056         -	AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
  2057         -	    tcl_cv_eh_disposition,
  2058         -	    AC_TRY_COMPILE([
  2059         -#	    define WIN32_LEAN_AND_MEAN
  2060         -#	    include <windows.h>
  2061         -#	    undef WIN32_LEAN_AND_MEAN
  2062         -	    ],[
  2063         -		EXCEPTION_DISPOSITION x;
  2064         -	    ],
  2065         -		tcl_cv_eh_disposition=yes,
  2066         -		tcl_cv_eh_disposition=no)
  2067         -	)
  2068         -	if test "$tcl_cv_eh_disposition" = "no" ; then
  2069         -	AC_DEFINE(EXCEPTION_DISPOSITION, int,
  2070         -		[Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
  2071         -	fi
  2072         -
  2073         -	# Check to see if winnt.h defines CHAR, SHORT, and LONG
  2074         -	# even if VOID has already been #defined. The win32api
  2075         -	# used by mingw and cygwin is known to do this.
  2076         -
  2077         -	AC_CACHE_CHECK(for winnt.h that ignores VOID define,
  2078         -	    tcl_cv_winnt_ignore_void,
  2079         -	    AC_TRY_COMPILE([
  2080         -		#define VOID void
  2081         -		#define WIN32_LEAN_AND_MEAN
  2082         -		#include <windows.h>
  2083         -		#undef WIN32_LEAN_AND_MEAN
  2084         -	    ], [
  2085         -		CHAR c;
  2086         -		SHORT s;
  2087         -		LONG l;
  2088         -	    ],
  2089         -        tcl_cv_winnt_ignore_void=yes,
  2090         -        tcl_cv_winnt_ignore_void=no)
  2091         -	)
  2092         -	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
  2093         -	    AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
  2094         -		    [Defined when cygwin/mingw ignores VOID define in winnt.h])
  2095         -	fi
  2096         -
  2097         -	# See if the compiler supports casting to a union type.
  2098         -	# This is used to stop gcc from printing a compiler
  2099         -	# warning when initializing a union member.
  2100         -
  2101         -	AC_CACHE_CHECK(for cast to union support,
  2102         -	    tcl_cv_cast_to_union,
  2103         -	    AC_TRY_COMPILE([],
  2104         -	    [
  2105         -		  union foo { int i; double d; };
  2106         -		  union foo f = (union foo) (int) 0;
  2107         -	    ],
  2108         -	    tcl_cv_cast_to_union=yes,
  2109         -	    tcl_cv_cast_to_union=no)
  2110         -	)
  2111         -	if test "$tcl_cv_cast_to_union" = "yes"; then
  2112         -	    AC_DEFINE(HAVE_CAST_TO_UNION, 1,
  2113         -		    [Defined when compiler supports casting to union type.])
  2114         -	fi
  2115         -    fi
  2116         -
  2117         -    AC_SUBST(CFLAGS_DEBUG)
  2118         -    AC_SUBST(CFLAGS_OPTIMIZE)
  2119         -    AC_SUBST(CFLAGS_WARNING)
  2120         -
  2121         -    AC_SUBST(STLIB_LD)
  2122         -    AC_SUBST(SHLIB_LD)
  2123         -
  2124         -    AC_SUBST(SHLIB_LD_LIBS)
  2125         -    AC_SUBST(SHLIB_CFLAGS)
  2126         -
  2127         -    AC_SUBST(LD_LIBRARY_PATH_VAR)
  2128         -
  2129         -    # These must be called after we do the basic CFLAGS checks and
  2130         -    # verify any possible 64-bit or similar switches are necessary
  2131         -    TEA_TCL_EARLY_FLAGS
  2132         -    TEA_TCL_64BIT_FLAGS
  2133         -])
  2134         -
  2135         -#--------------------------------------------------------------------
  2136         -# TEA_SERIAL_PORT
  2137         -#
  2138         -#	Determine which interface to use to talk to the serial port.
  2139         -#	Note that #include lines must begin in leftmost column for
  2140         -#	some compilers to recognize them as preprocessor directives,
  2141         -#	and some build environments have stdin not pointing at a
  2142         -#	pseudo-terminal (usually /dev/null instead.)
  2143         -#
  2144         -# Arguments:
  2145         -#	none
  2146         -#
  2147         -# Results:
  2148         -#
  2149         -#	Defines only one of the following vars:
  2150         -#		HAVE_SYS_MODEM_H
  2151         -#		USE_TERMIOS
  2152         -#		USE_TERMIO
  2153         -#		USE_SGTTY
  2154         -#--------------------------------------------------------------------
  2155         -
  2156         -AC_DEFUN([TEA_SERIAL_PORT], [
  2157         -    AC_CHECK_HEADERS(sys/modem.h)
  2158         -    AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [
  2159         -    AC_TRY_RUN([
  2160         -#include <termios.h>
  2161         -
  2162         -int main() {
  2163         -    struct termios t;
  2164         -    if (tcgetattr(0, &t) == 0) {
  2165         -	cfsetospeed(&t, 0);
  2166         -	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
  2167         -	return 0;
  2168         -    }
  2169         -    return 1;
  2170         -}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
  2171         -    if test $tcl_cv_api_serial = no ; then
  2172         -	AC_TRY_RUN([
  2173         -#include <termio.h>
  2174         -
  2175         -int main() {
  2176         -    struct termio t;
  2177         -    if (ioctl(0, TCGETA, &t) == 0) {
  2178         -	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
  2179         -	return 0;
  2180         -    }
  2181         -    return 1;
  2182         -}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
  2183         -    fi
  2184         -    if test $tcl_cv_api_serial = no ; then
  2185         -	AC_TRY_RUN([
  2186         -#include <sgtty.h>
  2187         -
  2188         -int main() {
  2189         -    struct sgttyb t;
  2190         -    if (ioctl(0, TIOCGETP, &t) == 0) {
  2191         -	t.sg_ospeed = 0;
  2192         -	t.sg_flags |= ODDP | EVENP | RAW;
  2193         -	return 0;
  2194         -    }
  2195         -    return 1;
  2196         -}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
  2197         -    fi
  2198         -    if test $tcl_cv_api_serial = no ; then
  2199         -	AC_TRY_RUN([
  2200         -#include <termios.h>
  2201         -#include <errno.h>
  2202         -
  2203         -int main() {
  2204         -    struct termios t;
  2205         -    if (tcgetattr(0, &t) == 0
  2206         -	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
  2207         -	cfsetospeed(&t, 0);
  2208         -	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
  2209         -	return 0;
  2210         -    }
  2211         -    return 1;
  2212         -}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
  2213         -    fi
  2214         -    if test $tcl_cv_api_serial = no; then
  2215         -	AC_TRY_RUN([
  2216         -#include <termio.h>
  2217         -#include <errno.h>
  2218         -
  2219         -int main() {
  2220         -    struct termio t;
  2221         -    if (ioctl(0, TCGETA, &t) == 0
  2222         -	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
  2223         -	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
  2224         -	return 0;
  2225         -    }
  2226         -    return 1;
  2227         -    }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
  2228         -    fi
  2229         -    if test $tcl_cv_api_serial = no; then
  2230         -	AC_TRY_RUN([
  2231         -#include <sgtty.h>
  2232         -#include <errno.h>
  2233         -
  2234         -int main() {
  2235         -    struct sgttyb t;
  2236         -    if (ioctl(0, TIOCGETP, &t) == 0
  2237         -	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
  2238         -	t.sg_ospeed = 0;
  2239         -	t.sg_flags |= ODDP | EVENP | RAW;
  2240         -	return 0;
  2241         -    }
  2242         -    return 1;
  2243         -}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
  2244         -    fi])
  2245         -    case $tcl_cv_api_serial in
  2246         -	termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);;
  2247         -	termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
  2248         -	sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
  2249         -    esac
  2250         -])
  2251         -
  2252         -#--------------------------------------------------------------------
  2253         -# TEA_MISSING_POSIX_HEADERS
  2254         -#
  2255         -#	Supply substitutes for missing POSIX header files.  Special
  2256         -#	notes:
  2257         -#	    - stdlib.h doesn't define strtol, strtoul, or
  2258         -#	      strtod in some versions of SunOS
  2259         -#	    - some versions of string.h don't declare procedures such
  2260         -#	      as strstr
  2261         -#
  2262         -# Arguments:
  2263         -#	none
  2264         -#
  2265         -# Results:
  2266         -#
  2267         -#	Defines some of the following vars:
  2268         -#		NO_DIRENT_H
  2269         -#		NO_ERRNO_H
  2270         -#		NO_VALUES_H
  2271         -#		HAVE_LIMITS_H or NO_LIMITS_H
  2272         -#		NO_STDLIB_H
  2273         -#		NO_STRING_H
  2274         -#		NO_SYS_WAIT_H
  2275         -#		NO_DLFCN_H
  2276         -#		HAVE_SYS_PARAM_H
  2277         -#
  2278         -#		HAVE_STRING_H ?
  2279         -#
  2280         -# tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and
  2281         -# CHECK on limits.h
  2282         -#--------------------------------------------------------------------
  2283         -
  2284         -AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [
  2285         -    AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [
  2286         -    AC_TRY_LINK([#include <sys/types.h>
  2287         -#include <dirent.h>], [
  2288         -#ifndef _POSIX_SOURCE
  2289         -#   ifdef __Lynx__
  2290         -	/*
  2291         -	 * Generate compilation error to make the test fail:  Lynx headers
  2292         -	 * are only valid if really in the POSIX environment.
  2293         -	 */
  2294         -
  2295         -	missing_procedure();
  2296         -#   endif
  2297         -#endif
  2298         -DIR *d;
  2299         -struct dirent *entryPtr;
  2300         -char *p;
  2301         -d = opendir("foobar");
  2302         -entryPtr = readdir(d);
  2303         -p = entryPtr->d_name;
  2304         -closedir(d);
  2305         -], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
  2306         -
  2307         -    if test $tcl_cv_dirent_h = no; then
  2308         -	AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
  2309         -    fi
  2310         -
  2311         -    # TEA specific:
  2312         -    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
  2313         -    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
  2314         -    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
  2315         -    AC_CHECK_HEADER(limits.h,
  2316         -	[AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
  2317         -	[AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])])
  2318         -    AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
  2319         -    AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
  2320         -    AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
  2321         -    AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
  2322         -    if test $tcl_ok = 0; then
  2323         -	AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
  2324         -    fi
  2325         -    AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
  2326         -    AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
  2327         -    AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
  2328         -
  2329         -    # See also memmove check below for a place where NO_STRING_H can be
  2330         -    # set and why.
  2331         -
  2332         -    if test $tcl_ok = 0; then
  2333         -	AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?])
  2334         -    fi
  2335         -
  2336         -    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
  2337         -    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])])
  2338         -
  2339         -    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
  2340         -    AC_HAVE_HEADERS(sys/param.h)
  2341         -])
  2342         -
  2343         -#--------------------------------------------------------------------
  2344         -# TEA_PATH_X
  2345         -#
  2346         -#	Locate the X11 header files and the X11 library archive.  Try
  2347         -#	the ac_path_x macro first, but if it doesn't find the X stuff
  2348         -#	(e.g. because there's no xmkmf program) then check through
  2349         -#	a list of possible directories.  Under some conditions the
  2350         -#	autoconf macro will return an include directory that contains
  2351         -#	no include files, so double-check its result just to be safe.
  2352         -#
  2353         -#	This should be called after TEA_CONFIG_CFLAGS as setting the
  2354         -#	LIBS line can confuse some configure macro magic.
  2355         -#
  2356         -# Arguments:
  2357         -#	none
  2358         -#
  2359         -# Results:
  2360         -#
  2361         -#	Sets the following vars:
  2362         -#		XINCLUDES
  2363         -#		XLIBSW
  2364         -#		PKG_LIBS (appends to)
  2365         -#--------------------------------------------------------------------
  2366         -
  2367         -AC_DEFUN([TEA_PATH_X], [
  2368         -    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
  2369         -	TEA_PATH_UNIX_X
  2370         -    fi
  2371         -])
  2372         -
  2373         -AC_DEFUN([TEA_PATH_UNIX_X], [
  2374         -    AC_PATH_X
  2375         -    not_really_there=""
  2376         -    if test "$no_x" = ""; then
  2377         -	if test "$x_includes" = ""; then
  2378         -	    AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
  2379         -	else
  2380         -	    if test ! -r $x_includes/X11/Intrinsic.h; then
  2381         -		not_really_there="yes"
  2382         -	    fi
  2383         -	fi
  2384         -    fi
  2385         -    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
  2386         -	AC_MSG_CHECKING([for X11 header files])
  2387         -	found_xincludes="no"
  2388         -	AC_TRY_CPP([#include <X11/Intrinsic.h>], found_xincludes="yes", found_xincludes="no")
  2389         -	if test "$found_xincludes" = "no"; then
  2390         -	    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"
  2391         -	    for i in $dirs ; do
  2392         -		if test -r $i/X11/Intrinsic.h; then
  2393         -		    AC_MSG_RESULT([$i])
  2394         -		    XINCLUDES=" -I$i"
  2395         -		    found_xincludes="yes"
  2396         -		    break
  2397         -		fi
  2398         -	    done
  2399         -	fi
  2400         -    else
  2401         -	if test "$x_includes" != ""; then
  2402         -	    XINCLUDES="-I$x_includes"
  2403         -	    found_xincludes="yes"
  2404         -	fi
  2405         -    fi
  2406         -    if test "$found_xincludes" = "no"; then
  2407         -	AC_MSG_RESULT([couldn't find any!])
  2408         -    fi
  2409         -
  2410         -    if test "$no_x" = yes; then
  2411         -	AC_MSG_CHECKING([for X11 libraries])
  2412         -	XLIBSW=nope
  2413         -	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"
  2414         -	for i in $dirs ; do
  2415         -	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
  2416         -		AC_MSG_RESULT([$i])
  2417         -		XLIBSW="-L$i -lX11"
  2418         -		x_libraries="$i"
  2419         -		break
  2420         -	    fi
  2421         -	done
  2422         -    else
  2423         -	if test "$x_libraries" = ""; then
  2424         -	    XLIBSW=-lX11
  2425         -	else
  2426         -	    XLIBSW="-L$x_libraries -lX11"
  2427         -	fi
  2428         -    fi
  2429         -    if test "$XLIBSW" = nope ; then
  2430         -	AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
  2431         -    fi
  2432         -    if test "$XLIBSW" = nope ; then
  2433         -	AC_MSG_RESULT([could not find any!  Using -lX11.])
  2434         -	XLIBSW=-lX11
  2435         -    fi
  2436         -    # TEA specific:
  2437         -    if test x"${XLIBSW}" != x ; then
  2438         -	PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
  2439         -    fi
  2440         -])
  2441         -
  2442         -#--------------------------------------------------------------------
  2443         -# TEA_BLOCKING_STYLE
  2444         -#
  2445         -#	The statements below check for systems where POSIX-style
  2446         -#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
  2447         -#	On these systems (mostly older ones), use the old BSD-style
  2448         -#	FIONBIO approach instead.
  2449         -#
  2450         -# Arguments:
  2451         -#	none
  2452         -#
  2453         -# Results:
  2454         -#
  2455         -#	Defines some of the following vars:
  2456         -#		HAVE_SYS_IOCTL_H
  2457         -#		HAVE_SYS_FILIO_H
  2458         -#		USE_FIONBIO
  2459         -#		O_NONBLOCK
  2460         -#--------------------------------------------------------------------
  2461         -
  2462         -AC_DEFUN([TEA_BLOCKING_STYLE], [
  2463         -    AC_CHECK_HEADERS(sys/ioctl.h)
  2464         -    AC_CHECK_HEADERS(sys/filio.h)
  2465         -    TEA_CONFIG_SYSTEM
  2466         -    AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
  2467         -    case $system in
  2468         -	OSF*)
  2469         -	    AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
  2470         -	    AC_MSG_RESULT([FIONBIO])
  2471         -	    ;;
  2472         -	*)
  2473         -	    AC_MSG_RESULT([O_NONBLOCK])
  2474         -	    ;;
  2475         -    esac
  2476         -])
  2477         -
  2478         -#--------------------------------------------------------------------
  2479         -# TEA_TIME_HANDLER
  2480         -#
  2481         -#	Checks how the system deals with time.h, what time structures
  2482         -#	are used on the system, and what fields the structures have.
  2483         -#
  2484         -# Arguments:
  2485         -#	none
  2486         -#
  2487         -# Results:
  2488         -#
  2489         -#	Defines some of the following vars:
  2490         -#		USE_DELTA_FOR_TZ
  2491         -#		HAVE_TM_GMTOFF
  2492         -#		HAVE_TM_TZADJ
  2493         -#		HAVE_TIMEZONE_VAR
  2494         -#--------------------------------------------------------------------
  2495         -
  2496         -AC_DEFUN([TEA_TIME_HANDLER], [
  2497         -    AC_CHECK_HEADERS(sys/time.h)
  2498         -    AC_HEADER_TIME
  2499         -    AC_STRUCT_TIMEZONE
  2500         -
  2501         -    AC_CHECK_FUNCS(gmtime_r localtime_r)
  2502         -
  2503         -    AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [
  2504         -	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
  2505         -	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)])
  2506         -    if test $tcl_cv_member_tm_tzadj = yes ; then
  2507         -	AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
  2508         -    fi
  2509         -
  2510         -    AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [
  2511         -	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
  2512         -	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)])
  2513         -    if test $tcl_cv_member_tm_gmtoff = yes ; then
  2514         -	AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
  2515         -    fi
  2516         -
  2517         -    #
  2518         -    # Its important to include time.h in this check, as some systems
  2519         -    # (like convex) have timezone functions, etc.
  2520         -    #
  2521         -    AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
  2522         -	AC_TRY_COMPILE([#include <time.h>],
  2523         -	    [extern long timezone;
  2524         -	    timezone += 1;
  2525         -	    exit (0);],
  2526         -	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
  2527         -    if test $tcl_cv_timezone_long = yes ; then
  2528         -	AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
  2529         -    else
  2530         -	#
  2531         -	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
  2532         -	#
  2533         -	AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [
  2534         -	    AC_TRY_COMPILE([#include <time.h>],
  2535         -		[extern time_t timezone;
  2536         -		timezone += 1;
  2537         -		exit (0);],
  2538         -		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)])
  2539         -	if test $tcl_cv_timezone_time = yes ; then
  2540         -	    AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
  2541         -	fi
  2542         -    fi
  2543         -])
  2544         -
  2545         -#--------------------------------------------------------------------
  2546         -# TEA_BUGGY_STRTOD
  2547         -#
  2548         -#	Under Solaris 2.4, strtod returns the wrong value for the
  2549         -#	terminating character under some conditions.  Check for this
  2550         -#	and if the problem exists use a substitute procedure
  2551         -#	"fixstrtod" (provided by Tcl) that corrects the error.
  2552         -#	Also, on Compaq's Tru64 Unix 5.0,
  2553         -#	strtod(" ") returns 0.0 instead of a failure to convert.
  2554         -#
  2555         -# Arguments:
  2556         -#	none
  2557         -#
  2558         -# Results:
  2559         -#
  2560         -#	Might defines some of the following vars:
  2561         -#		strtod (=fixstrtod)
  2562         -#--------------------------------------------------------------------
  2563         -
  2564         -AC_DEFUN([TEA_BUGGY_STRTOD], [
  2565         -    AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
  2566         -    if test "$tcl_strtod" = 1; then
  2567         -	AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
  2568         -	    AC_TRY_RUN([
  2569         -		extern double strtod();
  2570         -		int main() {
  2571         -		    char *infString="Inf", *nanString="NaN", *spaceString=" ";
  2572         -		    char *term;
  2573         -		    double value;
  2574         -		    value = strtod(infString, &term);
  2575         -		    if ((term != infString) && (term[-1] == 0)) {
  2576         -			exit(1);
  2577         -		    }
  2578         -		    value = strtod(nanString, &term);
  2579         -		    if ((term != nanString) && (term[-1] == 0)) {
  2580         -			exit(1);
  2581         -		    }
  2582         -		    value = strtod(spaceString, &term);
  2583         -		    if (term == (spaceString+1)) {
  2584         -			exit(1);
  2585         -		    }
  2586         -		    exit(0);
  2587         -		}], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
  2588         -		    tcl_cv_strtod_buggy=buggy)])
  2589         -	if test "$tcl_cv_strtod_buggy" = buggy; then
  2590         -	    AC_LIBOBJ([fixstrtod])
  2591         -	    USE_COMPAT=1
  2592         -	    AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
  2593         -	fi
  2594         -    fi
  2595         -])
  2596         -
  2597         -#--------------------------------------------------------------------
  2598         -# TEA_TCL_LINK_LIBS
  2599         -#
  2600         -#	Search for the libraries needed to link the Tcl shell.
  2601         -#	Things like the math library (-lm) and socket stuff (-lsocket vs.
  2602         -#	-lnsl) are dealt with here.
  2603         -#
  2604         -# Arguments:
  2605         -#	Requires the following vars to be set in the Makefile:
  2606         -#		DL_LIBS (not in TEA, only needed in core)
  2607         -#		LIBS
  2608         -#		MATH_LIBS
  2609         -#
  2610         -# Results:
  2611         -#
  2612         -#	Substitutes the following vars:
  2613         -#		TCL_LIBS
  2614         -#		MATH_LIBS
  2615         -#
  2616         -#	Might append to the following vars:
  2617         -#		LIBS
  2618         -#
  2619         -#	Might define the following vars:
  2620         -#		HAVE_NET_ERRNO_H
  2621         -#--------------------------------------------------------------------
  2622         -
  2623         -AC_DEFUN([TEA_TCL_LINK_LIBS], [
  2624         -    #--------------------------------------------------------------------
  2625         -    # On a few very rare systems, all of the libm.a stuff is
  2626         -    # already in libc.a.  Set compiler flags accordingly.
  2627         -    # Also, Linux requires the "ieee" library for math to work
  2628         -    # right (and it must appear before "-lm").
  2629         -    #--------------------------------------------------------------------
  2630         -
  2631         -    AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
  2632         -    AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
  2633         -
  2634         -    #--------------------------------------------------------------------
  2635         -    # Interactive UNIX requires -linet instead of -lsocket, plus it
  2636         -    # needs net/errno.h to define the socket-related error codes.
  2637         -    #--------------------------------------------------------------------
  2638         -
  2639         -    AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
  2640         -    AC_CHECK_HEADER(net/errno.h, [
  2641         -	AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have <net/errno.h>?])])
  2642         -
  2643         -    #--------------------------------------------------------------------
  2644         -    #	Check for the existence of the -lsocket and -lnsl libraries.
  2645         -    #	The order here is important, so that they end up in the right
  2646         -    #	order in the command line generated by make.  Here are some
  2647         -    #	special considerations:
  2648         -    #	1. Use "connect" and "accept" to check for -lsocket, and
  2649         -    #	   "gethostbyname" to check for -lnsl.
  2650         -    #	2. Use each function name only once:  can't redo a check because
  2651         -    #	   autoconf caches the results of the last check and won't redo it.
  2652         -    #	3. Use -lnsl and -lsocket only if they supply procedures that
  2653         -    #	   aren't already present in the normal libraries.  This is because
  2654         -    #	   IRIX 5.2 has libraries, but they aren't needed and they're
  2655         -    #	   bogus:  they goof up name resolution if used.
  2656         -    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
  2657         -    #	   To get around this problem, check for both libraries together
  2658         -    #	   if -lsocket doesn't work by itself.
  2659         -    #--------------------------------------------------------------------
  2660         -
  2661         -    tcl_checkBoth=0
  2662         -    AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
  2663         -    if test "$tcl_checkSocket" = 1; then
  2664         -	AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
  2665         -	    LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
  2666         -    fi
  2667         -    if test "$tcl_checkBoth" = 1; then
  2668         -	tk_oldLibs=$LIBS
  2669         -	LIBS="$LIBS -lsocket -lnsl"
  2670         -	AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
  2671         -    fi
  2672         -    AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
  2673         -	    [LIBS="$LIBS -lnsl"])])
  2674         -
  2675         -    # TEA specific: Don't perform the eval of the libraries here because
  2676         -    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
  2677         -
  2678         -    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
  2679         -    AC_SUBST(TCL_LIBS)
  2680         -    AC_SUBST(MATH_LIBS)
  2681         -])
  2682         -
  2683         -#--------------------------------------------------------------------
  2684         -# TEA_TCL_EARLY_FLAGS
  2685         -#
  2686         -#	Check for what flags are needed to be passed so the correct OS
  2687         -#	features are available.
  2688         -#
  2689         -# Arguments:
  2690         -#	None
  2691         -#
  2692         -# Results:
  2693         -#
  2694         -#	Might define the following vars:
  2695         -#		_ISOC99_SOURCE
  2696         -#		_LARGEFILE64_SOURCE
  2697         -#		_LARGEFILE_SOURCE64
  2698         -#--------------------------------------------------------------------
  2699         -
  2700         -AC_DEFUN([TEA_TCL_EARLY_FLAG],[
  2701         -    AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
  2702         -	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
  2703         -	    AC_TRY_COMPILE([[#define ]$1[ 1
  2704         -]$2], $3,
  2705         -		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
  2706         -		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
  2707         -    if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
  2708         -	AC_DEFINE($1, 1, [Add the ]$1[ flag when building])
  2709         -	tcl_flags="$tcl_flags $1"
  2710         -    fi
  2711         -])
  2712         -
  2713         -AC_DEFUN([TEA_TCL_EARLY_FLAGS],[
  2714         -    AC_MSG_CHECKING([for required early compiler flags])
  2715         -    tcl_flags=""
  2716         -    TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
  2717         -	[char *p = (char *)strtoll; char *q = (char *)strtoull;])
  2718         -    TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
  2719         -	[struct stat64 buf; int i = stat64("/", &buf);])
  2720         -    TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
  2721         -	[char *p = (char *)open64;])
  2722         -    if test "x${tcl_flags}" = "x" ; then
  2723         -	AC_MSG_RESULT([none])
  2724         -    else
  2725         -	AC_MSG_RESULT([${tcl_flags}])
  2726         -    fi
  2727         -])
  2728         -
  2729         -#--------------------------------------------------------------------
  2730         -# TEA_TCL_64BIT_FLAGS
  2731         -#
  2732         -#	Check for what is defined in the way of 64-bit features.
  2733         -#
  2734         -# Arguments:
  2735         -#	None
  2736         -#
  2737         -# Results:
  2738         -#
  2739         -#	Might define the following vars:
  2740         -#		TCL_WIDE_INT_IS_LONG
  2741         -#		TCL_WIDE_INT_TYPE
  2742         -#		HAVE_STRUCT_DIRENT64
  2743         -#		HAVE_STRUCT_STAT64
  2744         -#		HAVE_TYPE_OFF64_T
  2745         -#--------------------------------------------------------------------
  2746         -
  2747         -AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
  2748         -    AC_MSG_CHECKING([for 64-bit integer type])
  2749         -    AC_CACHE_VAL(tcl_cv_type_64bit,[
  2750         -	tcl_cv_type_64bit=none
  2751         -	# See if the compiler knows natively about __int64
  2752         -	AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
  2753         -	    tcl_type_64bit=__int64, tcl_type_64bit="long long")
  2754         -	# See if we should use long anyway  Note that we substitute in the
  2755         -	# type that is our current guess for a 64-bit type inside this check
  2756         -	# program, so it should be modified only carefully...
  2757         -        AC_TRY_COMPILE(,[switch (0) {
  2758         -            case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
  2759         -        }],tcl_cv_type_64bit=${tcl_type_64bit})])
  2760         -    if test "${tcl_cv_type_64bit}" = none ; then
  2761         -	AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?])
  2762         -	AC_MSG_RESULT([using long])
  2763         -    elif test "${tcl_cv_type_64bit}" = "__int64" \
  2764         -		-a "${TEA_PLATFORM}" = "windows" ; then
  2765         -	# TEA specific: We actually want to use the default tcl.h checks in
  2766         -	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
  2767         -	AC_MSG_RESULT([using Tcl header defaults])
  2768         -    else
  2769         -	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
  2770         -	    [What type should be used to define wide integers?])
  2771         -	AC_MSG_RESULT([${tcl_cv_type_64bit}])
  2772         -
  2773         -	# Now check for auxiliary declarations
  2774         -	AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
  2775         -	    AC_TRY_COMPILE([#include <sys/types.h>
  2776         -#include <sys/dirent.h>],[struct dirent64 p;],
  2777         -		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
  2778         -	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
  2779         -	    AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
  2780         -	fi
  2781         -
  2782         -	AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[
  2783         -	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
  2784         -],
  2785         -		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
  2786         -	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
  2787         -	    AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?])
  2788         -	fi
  2789         -
  2790         -	AC_CHECK_FUNCS(open64 lseek64)
  2791         -	AC_MSG_CHECKING([for off64_t])
  2792         -	AC_CACHE_VAL(tcl_cv_type_off64_t,[
  2793         -	    AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
  2794         -],
  2795         -		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
  2796         -	dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
  2797         -	dnl functions lseek64 and open64 are defined.
  2798         -	if test "x${tcl_cv_type_off64_t}" = "xyes" && \
  2799         -	        test "x${ac_cv_func_lseek64}" = "xyes" && \
  2800         -	        test "x${ac_cv_func_open64}" = "xyes" ; then
  2801         -	    AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
  2802         -	    AC_MSG_RESULT([yes])
  2803         -	else
  2804         -	    AC_MSG_RESULT([no])
  2805         -	fi
  2806         -    fi
  2807         -])
  2808         -
  2809         -##
  2810         -## Here ends the standard Tcl configuration bits and starts the
  2811         -## TEA specific functions
  2812         -##
  2813         -
  2814         -#------------------------------------------------------------------------
  2815         -# TEA_INIT --
  2816         -#
  2817         -#	Init various Tcl Extension Architecture (TEA) variables.
  2818         -#	This should be the first called TEA_* macro.
  2819         -#
  2820         -# Arguments:
  2821         -#	none
  2822         -#
  2823         -# Results:
  2824         -#
  2825         -#	Defines and substs the following vars:
  2826         -#		CYGPATH
  2827         -#		EXEEXT
  2828         -#	Defines only:
  2829         -#		TEA_VERSION
  2830         -#		TEA_INITED
  2831         -#		TEA_PLATFORM (windows or unix)
  2832         -#
  2833         -# "cygpath" is used on windows to generate native path names for include
  2834         -# files. These variables should only be used with the compiler and linker
  2835         -# since they generate native path names.
  2836         -#
  2837         -# EXEEXT
  2838         -#	Select the executable extension based on the host type.  This
  2839         -#	is a lightweight replacement for AC_EXEEXT that doesn't require
  2840         -#	a compiler.
  2841         -#------------------------------------------------------------------------
  2842         -
  2843         -AC_DEFUN([TEA_INIT], [
  2844         -    # TEA extensions pass this us the version of TEA they think they
  2845         -    # are compatible with.
  2846         -    TEA_VERSION="3.9"
  2847         -
  2848         -    AC_MSG_CHECKING([for correct TEA configuration])
  2849         -    if test x"${PACKAGE_NAME}" = x ; then
  2850         -	AC_MSG_ERROR([
  2851         -The PACKAGE_NAME variable must be defined by your TEA configure.in])
  2852         -    fi
  2853         -    if test x"$1" = x ; then
  2854         -	AC_MSG_ERROR([
  2855         -TEA version not specified.])
  2856         -    elif test "$1" != "${TEA_VERSION}" ; then
  2857         -	AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"])
  2858         -    else
  2859         -	AC_MSG_RESULT([ok (TEA ${TEA_VERSION})])
  2860         -    fi
  2861         -
  2862         -    # If the user did not set CFLAGS, set it now to keep macros
  2863         -    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
  2864         -    if test "${CFLAGS+set}" != "set" ; then
  2865         -	CFLAGS=""
  2866         -    fi
  2867         -
  2868         -    case "`uname -s`" in
  2869         -	*win32*|*WIN32*|*MINGW32_*)
  2870         -	    AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
  2871         -	    EXEEXT=".exe"
  2872         -	    TEA_PLATFORM="windows"
  2873         -	    ;;
  2874         -	*CYGWIN_*)
  2875         -	    CYGPATH=echo
  2876         -	    EXEEXT=".exe"
  2877         -	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
  2878         -	    ;;
  2879         -	*)
  2880         -	    CYGPATH=echo
  2881         -	    # Maybe we are cross-compiling....
  2882         -	    case ${host_alias} in
  2883         -		*mingw32*)
  2884         -		EXEEXT=".exe"
  2885         -		TEA_PLATFORM="windows"
  2886         -		;;
  2887         -	    *)
  2888         -		EXEEXT=""
  2889         -		TEA_PLATFORM="unix"
  2890         -		;;
  2891         -	    esac
  2892         -	    ;;
  2893         -    esac
  2894         -
  2895         -    # Check if exec_prefix is set. If not use fall back to prefix.
  2896         -    # Note when adjusted, so that TEA_PREFIX can correct for this.
  2897         -    # This is needed for recursive configures, since autoconf propagates
  2898         -    # $prefix, but not $exec_prefix (doh!).
  2899         -    if test x$exec_prefix = xNONE ; then
  2900         -	exec_prefix_default=yes
  2901         -	exec_prefix=$prefix
  2902         -    fi
  2903         -
  2904         -    AC_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}])
  2905         -
  2906         -    AC_SUBST(EXEEXT)
  2907         -    AC_SUBST(CYGPATH)
  2908         -
  2909         -    # This package name must be replaced statically for AC_SUBST to work
  2910         -    AC_SUBST(PKG_LIB_FILE)
  2911         -    # Substitute STUB_LIB_FILE in case package creates a stub library too.
  2912         -    AC_SUBST(PKG_STUB_LIB_FILE)
  2913         -
  2914         -    # We AC_SUBST these here to ensure they are subst'ed,
  2915         -    # in case the user doesn't call TEA_ADD_...
  2916         -    AC_SUBST(PKG_STUB_SOURCES)
  2917         -    AC_SUBST(PKG_STUB_OBJECTS)
  2918         -    AC_SUBST(PKG_TCL_SOURCES)
  2919         -    AC_SUBST(PKG_HEADERS)
  2920         -    AC_SUBST(PKG_INCLUDES)
  2921         -    AC_SUBST(PKG_LIBS)
  2922         -    AC_SUBST(PKG_CFLAGS)
  2923         -])
  2924         -
  2925         -#------------------------------------------------------------------------
  2926         -# TEA_ADD_SOURCES --
  2927         -#
  2928         -#	Specify one or more source files.  Users should check for
  2929         -#	the right platform before adding to their list.
  2930         -#	It is not important to specify the directory, as long as it is
  2931         -#	in the generic, win or unix subdirectory of $(srcdir).
  2932         -#
  2933         -# Arguments:
  2934         -#	one or more file names
  2935         -#
  2936         -# Results:
  2937         -#
  2938         -#	Defines and substs the following vars:
  2939         -#		PKG_SOURCES
  2940         -#		PKG_OBJECTS
  2941         -#------------------------------------------------------------------------
  2942         -AC_DEFUN([TEA_ADD_SOURCES], [
  2943         -    vars="[email protected]"
  2944         -    for i in $vars; do
  2945         -	case $i in
  2946         -	    [\$]*)
  2947         -		# allow $-var names
  2948         -		PKG_SOURCES="$PKG_SOURCES $i"
  2949         -		PKG_OBJECTS="$PKG_OBJECTS $i"
  2950         -		;;
  2951         -	    *)
  2952         -		# check for existence - allows for generic/win/unix VPATH
  2953         -		# To add more dirs here (like 'src'), you have to update VPATH
  2954         -		# in Makefile.in as well
  2955         -		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
  2956         -		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
  2957         -		    -a ! -f "${srcdir}/macosx/$i" \
  2958         -		    ; then
  2959         -		    AC_MSG_ERROR([could not find source file '$i'])
  2960         -		fi
  2961         -		PKG_SOURCES="$PKG_SOURCES $i"
  2962         -		# this assumes it is in a VPATH dir
  2963         -		i=`basename $i`
  2964         -		# handle user calling this before or after TEA_SETUP_COMPILER
  2965         -		if test x"${OBJEXT}" != x ; then
  2966         -		    j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
  2967         -		else
  2968         -		    j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
  2969         -		fi
  2970         -		PKG_OBJECTS="$PKG_OBJECTS $j"
  2971         -		;;
  2972         -	esac
  2973         -    done
  2974         -    AC_SUBST(PKG_SOURCES)
  2975         -    AC_SUBST(PKG_OBJECTS)
  2976         -])
  2977         -
  2978         -#------------------------------------------------------------------------
  2979         -# TEA_ADD_STUB_SOURCES --
  2980         -#
  2981         -#	Specify one or more source files.  Users should check for
  2982         -#	the right platform before adding to their list.
  2983         -#	It is not important to specify the directory, as long as it is
  2984         -#	in the generic, win or unix subdirectory of $(srcdir).
  2985         -#
  2986         -# Arguments:
  2987         -#	one or more file names
  2988         -#
  2989         -# Results:
  2990         -#
  2991         -#	Defines and substs the following vars:
  2992         -#		PKG_STUB_SOURCES
  2993         -#		PKG_STUB_OBJECTS
  2994         -#------------------------------------------------------------------------
  2995         -AC_DEFUN([TEA_ADD_STUB_SOURCES], [
  2996         -    vars="[email protected]"
  2997         -    for i in $vars; do
  2998         -	# check for existence - allows for generic/win/unix VPATH
  2999         -	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
  3000         -	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
  3001         -	    -a ! -f "${srcdir}/macosx/$i" \
  3002         -	    ; then
  3003         -	    AC_MSG_ERROR([could not find stub source file '$i'])
  3004         -	fi
  3005         -	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
  3006         -	# this assumes it is in a VPATH dir
  3007         -	i=`basename $i`
  3008         -	# handle user calling this before or after TEA_SETUP_COMPILER
  3009         -	if test x"${OBJEXT}" != x ; then
  3010         -	    j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
  3011         -	else
  3012         -	    j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
  3013         -	fi
  3014         -	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
  3015         -    done
  3016         -    AC_SUBST(PKG_STUB_SOURCES)
  3017         -    AC_SUBST(PKG_STUB_OBJECTS)
  3018         -])
  3019         -
  3020         -#------------------------------------------------------------------------
  3021         -# TEA_ADD_TCL_SOURCES --
  3022         -#
  3023         -#	Specify one or more Tcl source files.  These should be platform
  3024         -#	independent runtime files.
  3025         -#
  3026         -# Arguments:
  3027         -#	one or more file names
  3028         -#
  3029         -# Results:
  3030         -#
  3031         -#	Defines and substs the following vars:
  3032         -#		PKG_TCL_SOURCES
  3033         -#------------------------------------------------------------------------
  3034         -AC_DEFUN([TEA_ADD_TCL_SOURCES], [
  3035         -    vars="[email protected]"
  3036         -    for i in $vars; do
  3037         -	# check for existence, be strict because it is installed
  3038         -	if test ! -f "${srcdir}/$i" ; then
  3039         -	    AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i'])
  3040         -	fi
  3041         -	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
  3042         -    done
  3043         -    AC_SUBST(PKG_TCL_SOURCES)
  3044         -])
  3045         -
  3046         -#------------------------------------------------------------------------
  3047         -# TEA_ADD_HEADERS --
  3048         -#
  3049         -#	Specify one or more source headers.  Users should check for
  3050         -#	the right platform before adding to their list.
  3051         -#
  3052         -# Arguments:
  3053         -#	one or more file names
  3054         -#
  3055         -# Results:
  3056         -#
  3057         -#	Defines and substs the following vars:
  3058         -#		PKG_HEADERS
  3059         -#------------------------------------------------------------------------
  3060         -AC_DEFUN([TEA_ADD_HEADERS], [
  3061         -    vars="[email protected]"
  3062         -    for i in $vars; do
  3063         -	# check for existence, be strict because it is installed
  3064         -	if test ! -f "${srcdir}/$i" ; then
  3065         -	    AC_MSG_ERROR([could not find header file '${srcdir}/$i'])
  3066         -	fi
  3067         -	PKG_HEADERS="$PKG_HEADERS $i"
  3068         -    done
  3069         -    AC_SUBST(PKG_HEADERS)
  3070         -])
  3071         -
  3072         -#------------------------------------------------------------------------
  3073         -# TEA_ADD_INCLUDES --
  3074         -#
  3075         -#	Specify one or more include dirs.  Users should check for
  3076         -#	the right platform before adding to their list.
  3077         -#
  3078         -# Arguments:
  3079         -#	one or more file names
  3080         -#
  3081         -# Results:
  3082         -#
  3083         -#	Defines and substs the following vars:
  3084         -#		PKG_INCLUDES
  3085         -#------------------------------------------------------------------------
  3086         -AC_DEFUN([TEA_ADD_INCLUDES], [
  3087         -    vars="[email protected]"
  3088         -    for i in $vars; do
  3089         -	PKG_INCLUDES="$PKG_INCLUDES $i"
  3090         -    done
  3091         -    AC_SUBST(PKG_INCLUDES)
  3092         -])
  3093         -
  3094         -#------------------------------------------------------------------------
  3095         -# TEA_ADD_LIBS --
  3096         -#
  3097         -#	Specify one or more libraries.  Users should check for
  3098         -#	the right platform before adding to their list.  For Windows,
  3099         -#	libraries provided in "foo.lib" format will be converted to
  3100         -#	"-lfoo" when using GCC (mingw).
  3101         -#
  3102         -# Arguments:
  3103         -#	one or more file names
  3104         -#
  3105         -# Results:
  3106         -#
  3107         -#	Defines and substs the following vars:
  3108         -#		PKG_LIBS
  3109         -#------------------------------------------------------------------------
  3110         -AC_DEFUN([TEA_ADD_LIBS], [
  3111         -    vars="[email protected]"
  3112         -    for i in $vars; do
  3113         -	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
  3114         -	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
  3115         -	    i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'`
  3116         -	fi
  3117         -	PKG_LIBS="$PKG_LIBS $i"
  3118         -    done
  3119         -    AC_SUBST(PKG_LIBS)
  3120         -])
  3121         -
  3122         -#------------------------------------------------------------------------
  3123         -# TEA_ADD_CFLAGS --
  3124         -#
  3125         -#	Specify one or more CFLAGS.  Users should check for
  3126         -#	the right platform before adding to their list.
  3127         -#
  3128         -# Arguments:
  3129         -#	one or more file names
  3130         -#
  3131         -# Results:
  3132         -#
  3133         -#	Defines and substs the following vars:
  3134         -#		PKG_CFLAGS
  3135         -#------------------------------------------------------------------------
  3136         -AC_DEFUN([TEA_ADD_CFLAGS], [
  3137         -    PKG_CFLAGS="$PKG_CFLAGS [email protected]"
  3138         -    AC_SUBST(PKG_CFLAGS)
  3139         -])
  3140         -
  3141         -#------------------------------------------------------------------------
  3142         -# TEA_ADD_CLEANFILES --
  3143         -#
  3144         -#	Specify one or more CLEANFILES.
  3145         -#
  3146         -# Arguments:
  3147         -#	one or more file names to clean target
  3148         -#
  3149         -# Results:
  3150         -#
  3151         -#	Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG
  3152         -#------------------------------------------------------------------------
  3153         -AC_DEFUN([TEA_ADD_CLEANFILES], [
  3154         -    CLEANFILES="$CLEANFILES [email protected]"
  3155         -])
  3156         -
  3157         -#------------------------------------------------------------------------
  3158         -# TEA_PREFIX --
  3159         -#
  3160         -#	Handle the --prefix=... option by defaulting to what Tcl gave
  3161         -#
  3162         -# Arguments:
  3163         -#	none
  3164         -#
  3165         -# Results:
  3166         -#
  3167         -#	If --prefix or --exec-prefix was not specified, $prefix and
  3168         -#	$exec_prefix will be set to the values given to Tcl when it was
  3169         -#	configured.
  3170         -#------------------------------------------------------------------------
  3171         -AC_DEFUN([TEA_PREFIX], [
  3172         -    if test "${prefix}" = "NONE"; then
  3173         -	prefix_default=yes
  3174         -	if test x"${TCL_PREFIX}" != x; then
  3175         -	    AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
  3176         -	    prefix=${TCL_PREFIX}
  3177         -	else
  3178         -	    AC_MSG_NOTICE([--prefix defaulting to /usr/local])
  3179         -	    prefix=/usr/local
  3180         -	fi
  3181         -    fi
  3182         -    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
  3183         -	-o x"${exec_prefix_default}" = x"yes" ; then
  3184         -	if test x"${TCL_EXEC_PREFIX}" != x; then
  3185         -	    AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
  3186         -	    exec_prefix=${TCL_EXEC_PREFIX}
  3187         -	else
  3188         -	    AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}])
  3189         -	    exec_prefix=$prefix
  3190         -	fi
  3191         -    fi
  3192         -])
  3193         -
  3194         -#------------------------------------------------------------------------
  3195         -# TEA_SETUP_COMPILER_CC --
  3196         -#
  3197         -#	Do compiler checks the way we want.  This is just a replacement
  3198         -#	for AC_PROG_CC in TEA configure.in files to make them cleaner.
  3199         -#
  3200         -# Arguments:
  3201         -#	none
  3202         -#
  3203         -# Results:
  3204         -#
  3205         -#	Sets up CC var and other standard bits we need to make executables.
  3206         -#------------------------------------------------------------------------
  3207         -AC_DEFUN([TEA_SETUP_COMPILER_CC], [
  3208         -    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
  3209         -    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
  3210         -
  3211         -    AC_PROG_CC
  3212         -    AC_PROG_CPP
  3213         -
  3214         -    #--------------------------------------------------------------------
  3215         -    # Checks to see if the make program sets the $MAKE variable.
  3216         -    #--------------------------------------------------------------------
  3217         -
  3218         -    AC_PROG_MAKE_SET
  3219         -
  3220         -    #--------------------------------------------------------------------
  3221         -    # Find ranlib
  3222         -    #--------------------------------------------------------------------
  3223         -
  3224         -    AC_CHECK_TOOL(RANLIB, ranlib)
  3225         -
  3226         -    #--------------------------------------------------------------------
  3227         -    # Determines the correct binary file extension (.o, .obj, .exe etc.)
  3228         -    #--------------------------------------------------------------------
  3229         -
  3230         -    AC_OBJEXT
  3231         -    AC_EXEEXT
  3232         -])
  3233         -
  3234         -#------------------------------------------------------------------------
  3235         -# TEA_SETUP_COMPILER --
  3236         -#
  3237         -#	Do compiler checks that use the compiler.  This must go after
  3238         -#	TEA_SETUP_COMPILER_CC, which does the actual compiler check.
  3239         -#
  3240         -# Arguments:
  3241         -#	none
  3242         -#
  3243         -# Results:
  3244         -#
  3245         -#	Sets up CC var and other standard bits we need to make executables.
  3246         -#------------------------------------------------------------------------
  3247         -AC_DEFUN([TEA_SETUP_COMPILER], [
  3248         -    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
  3249         -    AC_REQUIRE([TEA_SETUP_COMPILER_CC])
  3250         -
  3251         -    #------------------------------------------------------------------------
  3252         -    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
  3253         -    # It makes compiling go faster.  (This is only a performance feature.)
  3254         -    #------------------------------------------------------------------------
  3255         -
  3256         -    if test -z "$no_pipe" -a -n "$GCC"; then
  3257         -	AC_CACHE_CHECK([if the compiler understands -pipe],
  3258         -	    tcl_cv_cc_pipe, [
  3259         -	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
  3260         -	    AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
  3261         -	    CFLAGS=$hold_cflags])
  3262         -	if test $tcl_cv_cc_pipe = yes; then
  3263         -	    CFLAGS="$CFLAGS -pipe"
  3264         -	fi
  3265         -    fi
  3266         -
  3267         -    #--------------------------------------------------------------------
  3268         -    # Common compiler flag setup
  3269         -    #--------------------------------------------------------------------
  3270         -
  3271         -    AC_C_BIGENDIAN
  3272         -    if test "${TEA_PLATFORM}" = "unix" ; then
  3273         -	TEA_TCL_LINK_LIBS
  3274         -	TEA_MISSING_POSIX_HEADERS
  3275         -	# Let the user call this, because if it triggers, they will
  3276         -	# need a compat/strtod.c that is correct.  Users can also
  3277         -	# use Tcl_GetDouble(FromObj) instead.
  3278         -	#TEA_BUGGY_STRTOD
  3279         -    fi
  3280         -])
  3281         -
  3282         -#------------------------------------------------------------------------
  3283         -# TEA_MAKE_LIB --
  3284         -#
  3285         -#	Generate a line that can be used to build a shared/unshared library
  3286         -#	in a platform independent manner.
  3287         -#
  3288         -# Arguments:
  3289         -#	none
  3290         -#
  3291         -#	Requires:
  3292         -#
  3293         -# Results:
  3294         -#
  3295         -#	Defines the following vars:
  3296         -#	CFLAGS -	Done late here to note disturb other AC macros
  3297         -#       MAKE_LIB -      Command to execute to build the Tcl library;
  3298         -#                       differs depending on whether or not Tcl is being
  3299         -#                       compiled as a shared library.
  3300         -#	MAKE_SHARED_LIB	Makefile rule for building a shared library
  3301         -#	MAKE_STATIC_LIB	Makefile rule for building a static library
  3302         -#	MAKE_STUB_LIB	Makefile rule for building a stub library
  3303         -#	VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
  3304         -#	VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
  3305         -#------------------------------------------------------------------------
  3306         -
  3307         -AC_DEFUN([TEA_MAKE_LIB], [
  3308         -    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
  3309         -	MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
  3310         -	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)"
  3311         -	AC_EGREP_CPP([manifest needed], [
  3312         -#if defined(_MSC_VER) && _MSC_VER >= 1400
  3313         -print("manifest needed")
  3314         -#endif
  3315         -	], [
  3316         -	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
  3317         -	VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
  3318         -	VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
  3319         -	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
  3320         -	TEA_ADD_CLEANFILES([*.manifest])
  3321         -	])
  3322         -	MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
  3323         -    else
  3324         -	MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
  3325         -	MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
  3326         -	MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
  3327         -    fi
  3328         -
  3329         -    if test "${SHARED_BUILD}" = "1" ; then
  3330         -	MAKE_LIB="${MAKE_SHARED_LIB} "
  3331         -    else
  3332         -	MAKE_LIB="${MAKE_STATIC_LIB} "
  3333         -    fi
  3334         -
  3335         -    #--------------------------------------------------------------------
  3336         -    # Shared libraries and static libraries have different names.
  3337         -    # Use the double eval to make sure any variables in the suffix is
  3338         -    # substituted. (@@@ Might not be necessary anymore)
  3339         -    #--------------------------------------------------------------------
  3340         -
  3341         -    if test "${TEA_PLATFORM}" = "windows" ; then
  3342         -	if test "${SHARED_BUILD}" = "1" ; then
  3343         -	    # We force the unresolved linking of symbols that are really in
  3344         -	    # the private libraries of Tcl and Tk.
  3345         -	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
  3346         -	    if test x"${TK_BIN_DIR}" != x ; then
  3347         -		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
  3348         -	    fi
  3349         -	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
  3350         -	else
  3351         -	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
  3352         -	fi
  3353         -	# Some packages build their own stubs libraries
  3354         -	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
  3355         -	if test "$GCC" = "yes"; then
  3356         -	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
  3357         -	fi
  3358         -	# These aren't needed on Windows (either MSVC or gcc)
  3359         -	RANLIB=:
  3360         -	RANLIB_STUB=:
  3361         -    else
  3362         -	RANLIB_STUB="${RANLIB}"
  3363         -	if test "${SHARED_BUILD}" = "1" ; then
  3364         -	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
  3365         -	    if test x"${TK_BIN_DIR}" != x ; then
  3366         -		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
  3367         -	    fi
  3368         -	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
  3369         -	    RANLIB=:
  3370         -	else
  3371         -	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
  3372         -	fi
  3373         -	# Some packages build their own stubs libraries
  3374         -	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
  3375         -    fi
  3376         -
  3377         -    # These are escaped so that only CFLAGS is picked up at configure time.
  3378         -    # The other values will be substituted at make time.
  3379         -    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
  3380         -    if test "${SHARED_BUILD}" = "1" ; then
  3381         -	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
  3382         -    fi
  3383         -
  3384         -    AC_SUBST(MAKE_LIB)
  3385         -    AC_SUBST(MAKE_SHARED_LIB)
  3386         -    AC_SUBST(MAKE_STATIC_LIB)
  3387         -    AC_SUBST(MAKE_STUB_LIB)
  3388         -    AC_SUBST(RANLIB_STUB)
  3389         -    AC_SUBST(VC_MANIFEST_EMBED_DLL)
  3390         -    AC_SUBST(VC_MANIFEST_EMBED_EXE)
  3391         -])
  3392         -
  3393         -#------------------------------------------------------------------------
  3394         -# TEA_LIB_SPEC --
  3395         -#
  3396         -#	Compute the name of an existing object library located in libdir
  3397         -#	from the given base name and produce the appropriate linker flags.
  3398         -#
  3399         -# Arguments:
  3400         -#	basename	The base name of the library without version
  3401         -#			numbers, extensions, or "lib" prefixes.
  3402         -#	extra_dir	Extra directory in which to search for the
  3403         -#			library.  This location is used first, then
  3404         -#			$prefix/$exec-prefix, then some defaults.
  3405         -#
  3406         -# Requires:
  3407         -#	TEA_INIT and TEA_PREFIX must be called first.
  3408         -#
  3409         -# Results:
  3410         -#
  3411         -#	Defines the following vars:
  3412         -#		${basename}_LIB_NAME	The computed library name.
  3413         -#		${basename}_LIB_SPEC	The computed linker flags.
  3414         -#------------------------------------------------------------------------
  3415         -
  3416         -AC_DEFUN([TEA_LIB_SPEC], [
  3417         -    AC_MSG_CHECKING([for $1 library])
  3418         -
  3419         -    # Look in exec-prefix for the library (defined by TEA_PREFIX).
  3420         -
  3421         -    tea_lib_name_dir="${exec_prefix}/lib"
  3422         -
  3423         -    # Or in a user-specified location.
  3424         -
  3425         -    if test x"$2" != x ; then
  3426         -	tea_extra_lib_dir=$2
  3427         -    else
  3428         -	tea_extra_lib_dir=NONE
  3429         -    fi
  3430         -
  3431         -    for i in \
  3432         -	    `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
  3433         -	    `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
  3434         -	    `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
  3435         -	    `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
  3436         -	    `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
  3437         -	    `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
  3438         -	    `ls -dr /usr/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
  3439         -	    `ls -dr /usr/lib64/lib$1[[0-9]]* 2>/dev/null ` \
  3440         -	    `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
  3441         -	    `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
  3442         -	if test -f "$i" ; then
  3443         -	    tea_lib_name_dir=`dirname $i`
  3444         -	    $1_LIB_NAME=`basename $i`
  3445         -	    $1_LIB_PATH_NAME=$i
  3446         -	    break
  3447         -	fi
  3448         -    done
  3449         -
  3450         -    if test "${TEA_PLATFORM}" = "windows"; then
  3451         -	$1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
  3452         -    else
  3453         -	# Strip off the leading "lib" and trailing ".a" or ".so"
  3454         -
  3455         -	tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
  3456         -	$1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
  3457         -    fi
  3458         -
  3459         -    if test "x${$1_LIB_NAME}" = x ; then
  3460         -	AC_MSG_ERROR([not found])
  3461         -    else
  3462         -	AC_MSG_RESULT([${$1_LIB_SPEC}])
  3463         -    fi
  3464         -])
  3465         -
  3466         -#------------------------------------------------------------------------
  3467         -# TEA_PRIVATE_TCL_HEADERS --
  3468         -#
  3469         -#	Locate the private Tcl include files
  3470         -#
  3471         -# Arguments:
  3472         -#
  3473         -#	Requires:
  3474         -#		TCL_SRC_DIR	Assumes that TEA_LOAD_TCLCONFIG has
  3475         -#				already been called.
  3476         -#
  3477         -# Results:
  3478         -#
  3479         -#	Substitutes the following vars:
  3480         -#		TCL_TOP_DIR_NATIVE
  3481         -#		TCL_INCLUDES
  3482         -#------------------------------------------------------------------------
  3483         -
  3484         -AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
  3485         -    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
  3486         -    AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS])
  3487         -    AC_MSG_CHECKING([for Tcl private include files])
  3488         -
  3489         -    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
  3490         -    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
  3491         -
  3492         -    # Check to see if tcl<Plat>Port.h isn't already with the public headers
  3493         -    # Don't look for tclInt.h because that resides with tcl.h in the core
  3494         -    # sources, but the <plat>Port headers are in a different directory
  3495         -    if test "${TEA_PLATFORM}" = "windows" -a \
  3496         -	-f "${ac_cv_c_tclh}/tclWinPort.h"; then
  3497         -	result="private headers found with public headers"
  3498         -    elif test "${TEA_PLATFORM}" = "unix" -a \
  3499         -	-f "${ac_cv_c_tclh}/tclUnixPort.h"; then
  3500         -	result="private headers found with public headers"
  3501         -    else
  3502         -	TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
  3503         -	if test "${TEA_PLATFORM}" = "windows"; then
  3504         -	    TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
  3505         -	else
  3506         -	    TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
  3507         -	fi
  3508         -	# Overwrite the previous TCL_INCLUDES as this should capture both
  3509         -	# public and private headers in the same set.
  3510         -	# We want to ensure these are substituted so as not to require
  3511         -	# any *_NATIVE vars be defined in the Makefile
  3512         -	TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
  3513         -	if test "`uname -s`" = "Darwin"; then
  3514         -            # If Tcl was built as a framework, attempt to use
  3515         -            # the framework's Headers and PrivateHeaders directories
  3516         -            case ${TCL_DEFS} in
  3517         -	    	*TCL_FRAMEWORK*)
  3518         -		    if test -d "${TCL_BIN_DIR}/Headers" -a \
  3519         -			    -d "${TCL_BIN_DIR}/PrivateHeaders"; then
  3520         -			TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
  3521         -		    else
  3522         -			TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
  3523         -		    fi
  3524         -	            ;;
  3525         -	    esac
  3526         -	    result="Using ${TCL_INCLUDES}"
  3527         -	else
  3528         -	    if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
  3529         -		AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
  3530         -	    fi
  3531         -	    result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
  3532         -	fi
  3533         -    fi
  3534         -
  3535         -    AC_SUBST(TCL_TOP_DIR_NATIVE)
  3536         -
  3537         -    AC_SUBST(TCL_INCLUDES)
  3538         -    AC_MSG_RESULT([${result}])
  3539         -])
  3540         -
  3541         -#------------------------------------------------------------------------
  3542         -# TEA_PUBLIC_TCL_HEADERS --
  3543         -#
  3544         -#	Locate the installed public Tcl header files
  3545         -#
  3546         -# Arguments:
  3547         -#	None.
  3548         -#
  3549         -# Requires:
  3550         -#	CYGPATH must be set
  3551         -#
  3552         -# Results:
  3553         -#
  3554         -#	Adds a --with-tclinclude switch to configure.
  3555         -#	Result is cached.
  3556         -#
  3557         -#	Substitutes the following vars:
  3558         -#		TCL_INCLUDES
  3559         -#------------------------------------------------------------------------
  3560         -
  3561         -AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [
  3562         -    AC_MSG_CHECKING([for Tcl public headers])
  3563         -
  3564         -    AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory containing the public Tcl header files], with_tclinclude=${withval})
  3565         -
  3566         -    AC_CACHE_VAL(ac_cv_c_tclh, [
  3567         -	# Use the value from --with-tclinclude, if it was given
  3568         -
  3569         -	if test x"${with_tclinclude}" != x ; then
  3570         -	    if test -f "${with_tclinclude}/tcl.h" ; then
  3571         -		ac_cv_c_tclh=${with_tclinclude}
  3572         -	    else
  3573         -		AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
  3574         -	    fi
  3575         -	else
  3576         -	    list=""
  3577         -	    if test "`uname -s`" = "Darwin"; then
  3578         -		# If Tcl was built as a framework, attempt to use
  3579         -		# the framework's Headers directory
  3580         -		case ${TCL_DEFS} in
  3581         -		    *TCL_FRAMEWORK*)
  3582         -			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
  3583         -			;;
  3584         -		esac
  3585         -	    fi
  3586         -
  3587         -	    # Look in the source dir only if Tcl is not installed,
  3588         -	    # and in that situation, look there before installed locations.
  3589         -	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
  3590         -		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
  3591         -	    fi
  3592         -
  3593         -	    # Check order: pkg --prefix location, Tcl's --prefix location,
  3594         -	    # relative to directory of tclConfig.sh.
  3595         -
  3596         -	    eval "temp_includedir=${includedir}"
  3597         -	    list="$list \
  3598         -		`ls -d ${temp_includedir}        2>/dev/null` \
  3599         -		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
  3600         -		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
  3601         -	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
  3602         -		list="$list /usr/local/include /usr/include"
  3603         -		if test x"${TCL_INCLUDE_SPEC}" != x ; then
  3604         -		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
  3605         -		    list="$list `ls -d ${d} 2>/dev/null`"
  3606         -		fi
  3607         -	    fi
  3608         -	    for i in $list ; do
  3609         -		if test -f "$i/tcl.h" ; then
  3610         -		    ac_cv_c_tclh=$i
  3611         -		    break
  3612         -		fi
  3613         -	    done
  3614         -	fi
  3615         -    ])
  3616         -
  3617         -    # Print a message based on how we determined the include path
  3618         -
  3619         -    if test x"${ac_cv_c_tclh}" = x ; then
  3620         -	AC_MSG_ERROR([tcl.h not found.  Please specify its location with --with-tclinclude])
  3621         -    else
  3622         -	AC_MSG_RESULT([${ac_cv_c_tclh}])
  3623         -    fi
  3624         -
  3625         -    # Convert to a native path and substitute into the output files.
  3626         -
  3627         -    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
  3628         -
  3629         -    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
  3630         -
  3631         -    AC_SUBST(TCL_INCLUDES)
  3632         -])
  3633         -
  3634         -#------------------------------------------------------------------------
  3635         -# TEA_PRIVATE_TK_HEADERS --
  3636         -#
  3637         -#	Locate the private Tk include files
  3638         -#
  3639         -# Arguments:
  3640         -#
  3641         -#	Requires:
  3642         -#		TK_SRC_DIR	Assumes that TEA_LOAD_TKCONFIG has
  3643         -#				 already been called.
  3644         -#
  3645         -# Results:
  3646         -#
  3647         -#	Substitutes the following vars:
  3648         -#		TK_INCLUDES
  3649         -#------------------------------------------------------------------------
  3650         -
  3651         -AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
  3652         -    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
  3653         -    AC_REQUIRE([TEA_PUBLIC_TK_HEADERS])
  3654         -    AC_MSG_CHECKING([for Tk private include files])
  3655         -
  3656         -    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
  3657         -    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
  3658         -
  3659         -    # Check to see if tk<Plat>Port.h isn't already with the public headers
  3660         -    # Don't look for tkInt.h because that resides with tk.h in the core
  3661         -    # sources, but the <plat>Port headers are in a different directory
  3662         -    if test "${TEA_PLATFORM}" = "windows" -a \
  3663         -	-f "${ac_cv_c_tkh}/tkWinPort.h"; then
  3664         -	result="private headers found with public headers"
  3665         -    elif test "${TEA_PLATFORM}" = "unix" -a \
  3666         -	-f "${ac_cv_c_tkh}/tkUnixPort.h"; then
  3667         -	result="private headers found with public headers"
  3668         -    else
  3669         -	TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
  3670         -	TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
  3671         -	if test "${TEA_PLATFORM}" = "windows"; then
  3672         -	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
  3673         -	else
  3674         -	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
  3675         -	fi
  3676         -	# Overwrite the previous TK_INCLUDES as this should capture both
  3677         -	# public and private headers in the same set.
  3678         -	# We want to ensure these are substituted so as not to require
  3679         -	# any *_NATIVE vars be defined in the Makefile
  3680         -	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
  3681         -	# Detect and add ttk subdir
  3682         -	if test -d "${TK_SRC_DIR}/generic/ttk"; then
  3683         -	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
  3684         -	fi
  3685         -	if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
  3686         -	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
  3687         -	fi
  3688         -	if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
  3689         -	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
  3690         -	fi
  3691         -	if test "`uname -s`" = "Darwin"; then
  3692         -	    # If Tk was built as a framework, attempt to use
  3693         -	    # the framework's Headers and PrivateHeaders directories
  3694         -	    case ${TK_DEFS} in
  3695         -		*TK_FRAMEWORK*)
  3696         -			if test -d "${TK_BIN_DIR}/Headers" -a \
  3697         -				-d "${TK_BIN_DIR}/PrivateHeaders"; then
  3698         -			    TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
  3699         -			else
  3700         -			    TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
  3701         -			fi
  3702         -			;;
  3703         -	    esac
  3704         -	    result="Using ${TK_INCLUDES}"
  3705         -	else
  3706         -	    if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
  3707         -	       AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
  3708         -	    fi
  3709         -	    result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
  3710         -	fi
  3711         -    fi
  3712         -
  3713         -    AC_SUBST(TK_TOP_DIR_NATIVE)
  3714         -    AC_SUBST(TK_XLIB_DIR_NATIVE)
  3715         -
  3716         -    AC_SUBST(TK_INCLUDES)
  3717         -    AC_MSG_RESULT([${result}])
  3718         -])
  3719         -
  3720         -#------------------------------------------------------------------------
  3721         -# TEA_PUBLIC_TK_HEADERS --
  3722         -#
  3723         -#	Locate the installed public Tk header files
  3724         -#
  3725         -# Arguments:
  3726         -#	None.
  3727         -#
  3728         -# Requires:
  3729         -#	CYGPATH must be set
  3730         -#
  3731         -# Results:
  3732         -#
  3733         -#	Adds a --with-tkinclude switch to configure.
  3734         -#	Result is cached.
  3735         -#
  3736         -#	Substitutes the following vars:
  3737         -#		TK_INCLUDES
  3738         -#------------------------------------------------------------------------
  3739         -
  3740         -AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [
  3741         -    AC_MSG_CHECKING([for Tk public headers])
  3742         -
  3743         -    AC_ARG_WITH(tkinclude, [  --with-tkinclude        directory containing the public Tk header files], with_tkinclude=${withval})
  3744         -
  3745         -    AC_CACHE_VAL(ac_cv_c_tkh, [
  3746         -	# Use the value from --with-tkinclude, if it was given
  3747         -
  3748         -	if test x"${with_tkinclude}" != x ; then
  3749         -	    if test -f "${with_tkinclude}/tk.h" ; then
  3750         -		ac_cv_c_tkh=${with_tkinclude}
  3751         -	    else
  3752         -		AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
  3753         -	    fi
  3754         -	else
  3755         -	    list=""
  3756         -	    if test "`uname -s`" = "Darwin"; then
  3757         -		# If Tk was built as a framework, attempt to use
  3758         -		# the framework's Headers directory.
  3759         -		case ${TK_DEFS} in
  3760         -		    *TK_FRAMEWORK*)
  3761         -			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
  3762         -			;;
  3763         -		esac
  3764         -	    fi
  3765         -
  3766         -	    # Look in the source dir only if Tk is not installed,
  3767         -	    # and in that situation, look there before installed locations.
  3768         -	    if test -f "${TK_BIN_DIR}/Makefile" ; then
  3769         -		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
  3770         -	    fi
  3771         -
  3772         -	    # Check order: pkg --prefix location, Tk's --prefix location,
  3773         -	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
  3774         -	    # relative to directory of tclConfig.sh.
  3775         -
  3776         -	    eval "temp_includedir=${includedir}"
  3777         -	    list="$list \
  3778         -		`ls -d ${temp_includedir}        2>/dev/null` \
  3779         -		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
  3780         -		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
  3781         -		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
  3782         -		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
  3783         -	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
  3784         -		list="$list /usr/local/include /usr/include"
  3785         -		if test x"${TK_INCLUDE_SPEC}" != x ; then
  3786         -		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
  3787         -		    list="$list `ls -d ${d} 2>/dev/null`"
  3788         -		fi
  3789         -	    fi
  3790         -	    for i in $list ; do
  3791         -		if test -f "$i/tk.h" ; then
  3792         -		    ac_cv_c_tkh=$i
  3793         -		    break
  3794         -		fi
  3795         -	    done
  3796         -	fi
  3797         -    ])
  3798         -
  3799         -    # Print a message based on how we determined the include path
  3800         -
  3801         -    if test x"${ac_cv_c_tkh}" = x ; then
  3802         -	AC_MSG_ERROR([tk.h not found.  Please specify its location with --with-tkinclude])
  3803         -    else
  3804         -	AC_MSG_RESULT([${ac_cv_c_tkh}])
  3805         -    fi
  3806         -
  3807         -    # Convert to a native path and substitute into the output files.
  3808         -
  3809         -    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
  3810         -
  3811         -    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
  3812         -
  3813         -    AC_SUBST(TK_INCLUDES)
  3814         -
  3815         -    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
  3816         -	# On Windows and Aqua, we need the X compat headers
  3817         -	AC_MSG_CHECKING([for X11 header files])
  3818         -	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
  3819         -	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
  3820         -	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
  3821         -	    AC_SUBST(TK_XINCLUDES)
  3822         -	fi
  3823         -	AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}])
  3824         -    fi
  3825         -])
  3826         -
  3827         -#------------------------------------------------------------------------
  3828         -# TEA_PATH_CONFIG --
  3829         -#
  3830         -#	Locate the ${1}Config.sh file and perform a sanity check on
  3831         -#	the ${1} compile flags.  These are used by packages like
  3832         -#	[incr Tk] that load *Config.sh files from more than Tcl and Tk.
  3833         -#
  3834         -# Arguments:
  3835         -#	none
  3836         -#
  3837         -# Results:
  3838         -#
  3839         -#	Adds the following arguments to configure:
  3840         -#		--with-$1=...
  3841         -#
  3842         -#	Defines the following vars:
  3843         -#		$1_BIN_DIR	Full path to the directory containing
  3844         -#				the $1Config.sh file
  3845         -#------------------------------------------------------------------------
  3846         -
  3847         -AC_DEFUN([TEA_PATH_CONFIG], [
  3848         -    #
  3849         -    # Ok, lets find the $1 configuration
  3850         -    # First, look for one uninstalled.
  3851         -    # the alternative search directory is invoked by --with-$1
  3852         -    #
  3853         -
  3854         -    if test x"${no_$1}" = x ; then
  3855         -	# we reset no_$1 in case something fails here
  3856         -	no_$1=true
  3857         -	AC_ARG_WITH($1, [  --with-$1              directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
  3858         -	AC_MSG_CHECKING([for $1 configuration])
  3859         -	AC_CACHE_VAL(ac_cv_c_$1config,[
  3860         -
  3861         -	    # First check to see if --with-$1 was specified.
  3862         -	    if test x"${with_$1config}" != x ; then
  3863         -		case ${with_$1config} in
  3864         -		    */$1Config.sh )
  3865         -			if test -f ${with_$1config}; then
  3866         -			    AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself])
  3867         -			    with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'`
  3868         -			fi;;
  3869         -		esac
  3870         -		if test -f "${with_$1config}/$1Config.sh" ; then
  3871         -		    ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
  3872         -		else
  3873         -		    AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
  3874         -		fi
  3875         -	    fi
  3876         -
  3877         -	    # then check for a private $1 installation
  3878         -	    if test x"${ac_cv_c_$1config}" = x ; then
  3879         -		for i in \
  3880         -			../$1 \
  3881         -			`ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
  3882         -			`ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
  3883         -			`ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \
  3884         -			`ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
  3885         -			../../$1 \
  3886         -			`ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
  3887         -			`ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
  3888         -			`ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
  3889         -			`ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
  3890         -			../../../$1 \
  3891         -			`ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
  3892         -			`ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
  3893         -			`ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
  3894         -			`ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
  3895         -			${srcdir}/../$1 \
  3896         -			`ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
  3897         -			`ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
  3898         -			`ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \
  3899         -			`ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
  3900         -			; do
  3901         -		    if test -f "$i/$1Config.sh" ; then
  3902         -			ac_cv_c_$1config=`(cd $i; pwd)`
  3903         -			break
  3904         -		    fi
  3905         -		    if test -f "$i/unix/$1Config.sh" ; then
  3906         -			ac_cv_c_$1config=`(cd $i/unix; pwd)`
  3907         -			break
  3908         -		    fi
  3909         -		done
  3910         -	    fi
  3911         -
  3912         -	    # check in a few common install locations
  3913         -	    if test x"${ac_cv_c_$1config}" = x ; then
  3914         -		for i in `ls -d ${libdir} 2>/dev/null` \
  3915         -			`ls -d ${exec_prefix}/lib 2>/dev/null` \
  3916         -			`ls -d ${prefix}/lib 2>/dev/null` \
  3917         -			`ls -d /usr/local/lib 2>/dev/null` \
  3918         -			`ls -d /usr/contrib/lib 2>/dev/null` \
  3919         -			`ls -d /usr/lib 2>/dev/null` \
  3920         -			`ls -d /usr/lib64 2>/dev/null` \
  3921         -			; do
  3922         -		    if test -f "$i/$1Config.sh" ; then
  3923         -			ac_cv_c_$1config=`(cd $i; pwd)`
  3924         -			break
  3925         -		    fi
  3926         -		done
  3927         -	    fi
  3928         -	])
  3929         -
  3930         -	if test x"${ac_cv_c_$1config}" = x ; then
  3931         -	    $1_BIN_DIR="# no $1 configs found"
  3932         -	    AC_MSG_WARN([Cannot find $1 configuration definitions])
  3933         -	    exit 0
  3934         -	else
  3935         -	    no_$1=
  3936         -	    $1_BIN_DIR=${ac_cv_c_$1config}
  3937         -	    AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
  3938         -	fi
  3939         -    fi
  3940         -])
  3941         -
  3942         -#------------------------------------------------------------------------
  3943         -# TEA_LOAD_CONFIG --
  3944         -#
  3945         -#	Load the $1Config.sh file
  3946         -#
  3947         -# Arguments:
  3948         -#
  3949         -#	Requires the following vars to be set:
  3950         -#		$1_BIN_DIR
  3951         -#
  3952         -# Results:
  3953         -#
  3954         -#	Substitutes the following vars:
  3955         -#		$1_SRC_DIR
  3956         -#		$1_LIB_FILE
  3957         -#		$1_LIB_SPEC
  3958         -#------------------------------------------------------------------------
  3959         -
  3960         -AC_DEFUN([TEA_LOAD_CONFIG], [
  3961         -    AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
  3962         -
  3963         -    if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
  3964         -        AC_MSG_RESULT([loading])
  3965         -	. "${$1_BIN_DIR}/$1Config.sh"
  3966         -    else
  3967         -        AC_MSG_RESULT([file not found])
  3968         -    fi
  3969         -
  3970         -    #
  3971         -    # If the $1_BIN_DIR is the build directory (not the install directory),
  3972         -    # then set the common variable name to the value of the build variables.
  3973         -    # For example, the variable $1_LIB_SPEC will be set to the value
  3974         -    # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
  3975         -    # instead of $1_BUILD_LIB_SPEC since it will work with both an
  3976         -    # installed and uninstalled version of Tcl.
  3977         -    #
  3978         -
  3979         -    if test -f "${$1_BIN_DIR}/Makefile" ; then
  3980         -	AC_MSG_WARN([Found Makefile - using build library specs for $1])
  3981         -        $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
  3982         -        $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
  3983         -        $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
  3984         -        $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC}
  3985         -        $1_LIBRARY_PATH=${$1_LIBRARY_PATH}
  3986         -    fi
  3987         -
  3988         -    AC_SUBST($1_VERSION)
  3989         -    AC_SUBST($1_BIN_DIR)
  3990         -    AC_SUBST($1_SRC_DIR)
  3991         -
  3992         -    AC_SUBST($1_LIB_FILE)
  3993         -    AC_SUBST($1_LIB_SPEC)
  3994         -
  3995         -    AC_SUBST($1_STUB_LIB_FILE)
  3996         -    AC_SUBST($1_STUB_LIB_SPEC)
  3997         -    AC_SUBST($1_STUB_LIB_PATH)
  3998         -
  3999         -    # Allow the caller to prevent this auto-check by specifying any 2nd arg
  4000         -    AS_IF([test "x$2" = x], [
  4001         -	# Check both upper and lower-case variants
  4002         -	# If a dev wanted non-stubs libs, this function could take an option
  4003         -	# to not use _STUB in the paths below
  4004         -	AS_IF([test "x${$1_STUB_LIB_SPEC}" = x],
  4005         -	    [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
  4006         -	    [TEA_LOAD_CONFIG_LIB($1_STUB)])
  4007         -    ])
  4008         -])
  4009         -
  4010         -#------------------------------------------------------------------------
  4011         -# TEA_LOAD_CONFIG_LIB --
  4012         -#
  4013         -#	Helper function to load correct library from another extension's
  4014         -#	${PACKAGE}Config.sh.
  4015         -#
  4016         -# Results:
  4017         -#	Adds to LIBS the appropriate extension library
  4018         -#------------------------------------------------------------------------
  4019         -AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
  4020         -    AC_MSG_CHECKING([For $1 library for LIBS])
  4021         -    # This simplifies the use of stub libraries by automatically adding
  4022         -    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
  4023         -    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
  4024         -    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
  4025         -    if test "x${$1_LIB_SPEC}" != "x" ; then
  4026         -	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
  4027         -	    TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"])
  4028         -	    AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}])
  4029         -	else
  4030         -	    TEA_ADD_LIBS([${$1_LIB_SPEC}])
  4031         -	    AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}])
  4032         -	fi
  4033         -    else
  4034         -	AC_MSG_RESULT([file not found])
  4035         -    fi
  4036         -])
  4037         -
  4038         -#------------------------------------------------------------------------
  4039         -# TEA_EXPORT_CONFIG --
  4040         -#
  4041         -#	Define the data to insert into the ${PACKAGE}Config.sh file
  4042         -#
  4043         -# Arguments:
  4044         -#
  4045         -#	Requires the following vars to be set:
  4046         -#		$1
  4047         -#
  4048         -# Results:
  4049         -#	Substitutes the following vars:
  4050         -#------------------------------------------------------------------------
  4051         -
  4052         -AC_DEFUN([TEA_EXPORT_CONFIG], [
  4053         -    #--------------------------------------------------------------------
  4054         -    # These are for $1Config.sh
  4055         -    #--------------------------------------------------------------------
  4056         -
  4057         -    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
  4058         -    eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
  4059         -    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
  4060         -	eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
  4061         -	eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
  4062         -    else
  4063         -	eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
  4064         -	eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
  4065         -    fi
  4066         -    $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
  4067         -    $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
  4068         -    $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
  4069         -    $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
  4070         -    $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
  4071         -    $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
  4072         -
  4073         -    AC_SUBST($1_BUILD_LIB_SPEC)
  4074         -    AC_SUBST($1_LIB_SPEC)
  4075         -    AC_SUBST($1_BUILD_STUB_LIB_SPEC)
  4076         -    AC_SUBST($1_STUB_LIB_SPEC)
  4077         -    AC_SUBST($1_BUILD_STUB_LIB_PATH)
  4078         -    AC_SUBST($1_STUB_LIB_PATH)
  4079         -
  4080         -    AC_SUBST(MAJOR_VERSION)
  4081         -    AC_SUBST(MINOR_VERSION)
  4082         -    AC_SUBST(PATCHLEVEL)
  4083         -])
  4084         -
  4085         -
  4086         -#------------------------------------------------------------------------
  4087         -# TEA_PATH_CELIB --
  4088         -#
  4089         -#	Locate Keuchel's celib emulation layer for targeting Win/CE
  4090         -#
  4091         -# Arguments:
  4092         -#	none
  4093         -#
  4094         -# Results:
  4095         -#
  4096         -#	Adds the following arguments to configure:
  4097         -#		--with-celib=...
  4098         -#
  4099         -#	Defines the following vars:
  4100         -#		CELIB_DIR	Full path to the directory containing
  4101         -#				the include and platform lib files
  4102         -#------------------------------------------------------------------------
  4103         -
  4104         -AC_DEFUN([TEA_PATH_CELIB], [
  4105         -    # First, look for one uninstalled.
  4106         -    # the alternative search directory is invoked by --with-celib
  4107         -
  4108         -    if test x"${no_celib}" = x ; then
  4109         -	# we reset no_celib in case something fails here
  4110         -	no_celib=true
  4111         -	AC_ARG_WITH(celib,[  --with-celib=DIR        use Windows/CE support library from DIR], with_celibconfig=${withval})
  4112         -	AC_MSG_CHECKING([for Windows/CE celib directory])
  4113         -	AC_CACHE_VAL(ac_cv_c_celibconfig,[
  4114         -	    # First check to see if --with-celibconfig was specified.
  4115         -	    if test x"${with_celibconfig}" != x ; then
  4116         -		if test -d "${with_celibconfig}/inc" ; then
  4117         -		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
  4118         -		else
  4119         -		    AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory])
  4120         -		fi
  4121         -	    fi
  4122         -
  4123         -	    # then check for a celib library
  4124         -	    if test x"${ac_cv_c_celibconfig}" = x ; then
  4125         -		for i in \
  4126         -			../celib-palm-3.0 \
  4127         -			../celib \
  4128         -			../../celib-palm-3.0 \
  4129         -			../../celib \
  4130         -			`ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \
  4131         -			${srcdir}/../celib-palm-3.0 \
  4132         -			${srcdir}/../celib \
  4133         -			`ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \
  4134         -			; do
  4135         -		    if test -d "$i/inc" ; then
  4136         -			ac_cv_c_celibconfig=`(cd $i; pwd)`
  4137         -			break
  4138         -		    fi
  4139         -		done
  4140         -	    fi
  4141         -	])
  4142         -	if test x"${ac_cv_c_celibconfig}" = x ; then
  4143         -	    AC_MSG_ERROR([Cannot find celib support library directory])
  4144         -	else
  4145         -	    no_celib=
  4146         -	    CELIB_DIR=${ac_cv_c_celibconfig}
  4147         -	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
  4148         -	    AC_MSG_RESULT([found $CELIB_DIR])
  4149         -	fi
  4150         -    fi
  4151         -])
  4152         -
  4153         -
  4154         -# Local Variables:
  4155         -# mode: autoconf
  4156         -# End: