Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tea-update Excluding Merge-Ins
This is equivalent to a diff from 90dd28722d to 21aeb4698d
2013-07-21
| ||
16:36 | Updated TEA build system of tdom itself and the extensions (merged from branch "tea-update"). check-in: 67628d28e2 user: rolf tags: trunk | |
16:32 | Made the example extension "example" work again. Closed-Leaf check-in: 21aeb4698d user: rolf tags: tea-update | |
15:25 | Build of working tcldomsh finally restored. check-in: a95bf4cf89 user: rolf tags: tea-update | |
2013-06-06
| ||
01:49 | Updated TEA for tdom core. tcldomsh seg fault makes that retarded. check-in: f5d136bd2f user: rolf tags: tea-update | |
2013-05-16
| ||
00:03 | Update to expat 2.1.0. check-in: 90dd28722d user: rolf tags: trunk | |
2012-05-17
| ||
21:21 | Updated check-in: a842228559 user: rolf@point.pointsman.de tags: trunk | |
Changes to Makefile.in.
1 -# Makefile.in -- 1 +# Makefile.in -- 2 2 # 3 -# This file is a Makefile for Sample TEA Extension. If it has the name 3 +# This file is a Makefile for the tdom TEA Extension. If it has the name 4 4 # "Makefile.in" then it is a template for a Makefile; to generate the 5 5 # actual Makefile, run "./configure", which is a configuration script 6 6 # generated by the "autoconf" program (constructs like "@foo@" will get 7 7 # replaced in the actual Makefile. 8 8 # 9 +# Copyright (c) 2013 Rolf Ade 10 +# 11 +# Derived from work 9 12 # Copyright (c) 1999 Scriptics Corporation. 10 13 # Copyright (c) 2002-2005 ActiveState Corporation. 11 14 # 12 15 # See the file "license.terms" for information on usage and redistribution 13 16 # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 14 -# 15 -# RCS: @(#) $Id$ 16 17 17 18 #======================================================================== 18 19 # Add additional lines to handle any additional AC_SUBST cases that 19 20 # have been added in a customized configure script. 20 21 #======================================================================== 21 22 22 23 AOL_DIR = @AOL_DIR@ ................................................................................ 79 80 80 81 srcdir = @srcdir@ 81 82 prefix = @prefix@ 82 83 exec_prefix = @exec_prefix@ 83 84 84 85 bindir = @bindir@ 85 86 libdir = @libdir@ 87 +includedir = @includedir@ 88 +datarootdir = @datarootdir@ 86 89 datadir = @datadir@ 87 90 mandir = @mandir@ 88 -includedir = @includedir@ 89 91 90 92 DESTDIR = 91 93 92 94 PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 93 95 pkgdatadir = $(datadir)/$(PKG_DIR) 94 96 pkglibdir = $(libdir)/$(PKG_DIR) 95 97 pkgincludedir = $(includedir)/$(PKG_DIR) 96 98 97 99 top_builddir = . 98 100 99 -INSTALL = @INSTALL@ 100 -INSTALL_PROGRAM = @INSTALL_PROGRAM@ 101 -INSTALL_DATA = @INSTALL_DATA@ 102 -INSTALL_SCRIPT = @INSTALL_SCRIPT@ 101 +INSTALL_OPTIONS = 102 +INSTALL = $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS} 103 +INSTALL_DATA_DIR = ${INSTALL} -d -m 755 104 +INSTALL_PROGRAM = ${INSTALL} -m 555 105 +INSTALL_DATA = ${INSTALL} -m 444 106 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} 107 +INSTALL_LIBRARY = ${INSTALL_DATA} 103 108 104 109 PACKAGE_NAME = @PACKAGE_NAME@ 105 110 PACKAGE_VERSION = @PACKAGE_VERSION@ 106 111 CC = @CC@ 107 112 CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 108 113 CFLAGS_WARNING = @CFLAGS_WARNING@ 109 -CLEANFILES = @CLEANFILES@ 110 114 EXEEXT = @EXEEXT@ 111 115 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 112 116 MAKE_LIB = @MAKE_LIB@ 113 117 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 114 118 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 115 119 MAKE_STUB_LIB = @MAKE_STUB_LIB@ 116 120 OBJEXT = @OBJEXT@ ................................................................................ 121 125 SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 122 126 STLIB_LD = @STLIB_LD@ 123 127 #TCL_DEFS = @TCL_DEFS@ 124 128 TCL_BIN_DIR = @TCL_BIN_DIR@ 125 129 TCL_SRC_DIR = @TCL_SRC_DIR@ 126 130 #TK_BIN_DIR = @TK_BIN_DIR@ 127 131 #TK_SRC_DIR = @TK_SRC_DIR@ 132 + 133 +MATH_LIBS = @MATH_LIBS@ 128 134 129 135 # Not used, but retained for reference of what libs Tcl required 130 136 #TCL_LIBS = @TCL_LIBS@ 137 + 138 +TDOMSHELL_LIBS = @TCL_LIBS@ @SHLIB_LD_LIBS@ 131 139 132 140 #======================================================================== 133 141 # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our 134 142 # package without installing. The other environment variables allow us 135 143 # to test against an uninstalled Tcl. Add special env vars that you 136 144 # require for testing here (like TCLX_LIBRARY). 137 145 #======================================================================== 138 146 139 147 EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) 140 148 #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR) 141 149 TCLLIBPATH = $(top_builddir) 142 -TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ 143 - @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 150 +TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` 151 +PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 144 152 PATH="$(EXTRA_PATH):$(PATH)" \ 145 153 TCLLIBPATH="$(TCLLIBPATH)" 146 -# TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` 147 154 148 155 TCLSH_PROG = @TCLSH_PROG@ 149 -TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) 156 +TCLSH = $(PKG_ENV) $(TCLSH_ENV) $(TCLSH_PROG) 150 157 158 +#WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` 151 159 #WISH_PROG = @WISH_PROG@ 152 -#WISH = $(TCLSH_ENV) $(WISH_PROG) 153 - 160 +#WISH = $(PKG_ENV) $(TCLSH_ENV) $(WISH_ENV) $(WISH_PROG) 154 161 155 162 SHARED_BUILD = @SHARED_BUILD@ 156 163 157 164 INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ 158 165 #INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ 159 166 160 167 PKG_CFLAGS = @PKG_CFLAGS@ ................................................................................ 163 170 # must make sure that configure.in checks for the necessary components 164 171 # that your library may use. TCL_DEFS can actually be a problem if 165 172 # you do not compile with a similar machine setup as the Tcl core was 166 173 # compiled with. 167 174 #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) 168 175 DEFS = @DEFS@ $(PKG_CFLAGS) 169 176 170 -CONFIG_CLEAN_FILES = Makefile tdomConfig.sh tdom.tcl 177 +# Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile 178 +CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl 179 +CLEANFILES = @CLEANFILES@ 171 180 172 181 CPPFLAGS = @CPPFLAGS@ 173 182 LIBS = @PKG_LIBS@ @LIBS@ 174 183 AR = @AR@ 175 184 CFLAGS = @CFLAGS@ 176 185 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 186 + 187 +.SUFFIXES: .c .$(OBJEXT) 177 188 178 189 #======================================================================== 179 190 # Start of user-definable TARGETS section 180 191 #======================================================================== 181 192 182 193 #======================================================================== 183 194 # TEA TARGETS. Please note that the "libraries:" target refers to platform 184 -# independent files, and the "binaries:" target inclues executable programs and 195 +# independent files, and the "binaries:" target includes executable programs and 185 196 # platform-dependent libraries. Modify these targets so that they install 186 197 # the various pieces of your package. The make and install rules 187 198 # for the BINARIES that you specified above have already been done. 188 199 #======================================================================== 189 200 190 201 all: binaries libraries doc 191 202 192 203 #======================================================================== 193 204 # TDOM enabled shell is build as an extra directive, since non TEA. 194 205 #======================================================================== 195 206 196 -$(TDOMSHELL): $(PKG_OBJECTS) 207 +$(TDOMSHELL): $(PKG_OBJECTS) $(srcdir)/unix/tclAppInit.c 197 208 $(COMPILE) -c `@CYGPATH@ $(srcdir)/unix/tclAppInit.c` 198 209 $(CC) @LDFLAGS@ -o $@ tclAppInit.$(OBJEXT) $(PKG_OBJECTS) \ 199 - $(TCL_LIBS) $(TCL_LIB_SPEC) $(LIBS) $(TDOM_LD_SEARCH_FLAGS) 210 + $(TCL_LIB_SPEC) $(TDOMSHELL_LIBS) $(TDOM_LD_SEARCH_FLAGS) 200 211 201 212 #======================================================================== 202 213 # The binaries target builds executable programs, Windows .dll's, unix 203 214 # shared/static libraries, and any other platform-dependent files. 204 215 # The list of targets to build for "binaries:" is specified at the top 205 216 # of the Makefile, in the "BINARIES" variable. 206 217 #======================================================================== 207 218 208 219 binaries: $(BINARIES) pkgIndex.tcl-hand 209 220 210 221 libraries: 211 - 212 222 213 223 #======================================================================== 214 224 # Your doc target should differentiate from doc builds (by the developer) 215 225 # and doc installs (see install-doc), which just install the docs on the 216 226 # end user machine when building from source. 217 227 #======================================================================== 218 228 ................................................................................ 224 234 225 235 #======================================================================== 226 236 # This rule installs platform-independent files, such as header files. 227 237 # The list=...; for p in $$list handles the empty list case x-platform. 228 238 #======================================================================== 229 239 230 240 install-libraries: libraries 231 - @mkdir -p $(DESTDIR)$(includedir) 241 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir) 232 242 @echo "Installing header files in $(DESTDIR)$(includedir)" 233 243 @list='$(PKG_HEADERS)'; for i in $$list; do \ 234 244 echo "Installing $(srcdir)/$$i" ; \ 235 245 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 236 246 done; 237 247 238 248 #======================================================================== 239 249 # Install documentation. Unix manpages should go in the $(mandir) 240 250 # directory. 241 251 #======================================================================== 242 252 243 253 install-doc: doc 244 - @mkdir -p $(DESTDIR)$(mandir)/mann 254 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann 245 255 @echo "Installing documentation in $(DESTDIR)$(mandir)" 246 256 @list='$(srcdir)/doc/*.n'; for i in $$list; do \ 247 257 echo "Installing $$i"; \ 248 - rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ 249 258 $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ 250 259 done 251 260 252 261 test: binaries libraries 253 262 @cp $(srcdir)/lib/tdom.tcl . 254 263 $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 255 264 256 265 shell: binaries libraries 257 266 @$(TCLSH) $(SCRIPT) 258 267 259 268 gdb: 260 269 $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) 270 + 271 +VALGRINDARGS = --tool=memcheck --num-callers=20 --leak-resolution=high \ 272 + --leak-check=yes --show-reachable=yes -v 273 + 274 +valgrind: binaries libraries 275 + $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) \ 276 + `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 277 + 278 +valgrindshell: binaries libraries 279 + $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT) 261 280 262 281 depend: 263 282 264 283 #======================================================================== 265 284 # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 266 285 # mentioned above. That will ensure that this target is built when you 267 286 # run "make binaries". ................................................................................ 292 311 # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ 293 312 # 294 313 # Setting the VPATH variable to a list of paths will cause the makefile 295 314 # to look into these paths when resolving .c to .obj dependencies. 296 315 # As necessary, add $(srcdir):$(srcdir)/compat:.... 297 316 #======================================================================== 298 317 299 -VPATH = $(srcdir):$(srcdir)/expat:$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win 318 +VPATH = $(srcdir):$(srcdir)/expat:$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win:$(srcdir)/macosx 300 319 301 320 .c.@OBJEXT@: 302 321 $(COMPILE) -c `@CYGPATH@ $<` -o $@ 303 322 304 323 #======================================================================== 305 324 # Create the pkgIndex.tcl file. 306 325 #======================================================================== ................................................................................ 313 332 314 333 #======================================================================== 315 334 # Distribution creation 316 335 # You may need to tweak this target to make it work correctly. 317 336 #======================================================================== 318 337 319 338 #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar 320 -COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 339 +COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 321 340 DIST_ROOT = /tmp/dist 322 341 DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) 323 342 324 343 dist-clean: 325 344 rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 326 345 327 346 dist: dist-clean ................................................................................ 359 378 #======================================================================== 360 379 361 380 #======================================================================== 362 381 # Don't modify the file to clean here. Instead, set the "CLEANFILES" 363 382 # variable in configure.in 364 383 #======================================================================== 365 384 366 -clean: 385 +clean: 367 386 -test -z "$(BINARIES)" || rm -f $(BINARIES) 368 387 -rm -f *.$(OBJEXT) core *.core 369 388 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 370 389 371 390 distclean: clean 372 391 -rm -f *.tab.c 373 392 -rm -f $(CONFIG_CLEAN_FILES) ................................................................................ 381 400 # In addition, this will generate the pkgIndex.tcl 382 401 # file in the install location (assuming it can find a usable tclsh shell) 383 402 # 384 403 # You should not have to modify this target. 385 404 #======================================================================== 386 405 387 406 install-lib-binaries: binaries 388 - @mkdir -p $(DESTDIR)$(pkglibdir) 407 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) 389 408 @list='$(lib_BINARIES)'; for p in $$list; do \ 390 409 if test -f $$p; then \ 391 - echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 392 - $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 410 + echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 411 + $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 393 412 stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ 394 413 if test "x$$stub" = "xstub"; then \ 395 414 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ 396 415 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ 397 416 else \ 398 417 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 399 418 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ ................................................................................ 415 434 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ 416 435 fi; \ 417 436 done 418 437 @if test "x$(SHARED_BUILD)" = "x1"; then \ 419 438 echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ 420 439 $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ 421 440 fi 422 - $(INSTALL_DATA) tdomConfig.sh $(DESTDIR)$(libdir) 423 441 424 442 #======================================================================== 425 443 # Install binary executables (e.g. .exe files and dependent .dll files) 426 444 # This is for files that must go in the bin directory (located next to 427 445 # wish and tclsh), like dependent .dll files on Windows. 428 446 # 429 447 # You should not have to modify this target, except to define bin_BINARIES 430 448 # above if necessary. 431 449 #======================================================================== 432 450 433 451 install-bin-binaries: binaries 434 - @mkdir -p $(DESTDIR)$(bindir) 452 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(bindir) 435 453 @list='$(bin_BINARIES)'; for p in $$list; do \ 436 454 if test -f $$p; then \ 437 455 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 438 456 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 439 457 fi; \ 440 458 done 441 459 442 -.SUFFIXES: .c .$(OBJEXT) 443 - 444 460 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 445 461 cd $(top_builddir) \ 446 462 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 447 463 448 464 uninstall-binaries: 449 465 list='$(lib_BINARIES)'; for p in $$list; do \ 450 466 rm -f $(DESTDIR)$(pkglibdir)/$$p; \
Changes to README.
57 57 make 58 58 make test 59 59 make install 60 60 61 61 Alternatively, you can build the tDOM package in just about any 62 62 directory elsewhere on the fileystem (since TEA-compatible). 63 63 64 - NOTE: Be sure to have the CC=gcc defined if you're using GCC. 65 - 66 64 You might also want to do "../configure --help" to get list of all 67 65 supported options of the configure script. In the "unix" directory 68 66 there is a "CONFIG" file containing some examples on how to invoke 69 67 the "configure" script for some common cases. You can peek 70 68 there. This file also includes a short description of the tDOM 71 69 specific configure options. 72 70 73 71 Since tDOM is TEA-compatible you should be able to build it using 74 72 the MinGW build environment for Windows. There is also the MSVC 75 73 nmake file so you can compile the package with Microsoft tools. 76 74 77 75 The compile process will build the tDOM shared library suitable for 78 76 loading into the Tcl shell using standard "package require" mechanism. 79 - Optionally the make process can also generate the "tcldomsh" 80 - executable shell with tDOM functionality built-in. You can use this 81 - shell as any other Tcl shell. To do this, you have to: 82 - 83 - make tcldomsh 84 - 85 - Note, however, that this step is optional. 86 - 87 - 88 - Note for Tcl 8.0.5 users: 89 - ------------------------- 90 - 91 - Per default, this release of tDOM links against Tcl stubs 92 - library. To build it against Tcl8.0.5, use the configure-tcl8.0.5 93 - script to generate the Makefile. 94 - 95 - If you want to recreate the configure script for building against 96 - Tcl8.0.5 please edit the "configure.in" file in this directory, 97 - comment-out the AC_DEFINE(USE_TCL_STUBS) directive and run 98 - autoconf. Please be sure to use autoconf with version 2.59. 99 - 100 - 101 -PLATFORMS 102 - HP-UX-10.20 (both ansi cc and gcc) 103 - HP-UX-9.x 104 - Linux 2.2.5 (egcs 2.91.66, SuSE 6.1) 105 - Solaris 2.5.1+ (both gcc and SunWorks compilers) 106 - W2K (VC++ 6.0) 107 - Mac OS X 10.2.6 (Apple's gcc) 108 - 109 - Other machines and OS's are not tested but should work too. 110 77 111 78 Have fun! 112 79 113 80 - EOF -
Changes to configure.
more than 10,000 changes
Changes to configure.in.
1 1 #!/bin/bash -norc 2 2 dnl This file is an input file used by the GNU "autoconf" program to 3 3 dnl generate the file "configure", which is run during Tcl installation 4 4 dnl to configure the system for the local environment. 5 -# 6 -# RCS: @(#) $Id$ 7 5 8 6 #----------------------------------------------------------------------- 9 7 # Sample configure.in for Tcl Extensions. The only places you should 10 8 # need to modify this file are marked by the string __CHANGE__ 11 9 #----------------------------------------------------------------------- 12 10 13 11 #----------------------------------------------------------------------- 14 12 # __CHANGE__ 15 13 # Set your package name and version numbers here. 16 14 # 17 15 # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION 18 16 # set as provided. These will also be added as -D defs in your Makefile 19 17 # so you can encode the package version directly into the source files. 18 +# This will also define a special symbol for Windows (BUILD_sample in 19 +# this case) so that we create the export library with the dll. 20 20 #----------------------------------------------------------------------- 21 21 22 22 AC_INIT([tdom], [0.8.3]) 23 23 24 24 #-------------------------------------------------------------------- 25 25 # Call TEA_INIT as the first TEA_ macro to set up initial vars. 26 26 # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" 27 27 # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. 28 28 #-------------------------------------------------------------------- 29 29 30 -TEA_INIT([3.6]) 30 +TEA_INIT([3.9]) 31 31 32 32 AC_CONFIG_AUX_DIR(tclconfig) 33 33 34 34 #-------------------------------------------------------------------- 35 35 # Load the tclConfig.sh file 36 36 #-------------------------------------------------------------------- 37 37 ................................................................................ 51 51 #----------------------------------------------------------------------- 52 52 53 53 TEA_PREFIX 54 54 55 55 #----------------------------------------------------------------------- 56 56 # Standard compiler checks. 57 57 # This sets up CC by using the CC env var, or looks for gcc otherwise. 58 -# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create 59 -# the basic setup necessary to compile executables. 58 +# This also calls AC_PROG_CC and a few others to create the basic setup 59 +# necessary to compile executables. 60 60 #----------------------------------------------------------------------- 61 61 62 62 TEA_SETUP_COMPILER 63 63 64 64 #----------------------------------------------------------------------- 65 65 # Those two are needed for compiling expat. 66 66 #----------------------------------------------------------------------- ................................................................................ 103 103 TEA_ADD_LIBS([${AOL_LIBS}]) 104 104 TEA_ADD_CFLAGS([]) 105 105 TEA_ADD_STUB_SOURCES([generic/tdomStubLib.c]) 106 106 TEA_ADD_TCL_SOURCES([lib/tdom.tcl]) 107 107 108 108 #-------------------------------------------------------------------- 109 109 # __CHANGE__ 110 -# A few miscellaneous platform-specific items: 111 110 # 112 -# Define a special symbol for Windows (BUILD_sample in this case) so 113 -# that we create the export library with the dll. 111 +# You can add more files to clean if your extension creates any extra 112 +# files by extending CLEANFILES. 113 +# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure 114 +# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. 114 115 # 115 -# Windows creates a few extra files that need to be cleaned up. 116 -# You can add more files to clean if your extension creates any extra 117 -# files. 118 -# 116 +# A few miscellaneous platform-specific items: 119 117 # TEA_ADD_* any platform specific compiler/build info here. 120 118 #-------------------------------------------------------------------- 121 119 122 120 if test "${TEA_PLATFORM}" = "windows" ; then 123 121 AC_DEFINE(BUILD_tdom) 124 122 CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch" 125 123 #TEA_ADD_SOURCES([win/winFile.c]) 126 124 #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) 127 125 else 128 - CLEANFILES="pkgIndex.tcl tcldomsh" 126 + CLEANFILES="pkgIndex.tcl tdomConfig.sh tdom.tcl tcldomsh" 129 127 #TEA_ADD_SOURCES([unix/unixFile.c]) 130 128 #TEA_ADD_LIBS([-lsuperfly]) 131 129 fi 132 130 AC_SUBST(CLEANFILES) 133 131 134 132 #-------------------------------------------------------------------- 135 133 # __CHANGE__ ................................................................................ 181 179 #-------------------------------------------------------------------- 182 180 # Everyone should be linking against the Tcl stub library. If you 183 181 # can't for some reason, remove this definition. If you aren't using 184 182 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to 185 183 # link against the non-stubbed Tcl library. Add Tk too if necessary. 186 184 #-------------------------------------------------------------------- 187 185 188 -AC_DEFINE(USE_TCL_STUBS) 189 -#AC_DEFINE(USE_TK_STUBS) 186 +AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs]) 187 +#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs]) 190 188 191 189 #-------------------------------------------------------------------- 192 190 # This macro generates a line to use when building a library. It 193 191 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, 194 192 # and TEA_LOAD_TCLCONFIG macros above. 195 193 #-------------------------------------------------------------------- 196 194 197 195 TEA_MAKE_LIB 198 196 199 197 #-------------------------------------------------------------------- 200 -# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl 201 -# file during the install process. Don't run the TCLSH_PROG through 202 -# ${CYGPATH} because it's being used directly by make. 203 -# Require that we use a tclsh shell version 8.2 or later since earlier 204 -# versions have bugs in the pkg_mkIndex routine. 205 -# Add WISH as well if this is a Tk extension. 198 +# Determine the name of the tclsh and/or wish executables in the 199 +# Tcl and Tk build directories or the location they were installed 200 +# into. These paths are used to support running test cases only, 201 +# the Makefile should not be making use of these paths to generate 202 +# a pkgIndex.tcl file or anything else at extension build time. 206 203 #-------------------------------------------------------------------- 207 204 208 205 TEA_PROG_TCLSH 209 206 #TEA_PROG_WISH 210 207 211 208 #-------------------------------------------------------------------- 212 209 # Add some private preprocessor options
Changes to extensions/example/Makefile.in.
3 3 # This file is a Makefile for Sample TEA Extension. If it has the name 4 4 # "Makefile.in" then it is a template for a Makefile; to generate the 5 5 # actual Makefile, run "./configure", which is a configuration script 6 6 # generated by the "autoconf" program (constructs like "@foo@" will get 7 7 # replaced in the actual Makefile. 8 8 # 9 9 # Copyright (c) 1999 Scriptics Corporation. 10 -# Copyright (c) 2002 ActiveState SRL. 10 +# Copyright (c) 2002-2005 ActiveState Corporation. 11 11 # 12 12 # See the file "license.terms" for information on usage and redistribution 13 13 # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 14 -# 15 -# RCS: @(#) $Id$ 16 14 17 15 #======================================================================== 18 -# Edit the following few lines when writing a new extension 16 +# Add additional lines to handle any additional AC_SUBST cases that 17 +# have been added in a customized configure script. 18 +#======================================================================== 19 + 20 +#SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@ 21 + 22 +#======================================================================== 23 +# Nothing of the variables below this line should need to be changed. 24 +# Please check the TARGETS section below to make sure the make targets 25 +# are correct. 19 26 #======================================================================== 20 27 21 28 #======================================================================== 22 -# Enumerate the names of the source files included in this package. 29 +# The names of the source files is defined in the configure script. 30 +# The object files are used for linking into the final library. 23 31 # This will be used when a dist target is added to the Makefile. 24 -# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is 25 -# appropriate for your platform. It is not important to specify the 26 -# directory, as long as it is the $(srcdir) or in the generic, win or 27 -# unix subdirectory. 28 -#======================================================================== 29 - 30 -EXAMPLE_SOURCES = example.c 31 - 32 -WIN_SOURCES = 33 -UNIX_SOURCES = 34 - 35 -#======================================================================== 36 -# Identify the object files. This replaces .c with .$(OBJEXT) for all 37 -# the named source files. These objects are created and linked into the 38 -# final library. In these do not correspond directly to the source files 39 -# above, you will need to enumerate the object files here. 40 -# Normally we would use $(OBJEXT), but certain make executables won't do 41 -# the extra macro in a macro conversion properly. 42 -# 43 -# "sample_LIB_FILE" refers to the library (dynamic or static as per 32 +# It is not important to specify the directory, as long as it is the 33 +# $(srcdir) or in the generic, win or unix subdirectory. 34 +#======================================================================== 35 + 36 +PKG_SOURCES = @PKG_SOURCES@ 37 +PKG_OBJECTS = @PKG_OBJECTS@ 38 + 39 +PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ 40 +PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ 41 + 42 +#======================================================================== 43 +# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with 44 +# this package that need to be installed, if any. 45 +#======================================================================== 46 + 47 +PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ 48 + 49 +#======================================================================== 50 +# This is a list of public header files to be installed, if any. 51 +#======================================================================== 52 + 53 +PKG_HEADERS = @PKG_HEADERS@ 54 + 55 +#======================================================================== 56 +# "PKG_LIB_FILE" refers to the library (dynamic or static as per 44 57 # configuration options) composed of the named objects. 45 58 #======================================================================== 46 59 47 -example_OBJECTS = $(EXAMPLE_SOURCES:.c=.@OBJEXT@) 48 -example_LIB_FILE = @example_LIB_FILE@ 60 +PKG_LIB_FILE = @PKG_LIB_FILE@ 61 +PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ 49 62 50 -#======================================================================== 51 -# RUNTIME_SOURCES identifies Tcl runtime files that are associated with 52 -# this package that need to be installed, if any. 53 -#======================================================================== 54 - 55 -#RUNTIME_SOURCES = example.tcl 56 - 57 -#======================================================================== 58 -# This is a list of header files to be installed 59 -#======================================================================== 60 - 61 -GENERIC_HDRS = 62 - 63 -#======================================================================== 64 -# Add additional lines to handle any additional AC_SUBST cases that 65 -# have been added to the configure script. 66 -#======================================================================== 67 - 68 -# nothing so far 69 - 70 -#======================================================================== 71 -# Nothing of the variables below this line need to be changed. Please 72 -# check the TARGETS section below to make sure the make targets are 73 -# correct. 74 -#======================================================================== 75 - 76 -#======================================================================== 77 -# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the 78 -# library that we are building. 79 -#======================================================================== 80 - 81 -lib_BINARIES = $($(PACKAGE)_LIB_FILE) $($(PACKAGE)stub_LIB_FILE) 63 +lib_BINARIES = $(PKG_LIB_FILE) 82 64 BINARIES = $(lib_BINARIES) 83 65 84 66 SHELL = @SHELL@ 85 67 86 68 srcdir = @srcdir@ 87 69 prefix = @prefix@ 88 70 exec_prefix = @exec_prefix@ 89 71 90 72 bindir = @bindir@ 91 73 libdir = @libdir@ 74 +includedir = @includedir@ 75 +datarootdir = @datarootdir@ 92 76 datadir = @datadir@ 93 77 mandir = @mandir@ 94 -includedir = @includedir@ 95 78 96 79 DESTDIR = 97 80 98 -PKG_DIR = $(PACKAGE)$(VERSION) 81 +PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 99 82 pkgdatadir = $(datadir)/$(PKG_DIR) 100 83 pkglibdir = $(libdir)/$(PKG_DIR) 101 84 pkgincludedir = $(includedir)/$(PKG_DIR) 102 85 103 86 top_builddir = . 104 87 105 -INSTALL = @INSTALL@ 106 -INSTALL_PROGRAM = @INSTALL_PROGRAM@ 107 -INSTALL_DATA = @INSTALL_DATA@ 108 -INSTALL_SCRIPT = @INSTALL_SCRIPT@ 88 +INSTALL_OPTIONS = 89 +INSTALL = $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS} 90 +INSTALL_DATA_DIR = ${INSTALL} -d -m 755 91 +INSTALL_PROGRAM = ${INSTALL} -m 555 92 +INSTALL_DATA = ${INSTALL} -m 444 93 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} 94 +INSTALL_LIBRARY = ${INSTALL_DATA} 109 95 110 -PACKAGE = @PACKAGE@ 111 -VERSION = @VERSION@ 96 +PACKAGE_NAME = @PACKAGE_NAME@ 97 +PACKAGE_VERSION = @PACKAGE_VERSION@ 112 98 CC = @CC@ 113 -CFLAGS_DEBUG = @CFLAGS_DEBUG@ 114 99 CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 115 -CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ 116 -CLEANFILES = @CLEANFILES@ 100 +CFLAGS_WARNING = @CFLAGS_WARNING@ 117 101 EXEEXT = @EXEEXT@ 118 -LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ 119 102 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 120 -LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ 121 103 MAKE_LIB = @MAKE_LIB@ 122 -MAKE_STUB_LIB = @MAKE_STUB_LIB@ 123 104 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 124 105 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 106 +MAKE_STUB_LIB = @MAKE_STUB_LIB@ 125 107 OBJEXT = @OBJEXT@ 126 108 RANLIB = @RANLIB@ 109 +RANLIB_STUB = @RANLIB_STUB@ 127 110 SHLIB_CFLAGS = @SHLIB_CFLAGS@ 128 111 SHLIB_LD = @SHLIB_LD@ 129 -SHLIB_LDFLAGS = @SHLIB_LDFLAGS@ 130 112 SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 131 113 STLIB_LD = @STLIB_LD@ 132 -TCL_DEFS = @TCL_DEFS@ 114 +#TCL_DEFS = @TCL_DEFS@ 133 115 TCL_BIN_DIR = @TCL_BIN_DIR@ 134 116 TCL_SRC_DIR = @TCL_SRC_DIR@ 117 +#TK_BIN_DIR = @TK_BIN_DIR@ 118 +#TK_SRC_DIR = @TK_SRC_DIR@ 135 119 136 -# This is necessary for packages that use private Tcl headers 137 -#TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@ 138 - 139 -#======================================================================== 140 -# This is needed so we can link the custom shell 141 -#======================================================================== 142 - 143 -TCL_LIBS = @TCL_LIBS@ 144 -TCL_LIB_SPEC = @TCL_LIB_SPEC@ 120 +# Not used, but retained for reference of what libs Tcl required 121 +#TCL_LIBS = @TCL_LIBS@ 145 122 146 123 #======================================================================== 147 124 # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our 148 125 # package without installing. The other environment variables allow us 149 126 # to test against an uninstalled Tcl. Add special env vars that you 150 127 # require for testing here (like TCLX_LIBRARY). 151 128 #======================================================================== 152 129 153 130 EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) 154 -TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ 155 - LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \ 156 - LIBPATH="$(EXTRA_PATH):${LIBPATH}" \ 157 - SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \ 131 +#EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR) 132 +TCLLIBPATH = $(top_builddir) 133 +TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` 134 +PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 158 135 PATH="$(EXTRA_PATH):$(PATH)" \ 159 - TCLLIBPATH="$(top_builddir)" 136 + TCLLIBPATH="$(TCLLIBPATH)" 137 + 160 138 TCLSH_PROG = @TCLSH_PROG@ 161 -TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) 139 +TCLSH = $(PKG_ENV) $(TCLSH_ENV) $(TCLSH_PROG) 140 + 141 +#WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` 142 +#WISH_PROG = @WISH_PROG@ 143 +#WISH = $(PKG_ENV) $(TCLSH_ENV) $(WISH_ENV) $(WISH_PROG) 144 + 162 145 SHARED_BUILD = @SHARED_BUILD@ 163 146 164 -INCLUDES = @TCL_INCLUDES@ @EXAMPLE_INCLUDES@ 147 +INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ 148 +#INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ 165 149 166 -EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@ 150 +PKG_CFLAGS = @PKG_CFLAGS@ 167 151 168 -DEFS = $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS) 152 +# TCL_DEFS is not strictly need here, but if you remove it, then you 153 +# must make sure that configure.in checks for the necessary components 154 +# that your library may use. TCL_DEFS can actually be a problem if 155 +# you do not compile with a similar machine setup as the Tcl core was 156 +# compiled with. 157 +#DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) 158 +DEFS = @DEFS@ $(PKG_CFLAGS) 169 159 170 -CONFIG_CLEAN_FILES = Makefile 160 +# Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile 161 +CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl 162 +CLEANFILES = @CLEANFILES@ 171 163 172 164 CPPFLAGS = @CPPFLAGS@ 173 -LIBS = @LIBS@ @TDOM_BUILD_STUB_LIB_SPEC@ 174 -AR = ar 175 - 176 -CFLAGS = @CFLAGS@ -DUSE_TDOM_STUBS=1 165 +LIBS = @PKG_LIBS@ @LIBS@ 166 +AR = @AR@ 167 +CFLAGS = @CFLAGS@ 177 168 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 169 + 170 +.SUFFIXES: .c .$(OBJEXT) 178 171 179 172 #======================================================================== 180 173 # Start of user-definable TARGETS section 181 174 #======================================================================== 182 175 183 176 #======================================================================== 184 177 # TEA TARGETS. Please note that the "libraries:" target refers to platform 185 -# independent files, and the "binaries:" target inclues executable programs and 178 +# independent files, and the "binaries:" target includes executable programs and 186 179 # platform-dependent libraries. Modify these targets so that they install 187 180 # the various pieces of your package. The make and install rules 188 181 # for the BINARIES that you specified above have already been done. 189 182 #======================================================================== 190 183 191 184 all: binaries libraries doc 192 185 ................................................................................ 193 186 #======================================================================== 194 187 # The binaries target builds executable programs, Windows .dll's, unix 195 188 # shared/static libraries, and any other platform-dependent files. 196 189 # The list of targets to build for "binaries:" is specified at the top 197 190 # of the Makefile, in the "BINARIES" variable. 198 191 #======================================================================== 199 192 200 -binaries: $(BINARIES) pkgIndex.tcl-hand 193 +binaries: $(BINARIES) 201 194 202 195 libraries: 203 196 197 +#======================================================================== 198 +# Your doc target should differentiate from doc builds (by the developer) 199 +# and doc installs (see install-doc), which just install the docs on the 200 +# end user machine when building from source. 201 +#======================================================================== 202 + 204 203 doc: 204 + @echo "If you have documentation to create, place the commands to" 205 + @echo "build the docs in the 'doc:' target. For example:" 206 + @echo " xml2nroff sample.xml > sample.n" 207 + @echo " xml2html sample.xml > sample.html" 205 208 206 -install: all install-binaries 209 +install: all install-binaries install-libraries install-doc 207 210 208 -install-binaries: binaries install-lib-binaries 209 - @if test "x$(SHARED_BUILD)" = "x1"; then \ 210 - $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ 211 - fi 211 +install-binaries: binaries install-lib-binaries install-bin-binaries 212 212 213 213 #======================================================================== 214 214 # This rule installs platform-independent files, such as header files. 215 +# The list=...; for p in $$list handles the empty list case x-platform. 215 216 #======================================================================== 216 217 217 218 install-libraries: libraries 218 - @mkdir -p $(DESTDIR)$(includedir) 219 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir) 219 220 @echo "Installing header files in $(DESTDIR)$(includedir)" 220 - @if test "x$(GENERIC_HDRS)" != "x"; then \ 221 - for i in $(GENERIC_HDRS) ; do \ 222 - echo " $(INSTALL_DATA) $$i" ; \ 223 - $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \ 224 - done; 225 - fi 221 + @list='$(PKG_HEADERS)'; for i in $$list; do \ 222 + echo "Installing $(srcdir)/$$i" ; \ 223 + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 224 + done; 226 225 227 226 #======================================================================== 228 227 # Install documentation. Unix manpages should go in the $(mandir) 229 228 # directory. 230 229 #======================================================================== 231 230 232 231 install-doc: doc 233 - @mkdir -p $(DESTDIR)$(mandir)/mann 232 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann 234 233 @echo "Installing documentation in $(DESTDIR)$(mandir)" 235 - @for i in $(srcdir)/doc/*.n; do \ 236 - echo " $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann/`basename $$i`"; \ 237 - rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ 238 - $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ 234 + @list='$(srcdir)/doc/*.n'; for i in $$list; do \ 235 + echo "Installing $$i"; \ 236 + $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ 239 237 done 240 238 241 239 test: binaries libraries 242 240 $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 243 241 244 242 shell: binaries libraries 245 243 @$(TCLSH) $(SCRIPT) 246 244 247 245 gdb: 248 246 $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) 249 247 248 +VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high \ 249 + --leak-check=yes --show-reachable=yes -v 250 + 251 +valgrind: binaries libraries 252 + $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) \ 253 + `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 254 + 255 +valgrindshell: binaries libraries 256 + $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT) 257 + 250 258 depend: 251 259 252 260 #======================================================================== 253 -# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable 261 +# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 254 262 # mentioned above. That will ensure that this target is built when you 255 263 # run "make binaries". 256 264 # 257 -# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final 265 +# The $(PKG_OBJECTS) objects are created and linked into the final 258 266 # library. In most cases these object files will correspond to the 259 267 # source files above. 260 268 #======================================================================== 261 269 262 -$($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS) 263 - -rm -f $($(PACKAGE)stub_LIB_FILE) 270 +$(PKG_LIB_FILE): $(PKG_OBJECTS) 271 + -rm -f $(PKG_LIB_FILE) 272 + ${MAKE_LIB} 273 + $(RANLIB) $(PKG_LIB_FILE) 274 + 275 +$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) 276 + -rm -f $(PKG_STUB_LIB_FILE) 264 277 ${MAKE_STUB_LIB} 265 - $(RANLIB) $($(PACKAGE)stub_LIB_FILE) 266 - 267 -$($(PACKAGE)_LIB_FILE): $($(PACKAGE)_OBJECTS) 268 - -rm -f $($(PACKAGE)_LIB_FILE) 269 - ${MAKE_LIB} 270 - $(RANLIB) $($(PACKAGE)_LIB_FILE) 278 + $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) 271 279 272 280 #======================================================================== 273 281 # We need to enumerate the list of .c to .o lines here. 274 282 # 275 283 # In the following lines, $(srcdir) refers to the toplevel directory 276 284 # containing your extension. If your sources are in a subdirectory, 277 285 # you will have to modify the paths to reflect this: ................................................................................ 280 288 # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ 281 289 # 282 290 # Setting the VPATH variable to a list of paths will cause the makefile 283 291 # to look into these paths when resolving .c to .obj dependencies. 284 292 # As necessary, add $(srcdir):$(srcdir)/compat:.... 285 293 #======================================================================== 286 294 287 -VPATH = $(srcdir)/generic:$(srcdir)/expat:$(srcdir)/unix:$(srcdir)/win 295 +VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win:$(srcdir)/macosx 288 296 289 -.c.$(OBJEXT): 297 +.c.@OBJEXT@: 290 298 $(COMPILE) -c `@CYGPATH@ $<` -o $@ 291 299 292 -#======================================================================== 293 -# Create the pkgIndex.tcl file. 294 -# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but 295 -# you may find that you need to customize the package. If so, either 296 -# modify the -hand version, or create a pkgIndex.tcl.in file and have 297 -# the configure script output the pkgIndex.tcl by editing configure.in. 298 -#======================================================================== 299 - 300 -# pkgIndex.tcl: 301 -# @(echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH) 302 - 303 -pkgIndex.tcl-hand: 304 - @(echo 'package ifneeded $(PACKAGE) $(VERSION) \ 305 - "load [file join $$dir $($(PACKAGE)_LIB_FILE)]"'\ 306 - ) > pkgIndex.tcl 307 - 308 300 #======================================================================== 309 301 # Distribution creation 310 302 # You may need to tweak this target to make it work correctly. 311 303 #======================================================================== 312 304 313 305 #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar 314 -COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 306 +COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 315 307 DIST_ROOT = /tmp/dist 316 308 DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) 317 309 318 310 dist-clean: 319 311 rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 320 312 321 313 dist: dist-clean 322 314 mkdir -p $(DIST_DIR) 323 315 cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \ 324 - $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ 325 - $(DIST_DIR)/ 316 + $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ 317 + $(DIST_DIR)/ 326 318 chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 327 319 chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in 328 320 329 - cp -p $(srcdir)/*.[ch] $(DIST_DIR)/ 321 + for i in $(srcdir)/*.[ch]; do \ 322 + if [ -f $$i ]; then \ 323 + cp -p $$i $(DIST_DIR)/ ; \ 324 + fi; \ 325 + done; 330 326 331 327 mkdir $(DIST_DIR)/tclconfig 332 328 cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ 333 - $(DIST_DIR)/tclconfig/ 329 + $(DIST_DIR)/tclconfig/ 334 330 chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 335 331 chmod +x $(DIST_DIR)/tclconfig/install-sh 336 332 337 - list='doc generic tests unix win expat lib apps encodings xe'; \ 333 + list='demos doc generic library mac tests unix win'; \ 338 334 for p in $$list; do \ 339 - if test -d $(srcdir)/$$p ; then \ 340 - mkdir $(DIST_DIR)/$$p; \ 341 - cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \ 342 - fi; \ 335 + if test -d $(srcdir)/$$p ; then \ 336 + mkdir $(DIST_DIR)/$$p; \ 337 + cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \ 338 + fi; \ 343 339 done 344 340 345 341 (cd $(DIST_ROOT); $(COMPRESS);) 346 342 347 343 #======================================================================== 348 344 # End of user-definable section 349 345 #======================================================================== 350 346 351 347 #======================================================================== 352 348 # Don't modify the file to clean here. Instead, set the "CLEANFILES" 353 349 # variable in configure.in 354 350 #======================================================================== 355 351 356 -clean: 352 +clean: 357 353 -test -z "$(BINARIES)" || rm -f $(BINARIES) 358 354 -rm -f *.$(OBJEXT) core *.core 359 355 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 360 356 361 357 distclean: clean 362 358 -rm -f *.tab.c 363 359 -rm -f $(CONFIG_CLEAN_FILES) ................................................................................ 370 366 # Library files go into the lib directory. 371 367 # In addition, this will generate the pkgIndex.tcl 372 368 # file in the install location (assuming it can find a usable tclsh shell) 373 369 # 374 370 # You should not have to modify this target. 375 371 #======================================================================== 376 372 377 -install-lib-binaries: 378 - @echo "Installing library files in $(pkglibdir)" 379 - @mkdir -p $(DESTDIR)$(pkglibdir) 373 +install-lib-binaries: binaries 374 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) 380 375 @list='$(lib_BINARIES)'; for p in $$list; do \ 381 376 if test -f $$p; then \ 382 - echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 383 - $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 384 - echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 385 - $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ 377 + echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 378 + $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 379 + stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ 380 + if test "x$$stub" = "xstub"; then \ 381 + echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ 382 + $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ 383 + else \ 384 + echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 385 + $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ 386 + fi; \ 386 387 ext=`echo $$p|sed -e "s/.*\.//"`; \ 387 388 if test "x$$ext" = "xdll"; then \ 388 389 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ 389 390 if test -f $$lib; then \ 390 391 echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ 391 392 $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ 392 393 fi; \ 393 394 fi; \ 394 395 fi; \ 395 396 done 396 - @list='$(RUNTIME_SOURCES)'; for p in $$list; do \ 397 - if test -f $(srcdir)/lib/$$p; then \ 398 - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 399 - $(INSTALL_DATA) $(srcdir)/lib/$$p $(DESTDIR)$(pkglibdir)/$$p; \ 397 + @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 398 + if test -f $(srcdir)/$$p; then \ 399 + destp=`basename $$p`; \ 400 + echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ 401 + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ 400 402 fi; \ 401 403 done 404 + @if test "x$(SHARED_BUILD)" = "x1"; then \ 405 + echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ 406 + $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ 407 + fi 402 408 403 409 #======================================================================== 404 410 # Install binary executables (e.g. .exe files and dependent .dll files) 405 411 # This is for files that must go in the bin directory (located next to 406 412 # wish and tclsh), like dependent .dll files on Windows. 407 413 # 408 414 # You should not have to modify this target, except to define bin_BINARIES 409 415 # above if necessary. 410 416 #======================================================================== 411 417 412 -# install-bin-binaries: 413 -# @echo "Installing executables in $(DESTDIR)$(bindir)" 414 -# @mkdir -p $(DESTDIR)$(bindir) 415 -# @list='$(bin_BINARIES)'; for p in $$list; do \ 416 -# if test -f $$p; then \ 417 -# echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 418 -# $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 419 -# fi; \ 420 -# done 421 - 422 -.SUFFIXES: .c .$(OBJEXT) 418 +install-bin-binaries: binaries 419 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(bindir) 420 + @list='$(bin_BINARIES)'; for p in $$list; do \ 421 + if test -f $$p; then \ 422 + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 423 + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 424 + fi; \ 425 + done 423 426 424 427 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 425 428 cd $(top_builddir) \ 426 429 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 427 430 428 431 uninstall-binaries: 429 432 list='$(lib_BINARIES)'; for p in $$list; do \ 430 433 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 431 434 done 432 - list='$(RUNTIME_SOURCES)'; for p in $$list; do \ 435 + list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 436 + p=`basename $$p`; \ 433 437 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 434 438 done 435 439 list='$(bin_BINARIES)'; for p in $$list; do \ 436 440 rm -f $(DESTDIR)$(bindir)/$$p; \ 437 441 done 438 442 439 443 .PHONY: all binaries clean depend distclean doc install libraries test 440 444 441 445 # Tell versions [3.59,3.63) of GNU make to not export all variables. 442 446 # Otherwise a system limit (for SysV at least) may be exceeded. 443 447 .NOEXPORT:
Changes to extensions/example/configure.
more than 10,000 changes
Changes to extensions/example/configure.in.
1 1 #!/bin/bash -norc 2 2 dnl This file is an input file used by the GNU "autoconf" program to 3 3 dnl generate the file "configure", which is run during Tcl installation 4 4 dnl to configure the system for the local environment. 5 -# 6 -# RCS: @(#) $Id$ 7 5 8 6 #----------------------------------------------------------------------- 9 7 # Sample configure.in for Tcl Extensions. The only places you should 10 8 # need to modify this file are marked by the string __CHANGE__ 11 9 #----------------------------------------------------------------------- 12 10 13 11 #----------------------------------------------------------------------- 14 12 # __CHANGE__ 15 -# This very first macro is used to verify that the configure script can 16 -# find the sources. The argument to AC_INIT should be a unique filename 17 -# for this package, and can be a relative path, such as: 13 +# Set your package name and version numbers here. 18 14 # 19 -# AC_INIT(generic/tcl.h) 15 +# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION 16 +# set as provided. These will also be added as -D defs in your Makefile 17 +# so you can encode the package version directly into the source files. 18 +# This will also define a special symbol for Windows (BUILD_sample in 19 +# this case) so that we create the export library with the dll. 20 20 #----------------------------------------------------------------------- 21 21 22 -AC_INIT(example.c) 23 - 24 -AC_CONFIG_AUX_DIR(../../tclconfig) 25 -CONFIGDIR=${srcdir}/../../tclconfig 26 -AC_SUBST(CONFIGDIR) 27 - 28 -#---------------------------------------------------------------------- 29 -# __CHANGE__ 30 -# Set your package name and version numbers here. The NODOT_VERSION is 31 -# required for constructing the library name on systems that don't like 32 -# dots in library names (Windows). The VERSION variable is used on the 33 -# other systems. 34 -#---------------------------------------------------------------------- 35 - 36 -PACKAGE=example 37 - 38 -MAJOR_VERSION=1 39 -MINOR_VERSION=0 40 -PATCHLEVEL=0 41 - 42 -VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCHLEVEL} 43 -NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}${PATCHLEVEL} 44 - 45 -AC_SUBST(PACKAGE) 46 -AC_SUBST(VERSION) 47 - 48 -# This package name must be replaced statically for AC_SUBST to work 49 -AC_SUBST(example_LIB_FILE) 50 - 51 -#-------------------------------------------------------------------- 52 -# We put this here so that you can compile with -DVERSION="1.2" to 53 -# encode the package version directly into the source files. 54 -#-------------------------------------------------------------------- 55 - 56 -eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}") 22 +AC_INIT([example], [1.0]) 57 23 58 24 #-------------------------------------------------------------------- 59 25 # Call TEA_INIT as the first TEA_ macro to set up initial vars. 60 -# This will define a ${TEA_PLATFORM} variable == "unix" or "windows". 26 +# This will define a ${TEA_PLATFORM} variable == "unix" or "windows" 27 +# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. 61 28 #-------------------------------------------------------------------- 62 29 63 -TEA_INIT 30 +TEA_INIT([3.9]) 31 + 32 +AC_CONFIG_AUX_DIR(../../tclconfig) 64 33 65 34 #-------------------------------------------------------------------- 66 35 # Load the tclConfig.sh file 67 36 #-------------------------------------------------------------------- 68 37 69 38 TEA_PATH_TCLCONFIG 70 39 TEA_LOAD_TCLCONFIG 71 40 72 -#-------------------------------------------------------------------- 73 -# Load the tdomConfig.sh file 74 -#-------------------------------------------------------------------- 75 -if test "${TEA_PLATFORM}" = "windows" ; then 76 - TDOM_BIN_DIR=../../win 77 -else 78 - TDOM_BIN_DIR=../../unix 79 -fi 80 -TDOM_LOAD_CONFIG 81 - 82 41 #-------------------------------------------------------------------- 83 42 # Load the tkConfig.sh file if necessary (Tk extension) 84 43 #-------------------------------------------------------------------- 85 44 86 45 #TEA_PATH_TKCONFIG 87 46 #TEA_LOAD_TKCONFIG 88 47 ................................................................................ 92 51 #----------------------------------------------------------------------- 93 52 94 53 TEA_PREFIX 95 54 96 55 #----------------------------------------------------------------------- 97 56 # Standard compiler checks. 98 57 # This sets up CC by using the CC env var, or looks for gcc otherwise. 99 -# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create 100 -# the basic setup necessary to compile executables. 58 +# This also calls AC_PROG_CC and a few others to create the basic setup 59 +# necessary to compile executables. 101 60 #----------------------------------------------------------------------- 102 61 103 62 TEA_SETUP_COMPILER 63 + 64 +#-------------------------------------------------------------------- 65 +# Load the tdomConfig.sh file 66 +#-------------------------------------------------------------------- 67 + 68 +TDOM_PATH_CONFIG 69 +TDOM_LOAD_CONFIG 70 + 71 +#----------------------------------------------------------------------- 72 +# __CHANGE__ 73 +# Specify the C source files to compile in TEA_ADD_SOURCES, 74 +# public headers that need to be installed in TEA_ADD_HEADERS, 75 +# stub library C source files to compile in TEA_ADD_STUB_SOURCES, 76 +# and runtime Tcl library files in TEA_ADD_TCL_SOURCES. 77 +# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS 78 +# and PKG_TCL_SOURCES. 79 +#----------------------------------------------------------------------- 80 + 81 +TEA_ADD_SOURCES([example.c]) 82 +TEA_ADD_HEADERS([]) 83 +TEA_ADD_INCLUDES([-I${srcdir}/../../generic -I${srcdir}/../../expat]) 84 +TEA_ADD_LIBS([${TDOM_STUB_LIB_SPEC}]) 85 +TEA_ADD_CFLAGS([-DUSE_TDOM_STUBS=1]) 86 +TEA_ADD_STUB_SOURCES([]) 87 +TEA_ADD_TCL_SOURCES([]) 88 + 89 +#-------------------------------------------------------------------- 90 +# __CHANGE__ 91 +# 92 +# You can add more files to clean if your extension creates any extra 93 +# files by extending CLEANFILES. 94 +# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure 95 +# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. 96 +# 97 +# A few miscellaneous platform-specific items: 98 +# TEA_ADD_* any platform specific compiler/build info here. 99 +#-------------------------------------------------------------------- 100 + 101 +#CLEANFILES="$CLEANFILES pkgIndex.tcl" 102 +if test "${TEA_PLATFORM}" = "windows" ; then 103 + # Ensure no empty if clauses 104 + : 105 + #TEA_ADD_SOURCES([win/winFile.c]) 106 + #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) 107 +else 108 + # Ensure no empty else clauses 109 + : 110 + #TEA_ADD_SOURCES([unix/unixFile.c]) 111 + #TEA_ADD_LIBS([-lsuperfly]) 112 +fi 104 113 105 114 #-------------------------------------------------------------------- 106 115 # __CHANGE__ 107 116 # Choose which headers you need. Extension authors should try very 108 117 # hard to only rely on the Tcl public header files. Internal headers 109 118 # contain private data structures and are subject to change without 110 119 # notice. ................................................................................ 112 121 #-------------------------------------------------------------------- 113 122 114 123 TEA_PUBLIC_TCL_HEADERS 115 124 #TEA_PRIVATE_TCL_HEADERS 116 125 117 126 #TEA_PUBLIC_TK_HEADERS 118 127 #TEA_PRIVATE_TK_HEADERS 119 - 120 -#-------------------------------------------------------------------- 121 -# __CHANGE__ 122 -# A few miscellaneous platform-specific items: 123 -# 124 -# Define a special symbol for Windows (BUILD_sample in this case) so 125 -# that we create the export library with the dll. See sha1.h on how 126 -# to use this. 127 -# 128 -# Windows creates a few extra files that need to be cleaned up. 129 -# You can add more files to clean if your extension creates any extra 130 -# files. 131 -# 132 -# Define any extra compiler flags in the PACKAGE_CFLAGS variable. 133 -# These will be appended to the current set of compiler flags for 134 -# your system. 135 -#-------------------------------------------------------------------- 136 - 137 -if test "${TEA_PLATFORM}" = "windows" ; then 138 - AC_DEFINE(BUILD_example) 139 - CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch" 140 - EXTRA_SOURCES='$(WIN_SOURCES)' 141 -else 142 - CLEANFILES="pkgIndex.tcl" 143 - EXTRA_SOURCES='$(UNIX_SOURCES)' 144 -fi 145 -AC_SUBST(CLEANFILES) 146 -AC_SUBST(EXTRA_SOURCES) 128 +#TEA_PATH_X 147 129 148 130 #-------------------------------------------------------------------- 149 131 # Check whether --enable-threads or --disable-threads was given. 132 +# This auto-enables if Tcl was compiled threaded. 150 133 #-------------------------------------------------------------------- 151 134 152 135 TEA_ENABLE_THREADS 153 136 154 137 #-------------------------------------------------------------------- 155 138 # The statement below defines a collection of symbols related to 156 139 # building as a shared library instead of a static library. ................................................................................ 168 151 169 152 #-------------------------------------------------------------------- 170 153 # Set the default compiler switches based on the --enable-symbols option. 171 154 #-------------------------------------------------------------------- 172 155 173 156 TEA_ENABLE_SYMBOLS 174 157 175 -if test "${SHARED_BUILD}" = "1" ; then 176 - CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}' 177 -else 178 - CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}' 179 -fi 180 -AC_SUBST(SHARED_BUILD) 181 - 182 158 #-------------------------------------------------------------------- 183 159 # Everyone should be linking against the Tcl stub library. If you 184 160 # can't for some reason, remove this definition. If you aren't using 185 161 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to 186 162 # link against the non-stubbed Tcl library. Add Tk too if necessary. 187 163 #-------------------------------------------------------------------- 188 164 189 -AC_DEFINE(USE_TCL_STUBS) 190 -#AC_DEFINE(USE_TK_STUBS) 165 +AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs]) 166 +#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs]) 191 167 192 168 #-------------------------------------------------------------------- 193 169 # This macro generates a line to use when building a library. It 194 170 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, 195 171 # and TEA_LOAD_TCLCONFIG macros above. 196 -# For tDOM we always build both, static and shared libraries 197 172 #-------------------------------------------------------------------- 198 173 199 174 TEA_MAKE_LIB 200 175 201 176 #-------------------------------------------------------------------- 202 -# __CHANGE__ 203 -# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary. 204 -#-------------------------------------------------------------------- 205 - 206 -#LIBS="${LIBS} --lsuperfly" 207 - 208 -#-------------------------------------------------------------------- 209 -# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl 210 -# file during the install process. Don't run the TCLSH_PROG through 211 -# ${CYGPATH} because it's being used directly by make. 212 -# Require that we use a tclsh shell version 8.2 or later since earlier 213 -# versions have bugs in the pkg_mkIndex routine. 214 -# Add WISH as well if this is a Tk extension. 177 +# Determine the name of the tclsh and/or wish executables in the 178 +# Tcl and Tk build directories or the location they were installed 179 +# into. These paths are used to support running test cases only, 180 +# the Makefile should not be making use of these paths to generate 181 +# a pkgIndex.tcl file or anything else at extension build time. 215 182 #-------------------------------------------------------------------- 216 183 217 184 TEA_PROG_TCLSH 218 185 #TEA_PROG_WISH 219 186 220 -#-------------------------------------------------------------------- 221 -# Add some private include directories 222 -#-------------------------------------------------------------------- 223 - 224 -EXAMPLE_INCLUDES="-I${srcdir}/../../generic -I${srcdir}/../../expat" 225 -AC_SUBST(EXAMPLE_INCLUDES) 226 - 227 187 #-------------------------------------------------------------------- 228 188 # Finally, substitute all of the various values into the Makefile. 229 189 # You may alternatively have a special pkgIndex.tcl.in or other files 230 190 # which require substituting th AC variables in. Include these here. 231 191 #-------------------------------------------------------------------- 232 192 233 -AC_OUTPUT([Makefile]) 193 +AC_OUTPUT([Makefile pkgIndex.tcl])
Changes to extensions/example/example.c.
1 1 2 -#include <tcl.h> 2 +#include <tdom.h> 3 3 #include <string.h> 4 -#include <expat.h> 5 -#include <tclexpat.h> 6 4 7 5 /* 8 6 * Beginning with 8.4, Tcl API is CONST'ified 9 7 */ 10 8 #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION <= 3) 11 9 # define CONST84 12 10 #endif 13 11 12 +extern char *Tdom_InitStubs (Tcl_Interp *interp, char *version, int exact); 14 13 15 14 typedef struct simpleCounter 16 15 { 17 16 int elementCounter; 18 17 } simpleCounter; 19 18 20 19 static char example_usage[] = ................................................................................ 231 230 *---------------------------------------------------------------------------- 232 231 */ 233 232 234 233 int 235 234 Example_Init (interp) 236 235 Tcl_Interp *interp; 237 236 { 238 - Tcl_PkgRequire (interp, "expat", "2.0", 0); 237 +#ifdef USE_TCL_STUBS 238 + if (Tcl_InitStubs(interp, "8", 0) == NULL) { 239 + return TCL_ERROR; 240 + } 241 +#endif 242 +#ifdef USE_TDOM_STUBS 243 + if (Tdom_InitStubs(interp, "0.8", 0) == NULL) { 244 + return TCL_ERROR; 245 + } 246 +#endif 247 + Tcl_PkgRequire (interp, "tdom", "0.8.0", 0); 239 248 Tcl_CreateObjCommand (interp, "example", TclExampleObjCmd, NULL, NULL ); 240 249 Tcl_PkgProvide (interp, "example", "1.0"); 250 + return TCL_OK; 241 251 } 242 252
Changes to extensions/example/exampletest.tcl.
1 1 #!tclsh 2 2 3 -load ../../unix/libtdom0.7.5.so 4 -load ./libexample1.0.0.so 3 +load ../../unix/libtdom0.8.3.so 4 +load ./libexample1.0.so 5 5 6 6 set counter1 0 7 7 set counter2 0 8 8 9 9 proc eh1 {args} { 10 10 global counter1 11 11
Changes to extensions/tdomhtml/configure.
1 1 #! /bin/sh 2 - 3 2 # Guess values for system-dependent variables and create Makefiles. 4 -# Generated automatically using autoconf version 2.13 5 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. 3 +# Generated by GNU Autoconf 2.69. 4 +# 5 +# 6 +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. 7 +# 6 8 # 7 9 # This configure script is free software; the Free Software Foundation 8 10 # gives unlimited permission to copy, distribute and modify it. 9 - 10 -# Defaults: 11 -ac_help= 11 +## -------------------- ## 12 +## M4sh Initialization. ## 13 +## -------------------- ## 14 + 15 +# Be more Bourne compatible 16 +DUALCASE=1; export DUALCASE # for MKS sh 17 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 18 + emulate sh 19 + NULLCMD=: 20 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 21 + # is contrary to our usage. Disable this feature. 22 + alias -g '${1+"$@"}'='"$@"' 23 + setopt NO_GLOB_SUBST 24 +else 25 + case `(set -o) 2>/dev/null` in #( 26 + *posix*) : 27 + set -o posix ;; #( 28 + *) : 29 + ;; 30 +esac 31 +fi 32 + 33 + 34 +as_nl=' 35 +' 36 +export as_nl 37 +# Printing a long string crashes Solaris 7 /usr/bin/printf. 38 +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 39 +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 40 +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 41 +# Prefer a ksh shell builtin over an external printf program on Solaris, 42 +# but without wasting forks for bash or zsh. 43 +if test -z "$BASH_VERSION$ZSH_VERSION" \ 44 + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 45 + as_echo='print -r --' 46 + as_echo_n='print -rn --' 47 +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 48 + as_echo='printf %s\n' 49 + as_echo_n='printf %s' 50 +else 51 + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 52 + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 53 + as_echo_n='/usr/ucb/echo -n' 54 + else 55 + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 56 + as_echo_n_body='eval 57 + arg=$1; 58 + case $arg in #( 59 + *"$as_nl"*) 60 + expr "X$arg" : "X\\(.*\\)$as_nl"; 61 + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 62 + esac; 63 + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 64 + ' 65 + export as_echo_n_body 66 + as_echo_n='sh -c $as_echo_n_body as_echo' 67 + fi 68 + export as_echo_body 69 + as_echo='sh -c $as_echo_body as_echo' 70 +fi 71 + 72 +# The user is always right. 73 +if test "${PATH_SEPARATOR+set}" != set; then 74 + PATH_SEPARATOR=: 75 + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 76 + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 77 + PATH_SEPARATOR=';' 78 + } 79 +fi 80 + 81 + 82 +# IFS 83 +# We need space, tab and new line, in precisely that order. Quoting is 84 +# there to prevent editors from complaining about space-tab. 85 +# (If _AS_PATH_WALK were called with IFS unset, it would disable word 86 +# splitting by setting IFS to empty value.) 87 +IFS=" "" $as_nl" 88 + 89 +# Find who we are. Look in the path if we contain no directory separator. 90 +as_myself= 91 +case $0 in #(( 92 + *[\\/]* ) as_myself=$0 ;; 93 + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 94 +for as_dir in $PATH 95 +do 96 + IFS=$as_save_IFS 97 + test -z "$as_dir" && as_dir=. 98 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 99 + done 100 +IFS=$as_save_IFS 101 + 102 + ;; 103 +esac 104 +# We did not find ourselves, most probably we were run as `sh COMMAND' 105 +# in which case we are not to be found in the path. 106 +if test "x$as_myself" = x; then 107 + as_myself=$0 108 +fi 109 +if test ! -f "$as_myself"; then 110 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 111 + exit 1 112 +fi 113 + 114 +# Unset variables that we do not need and which cause bugs (e.g. in 115 +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 116 +# suppresses any "Segmentation fault" message there. '((' could 117 +# trigger a bug in pdksh 5.2.14. 118 +for as_var in BASH_ENV ENV MAIL MAILPATH 119 +do eval test x\${$as_var+set} = xset \ 120 + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 121 +done 122 +PS1='$ ' 123 +PS2='> ' 124 +PS4='+ ' 125 + 126 +# NLS nuisances. 127 +LC_ALL=C 128 +export LC_ALL 129 +LANGUAGE=C 130 +export LANGUAGE 131 + 132 +# CDPATH. 133 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 134 + 135 +# Use a proper internal environment variable to ensure we don't fall 136 + # into an infinite loop, continuously re-executing ourselves. 137 + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then 138 + _as_can_reexec=no; export _as_can_reexec; 139 + # We cannot yet assume a decent shell, so we have to provide a 140 +# neutralization value for shells without unset; and this also 141 +# works around shells that cannot unset nonexistent variables. 142 +# Preserve -v and -x to the replacement shell. 143 +BASH_ENV=/dev/null 144 +ENV=/dev/null 145 +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 146 +case $- in # (((( 147 + *v*x* | *x*v* ) as_opts=-vx ;; 148 + *v* ) as_opts=-v ;; 149 + *x* ) as_opts=-x ;; 150 + * ) as_opts= ;; 151 +esac 152 +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 153 +# Admittedly, this is quite paranoid, since all the known shells bail 154 +# out after a failed `exec'. 155 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 156 +as_fn_exit 255 157 + fi 158 + # We don't want this to propagate to other subprocesses. 159 + { _as_can_reexec=; unset _as_can_reexec;} 160 +if test "x$CONFIG_SHELL" = x; then 161 + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 162 + emulate sh 163 + NULLCMD=: 164 + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 165 + # is contrary to our usage. Disable this feature. 166 + alias -g '\${1+\"\$@\"}'='\"\$@\"' 167 + setopt NO_GLOB_SUBST 168 +else 169 + case \`(set -o) 2>/dev/null\` in #( 170 + *posix*) : 171 + set -o posix ;; #( 172 + *) : 173 + ;; 174 +esac 175 +fi 176 +" 177 + as_required="as_fn_return () { (exit \$1); } 178 +as_fn_success () { as_fn_return 0; } 179 +as_fn_failure () { as_fn_return 1; } 180 +as_fn_ret_success () { return 0; } 181 +as_fn_ret_failure () { return 1; } 182 + 183 +exitcode=0 184 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } 185 +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 186 +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 187 +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 188 +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 189 + 190 +else 191 + exitcode=1; echo positional parameters were not saved. 192 +fi 193 +test x\$exitcode = x0 || exit 1 194 +test -x / || exit 1" 195 + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 196 + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 197 + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 198 + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" 199 + if (eval "$as_required") 2>/dev/null; then : 200 + as_have_required=yes 201 +else 202 + as_have_required=no 203 +fi 204 + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 205 + 206 +else 207 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 208 +as_found=false 209 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 210 +do 211 + IFS=$as_save_IFS 212 + test -z "$as_dir" && as_dir=. 213 + as_found=: 214 + case $as_dir in #( 215 + /*) 216 + for as_base in sh bash ksh sh5; do 217 + # Try only shells that exist, to save several forks. 218 + as_shell=$as_dir/$as_base 219 + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 220 + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 221 + CONFIG_SHELL=$as_shell as_have_required=yes 222 + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 223 + break 2 224 +fi 225 +fi 226 + done;; 227 + esac 228 + as_found=false 229 +done 230 +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 231 + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 232 + CONFIG_SHELL=$SHELL as_have_required=yes 233 +fi; } 234 +IFS=$as_save_IFS 235 + 236 + 237 + if test "x$CONFIG_SHELL" != x; then : 238 + export CONFIG_SHELL 239 + # We cannot yet assume a decent shell, so we have to provide a 240 +# neutralization value for shells without unset; and this also 241 +# works around shells that cannot unset nonexistent variables. 242 +# Preserve -v and -x to the replacement shell. 243 +BASH_ENV=/dev/null 244 +ENV=/dev/null 245 +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 246 +case $- in # (((( 247 + *v*x* | *x*v* ) as_opts=-vx ;; 248 + *v* ) as_opts=-v ;; 249 + *x* ) as_opts=-x ;; 250 + * ) as_opts= ;; 251 +esac 252 +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 253 +# Admittedly, this is quite paranoid, since all the known shells bail 254 +# out after a failed `exec'. 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 256 +exit 255 257 +fi 258 + 259 + if test x$as_have_required = xno; then : 260 + $as_echo "$0: This script requires a shell more modern than all" 261 + $as_echo "$0: the shells that I found on your system." 262 + if test x${ZSH_VERSION+set} = xset ; then 263 + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 264 + $as_echo "$0: be upgraded to zsh 4.3.4 or later." 265 + else 266 + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, 267 +$0: including any error possibly output before this 268 +$0: message. Then install a modern shell, or manually run 269 +$0: the script under such a shell if you do have one." 270 + fi 271 + exit 1 272 +fi 273 +fi 274 +fi 275 +SHELL=${CONFIG_SHELL-/bin/sh} 276 +export SHELL 277 +# Unset more variables known to interfere with behavior of common tools. 278 +CLICOLOR_FORCE= GREP_OPTIONS= 279 +unset CLICOLOR_FORCE GREP_OPTIONS 280 + 281 +## --------------------- ## 282 +## M4sh Shell Functions. ## 283 +## --------------------- ## 284 +# as_fn_unset VAR 285 +# --------------- 286 +# Portably unset VAR. 287 +as_fn_unset () 288 +{ 289 + { eval $1=; unset $1;} 290 +} 291 +as_unset=as_fn_unset 292 + 293 +# as_fn_set_status STATUS 294 +# ----------------------- 295 +# Set $? to STATUS, without forking. 296 +as_fn_set_status () 297 +{ 298 + return $1 299 +} # as_fn_set_status 300 + 301 +# as_fn_exit STATUS 302 +# ----------------- 303 +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 304 +as_fn_exit () 305 +{ 306 + set +e 307 + as_fn_set_status $1 308 + exit $1 309 +} # as_fn_exit 310 + 311 +# as_fn_mkdir_p 312 +# ------------- 313 +# Create "$as_dir" as a directory, including parents if necessary. 314 +as_fn_mkdir_p () 315 +{ 316 + 317 + case $as_dir in #( 318 + -*) as_dir=./$as_dir;; 319 + esac 320 + test -d "$as_dir" || eval $as_mkdir_p || { 321 + as_dirs= 322 + while :; do 323 + case $as_dir in #( 324 + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 325 + *) as_qdir=$as_dir;; 326 + esac 327 + as_dirs="'$as_qdir' $as_dirs" 328 + as_dir=`$as_dirname -- "$as_dir" || 329 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 330 + X"$as_dir" : 'X\(//\)[^/]' \| \ 331 + X"$as_dir" : 'X\(//\)$' \| \ 332 + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 333 +$as_echo X"$as_dir" | 334 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 335 + s//\1/ 336 + q 337 + } 338 + /^X\(\/\/\)[^/].*/{ 339 + s//\1/ 340 + q 341 + } 342 + /^X\(\/\/\)$/{ 343 + s//\1/ 344 + q 345 + } 346 + /^X\(\/\).*/{ 347 + s//\1/ 348 + q 349 + } 350 + s/.*/./; q'` 351 + test -d "$as_dir" && break 352 + done 353 + test -z "$as_dirs" || eval "mkdir $as_dirs" 354 + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 355 + 356 + 357 +} # as_fn_mkdir_p 358 + 359 +# as_fn_executable_p FILE 360 +# ----------------------- 361 +# Test if FILE is an executable regular file. 362 +as_fn_executable_p () 363 +{ 364 + test -f "$1" && test -x "$1" 365 +} # as_fn_executable_p 366 +# as_fn_append VAR VALUE 367 +# ---------------------- 368 +# Append the text in VALUE to the end of the definition contained in VAR. Take 369 +# advantage of any shell optimizations that allow amortized linear growth over 370 +# repeated appends, instead of the typical quadratic growth present in naive 371 +# implementations. 372 +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 373 + eval 'as_fn_append () 374 + { 375 + eval $1+=\$2 376 + }' 377 +else 378 + as_fn_append () 379 + { 380 + eval $1=\$$1\$2 381 + } 382 +fi # as_fn_append 383 + 384 +# as_fn_arith ARG... 385 +# ------------------ 386 +# Perform arithmetic evaluation on the ARGs, and store the result in the 387 +# global $as_val. Take advantage of shells that can avoid forks. The arguments 388 +# must be portable across $(()) and expr. 389 +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 390 + eval 'as_fn_arith () 391 + { 392 + as_val=$(( $* )) 393 + }' 394 +else 395 + as_fn_arith () 396 + { 397 + as_val=`expr "$@" || test $? -eq 1` 398 + } 399 +fi # as_fn_arith 400 + 401 + 402 +# as_fn_error STATUS ERROR [LINENO LOG_FD] 403 +# ---------------------------------------- 404 +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 405 +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 406 +# script with STATUS, using 1 if that was 0. 407 +as_fn_error () 408 +{ 409 + as_status=$1; test $as_status -eq 0 && as_status=1 410 + if test "$4"; then 411 + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 412 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 413 + fi 414 + $as_echo "$as_me: error: $2" >&2 415 + as_fn_exit $as_status 416 +} # as_fn_error 417 + 418 +if expr a : '\(a\)' >/dev/null 2>&1 && 419 + test "X`expr 00001 : '.*\(...\)'`" = X001; then 420 + as_expr=expr 421 +else 422 + as_expr=false 423 +fi 424 + 425 +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 426 + as_basename=basename 427 +else 428 + as_basename=false 429 +fi 430 + 431 +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 432 + as_dirname=dirname 433 +else 434 + as_dirname=false 435 +fi 436 + 437 +as_me=`$as_basename -- "$0" || 438 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 439 + X"$0" : 'X\(//\)$' \| \ 440 + X"$0" : 'X\(/\)' \| . 2>/dev/null || 441 +$as_echo X/"$0" | 442 + sed '/^.*\/\([^/][^/]*\)\/*$/{ 443 + s//\1/ 444 + q 445 + } 446 + /^X\/\(\/\/\)$/{ 447 + s//\1/ 448 + q 449 + } 450 + /^X\/\(\/\).*/{ 451 + s//\1/ 452 + q 453 + } 454 + s/.*/./; q'` 455 + 456 +# Avoid depending upon Character Ranges. 457 +as_cr_letters='abcdefghijklmnopqrstuvwxyz' 458 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 459 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS 460 +as_cr_digits='0123456789' 461 +as_cr_alnum=$as_cr_Letters$as_cr_digits 462 + 463 + 464 + as_lineno_1=$LINENO as_lineno_1a=$LINENO 465 + as_lineno_2=$LINENO as_lineno_2a=$LINENO 466 + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 467 + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 468 + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 469 + sed -n ' 470 + p 471 + /[$]LINENO/= 472 + ' <$as_myself | 473 + sed ' 474 + s/[$]LINENO.*/&-/ 475 + t lineno 476 + b 477 + :lineno 478 + N 479 + :loop 480 + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 481 + t loop 482 + s/-\n.*// 483 + ' >$as_me.lineno && 484 + chmod +x "$as_me.lineno" || 485 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 486 + 487 + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 488 + # already done that, so ensure we don't try to do so again and fall 489 + # in an infinite loop. This has already happened in practice. 490 + _as_can_reexec=no; export _as_can_reexec 491 + # Don't try to exec as it changes $[0], causing all sort of problems 492 + # (the dirname of $[0] is not the place where we might find the 493 + # original and so on. Autoconf is especially sensitive to this). 494 + . "./$as_me.lineno" 495 + # Exit status is that of the last command. 496 + exit 497 +} 498 + 499 +ECHO_C= ECHO_N= ECHO_T= 500 +case `echo -n x` in #((((( 501 +-n*) 502 + case `echo 'xy\c'` in 503 + *c*) ECHO_T=' ';; # ECHO_T is single tab character. 504 + xy) ECHO_C='\c';; 505 + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 506 + ECHO_T=' ';; 507 + esac;; 508 +*) 509 + ECHO_N='-n';; 510 +esac 511 + 512 +rm -f conf$$ conf$$.exe conf$$.file 513 +if test -d conf$$.dir; then 514 + rm -f conf$$.dir/conf$$.file 515 +else 516 + rm -f conf$$.dir 517 + mkdir conf$$.dir 2>/dev/null 518 +fi 519 +if (echo >conf$$.file) 2>/dev/null; then 520 + if ln -s conf$$.file conf$$ 2>/dev/null; then 521 + as_ln_s='ln -s' 522 + # ... but there are two gotchas: 523 + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 524 + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 525 + # In both cases, we have to default to `cp -pR'. 526 + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 527 + as_ln_s='cp -pR' 528 + elif ln conf$$.file conf$$ 2>/dev/null; then 529 + as_ln_s=ln 530 + else 531 + as_ln_s='cp -pR' 532 + fi 533 +else 534 + as_ln_s='cp -pR' 535 +fi 536 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 537 +rmdir conf$$.dir 2>/dev/null 538 + 539 +if mkdir -p . 2>/dev/null; then 540 + as_mkdir_p='mkdir -p "$as_dir"' 541 +else 542 + test -d ./-p && rmdir ./-p 543 + as_mkdir_p=false 544 +fi 545 + 546 +as_test_x='test -x' 547 +as_executable_p=as_fn_executable_p 548 + 549 +# Sed expression to map a string onto a valid CPP name. 550 +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 551 + 552 +# Sed expression to map a string onto a valid variable name. 553 +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 554 + 555 + 556 +test -n "$DJDIR" || exec 7<&0 </dev/null 557 +exec 6>&1 558 + 559 +# Name of the host. 560 +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 561 +# so uname gets run too. 562 +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 563 + 564 +# 565 +# Initializations. 566 +# 12 567 ac_default_prefix=/usr/local 13 -# Any additions from configure.in: 568 +ac_clean_files= 569 +ac_config_libobj_dir=. 570 +LIBOBJS= 571 +cross_compiling=no 572 +subdirs= 573 +MFLAGS= 574 +MAKEFLAGS= 575 + 576 +# Identity of this package. 577 +PACKAGE_NAME= 578 +PACKAGE_TARNAME= 579 +PACKAGE_VERSION= 580 +PACKAGE_STRING= 581 +PACKAGE_BUGREPORT= 582 +PACKAGE_URL= 583 + 584 +ac_unique_file="tdomhtml.tcl" 585 +ac_subst_vars='LTLIBOBJS 586 +LIBOBJS 587 +EXTRA_SOURCES 588 +CLEANFILES 589 +INSTALL_DATA 590 +INSTALL_SCRIPT 591 +INSTALL_PROGRAM 592 +VERSION 593 +PACKAGE 594 +CONFIGDIR 595 +target_alias 596 +host_alias 597 +build_alias 598 +LIBS 599 +ECHO_T 600 +ECHO_N 601 +ECHO_C 602 +DEFS 603 +mandir 604 +localedir 605 +libdir 606 +psdir 607 +pdfdir 608 +dvidir 609 +htmldir 610 +infodir 611 +docdir 612 +oldincludedir 613 +includedir 614 +localstatedir 615 +sharedstatedir 616 +sysconfdir 617 +datadir 618 +datarootdir 619 +libexecdir 620 +sbindir 621 +bindir 622 +program_transform_name 623 +prefix 624 +exec_prefix 625 +PACKAGE_URL 626 +PACKAGE_BUGREPORT 627 +PACKAGE_STRING 628 +PACKAGE_VERSION 629 +PACKAGE_TARNAME 630 +PACKAGE_NAME 631 +PATH_SEPARATOR 632 +SHELL' 633 +ac_subst_files='' 634 +ac_user_opts=' 635 +enable_option_checking 636 +' 637 + ac_precious_vars='build_alias 638 +host_alias 639 +target_alias' 640 + 14 641 15 642 # Initialize some variables set by options. 643 +ac_init_help= 644 +ac_init_version=false 645 +ac_unrecognized_opts= 646 +ac_unrecognized_sep= 16 647 # The variables have the same names as the options, with 17 648 # dashes changed to underlines. 18 -build=NONE 19 -cache_file=./config.cache 649 +cache_file=/dev/null 20 650 exec_prefix=NONE 21 -host=NONE 22 651 no_create= 23 -nonopt=NONE 24 652 no_recursion= 25 653 prefix=NONE 26 654 program_prefix=NONE 27 655 program_suffix=NONE 28 656 program_transform_name=s,x,x, 29 657 silent= 30 658 site= 31 659 srcdir= 32 -target=NONE 33 660 verbose= 34 661 x_includes=NONE 35 662 x_libraries=NONE 663 + 664 +# Installation directory options. 665 +# These are left unexpanded so users can "make install exec_prefix=/foo" 666 +# and all the variables that are supposed to be based on exec_prefix 667 +# by default will actually change. 668 +# Use braces instead of parens because sh, perl, etc. also accept them. 669 +# (The list follows the same order as the GNU Coding Standards.) 36 670 bindir='${exec_prefix}/bin' 37 671 sbindir='${exec_prefix}/sbin' 38 672 libexecdir='${exec_prefix}/libexec' 39 -datadir='${prefix}/share' 673 +datarootdir='${prefix}/share' 674 +datadir='${datarootdir}' 40 675 sysconfdir='${prefix}/etc' 41 676 sharedstatedir='${prefix}/com' 42 677 localstatedir='${prefix}/var' 43 -libdir='${exec_prefix}/lib' 44 678 includedir='${prefix}/include' 45 679 oldincludedir='/usr/include' 46 -infodir='${prefix}/info' 47 -mandir='${prefix}/man' 48 - 49 -# Initialize some other variables. 50 -subdirs= 51 -MFLAGS= MAKEFLAGS= 52 -SHELL=${CONFIG_SHELL-/bin/sh} 53 -# Maximum number of lines to put in a shell here document. 54 -ac_max_here_lines=12 680 +docdir='${datarootdir}/doc/${PACKAGE}' 681 +infodir='${datarootdir}/info' 682 +htmldir='${docdir}' 683 +dvidir='${docdir}' 684 +pdfdir='${docdir}' 685 +psdir='${docdir}' 686 +libdir='${exec_prefix}/lib' 687 +localedir='${datarootdir}/locale' 688 +mandir='${datarootdir}/man' 55 689 56 690 ac_prev= 691 +ac_dashdash= 57 692 for ac_option 58 693 do 59 - 60 694 # If the previous option needs an argument, assign it. 61 695 if test -n "$ac_prev"; then 62 - eval "$ac_prev=\$ac_option" 696 + eval $ac_prev=\$ac_option 63 697 ac_prev= 64 698 continue 65 699 fi 66 700 67 - case "$ac_option" in 68 - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 69 - *) ac_optarg= ;; 701 + case $ac_option in 702 + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 703 + *=) ac_optarg= ;; 704 + *) ac_optarg=yes ;; 70 705 esac 71 706 72 707 # Accept the important Cygnus configure options, so we can diagnose typos. 73 708 74 - case "$ac_option" in 709 + case $ac_dashdash$ac_option in 710 + --) 711 + ac_dashdash=yes ;; 75 712 76 713 -bindir | --bindir | --bindi | --bind | --bin | --bi) 77 714 ac_prev=bindir ;; 78 715 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 79 - bindir="$ac_optarg" ;; 716 + bindir=$ac_optarg ;; 80 717 81 718 -build | --build | --buil | --bui | --bu) 82 - ac_prev=build ;; 719 + ac_prev=build_alias ;; 83 720 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 84 - build="$ac_optarg" ;; 721 + build_alias=$ac_optarg ;; 85 722 86 723 -cache-file | --cache-file | --cache-fil | --cache-fi \ 87 724 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 88 725 ac_prev=cache_file ;; 89 726 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 90 727 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 91 - cache_file="$ac_optarg" ;; 728 + cache_file=$ac_optarg ;; 92 729 93 - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) 730 + --config-cache | -C) 731 + cache_file=config.cache ;; 732 + 733 + -datadir | --datadir | --datadi | --datad) 94 734 ac_prev=datadir ;; 95 - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ 96 - | --da=*) 97 - datadir="$ac_optarg" ;; 735 + -datadir=* | --datadir=* | --datadi=* | --datad=*) 736 + datadir=$ac_optarg ;; 737 + 738 + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 739 + | --dataroo | --dataro | --datar) 740 + ac_prev=datarootdir ;; 741 + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 742 + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 743 + datarootdir=$ac_optarg ;; 98 744 99 745 -disable-* | --disable-*) 100 - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` 746 + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 101 747 # Reject names that are not valid shell variable names. 102 - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then 103 - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 104 - fi 105 - ac_feature=`echo $ac_feature| sed 's/-/_/g'` 106 - eval "enable_${ac_feature}=no" ;; 748 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 749 + as_fn_error $? "invalid feature name: $ac_useropt" 750 + ac_useropt_orig=$ac_useropt 751 + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 752 + case $ac_user_opts in 753 + *" 754 +"enable_$ac_useropt" 755 +"*) ;; 756 + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 757 + ac_unrecognized_sep=', ';; 758 + esac 759 + eval enable_$ac_useropt=no ;; 760 + 761 + -docdir | --docdir | --docdi | --doc | --do) 762 + ac_prev=docdir ;; 763 + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 764 + docdir=$ac_optarg ;; 765 + 766 + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 767 + ac_prev=dvidir ;; 768 + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 769 + dvidir=$ac_optarg ;; 107 770 108 771 -enable-* | --enable-*) 109 - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` 772 + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 110 773 # Reject names that are not valid shell variable names. 111 - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then 112 - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 113 - fi 114 - ac_feature=`echo $ac_feature| sed 's/-/_/g'` 115 - case "$ac_option" in 116 - *=*) ;; 117 - *) ac_optarg=yes ;; 774 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 775 + as_fn_error $? "invalid feature name: $ac_useropt" 776 + ac_useropt_orig=$ac_useropt 777 + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 778 + case $ac_user_opts in 779 + *" 780 +"enable_$ac_useropt" 781 +"*) ;; 782 + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 783 + ac_unrecognized_sep=', ';; 118 784 esac 119 - eval "enable_${ac_feature}='$ac_optarg'" ;; 785 + eval enable_$ac_useropt=\$ac_optarg ;; 120 786 121 787 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 122 788 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 123 789 | --exec | --exe | --ex) 124 790 ac_prev=exec_prefix ;; 125 791 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 126 792 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 127 793 | --exec=* | --exe=* | --ex=*) 128 - exec_prefix="$ac_optarg" ;; 794 + exec_prefix=$ac_optarg ;; 129 795 130 796 -gas | --gas | --ga | --g) 131 797 # Obsolete; use --with-gas. 132 798 with_gas=yes ;; 133 799 134 - -help | --help | --hel | --he) 135 - # Omit some internal or obsolete options to make the list less imposing. 136 - # This message is too long to be a string in the A/UX 3.1 sh. 137 - cat << EOF 138 -Usage: configure [options] [host] 139 -Options: [defaults in brackets after descriptions] 140 -Configuration: 141 - --cache-file=FILE cache test results in FILE 142 - --help print this message 143 - --no-create do not create output files 144 - --quiet, --silent do not print \`checking...' messages 145 - --version print the version of autoconf that created configure 146 -Directory and file names: 147 - --prefix=PREFIX install architecture-independent files in PREFIX 148 - [$ac_default_prefix] 149 - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 150 - [same as prefix] 151 - --bindir=DIR user executables in DIR [EPREFIX/bin] 152 - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] 153 - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] 154 - --datadir=DIR read-only architecture-independent data in DIR 155 - [PREFIX/share] 156 - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] 157 - --sharedstatedir=DIR modifiable architecture-independent data in DIR 158 - [PREFIX/com] 159 - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] 160 - --libdir=DIR object code libraries in DIR [EPREFIX/lib] 161 - --includedir=DIR C header files in DIR [PREFIX/include] 162 - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] 163 - --infodir=DIR info documentation in DIR [PREFIX/info] 164 - --mandir=DIR man documentation in DIR [PREFIX/man] 165 - --srcdir=DIR find the sources in DIR [configure dir or ..] 166 - --program-prefix=PREFIX prepend PREFIX to installed program names 167 - --program-suffix=SUFFIX append SUFFIX to installed program names 168 - --program-transform-name=PROGRAM 169 - run sed PROGRAM on installed program names 170 -EOF 171 - cat << EOF 172 -Host type: 173 - --build=BUILD configure for building on BUILD [BUILD=HOST] 174 - --host=HOST configure for HOST [guessed] 175 - --target=TARGET configure for TARGET [TARGET=HOST] 176 -Features and packages: 177 - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 178 - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 179 - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 180 - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 181 - --x-includes=DIR X include files are in DIR 182 - --x-libraries=DIR X library files are in DIR 183 -EOF 184 - if test -n "$ac_help"; then 185 - echo "--enable and --with options recognized:$ac_help" 186 - fi 187 - exit 0 ;; 800 + -help | --help | --hel | --he | -h) 801 + ac_init_help=long ;; 802 + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 803 + ac_init_help=recursive ;; 804 + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 805 + ac_init_help=short ;; 188 806 189 807 -host | --host | --hos | --ho) 190 - ac_prev=host ;; 808 + ac_prev=host_alias ;; 191 809 -host=* | --host=* | --hos=* | --ho=*) 192 - host="$ac_optarg" ;; 810 + host_alias=$ac_optarg ;; 811 + 812 + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 813 + ac_prev=htmldir ;; 814 + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 815 + | --ht=*) 816 + htmldir=$ac_optarg ;; 193 817 194 818 -includedir | --includedir | --includedi | --included | --include \ 195 819 | --includ | --inclu | --incl | --inc) 196 820 ac_prev=includedir ;; 197 821 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 198 822 | --includ=* | --inclu=* | --incl=* | --inc=*) 199 - includedir="$ac_optarg" ;; 823 + includedir=$ac_optarg ;; 200 824 201 825 -infodir | --infodir | --infodi | --infod | --info | --inf) 202 826 ac_prev=infodir ;; 203 827 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 204 - infodir="$ac_optarg" ;; 828 + infodir=$ac_optarg ;; 205 829 206 830 -libdir | --libdir | --libdi | --libd) 207 831 ac_prev=libdir ;; 208 832 -libdir=* | --libdir=* | --libdi=* | --libd=*) 209 - libdir="$ac_optarg" ;; 833 + libdir=$ac_optarg ;; 210 834 211 835 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 212 836 | --libexe | --libex | --libe) 213 837 ac_prev=libexecdir ;; 214 838 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 215 839 | --libexe=* | --libex=* | --libe=*) 216 - libexecdir="$ac_optarg" ;; 840 + libexecdir=$ac_optarg ;; 841 + 842 + -localedir | --localedir | --localedi | --localed | --locale) 843 + ac_prev=localedir ;; 844 + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 845 + localedir=$ac_optarg ;; 217 846 218 847 -localstatedir | --localstatedir | --localstatedi | --localstated \ 219 - | --localstate | --localstat | --localsta | --localst \ 220 - | --locals | --local | --loca | --loc | --lo) 848 + | --localstate | --localstat | --localsta | --localst | --locals) 221 849 ac_prev=localstatedir ;; 222 850 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 223 - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ 224 - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 225 - localstatedir="$ac_optarg" ;; 851 + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 852 + localstatedir=$ac_optarg ;; 226 853 227 854 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 228 855 ac_prev=mandir ;; 229 856 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 230 - mandir="$ac_optarg" ;; 857 + mandir=$ac_optarg ;; 231 858 232 859 -nfp | --nfp | --nf) 233 860 # Obsolete; use --without-fp. 234 861 with_fp=no ;; 235 862 236 863 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 237 - | --no-cr | --no-c) 864 + | --no-cr | --no-c | -n) 238 865 no_create=yes ;; 239 866 240 867 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 241 868 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 242 869 no_recursion=yes ;; 243 870 244 871 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 245 872 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 246 873 | --oldin | --oldi | --old | --ol | --o) 247 874 ac_prev=oldincludedir ;; 248 875 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 249 876 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 250 877 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 251 - oldincludedir="$ac_optarg" ;; 878 + oldincludedir=$ac_optarg ;; 252 879 253 880 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 254 881 ac_prev=prefix ;; 255 882 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 256 - prefix="$ac_optarg" ;; 883 + prefix=$ac_optarg ;; 257 884 258 885 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 259 886 | --program-pre | --program-pr | --program-p) 260 887 ac_prev=program_prefix ;; 261 888 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 262 889 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 263 - program_prefix="$ac_optarg" ;; 890 + program_prefix=$ac_optarg ;; 264 891 265 892 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 266 893 | --program-suf | --program-su | --program-s) 267 894 ac_prev=program_suffix ;; 268 895 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 269 896 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 270 - program_suffix="$ac_optarg" ;; 897 + program_suffix=$ac_optarg ;; 271 898 272 899 -program-transform-name | --program-transform-name \ 273 900 | --program-transform-nam | --program-transform-na \ 274 901 | --program-transform-n | --program-transform- \ 275 902 | --program-transform | --program-transfor \ 276 903 | --program-transfo | --program-transf \ 277 904 | --program-trans | --program-tran \ ................................................................................ 280 907 -program-transform-name=* | --program-transform-name=* \ 281 908 | --program-transform-nam=* | --program-transform-na=* \ 282 909 | --program-transform-n=* | --program-transform-=* \ 283 910 | --program-transform=* | --program-transfor=* \ 284 911 | --program-transfo=* | --program-transf=* \ 285 912 | --program-trans=* | --program-tran=* \ 286 913 | --progr-tra=* | --program-tr=* | --program-t=*) 287 - program_transform_name="$ac_optarg" ;; 914 + program_transform_name=$ac_optarg ;; 915 + 916 + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 917 + ac_prev=pdfdir ;; 918 + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 919 + pdfdir=$ac_optarg ;; 920 + 921 + -psdir | --psdir | --psdi | --psd | --ps) 922 + ac_prev=psdir ;; 923 + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 924 + psdir=$ac_optarg ;; 288 925 289 926 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 290 927 | -silent | --silent | --silen | --sile | --sil) 291 928 silent=yes ;; 292 929 293 930 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 294 931 ac_prev=sbindir ;; 295 932 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 296 933 | --sbi=* | --sb=*) 297 - sbindir="$ac_optarg" ;; 934 + sbindir=$ac_optarg ;; 298 935 299 936 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 300 937 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 301 938 | --sharedst | --shareds | --shared | --share | --shar \ 302 939 | --sha | --sh) 303 940 ac_prev=sharedstatedir ;; 304 941 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 305 942 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 306 943 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 307 944 | --sha=* | --sh=*) 308 - sharedstatedir="$ac_optarg" ;; 945 + sharedstatedir=$ac_optarg ;; 309 946 310 947 -site | --site | --sit) 311 948 ac_prev=site ;; 312 949 -site=* | --site=* | --sit=*) 313 - site="$ac_optarg" ;; 950 + site=$ac_optarg ;; 314 951 315 952 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 316 953 ac_prev=srcdir ;; 317 954 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 318 - srcdir="$ac_optarg" ;; 955 + srcdir=$ac_optarg ;; 319 956 320 957 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 321 958 | --syscon | --sysco | --sysc | --sys | --sy) 322 959 ac_prev=sysconfdir ;; 323 960 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 324 961 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 325 - sysconfdir="$ac_optarg" ;; 962 + sysconfdir=$ac_optarg ;; 326 963 327 964 -target | --target | --targe | --targ | --tar | --ta | --t) 328 - ac_prev=target ;; 965 + ac_prev=target_alias ;; 329 966 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 330 - target="$ac_optarg" ;; 967 + target_alias=$ac_optarg ;; 331 968 332 969 -v | -verbose | --verbose | --verbos | --verbo | --verb) 333 970 verbose=yes ;; 334 971 335 - -version | --version | --versio | --versi | --vers) 336 - echo "configure generated by autoconf version 2.13" 337 - exit 0 ;; 972 + -version | --version | --versio | --versi | --vers | -V) 973 + ac_init_version=: ;; 338 974 339 975 -with-* | --with-*) 340 - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` 976 + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 341 977 # Reject names that are not valid shell variable names. 342 - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then 343 - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 344 - fi 345 - ac_package=`echo $ac_package| sed 's/-/_/g'` 346 - case "$ac_option" in 347 - *=*) ;; 348 - *) ac_optarg=yes ;; 978 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 979 + as_fn_error $? "invalid package name: $ac_useropt" 980 + ac_useropt_orig=$ac_useropt 981 + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 982 + case $ac_user_opts in 983 + *" 984 +"with_$ac_useropt" 985 +"*) ;; 986 + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 987 + ac_unrecognized_sep=', ';; 349 988 esac 350 - eval "with_${ac_package}='$ac_optarg'" ;; 989 + eval with_$ac_useropt=\$ac_optarg ;; 351 990 352 991 -without-* | --without-*) 353 - ac_package=`echo $ac_option|sed -e 's/-*without-//'` 992 + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 354 993 # Reject names that are not valid shell variable names. 355 - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then 356 - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 357 - fi 358 - ac_package=`echo $ac_package| sed 's/-/_/g'` 359 - eval "with_${ac_package}=no" ;; 994 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 995 + as_fn_error $? "invalid package name: $ac_useropt" 996 + ac_useropt_orig=$ac_useropt 997 + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 998 + case $ac_user_opts in 999 + *" 1000 +"with_$ac_useropt" 1001 +"*) ;; 1002 + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 1003 + ac_unrecognized_sep=', ';; 1004 + esac 1005 + eval with_$ac_useropt=no ;; 360 1006 361 1007 --x) 362 1008 # Obsolete; use --with-x. 363 1009 with_x=yes ;; 364 1010 365 1011 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 366 1012 | --x-incl | --x-inc | --x-in | --x-i) 367 1013 ac_prev=x_includes ;; 368 1014 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 369 1015 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 370 - x_includes="$ac_optarg" ;; 1016 + x_includes=$ac_optarg ;; 371 1017 372 1018 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 373 1019 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 374 1020 ac_prev=x_libraries ;; 375 1021 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 376 1022 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 377 - x_libraries="$ac_optarg" ;; 1023 + x_libraries=$ac_optarg ;; 378 1024 379 - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } 1025 + -*) as_fn_error $? "unrecognized option: \`$ac_option' 1026 +Try \`$0 --help' for more information" 380 1027 ;; 381 1028 1029 + *=*) 1030 + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1031 + # Reject names that are not valid shell variable names. 1032 + case $ac_envvar in #( 1033 + '' | [0-9]* | *[!_$as_cr_alnum]* ) 1034 + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1035 + esac 1036 + eval $ac_envvar=\$ac_optarg 1037 + export $ac_envvar ;; 1038 + 382 1039 *) 383 - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then 384 - echo "configure: warning: $ac_option: invalid host type" 1>&2 385 - fi 386 - if test "x$nonopt" != xNONE; then 387 - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } 388 - fi 389 - nonopt="$ac_option" 1040 + # FIXME: should be removed in autoconf 3.0. 1041 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1042 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1043 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1044 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 390 1045 ;; 391 1046 392 1047 esac 393 1048 done 394 1049 395 1050 if test -n "$ac_prev"; then 396 - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } 397 -fi 398 - 399 -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 400 - 401 -# File descriptor usage: 402 -# 0 standard input 403 -# 1 file creation 404 -# 2 errors and warnings 405 -# 3 some systems may open it to /dev/tty 406 -# 4 used on the Kubota Titan 407 -# 6 checking for... messages and results 408 -# 5 compiler messages saved in config.log 409 -if test "$silent" = yes; then 410 - exec 6>/dev/null 411 -else 412 - exec 6>&1 413 -fi 414 -exec 5>./config.log 415 - 416 -echo "\ 417 -This file contains any messages produced by compilers while 418 -running configure, to aid debugging if configure makes a mistake. 419 -" 1>&5 420 - 421 -# Strip out --no-create and --no-recursion so they do not pile up. 422 -# Also quote any args containing shell metacharacters. 423 -ac_configure_args= 424 -for ac_arg 1051 + ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1052 + as_fn_error $? "missing argument to $ac_option" 1053 +fi 1054 + 1055 +if test -n "$ac_unrecognized_opts"; then 1056 + case $enable_option_checking in 1057 + no) ;; 1058 + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1059 + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1060 + esac 1061 +fi 1062 + 1063 +# Check all directory arguments for consistency. 1064 +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1065 + datadir sysconfdir sharedstatedir localstatedir includedir \ 1066 + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1067 + libdir localedir mandir 425 1068 do 426 - case "$ac_arg" in 427 - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 428 - | --no-cr | --no-c) ;; 429 - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 430 - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; 431 - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 432 - ac_configure_args="$ac_configure_args '$ac_arg'" ;; 433 - *) ac_configure_args="$ac_configure_args $ac_arg" ;; 434 - esac 435 -done 436 - 437 -# NLS nuisances. 438 -# Only set these to C if already set. These must not be set unconditionally 439 -# because not all systems understand e.g. LANG=C (notably SCO). 440 -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! 441 -# Non-C LC_CTYPE values break the ctype check. 442 -if test "${LANG+set}" = set; then LANG=C; export LANG; fi 443 -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi 444 -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi 445 -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi 446 - 447 -# confdefs.h avoids OS command line length limits that DEFS can exceed. 448 -rm -rf conftest* confdefs.h 449 -# AIX cpp loses on an empty file, so make sure it contains at least a newline. 450 -echo > confdefs.h 451 - 452 -# A filename unique to this package, relative to the directory that 453 -# configure is in, which we can look for to find out if srcdir is correct. 454 -ac_unique_file=tdomhtml.tcl 1069 + eval ac_val=\$$ac_var 1070 + # Remove trailing slashes. 1071 + case $ac_val in 1072 + */ ) 1073 + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1074 + eval $ac_var=\$ac_val;; 1075 + esac 1076 + # Be sure to have absolute directory names. 1077 + case $ac_val in 1078 + [\\/$]* | ?:[\\/]* ) continue;; 1079 + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1080 + esac 1081 + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1082 +done 1083 + 1084 +# There might be people who depend on the old broken behavior: `$host' 1085 +# used to hold the argument of --host etc. 1086 +# FIXME: To remove some day. 1087 +build=$build_alias 1088 +host=$host_alias 1089 +target=$target_alias 1090 + 1091 +# FIXME: To remove some day. 1092 +if test "x$host_alias" != x; then 1093 + if test "x$build_alias" = x; then 1094 + cross_compiling=maybe 1095 + elif test "x$build_alias" != "x$host_alias"; then 1096 + cross_compiling=yes 1097 + fi 1098 +fi 1099 + 1100 +ac_tool_prefix= 1101 +test -n "$host_alias" && ac_tool_prefix=$host_alias- 1102 + 1103 +test "$silent" = yes && exec 6>/dev/null 1104 + 1105 + 1106 +ac_pwd=`pwd` && test -n "$ac_pwd" && 1107 +ac_ls_di=`ls -di .` && 1108 +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1109 + as_fn_error $? "working directory cannot be determined" 1110 +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1111 + as_fn_error $? "pwd does not report name of working directory" 1112 + 455 1113 456 1114 # Find the source files, if location was not specified. 457 1115 if test -z "$srcdir"; then 458 1116 ac_srcdir_defaulted=yes 459 - # Try the directory containing this script, then its parent. 460 - ac_prog=$0 461 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` 462 - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 1117 + # Try the directory containing this script, then the parent directory. 1118 + ac_confdir=`$as_dirname -- "$as_myself" || 1119 +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1120 + X"$as_myself" : 'X\(//\)[^/]' \| \ 1121 + X"$as_myself" : 'X\(//\)$' \| \ 1122 + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1123 +$as_echo X"$as_myself" | 1124 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1125 + s//\1/ 1126 + q 1127 + } 1128 + /^X\(\/\/\)[^/].*/{ 1129 + s//\1/ 1130 + q 1131 + } 1132 + /^X\(\/\/\)$/{ 1133 + s//\1/ 1134 + q 1135 + } 1136 + /^X\(\/\).*/{ 1137 + s//\1/ 1138 + q 1139 + } 1140 + s/.*/./; q'` 463 1141 srcdir=$ac_confdir 464 - if test ! -r $srcdir/$ac_unique_file; then 1142 + if test ! -r "$srcdir/$ac_unique_file"; then 465 1143 srcdir=.. 466 1144 fi 467 1145 else 468 1146 ac_srcdir_defaulted=no 469 1147 fi 470 -if test ! -r $srcdir/$ac_unique_file; then 471 - if test "$ac_srcdir_defaulted" = yes; then 472 - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } 473 - else 474 - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } 475 - fi 476 -fi 477 -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` 478 - 479 -# Prefer explicitly selected file to automatically selected ones. 480 -if test -z "$CONFIG_SITE"; then 481 - if test "x$prefix" != xNONE; then 482 - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" 483 - else 484 - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 485 - fi 486 -fi 487 -for ac_site_file in $CONFIG_SITE; do 488 - if test -r "$ac_site_file"; then 489 - echo "loading site script $ac_site_file" 490 - . "$ac_site_file" 1148 +if test ! -r "$srcdir/$ac_unique_file"; then 1149 + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1150 + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1151 +fi 1152 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1153 +ac_abs_confdir=`( 1154 + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1155 + pwd)` 1156 +# When building in place, set srcdir=. 1157 +if test "$ac_abs_confdir" = "$ac_pwd"; then 1158 + srcdir=. 1159 +fi 1160 +# Remove unnecessary trailing slashes from srcdir. 1161 +# Double slashes in file names in object file debugging info 1162 +# mess up M-x gdb in Emacs. 1163 +case $srcdir in 1164 +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1165 +esac 1166 +for ac_var in $ac_precious_vars; do 1167 + eval ac_env_${ac_var}_set=\${${ac_var}+set} 1168 + eval ac_env_${ac_var}_value=\$${ac_var} 1169 + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1170 + eval ac_cv_env_${ac_var}_value=\$${ac_var} 1171 +done 1172 + 1173 +# 1174 +# Report the --help message. 1175 +# 1176 +if test "$ac_init_help" = "long"; then 1177 + # Omit some internal or obsolete options to make the list less imposing. 1178 + # This message is too long to be a string in the A/UX 3.1 sh. 1179 + cat <<_ACEOF 1180 +\`configure' configures this package to adapt to many kinds of systems. 1181 + 1182 +Usage: $0 [OPTION]... [VAR=VALUE]... 1183 + 1184 +To assign environment variables (e.g., CC, CFLAGS...), specify them as 1185 +VAR=VALUE. See below for descriptions of some of the useful variables. 1186 + 1187 +Defaults for the options are specified in brackets. 1188 + 1189 +Configuration: 1190 + -h, --help display this help and exit 1191 + --help=short display options specific to this package 1192 + --help=recursive display the short help of all the included packages 1193 + -V, --version display version information and exit 1194 + -q, --quiet, --silent do not print \`checking ...' messages 1195 + --cache-file=FILE cache test results in FILE [disabled] 1196 + -C, --config-cache alias for \`--cache-file=config.cache' 1197 + -n, --no-create do not create output files 1198 + --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1199 + 1200 +Installation directories: 1201 + --prefix=PREFIX install architecture-independent files in PREFIX 1202 + [$ac_default_prefix] 1203 + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1204 + [PREFIX] 1205 + 1206 +By default, \`make install' will install all the files in 1207 +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1208 +an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1209 +for instance \`--prefix=\$HOME'. 1210 + 1211 +For better control, use the options below. 1212 + 1213 +Fine tuning of the installation directories: 1214 + --bindir=DIR user executables [EPREFIX/bin] 1215 + --sbindir=DIR system admin executables [EPREFIX/sbin] 1216 + --libexecdir=DIR program executables [EPREFIX/libexec] 1217 + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1218 + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1219 + --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1220 + --libdir=DIR object code libraries [EPREFIX/lib] 1221 + --includedir=DIR C header files [PREFIX/include] 1222 + --oldincludedir=DIR C header files for non-gcc [/usr/include] 1223 + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1224 + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1225 + --infodir=DIR info documentation [DATAROOTDIR/info] 1226 + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1227 + --mandir=DIR man documentation [DATAROOTDIR/man] 1228 + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] 1229 + --htmldir=DIR html documentation [DOCDIR] 1230 + --dvidir=DIR dvi documentation [DOCDIR] 1231 + --pdfdir=DIR pdf documentation [DOCDIR] 1232 + --psdir=DIR ps documentation [DOCDIR] 1233 +_ACEOF 1234 + 1235 + cat <<\_ACEOF 1236 +_ACEOF 1237 +fi 1238 + 1239 +if test -n "$ac_init_help"; then 1240 + 1241 + cat <<\_ACEOF 1242 + 1243 +Report bugs to the package provider. 1244 +_ACEOF 1245 +ac_status=$? 1246 +fi 1247 + 1248 +if test "$ac_init_help" = "recursive"; then 1249 + # If there are subdirs, report their specific --help. 1250 + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1251 + test -d "$ac_dir" || 1252 + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1253 + continue 1254 + ac_builddir=. 1255 + 1256 +case "$ac_dir" in 1257 +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1258 +*) 1259 + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1260 + # A ".." for each directory in $ac_dir_suffix. 1261 + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1262 + case $ac_top_builddir_sub in 1263 + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1264 + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1265 + esac ;; 1266 +esac 1267 +ac_abs_top_builddir=$ac_pwd 1268 +ac_abs_builddir=$ac_pwd$ac_dir_suffix 1269 +# for backward compatibility: 1270 +ac_top_builddir=$ac_top_build_prefix 1271 + 1272 +case $srcdir in 1273 + .) # We are building in place. 1274 + ac_srcdir=. 1275 + ac_top_srcdir=$ac_top_builddir_sub 1276 + ac_abs_top_srcdir=$ac_pwd ;; 1277 + [\\/]* | ?:[\\/]* ) # Absolute name. 1278 + ac_srcdir=$srcdir$ac_dir_suffix; 1279 + ac_top_srcdir=$srcdir 1280 + ac_abs_top_srcdir=$srcdir ;; 1281 + *) # Relative name. 1282 + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1283 + ac_top_srcdir=$ac_top_build_prefix$srcdir 1284 + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1285 +esac 1286 +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1287 + 1288 + cd "$ac_dir" || { ac_status=$?; continue; } 1289 + # Check for guested configure. 1290 + if test -f "$ac_srcdir/configure.gnu"; then 1291 + echo && 1292 + $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1293 + elif test -f "$ac_srcdir/configure"; then 1294 + echo && 1295 + $SHELL "$ac_srcdir/configure" --help=recursive 1296 + else 1297 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1298 + fi || ac_status=$? 1299 + cd "$ac_pwd" || { ac_status=$?; break; } 1300 + done 1301 +fi 1302 + 1303 +test -n "$ac_init_help" && exit $ac_status 1304 +if $ac_init_version; then 1305 + cat <<\_ACEOF 1306 +configure 1307 +generated by GNU Autoconf 2.69 1308 + 1309 +Copyright (C) 2012 Free Software Foundation, Inc. 1310 +This configure script is free software; the Free Software Foundation 1311 +gives unlimited permission to copy, distribute and modify it. 1312 +_ACEOF 1313 + exit 1314 +fi 1315 + 1316 +## ------------------------ ## 1317 +## Autoconf initialization. ## 1318 +## ------------------------ ## 1319 +cat >config.log <<_ACEOF 1320 +This file contains any messages produced by compilers while 1321 +running configure, to aid debugging if configure makes a mistake. 1322 + 1323 +It was created by $as_me, which was 1324 +generated by GNU Autoconf 2.69. Invocation command line was 1325 + 1326 + $ $0 $@ 1327 + 1328 +_ACEOF 1329 +exec 5>>config.log 1330 +{ 1331 +cat <<_ASUNAME 1332 +## --------- ## 1333 +## Platform. ## 1334 +## --------- ## 1335 + 1336 +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 1337 +uname -m = `(uname -m) 2>/dev/null || echo unknown` 1338 +uname -r = `(uname -r) 2>/dev/null || echo unknown` 1339 +uname -s = `(uname -s) 2>/dev/null || echo unknown` 1340 +uname -v = `(uname -v) 2>/dev/null || echo unknown` 1341 + 1342 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 1343 +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 1344 + 1345 +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1346 +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1347 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1348 +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 1349 +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1350 +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1351 +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1352 + 1353 +_ASUNAME 1354 + 1355 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1356 +for as_dir in $PATH 1357 +do 1358 + IFS=$as_save_IFS 1359 + test -z "$as_dir" && as_dir=. 1360 + $as_echo "PATH: $as_dir" 1361 + done 1362 +IFS=$as_save_IFS 1363 + 1364 +} >&5 1365 + 1366 +cat >&5 <<_ACEOF 1367 + 1368 + 1369 +## ----------- ## 1370 +## Core tests. ## 1371 +## ----------- ## 1372 + 1373 +_ACEOF 1374 + 1375 + 1376 +# Keep a trace of the command line. 1377 +# Strip out --no-create and --no-recursion so they do not pile up. 1378 +# Strip out --silent because we don't want to record it for future runs. 1379 +# Also quote any args containing shell meta-characters. 1380 +# Make two passes to allow for proper duplicate-argument suppression. 1381 +ac_configure_args= 1382 +ac_configure_args0= 1383 +ac_configure_args1= 1384 +ac_must_keep_next=false 1385 +for ac_pass in 1 2 1386 +do 1387 + for ac_arg 1388 + do 1389 + case $ac_arg in 1390 + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 1391 + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1392 + | -silent | --silent | --silen | --sile | --sil) 1393 + continue ;; 1394 + *\'*) 1395 + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 1396 + esac 1397 + case $ac_pass in 1398 + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 1399 + 2) 1400 + as_fn_append ac_configure_args1 " '$ac_arg'" 1401 + if test $ac_must_keep_next = true; then 1402 + ac_must_keep_next=false # Got value, back to normal. 1403 + else 1404 + case $ac_arg in 1405 + *=* | --config-cache | -C | -disable-* | --disable-* \ 1406 + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 1407 + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 1408 + | -with-* | --with-* | -without-* | --without-* | --x) 1409 + case "$ac_configure_args0 " in 1410 + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 1411 + esac 1412 + ;; 1413 + -* ) ac_must_keep_next=true ;; 1414 + esac 1415 + fi 1416 + as_fn_append ac_configure_args " '$ac_arg'" 1417 + ;; 1418 + esac 1419 + done 1420 +done 1421 +{ ac_configure_args0=; unset ac_configure_args0;} 1422 +{ ac_configure_args1=; unset ac_configure_args1;} 1423 + 1424 +# When interrupted or exit'd, cleanup temporary files, and complete 1425 +# config.log. We remove comments because anyway the quotes in there 1426 +# would cause problems or look ugly. 1427 +# WARNING: Use '\'' to represent an apostrophe within the trap. 1428 +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 1429 +trap 'exit_status=$? 1430 + # Save into config.log some information that might help in debugging. 1431 + { 1432 + echo 1433 + 1434 + $as_echo "## ---------------- ## 1435 +## Cache variables. ## 1436 +## ---------------- ##" 1437 + echo 1438 + # The following way of writing the cache mishandles newlines in values, 1439 +( 1440 + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 1441 + eval ac_val=\$$ac_var 1442 + case $ac_val in #( 1443 + *${as_nl}*) 1444 + case $ac_var in #( 1445 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 1446 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 1447 + esac 1448 + case $ac_var in #( 1449 + _ | IFS | as_nl) ;; #( 1450 + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 1451 + *) { eval $ac_var=; unset $ac_var;} ;; 1452 + esac ;; 1453 + esac 1454 + done 1455 + (set) 2>&1 | 1456 + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 1457 + *${as_nl}ac_space=\ *) 1458 + sed -n \ 1459 + "s/'\''/'\''\\\\'\'''\''/g; 1460 + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 1461 + ;; #( 1462 + *) 1463 + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 1464 + ;; 1465 + esac | 1466 + sort 1467 +) 1468 + echo 1469 + 1470 + $as_echo "## ----------------- ## 1471 +## Output variables. ## 1472 +## ----------------- ##" 1473 + echo 1474 + for ac_var in $ac_subst_vars 1475 + do 1476 + eval ac_val=\$$ac_var 1477 + case $ac_val in 1478 + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1479 + esac 1480 + $as_echo "$ac_var='\''$ac_val'\''" 1481 + done | sort 1482 + echo 1483 + 1484 + if test -n "$ac_subst_files"; then 1485 + $as_echo "## ------------------- ## 1486 +## File substitutions. ## 1487 +## ------------------- ##" 1488 + echo 1489 + for ac_var in $ac_subst_files 1490 + do 1491 + eval ac_val=\$$ac_var 1492 + case $ac_val in 1493 + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1494 + esac 1495 + $as_echo "$ac_var='\''$ac_val'\''" 1496 + done | sort 1497 + echo 1498 + fi 1499 + 1500 + if test -s confdefs.h; then 1501 + $as_echo "## ----------- ## 1502 +## confdefs.h. ## 1503 +## ----------- ##" 1504 + echo 1505 + cat confdefs.h 1506 + echo 1507 + fi 1508 + test "$ac_signal" != 0 && 1509 + $as_echo "$as_me: caught signal $ac_signal" 1510 + $as_echo "$as_me: exit $exit_status" 1511 + } >&5 1512 + rm -f core *.core core.conftest.* && 1513 + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 1514 + exit $exit_status 1515 +' 0 1516 +for ac_signal in 1 2 13 15; do 1517 + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 1518 +done 1519 +ac_signal=0 1520 + 1521 +# confdefs.h avoids OS command line length limits that DEFS can exceed. 1522 +rm -f -r conftest* confdefs.h 1523 + 1524 +$as_echo "/* confdefs.h */" > confdefs.h 1525 + 1526 +# Predefined preprocessor variables. 1527 + 1528 +cat >>confdefs.h <<_ACEOF 1529 +#define PACKAGE_NAME "$PACKAGE_NAME" 1530 +_ACEOF 1531 + 1532 +cat >>confdefs.h <<_ACEOF 1533 +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" 1534 +_ACEOF 1535 + 1536 +cat >>confdefs.h <<_ACEOF 1537 +#define PACKAGE_VERSION "$PACKAGE_VERSION" 1538 +_ACEOF 1539 + 1540 +cat >>confdefs.h <<_ACEOF 1541 +#define PACKAGE_STRING "$PACKAGE_STRING" 1542 +_ACEOF 1543 + 1544 +cat >>confdefs.h <<_ACEOF 1545 +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 1546 +_ACEOF 1547 + 1548 +cat >>confdefs.h <<_ACEOF 1549 +#define PACKAGE_URL "$PACKAGE_URL" 1550 +_ACEOF 1551 + 1552 + 1553 +# Let the site file select an alternate cache file if it wants to. 1554 +# Prefer an explicitly selected file to automatically selected ones. 1555 +ac_site_file1=NONE 1556 +ac_site_file2=NONE 1557 +if test -n "$CONFIG_SITE"; then 1558 + # We do not want a PATH search for config.site. 1559 + case $CONFIG_SITE in #(( 1560 + -*) ac_site_file1=./$CONFIG_SITE;; 1561 + */*) ac_site_file1=$CONFIG_SITE;; 1562 + *) ac_site_file1=./$CONFIG_SITE;; 1563 + esac 1564 +elif test "x$prefix" != xNONE; then 1565 + ac_site_file1=$prefix/share/config.site 1566 + ac_site_file2=$prefix/etc/config.site 1567 +else 1568 + ac_site_file1=$ac_default_prefix/share/config.site 1569 + ac_site_file2=$ac_default_prefix/etc/config.site 1570 +fi 1571 +for ac_site_file in "$ac_site_file1" "$ac_site_file2" 1572 +do 1573 + test "x$ac_site_file" = xNONE && continue 1574 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 1575 + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 1576 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} 1577 + sed 's/^/| /' "$ac_site_file" >&5 1578 + . "$ac_site_file" \ 1579 + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 1580 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 1581 +as_fn_error $? "failed to load site script $ac_site_file 1582 +See \`config.log' for more details" "$LINENO" 5; } 491 1583 fi 492 1584 done 493 1585 494 1586 if test -r "$cache_file"; then 495 - echo "loading cache $cache_file" 496 - . $cache_file 497 -else 498 - echo "creating cache $cache_file" 499 - > $cache_file 500 -fi 1587 + # Some versions of bash will fail to source /dev/null (special files 1588 + # actually), so we avoid doing that. DJGPP emulates it as a regular file. 1589 + if test /dev/null != "$cache_file" && test -f "$cache_file"; then 1590 + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 1591 +$as_echo "$as_me: loading cache $cache_file" >&6;} 1592 + case $cache_file in 1593 + [\\/]* | ?:[\\/]* ) . "$cache_file";; 1594 + *) . "./$cache_file";; 1595 + esac 1596 + fi 1597 +else 1598 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 1599 +$as_echo "$as_me: creating cache $cache_file" >&6;} 1600 + >$cache_file 1601 +fi 1602 + 1603 +# Check that the precious variables saved in the cache have kept the same 1604 +# value. 1605 +ac_cache_corrupted=false 1606 +for ac_var in $ac_precious_vars; do 1607 + eval ac_old_set=\$ac_cv_env_${ac_var}_set 1608 + eval ac_new_set=\$ac_env_${ac_var}_set 1609 + eval ac_old_val=\$ac_cv_env_${ac_var}_value 1610 + eval ac_new_val=\$ac_env_${ac_var}_value 1611 + case $ac_old_set,$ac_new_set in 1612 + set,) 1613 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 1614 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 1615 + ac_cache_corrupted=: ;; 1616 + ,set) 1617 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 1618 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 1619 + ac_cache_corrupted=: ;; 1620 + ,);; 1621 + *) 1622 + if test "x$ac_old_val" != "x$ac_new_val"; then 1623 + # differences in whitespace do not lead to failure. 1624 + ac_old_val_w=`echo x $ac_old_val` 1625 + ac_new_val_w=`echo x $ac_new_val` 1626 + if test "$ac_old_val_w" != "$ac_new_val_w"; then 1627 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 1628 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 1629 + ac_cache_corrupted=: 1630 + else 1631 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 1632 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 1633 + eval $ac_var=\$ac_old_val 1634 + fi 1635 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 1636 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 1637 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 1638 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 1639 + fi;; 1640 + esac 1641 + # Pass precious variables to config.status. 1642 + if test "$ac_new_set" = set; then 1643 + case $ac_new_val in 1644 + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 1645 + *) ac_arg=$ac_var=$ac_new_val ;; 1646 + esac 1647 + case " $ac_configure_args " in 1648 + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 1649 + *) as_fn_append ac_configure_args " '$ac_arg'" ;; 1650 + esac 1651 + fi 1652 +done 1653 +if $ac_cache_corrupted; then 1654 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 1655 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 1656 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 1657 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 1658 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 1659 +fi 1660 +## -------------------- ## 1661 +## Main body of script. ## 1662 +## -------------------- ## 501 1663 502 1664 ac_ext=c 503 -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 504 1665 ac_cpp='$CPP $CPPFLAGS' 505 -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 506 -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 507 -cross_compiling=$ac_cv_prog_cc_cross 508 - 509 -ac_exeext= 510 -ac_objext=o 511 -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 512 - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 513 - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 514 - ac_n= ac_c=' 515 -' ac_t=' ' 516 - else 517 - ac_n=-n ac_c= ac_t= 518 - fi 519 -else 520 - ac_n= ac_c='\c' ac_t= 521 -fi 1666 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 1667 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1668 +ac_compiler_gnu=$ac_cv_c_compiler_gnu 522 1669 523 1670 524 1671 525 1672 ac_aux_dir= 526 -for ac_dir in ../../tclconfig $srcdir/../../tclconfig; do 527 - if test -f $ac_dir/install-sh; then 1673 +for ac_dir in ../../tclconfig "$srcdir"/../../tclconfig; do 1674 + if test -f "$ac_dir/install-sh"; then 528 1675 ac_aux_dir=$ac_dir 529 1676 ac_install_sh="$ac_aux_dir/install-sh -c" 530 1677 break 531 - elif test -f $ac_dir/install.sh; then 1678 + elif test -f "$ac_dir/install.sh"; then 532 1679 ac_aux_dir=$ac_dir 533 1680 ac_install_sh="$ac_aux_dir/install.sh -c" 534 1681 break 1682 + elif test -f "$ac_dir/shtool"; then 1683 + ac_aux_dir=$ac_dir 1684 + ac_install_sh="$ac_aux_dir/shtool install -c" 1685 + break 535 1686 fi 536 1687 done 537 1688 if test -z "$ac_aux_dir"; then 538 - { echo "configure: error: can not find install-sh or install.sh in ../../tclconfig $srcdir/../../tclconfig" 1>&2; exit 1; } 1689 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../tclconfig \"$srcdir\"/../../tclconfig" "$LINENO" 5 539 1690 fi 540 -ac_config_guess=$ac_aux_dir/config.guess 541 -ac_config_sub=$ac_aux_dir/config.sub 542 -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. 1691 + 1692 +# These three variables are undocumented and unsupported, 1693 +# and are intended to be withdrawn in a future Autoconf release. 1694 +# They can cause serious problems if a builder's source tree is in a directory 1695 +# whose full name contains unusual characters. 1696 +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 1697 +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 1698 +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 1699 + 543 1700 544 1701 CONFIGDIR=${srcdir}/../../tclconfig 545 1702 546 1703 547 1704 #---------------------------------------------------------------------- 548 1705 # __CHANGE__ 549 1706 # Set your package name and version numbers here. The NODOT_VERSION is ................................................................................ 565 1722 566 1723 567 1724 #-------------------------------------------------------------------- 568 1725 # We put this here so that you can compile with -DVERSION="1.2" to 569 1726 # encode the package version directly into the source files. 570 1727 #-------------------------------------------------------------------- 571 1728 572 -eval cat >> confdefs.h <<EOF 1729 +eval cat >>confdefs.h <<_ACEOF 573 1730 #define VERSION "${VERSION}" 574 -EOF 1731 +_ACEOF 575 1732 576 1733 577 1734 #-------------------------------------------------------------------- 578 1735 # Call TEA_INIT as the first TEA_ macro to set up initial vars. 579 1736 # This will define a ${TEA_PLATFORM} variable == "unix" or "windows". 580 1737 #-------------------------------------------------------------------- 581 1738 ................................................................................ 615 1772 # Find a good install program. We prefer a C program (faster), 616 1773 # so one script is as good as another. But avoid the broken or 617 1774 # incompatible versions: 618 1775 # SysV /etc/install, /usr/sbin/install 619 1776 # SunOS /usr/etc/install 620 1777 # IRIX /sbin/install 621 1778 # AIX /bin/install 1779 +# AmigaOS /C/install, which installs bootblocks on floppy discs 622 1780 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 623 1781 # AFS /usr/afsws/bin/install, which mishandles nonexistent args 624 1782 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 1783 +# OS/2's system install, which has a completely different semantic 625 1784 # ./install, which can be erroneously created by make from ./install.sh. 626 -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 627 -echo "configure:628: checking for a BSD compatible install" >&5 1785 +# Reject install programs that cannot install multiple files. 1786 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 1787 +$as_echo_n "checking for a BSD-compatible install... " >&6; } 628 1788 if test -z "$INSTALL"; then 629 -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then 630 - echo $ac_n "(cached) $ac_c" 1>&6 1789 +if ${ac_cv_path_install+:} false; then : 1790 + $as_echo_n "(cached) " >&6 631 1791 else 632 - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" 633 - for ac_dir in $PATH; do 1792 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1793 +for as_dir in $PATH 1794 +do 1795 + IFS=$as_save_IFS 1796 + test -z "$as_dir" && as_dir=. 634 1797 # Account for people who put trailing slashes in PATH elements. 635 - case "$ac_dir/" in 636 - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; 637 - *) 638 - # OSF1 and SCO ODT 3.0 have their own names for install. 639 - # Don't use installbsd from OSF since it installs stuff as root 640 - # by default. 641 - for ac_prog in ginstall scoinst install; do 642 - if test -f $ac_dir/$ac_prog; then 1798 +case $as_dir/ in #(( 1799 + ./ | .// | /[cC]/* | \ 1800 + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ 1801 + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ 1802 + /usr/ucb/* ) ;; 1803 + *) 1804 + # OSF1 and SCO ODT 3.0 have their own names for install. 1805 + # Don't use installbsd from OSF since it installs stuff as root 1806 + # by default. 1807 + for ac_prog in ginstall scoinst install; do 1808 + for ac_exec_ext in '' $ac_executable_extensions; do 1809 + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then 643 1810 if test $ac_prog = install && 644 - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then 1811 + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 645 1812 # AIX install. It has an incompatible calling convention. 646 1813 : 1814 + elif test $ac_prog = install && 1815 + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 1816 + # program-specific install script used by HP pwplus--don't use. 1817 + : 647 1818 else 648 - ac_cv_path_install="$ac_dir/$ac_prog -c" 649 - break 2 1819 + rm -rf conftest.one conftest.two conftest.dir 1820 + echo one > conftest.one 1821 + echo two > conftest.two 1822 + mkdir conftest.dir 1823 + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && 1824 + test -s conftest.one && test -s conftest.two && 1825 + test -s conftest.dir/conftest.one && 1826 + test -s conftest.dir/conftest.two 1827 + then 1828 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" 1829 + break 3 1830 + fi 650 1831 fi 651 1832 fi 652 1833 done 653 - ;; 654 - esac 1834 + done 1835 + ;; 1836 +esac 1837 + 655 1838 done 656 - IFS="$ac_save_IFS" 1839 +IFS=$as_save_IFS 1840 + 1841 +rm -rf conftest.one conftest.two conftest.dir 657 1842 658 1843 fi 659 1844 if test "${ac_cv_path_install+set}" = set; then 660 - INSTALL="$ac_cv_path_install" 1845 + INSTALL=$ac_cv_path_install 661 1846 else 662 - # As a last resort, use the slow shell script. We don't cache a 663 - # path for INSTALL within a source directory, because that will 1847 + # As a last resort, use the slow shell script. Don't cache a 1848 + # value for INSTALL within a source directory, because that will 664 1849 # break other packages using the cache if that directory is 665 - # removed, or if the path is relative. 666 - INSTALL="$ac_install_sh" 1850 + # removed, or if the value is a relative name. 1851 + INSTALL=$ac_install_sh 667 1852 fi 668 1853 fi 669 -echo "$ac_t""$INSTALL" 1>&6 1854 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 1855 +$as_echo "$INSTALL" >&6; } 670 1856 671 1857 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. 672 1858 # It thinks the first close brace ends the variable substitution. 673 1859 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 674 1860 675 -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' 1861 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' 676 1862 677 1863 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 678 1864 679 1865 680 1866 #-------------------------------------------------------------------- 681 1867 # __CHANGE__ 682 1868 # Choose which headers you need. Extension authors should try very ................................................................................ 779 1965 780 1966 #-------------------------------------------------------------------- 781 1967 # Finally, substitute all of the various values into the Makefile. 782 1968 # You may alternatively have a special pkgIndex.tcl.in or other files 783 1969 # which require substituting th AC variables in. Include these here. 784 1970 #-------------------------------------------------------------------- 785 1971 786 -trap '' 1 2 15 787 -cat > confcache <<\EOF 1972 +ac_config_files="$ac_config_files Makefile pkgIndex.tcl" 1973 + 1974 +cat >confcache <<\_ACEOF 788 1975 # This file is a shell script that caches the results of configure 789 1976 # tests run on this system so they can be shared between configure 790 -# scripts and configure runs. It is not useful on other systems. 791 -# If it contains results you don't want to keep, you may remove or edit it. 1977 +# scripts and configure runs, see configure's option --config-cache. 1978 +# It is not useful on other systems. If it contains results you don't 1979 +# want to keep, you may remove or edit it. 792 1980 # 793 -# By default, configure uses ./config.cache as the cache file, 794 -# creating it if it does not exist already. You can give configure 795 -# the --cache-file=FILE option to use a different cache file; that is 796 -# what configure does when it calls configure scripts in 797 -# subdirectories, so they share the cache. 798 -# Giving --cache-file=/dev/null disables caching, for debugging configure. 799 -# config.status only pays attention to the cache file if you give it the 800 -# --recheck option to rerun configure. 1981 +# config.status only pays attention to the cache file if you give it 1982 +# the --recheck option to rerun configure. 801 1983 # 802 -EOF 1984 +# `ac_cv_env_foo' variables (set or unset) will be overridden when 1985 +# loading this file, other *unset* `ac_cv_foo' will be assigned the 1986 +# following values. 1987 + 1988 +_ACEOF 1989 + 803 1990 # The following way of writing the cache mishandles newlines in values, 804 1991 # but we know of no workaround that is simple, portable, and efficient. 805 -# So, don't put newlines in cache variables' values. 1992 +# So, we kill variables containing newlines. 806 1993 # Ultrix sh set writes to stderr and can't be redirected directly, 807 1994 # and sets the high bit in the cache file unless we assign to the vars. 808 -(set) 2>&1 | 809 - case `(ac_space=' '; set | grep ac_space) 2>&1` in 810 - *ac_space=\ *) 811 - # `set' does not quote correctly, so add quotes (double-quote substitution 812 - # turns \\\\ into \\, and sed turns \\ into \). 813 - sed -n \ 814 - -e "s/'/'\\\\''/g" \ 815 - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" 816 - ;; 817 - *) 818 - # `set' quotes correctly as required by POSIX, so do not add quotes. 819 - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' 820 - ;; 821 - esac >> confcache 822 -if cmp -s $cache_file confcache; then 823 - : 824 -else 825 - if test -w $cache_file; then 826 - echo "updating cache $cache_file" 827 - cat confcache > $cache_file 1995 +( 1996 + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 1997 + eval ac_val=\$$ac_var 1998 + case $ac_val in #( 1999 + *${as_nl}*) 2000 + case $ac_var in #( 2001 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2002 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2003 + esac 2004 + case $ac_var in #( 2005 + _ | IFS | as_nl) ;; #( 2006 + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2007 + *) { eval $ac_var=; unset $ac_var;} ;; 2008 + esac ;; 2009 + esac 2010 + done 2011 + 2012 + (set) 2>&1 | 2013 + case $as_nl`(ac_space=' '; set) 2>&1` in #( 2014 + *${as_nl}ac_space=\ *) 2015 + # `set' does not quote correctly, so add quotes: double-quote 2016 + # substitution turns \\\\ into \\, and sed turns \\ into \. 2017 + sed -n \ 2018 + "s/'/'\\\\''/g; 2019 + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 2020 + ;; #( 2021 + *) 2022 + # `set' quotes correctly as required by POSIX, so do not add quotes. 2023 + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 2024 + ;; 2025 + esac | 2026 + sort 2027 +) | 2028 + sed ' 2029 + /^ac_cv_env_/b end 2030 + t clear 2031 + :clear 2032 + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 2033 + t end 2034 + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 2035 + :end' >>confcache 2036 +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 2037 + if test -w "$cache_file"; then 2038 + if test "x$cache_file" != "x/dev/null"; then 2039 + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 2040 +$as_echo "$as_me: updating cache $cache_file" >&6;} 2041 + if test ! -f "$cache_file" || test -h "$cache_file"; then 2042 + cat confcache >"$cache_file" 2043 + else 2044 + case $cache_file in #( 2045 + */* | ?:*) 2046 + mv -f confcache "$cache_file"$$ && 2047 + mv -f "$cache_file"$$ "$cache_file" ;; #( 2048 + *) 2049 + mv -f confcache "$cache_file" ;; 2050 + esac 2051 + fi 2052 + fi 828 2053 else 829 - echo "not updating unwritable cache $cache_file" 2054 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 2055 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 830 2056 fi 831 2057 fi 832 2058 rm -f confcache 833 2059 834 -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 835 - 836 2060 test "x$prefix" = xNONE && prefix=$ac_default_prefix 837 2061 # Let make expand exec_prefix. 838 2062 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 839 2063 840 -# Any assignment to VPATH causes Sun make to only execute 841 -# the first set of double-colon rules, so remove it if not needed. 842 -# If there is a colon in the path, we need to keep it. 843 -if test "x$srcdir" = x.; then 844 - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' 845 -fi 846 - 847 -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 848 - 849 2064 # Transform confdefs.h into DEFS. 850 2065 # Protect against shell expansion while executing Makefile rules. 851 2066 # Protect against Makefile macro expansion. 852 -cat > conftest.defs <<\EOF 853 -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g 854 -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g 855 -s%\[%\\&%g 856 -s%\]%\\&%g 857 -s%\$%$$%g 858 -EOF 859 -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` 860 -rm -f conftest.defs 861 - 862 - 863 -# Without the "./", some shells look in PATH for config.status. 864 -: ${CONFIG_STATUS=./config.status} 865 - 866 -echo creating $CONFIG_STATUS 867 -rm -f $CONFIG_STATUS 868 -cat > $CONFIG_STATUS <<EOF 869 -#! /bin/sh 870 -# Generated automatically by configure. 871 -# Run this file to recreate the current configuration. 872 -# This directory was configured as follows, 873 -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 874 -# 875 -# $0 $ac_configure_args 876 -# 2067 +# 2068 +# If the first sed substitution is executed (which looks for macros that 2069 +# take arguments), then branch to the quote section. Otherwise, 2070 +# look for a macro that doesn't take arguments. 2071 +ac_script=' 2072 +:mline 2073 +/\\$/{ 2074 + N 2075 + s,\\\n,, 2076 + b mline 2077 +} 2078 +t clear 2079 +:clear 2080 +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g 2081 +t quote 2082 +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g 2083 +t quote 2084 +b any 2085 +:quote 2086 +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g 2087 +s/\[/\\&/g 2088 +s/\]/\\&/g 2089 +s/\$/$$/g 2090 +H 2091 +:any 2092 +${ 2093 + g 2094 + s/^\n// 2095 + s/\n/ /g 2096 + p 2097 +} 2098 +' 2099 +DEFS=`sed -n "$ac_script" confdefs.h` 2100 + 2101 + 2102 +ac_libobjs= 2103 +ac_ltlibobjs= 2104 +U= 2105 +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 2106 + # 1. Remove the extension, and $U if already installed. 2107 + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 2108 + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 2109 + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 2110 + # will be set to the directory where LIBOBJS objects are built. 2111 + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 2112 + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 2113 +done 2114 +LIBOBJS=$ac_libobjs 2115 + 2116 +LTLIBOBJS=$ac_ltlibobjs 2117 + 2118 + 2119 + 2120 +: "${CONFIG_STATUS=./config.status}" 2121 +ac_write_fail=0 2122 +ac_clean_files_save=$ac_clean_files 2123 +ac_clean_files="$ac_clean_files $CONFIG_STATUS" 2124 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 2125 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 2126 +as_write_fail=0 2127 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 2128 +#! $SHELL 2129 +# Generated by $as_me. 2130 +# Run this file to recreate the current configuration. 877 2131 # Compiler output produced by configure, useful for debugging 878 -# configure, is in ./config.log if it exists. 879 - 880 -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" 881 -for ac_option 2132 +# configure, is in config.log if it exists. 2133 + 2134 +debug=false 2135 +ac_cs_recheck=false 2136 +ac_cs_silent=false 2137 + 2138 +SHELL=\${CONFIG_SHELL-$SHELL} 2139 +export SHELL 2140 +_ASEOF 2141 +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 2142 +## -------------------- ## 2143 +## M4sh Initialization. ## 2144 +## -------------------- ## 2145 + 2146 +# Be more Bourne compatible 2147 +DUALCASE=1; export DUALCASE # for MKS sh 2148 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 2149 + emulate sh 2150 + NULLCMD=: 2151 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 2152 + # is contrary to our usage. Disable this feature. 2153 + alias -g '${1+"$@"}'='"$@"' 2154 + setopt NO_GLOB_SUBST 2155 +else 2156 + case `(set -o) 2>/dev/null` in #( 2157 + *posix*) : 2158 + set -o posix ;; #( 2159 + *) : 2160 + ;; 2161 +esac 2162 +fi 2163 + 2164 + 2165 +as_nl=' 2166 +' 2167 +export as_nl 2168 +# Printing a long string crashes Solaris 7 /usr/bin/printf. 2169 +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2170 +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 2171 +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 2172 +# Prefer a ksh shell builtin over an external printf program on Solaris, 2173 +# but without wasting forks for bash or zsh. 2174 +if test -z "$BASH_VERSION$ZSH_VERSION" \ 2175 + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 2176 + as_echo='print -r --' 2177 + as_echo_n='print -rn --' 2178 +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 2179 + as_echo='printf %s\n' 2180 + as_echo_n='printf %s' 2181 +else 2182 + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 2183 + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 2184 + as_echo_n='/usr/ucb/echo -n' 2185 + else 2186 + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 2187 + as_echo_n_body='eval 2188 + arg=$1; 2189 + case $arg in #( 2190 + *"$as_nl"*) 2191 + expr "X$arg" : "X\\(.*\\)$as_nl"; 2192 + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 2193 + esac; 2194 + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 2195 + ' 2196 + export as_echo_n_body 2197 + as_echo_n='sh -c $as_echo_n_body as_echo' 2198 + fi 2199 + export as_echo_body 2200 + as_echo='sh -c $as_echo_body as_echo' 2201 +fi 2202 + 2203 +# The user is always right. 2204 +if test "${PATH_SEPARATOR+set}" != set; then 2205 + PATH_SEPARATOR=: 2206 + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 2207 + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 2208 + PATH_SEPARATOR=';' 2209 + } 2210 +fi 2211 + 2212 + 2213 +# IFS 2214 +# We need space, tab and new line, in precisely that order. Quoting is 2215 +# there to prevent editors from complaining about space-tab. 2216 +# (If _AS_PATH_WALK were called with IFS unset, it would disable word 2217 +# splitting by setting IFS to empty value.) 2218 +IFS=" "" $as_nl" 2219 + 2220 +# Find who we are. Look in the path if we contain no directory separator. 2221 +as_myself= 2222 +case $0 in #(( 2223 + *[\\/]* ) as_myself=$0 ;; 2224 + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2225 +for as_dir in $PATH 2226 +do 2227 + IFS=$as_save_IFS 2228 + test -z "$as_dir" && as_dir=. 2229 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 2230 + done 2231 +IFS=$as_save_IFS 2232 + 2233 + ;; 2234 +esac 2235 +# We did not find ourselves, most probably we were run as `sh COMMAND' 2236 +# in which case we are not to be found in the path. 2237 +if test "x$as_myself" = x; then 2238 + as_myself=$0 2239 +fi 2240 +if test ! -f "$as_myself"; then 2241 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 2242 + exit 1 2243 +fi 2244 + 2245 +# Unset variables that we do not need and which cause bugs (e.g. in 2246 +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 2247 +# suppresses any "Segmentation fault" message there. '((' could 2248 +# trigger a bug in pdksh 5.2.14. 2249 +for as_var in BASH_ENV ENV MAIL MAILPATH 2250 +do eval test x\${$as_var+set} = xset \ 2251 + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 2252 +done 2253 +PS1='$ ' 2254 +PS2='> ' 2255 +PS4='+ ' 2256 + 2257 +# NLS nuisances. 2258 +LC_ALL=C 2259 +export LC_ALL 2260 +LANGUAGE=C 2261 +export LANGUAGE 2262 + 2263 +# CDPATH. 2264 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2265 + 2266 + 2267 +# as_fn_error STATUS ERROR [LINENO LOG_FD] 2268 +# ---------------------------------------- 2269 +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 2270 +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 2271 +# script with STATUS, using 1 if that was 0. 2272 +as_fn_error () 2273 +{ 2274 + as_status=$1; test $as_status -eq 0 && as_status=1 2275 + if test "$4"; then 2276 + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2277 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 2278 + fi 2279 + $as_echo "$as_me: error: $2" >&2 2280 + as_fn_exit $as_status 2281 +} # as_fn_error 2282 + 2283 + 2284 +# as_fn_set_status STATUS 2285 +# ----------------------- 2286 +# Set $? to STATUS, without forking. 2287 +as_fn_set_status () 2288 +{ 2289 + return $1 2290 +} # as_fn_set_status 2291 + 2292 +# as_fn_exit STATUS 2293 +# ----------------- 2294 +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 2295 +as_fn_exit () 2296 +{ 2297 + set +e 2298 + as_fn_set_status $1 2299 + exit $1 2300 +} # as_fn_exit 2301 + 2302 +# as_fn_unset VAR 2303 +# --------------- 2304 +# Portably unset VAR. 2305 +as_fn_unset () 2306 +{ 2307 + { eval $1=; unset $1;} 2308 +} 2309 +as_unset=as_fn_unset 2310 +# as_fn_append VAR VALUE 2311 +# ---------------------- 2312 +# Append the text in VALUE to the end of the definition contained in VAR. Take 2313 +# advantage of any shell optimizations that allow amortized linear growth over 2314 +# repeated appends, instead of the typical quadratic growth present in naive 2315 +# implementations. 2316 +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 2317 + eval 'as_fn_append () 2318 + { 2319 + eval $1+=\$2 2320 + }' 2321 +else 2322 + as_fn_append () 2323 + { 2324 + eval $1=\$$1\$2 2325 + } 2326 +fi # as_fn_append 2327 + 2328 +# as_fn_arith ARG... 2329 +# ------------------ 2330 +# Perform arithmetic evaluation on the ARGs, and store the result in the 2331 +# global $as_val. Take advantage of shells that can avoid forks. The arguments 2332 +# must be portable across $(()) and expr. 2333 +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 2334 + eval 'as_fn_arith () 2335 + { 2336 + as_val=$(( $* )) 2337 + }' 2338 +else 2339 + as_fn_arith () 2340 + { 2341 + as_val=`expr "$@" || test $? -eq 1` 2342 + } 2343 +fi # as_fn_arith 2344 + 2345 + 2346 +if expr a : '\(a\)' >/dev/null 2>&1 && 2347 + test "X`expr 00001 : '.*\(...\)'`" = X001; then 2348 + as_expr=expr 2349 +else 2350 + as_expr=false 2351 +fi 2352 + 2353 +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 2354 + as_basename=basename 2355 +else 2356 + as_basename=false 2357 +fi 2358 + 2359 +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 2360 + as_dirname=dirname 2361 +else 2362 + as_dirname=false 2363 +fi 2364 + 2365 +as_me=`$as_basename -- "$0" || 2366 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 2367 + X"$0" : 'X\(//\)$' \| \ 2368 + X"$0" : 'X\(/\)' \| . 2>/dev/null || 2369 +$as_echo X/"$0" | 2370 + sed '/^.*\/\([^/][^/]*\)\/*$/{ 2371 + s//\1/ 2372 + q 2373 + } 2374 + /^X\/\(\/\/\)$/{ 2375 + s//\1/ 2376 + q 2377 + } 2378 + /^X\/\(\/\).*/{ 2379 + s//\1/ 2380 + q 2381 + } 2382 + s/.*/./; q'` 2383 + 2384 +# Avoid depending upon Character Ranges. 2385 +as_cr_letters='abcdefghijklmnopqrstuvwxyz' 2386 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 2387 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS 2388 +as_cr_digits='0123456789' 2389 +as_cr_alnum=$as_cr_Letters$as_cr_digits 2390 + 2391 +ECHO_C= ECHO_N= ECHO_T= 2392 +case `echo -n x` in #((((( 2393 +-n*) 2394 + case `echo 'xy\c'` in 2395 + *c*) ECHO_T=' ';; # ECHO_T is single tab character. 2396 + xy) ECHO_C='\c';; 2397 + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 2398 + ECHO_T=' ';; 2399 + esac;; 2400 +*) 2401 + ECHO_N='-n';; 2402 +esac 2403 + 2404 +rm -f conf$$ conf$$.exe conf$$.file 2405 +if test -d conf$$.dir; then 2406 + rm -f conf$$.dir/conf$$.file 2407 +else 2408 + rm -f conf$$.dir 2409 + mkdir conf$$.dir 2>/dev/null 2410 +fi 2411 +if (echo >conf$$.file) 2>/dev/null; then 2412 + if ln -s conf$$.file conf$$ 2>/dev/null; then 2413 + as_ln_s='ln -s' 2414 + # ... but there are two gotchas: 2415 + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 2416 + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 2417 + # In both cases, we have to default to `cp -pR'. 2418 + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 2419 + as_ln_s='cp -pR' 2420 + elif ln conf$$.file conf$$ 2>/dev/null; then 2421 + as_ln_s=ln 2422 + else 2423 + as_ln_s='cp -pR' 2424 + fi 2425 +else 2426 + as_ln_s='cp -pR' 2427 +fi 2428 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 2429 +rmdir conf$$.dir 2>/dev/null 2430 + 2431 + 2432 +# as_fn_mkdir_p 2433 +# ------------- 2434 +# Create "$as_dir" as a directory, including parents if necessary. 2435 +as_fn_mkdir_p () 2436 +{ 2437 + 2438 + case $as_dir in #( 2439 + -*) as_dir=./$as_dir;; 2440 + esac 2441 + test -d "$as_dir" || eval $as_mkdir_p || { 2442 + as_dirs= 2443 + while :; do 2444 + case $as_dir in #( 2445 + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 2446 + *) as_qdir=$as_dir;; 2447 + esac 2448 + as_dirs="'$as_qdir' $as_dirs" 2449 + as_dir=`$as_dirname -- "$as_dir" || 2450 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 2451 + X"$as_dir" : 'X\(//\)[^/]' \| \ 2452 + X"$as_dir" : 'X\(//\)$' \| \ 2453 + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 2454 +$as_echo X"$as_dir" | 2455 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 2456 + s//\1/ 2457 + q 2458 + } 2459 + /^X\(\/\/\)[^/].*/{ 2460 + s//\1/ 2461 + q 2462 + } 2463 + /^X\(\/\/\)$/{ 2464 + s//\1/ 2465 + q 2466 + } 2467 + /^X\(\/\).*/{ 2468 + s//\1/ 2469 + q 2470 + } 2471 + s/.*/./; q'` 2472 + test -d "$as_dir" && break 2473 + done 2474 + test -z "$as_dirs" || eval "mkdir $as_dirs" 2475 + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 2476 + 2477 + 2478 +} # as_fn_mkdir_p 2479 +if mkdir -p . 2>/dev/null; then 2480 + as_mkdir_p='mkdir -p "$as_dir"' 2481 +else 2482 + test -d ./-p && rmdir ./-p 2483 + as_mkdir_p=false 2484 +fi 2485 + 2486 + 2487 +# as_fn_executable_p FILE 2488 +# ----------------------- 2489 +# Test if FILE is an executable regular file. 2490 +as_fn_executable_p () 2491 +{ 2492 + test -f "$1" && test -x "$1" 2493 +} # as_fn_executable_p 2494 +as_test_x='test -x' 2495 +as_executable_p=as_fn_executable_p 2496 + 2497 +# Sed expression to map a string onto a valid CPP name. 2498 +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 2499 + 2500 +# Sed expression to map a string onto a valid variable name. 2501 +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 2502 + 2503 + 2504 +exec 6>&1 2505 +## ----------------------------------- ## 2506 +## Main body of $CONFIG_STATUS script. ## 2507 +## ----------------------------------- ## 2508 +_ASEOF 2509 +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 2510 + 2511 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2512 +# Save the log message, to keep $0 and so on meaningful, and to 2513 +# report actual input values of CONFIG_FILES etc. instead of their 2514 +# values after options handling. 2515 +ac_log=" 2516 +This file was extended by $as_me, which was 2517 +generated by GNU Autoconf 2.69. Invocation command line was 2518 + 2519 + CONFIG_FILES = $CONFIG_FILES 2520 + CONFIG_HEADERS = $CONFIG_HEADERS 2521 + CONFIG_LINKS = $CONFIG_LINKS 2522 + CONFIG_COMMANDS = $CONFIG_COMMANDS 2523 + $ $0 $@ 2524 + 2525 +on `(hostname || uname -n) 2>/dev/null | sed 1q` 2526 +" 2527 + 2528 +_ACEOF 2529 + 2530 +case $ac_config_files in *" 2531 +"*) set x $ac_config_files; shift; ac_config_files=$*;; 2532 +esac 2533 + 2534 + 2535 + 2536 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2537 +# Files that config.status was made for. 2538 +config_files="$ac_config_files" 2539 + 2540 +_ACEOF 2541 + 2542 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2543 +ac_cs_usage="\ 2544 +\`$as_me' instantiates files and other configuration actions 2545 +from templates according to the current configuration. Unless the files 2546 +and actions are specified as TAGs, all are instantiated by default. 2547 + 2548 +Usage: $0 [OPTION]... [TAG]... 2549 + 2550 + -h, --help print this help, then exit 2551 + -V, --version print version number and configuration settings, then exit 2552 + --config print configuration, then exit 2553 + -q, --quiet, --silent 2554 + do not print progress messages 2555 + -d, --debug don't remove temporary files 2556 + --recheck update $as_me by reconfiguring in the same conditions 2557 + --file=FILE[:TEMPLATE] 2558 + instantiate the configuration file FILE 2559 + 2560 +Configuration files: 2561 +$config_files 2562 + 2563 +Report bugs to the package provider." 2564 + 2565 +_ACEOF 2566 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2567 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 2568 +ac_cs_version="\\ 2569 +config.status 2570 +configured by $0, generated by GNU Autoconf 2.69, 2571 + with options \\"\$ac_cs_config\\" 2572 + 2573 +Copyright (C) 2012 Free Software Foundation, Inc. 2574 +This config.status script is free software; the Free Software Foundation 2575 +gives unlimited permission to copy, distribute and modify it." 2576 + 2577 +ac_pwd='$ac_pwd' 2578 +srcdir='$srcdir' 2579 +INSTALL='$INSTALL' 2580 +test -n "\$AWK" || AWK=awk 2581 +_ACEOF 2582 + 2583 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2584 +# The default lists apply if the user does not specify any file. 2585 +ac_need_defaults=: 2586 +while test $# != 0 882 2587 do 883 - case "\$ac_option" in 2588 + case $1 in 2589 + --*=?*) 2590 + ac_option=`expr "X$1" : 'X\([^=]*\)='` 2591 + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 2592 + ac_shift=: 2593 + ;; 2594 + --*=) 2595 + ac_option=`expr "X$1" : 'X\([^=]*\)='` 2596 + ac_optarg= 2597 + ac_shift=: 2598 + ;; 2599 + *) 2600 + ac_option=$1 2601 + ac_optarg=$2 2602 + ac_shift=shift 2603 + ;; 2604 + esac 2605 + 2606 + case $ac_option in 2607 + # Handling of the options. 884 2608 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 885 - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" 886 - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; 887 - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) 888 - echo "$CONFIG_STATUS generated by autoconf version 2.13" 889 - exit 0 ;; 890 - -help | --help | --hel | --he | --h) 891 - echo "\$ac_cs_usage"; exit 0 ;; 892 - *) echo "\$ac_cs_usage"; exit 1 ;; 2609 + ac_cs_recheck=: ;; 2610 + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 2611 + $as_echo "$ac_cs_version"; exit ;; 2612 + --config | --confi | --conf | --con | --co | --c ) 2613 + $as_echo "$ac_cs_config"; exit ;; 2614 + --debug | --debu | --deb | --de | --d | -d ) 2615 + debug=: ;; 2616 + --file | --fil | --fi | --f ) 2617 + $ac_shift 2618 + case $ac_optarg in 2619 + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 2620 + '') as_fn_error $? "missing file argument" ;; 2621 + esac 2622 + as_fn_append CONFIG_FILES " '$ac_optarg'" 2623 + ac_need_defaults=false;; 2624 + --he | --h | --help | --hel | -h ) 2625 + $as_echo "$ac_cs_usage"; exit ;; 2626 + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2627 + | -silent | --silent | --silen | --sile | --sil | --si | --s) 2628 + ac_cs_silent=: ;; 2629 + 2630 + # This is an error. 2631 + -*) as_fn_error $? "unrecognized option: \`$1' 2632 +Try \`$0 --help' for more information." ;; 2633 + 2634 + *) as_fn_append ac_config_targets " $1" 2635 + ac_need_defaults=false ;; 2636 + 2637 + esac 2638 + shift 2639 +done 2640 + 2641 +ac_configure_extra_args= 2642 + 2643 +if $ac_cs_silent; then 2644 + exec 6>/dev/null 2645 + ac_configure_extra_args="$ac_configure_extra_args --silent" 2646 +fi 2647 + 2648 +_ACEOF 2649 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2650 +if \$ac_cs_recheck; then 2651 + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 2652 + shift 2653 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 2654 + CONFIG_SHELL='$SHELL' 2655 + export CONFIG_SHELL 2656 + exec "\$@" 2657 +fi 2658 + 2659 +_ACEOF 2660 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2661 +exec 5>>config.log 2662 +{ 2663 + echo 2664 + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 2665 +## Running $as_me. ## 2666 +_ASBOX 2667 + $as_echo "$ac_log" 2668 +} >&5 2669 + 2670 +_ACEOF 2671 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2672 +_ACEOF 2673 + 2674 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2675 + 2676 +# Handling of arguments. 2677 +for ac_config_target in $ac_config_targets 2678 +do 2679 + case $ac_config_target in 2680 + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 2681 + "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;; 2682 + 2683 + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 893 2684 esac 894 2685 done 895 2686 896 -ac_given_srcdir=$srcdir 897 -ac_given_INSTALL="$INSTALL" 898 - 899 -trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 900 -EOF 901 -cat >> $CONFIG_STATUS <<EOF 902 - 903 -# Protect against being on the right side of a sed subst in config.status. 904 -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; 905 - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF 906 -$ac_vpsub 907 -$extrasub 908 -s%@SHELL@%$SHELL%g 909 -s%@CFLAGS@%$CFLAGS%g 910 -s%@CPPFLAGS@%$CPPFLAGS%g 911 -s%@CXXFLAGS@%$CXXFLAGS%g 912 -s%@FFLAGS@%$FFLAGS%g 913 -s%@DEFS@%$DEFS%g 914 -s%@LDFLAGS@%$LDFLAGS%g 915 -s%@LIBS@%$LIBS%g 916 -s%@exec_prefix@%$exec_prefix%g 917 -s%@prefix@%$prefix%g 918 -s%@program_transform_name@%$program_transform_name%g 919 -s%@bindir@%$bindir%g 920 -s%@sbindir@%$sbindir%g 921 -s%@libexecdir@%$libexecdir%g 922 -s%@datadir@%$datadir%g 923 -s%@sysconfdir@%$sysconfdir%g 924 -s%@sharedstatedir@%$sharedstatedir%g 925 -s%@localstatedir@%$localstatedir%g 926 -s%@libdir@%$libdir%g 927 -s%@includedir@%$includedir%g 928 -s%@oldincludedir@%$oldincludedir%g 929 -s%@infodir@%$infodir%g 930 -s%@mandir@%$mandir%g 931 -s%@CONFIGDIR@%$CONFIGDIR%g 932 -s%@PACKAGE@%$PACKAGE%g 933 -s%@VERSION@%$VERSION%g 934 -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g 935 -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g 936 -s%@INSTALL_DATA@%$INSTALL_DATA%g 937 -s%@CLEANFILES@%$CLEANFILES%g 938 -s%@EXTRA_SOURCES@%$EXTRA_SOURCES%g 939 - 940 -CEOF 941 -EOF 942 - 943 -cat >> $CONFIG_STATUS <<\EOF 944 - 945 -# Split the substitutions into bite-sized pieces for seds with 946 -# small command number limits, like on Digital OSF/1 and HP-UX. 947 -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. 948 -ac_file=1 # Number of current file. 949 -ac_beg=1 # First line for current file. 950 -ac_end=$ac_max_sed_cmds # Line after last line for current file. 951 -ac_more_lines=: 952 -ac_sed_cmds="" 953 -while $ac_more_lines; do 954 - if test $ac_beg -gt 1; then 955 - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file 2687 + 2688 +# If the user did not use the arguments to specify the items to instantiate, 2689 +# then the envvar interface is used. Set only those that are not. 2690 +# We use the long form for the default assignment because of an extremely 2691 +# bizarre bug on SunOS 4.1.3. 2692 +if $ac_need_defaults; then 2693 + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 2694 +fi 2695 + 2696 +# Have a temporary directory for convenience. Make it in the build tree 2697 +# simply because there is no reason against having it here, and in addition, 2698 +# creating and moving files from /tmp can sometimes cause problems. 2699 +# Hook for its removal unless debugging. 2700 +# Note that there is a small window in which the directory will not be cleaned: 2701 +# after its creation but before its name has been assigned to `$tmp'. 2702 +$debug || 2703 +{ 2704 + tmp= ac_tmp= 2705 + trap 'exit_status=$? 2706 + : "${ac_tmp:=$tmp}" 2707 + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 2708 +' 0 2709 + trap 'as_fn_exit 1' 1 2 13 15 2710 +} 2711 +# Create a (secure) tmp directory for tmp files. 2712 + 2713 +{ 2714 + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 2715 + test -d "$tmp" 2716 +} || 2717 +{ 2718 + tmp=./conf$$-$RANDOM 2719 + (umask 077 && mkdir "$tmp") 2720 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 2721 +ac_tmp=$tmp 2722 + 2723 +# Set up the scripts for CONFIG_FILES section. 2724 +# No need to generate them if there are no CONFIG_FILES. 2725 +# This happens for instance with `./config.status config.h'. 2726 +if test -n "$CONFIG_FILES"; then 2727 + 2728 + 2729 +ac_cr=`echo X | tr X '\015'` 2730 +# On cygwin, bash can eat \r inside `` if the user requested igncr. 2731 +# But we know of no other shell where ac_cr would be empty at this 2732 +# point, so we can use a bashism as a fallback. 2733 +if test "x$ac_cr" = x; then 2734 + eval ac_cr=\$\'\\r\' 2735 +fi 2736 +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 2737 +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 2738 + ac_cs_awk_cr='\\r' 2739 +else 2740 + ac_cs_awk_cr=$ac_cr 2741 +fi 2742 + 2743 +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 2744 +_ACEOF 2745 + 2746 + 2747 +{ 2748 + echo "cat >conf$$subs.awk <<_ACEOF" && 2749 + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 2750 + echo "_ACEOF" 2751 +} >conf$$subs.sh || 2752 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 2753 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 2754 +ac_delim='%!_!# ' 2755 +for ac_last_try in false false false false false :; do 2756 + . ./conf$$subs.sh || 2757 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 2758 + 2759 + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 2760 + if test $ac_delim_n = $ac_delim_num; then 2761 + break 2762 + elif $ac_last_try; then 2763 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 956 2764 else 957 - sed "${ac_end}q" conftest.subs > conftest.s$ac_file 958 - fi 959 - if test ! -s conftest.s$ac_file; then 960 - ac_more_lines=false 961 - rm -f conftest.s$ac_file 962 - else 963 - if test -z "$ac_sed_cmds"; then 964 - ac_sed_cmds="sed -f conftest.s$ac_file" 965 - else 966 - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" 967 - fi 968 - ac_file=`expr $ac_file + 1` 969 - ac_beg=$ac_end 970 - ac_end=`expr $ac_end + $ac_max_sed_cmds` 2765 + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 971 2766 fi 972 2767 done 973 -if test -z "$ac_sed_cmds"; then 974 - ac_sed_cmds=cat 2768 +rm -f conf$$subs.sh 2769 + 2770 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2771 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 2772 +_ACEOF 2773 +sed -n ' 2774 +h 2775 +s/^/S["/; s/!.*/"]=/ 2776 +p 2777 +g 2778 +s/^[^!]*!// 2779 +:repl 2780 +t repl 2781 +s/'"$ac_delim"'$// 2782 +t delim 2783 +:nl 2784 +h 2785 +s/\(.\{148\}\)..*/\1/ 2786 +t more1 2787 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 2788 +p 2789 +n 2790 +b repl 2791 +:more1 2792 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 2793 +p 2794 +g 2795 +s/.\{148\}// 2796 +t nl 2797 +:delim 2798 +h 2799 +s/\(.\{148\}\)..*/\1/ 2800 +t more2 2801 +s/["\\]/\\&/g; s/^/"/; s/$/"/ 2802 +p 2803 +b 2804 +:more2 2805 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 2806 +p 2807 +g 2808 +s/.\{148\}// 2809 +t delim 2810 +' <conf$$subs.awk | sed ' 2811 +/^[^""]/{ 2812 + N 2813 + s/\n// 2814 +} 2815 +' >>$CONFIG_STATUS || ac_write_fail=1 2816 +rm -f conf$$subs.awk 2817 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 2818 +_ACAWK 2819 +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 2820 + for (key in S) S_is_set[key] = 1 2821 + FS = "" 2822 + 2823 +} 2824 +{ 2825 + line = $ 0 2826 + nfields = split(line, field, "@") 2827 + substed = 0 2828 + len = length(field[1]) 2829 + for (i = 2; i < nfields; i++) { 2830 + key = field[i] 2831 + keylen = length(key) 2832 + if (S_is_set[key]) { 2833 + value = S[key] 2834 + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 2835 + len += length(value) + length(field[++i]) 2836 + substed = 1 2837 + } else 2838 + len += 1 + keylen 2839 + } 2840 + 2841 + print line 2842 +} 2843 + 2844 +_ACAWK 2845 +_ACEOF 2846 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2847 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 2848 + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 2849 +else 2850 + cat 2851 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 2852 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 2853 +_ACEOF 2854 + 2855 +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), 2856 +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 2857 +# trailing colons and then remove the whole line if VPATH becomes empty 2858 +# (actually we leave an empty line to preserve line numbers). 2859 +if test "x$srcdir" = x.; then 2860 + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 2861 +h 2862 +s/// 2863 +s/^/:/ 2864 +s/[ ]*$/:/ 2865 +s/:\$(srcdir):/:/g 2866 +s/:\${srcdir}:/:/g 2867 +s/:@srcdir@:/:/g 2868 +s/^:*// 2869 +s/:*$// 2870 +x 2871 +s/\(=[ ]*\).*/\1/ 2872 +G 2873 +s/\n// 2874 +s/^[^=]*=[ ]*$// 2875 +}' 975 2876 fi 976 -EOF 977 - 978 -cat >> $CONFIG_STATUS <<EOF 979 - 980 -CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"} 981 -EOF 982 -cat >> $CONFIG_STATUS <<\EOF 983 -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then 984 - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 985 - case "$ac_file" in 986 - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` 987 - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 988 - *) ac_file_in="${ac_file}.in" ;; 2877 + 2878 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 2879 +fi # test -n "$CONFIG_FILES" 2880 + 2881 + 2882 +eval set X " :F $CONFIG_FILES " 2883 +shift 2884 +for ac_tag 2885 +do 2886 + case $ac_tag in 2887 + :[FHLC]) ac_mode=$ac_tag; continue;; 2888 + esac 2889 + case $ac_mode$ac_tag in 2890 + :[FHL]*:*);; 2891 + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 2892 + :[FH]-) ac_tag=-:-;; 2893 + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 2894 + esac 2895 + ac_save_IFS=$IFS 2896 + IFS=: 2897 + set x $ac_tag 2898 + IFS=$ac_save_IFS 2899 + shift 2900 + ac_file=$1 2901 + shift 2902 + 2903 + case $ac_mode in 2904 + :L) ac_source=$1;; 2905 + :[FH]) 2906 + ac_file_inputs= 2907 + for ac_f 2908 + do 2909 + case $ac_f in 2910 + -) ac_f="$ac_tmp/stdin";; 2911 + *) # Look for the file first in the build tree, then in the source tree 2912 + # (if the path is not absolute). The absolute path cannot be DOS-style, 2913 + # because $ac_f cannot contain `:'. 2914 + test -f "$ac_f" || 2915 + case $ac_f in 2916 + [\\/$]*) false;; 2917 + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 2918 + esac || 2919 + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 2920 + esac 2921 + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 2922 + as_fn_append ac_file_inputs " '$ac_f'" 2923 + done 2924 + 2925 + # Let's still pretend it is `configure' which instantiates (i.e., don't 2926 + # use $as_me), people would be surprised to read: 2927 + # /* config.h. Generated by config.status. */ 2928 + configure_input='Generated from '` 2929 + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 2930 + `' by configure.' 2931 + if test x"$ac_file" != x-; then 2932 + configure_input="$ac_file. $configure_input" 2933 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 2934 +$as_echo "$as_me: creating $ac_file" >&6;} 2935 + fi 2936 + # Neutralize special characters interpreted by sed in replacement strings. 2937 + case $configure_input in #( 2938 + *\&* | *\|* | *\\* ) 2939 + ac_sed_conf_input=`$as_echo "$configure_input" | 2940 + sed 's/[\\\\&|]/\\\\&/g'`;; #( 2941 + *) ac_sed_conf_input=$configure_input;; 2942 + esac 2943 + 2944 + case $ac_tag in 2945 + *:-:* | *:-) cat >"$ac_tmp/stdin" \ 2946 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 2947 + esac 2948 + ;; 2949 + esac 2950 + 2951 + ac_dir=`$as_dirname -- "$ac_file" || 2952 +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 2953 + X"$ac_file" : 'X\(//\)[^/]' \| \ 2954 + X"$ac_file" : 'X\(//\)$' \| \ 2955 + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 2956 +$as_echo X"$ac_file" | 2957 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 2958 + s//\1/ 2959 + q 2960 + } 2961 + /^X\(\/\/\)[^/].*/{ 2962 + s//\1/ 2963 + q 2964 + } 2965 + /^X\(\/\/\)$/{ 2966 + s//\1/ 2967 + q 2968 + } 2969 + /^X\(\/\).*/{ 2970 + s//\1/ 2971 + q 2972 + } 2973 + s/.*/./; q'` 2974 + as_dir="$ac_dir"; as_fn_mkdir_p 2975 + ac_builddir=. 2976 + 2977 +case "$ac_dir" in 2978 +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 2979 +*) 2980 + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 2981 + # A ".." for each directory in $ac_dir_suffix. 2982 + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 2983 + case $ac_top_builddir_sub in 2984 + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 2985 + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 2986 + esac ;; 2987 +esac 2988 +ac_abs_top_builddir=$ac_pwd 2989 +ac_abs_builddir=$ac_pwd$ac_dir_suffix 2990 +# for backward compatibility: 2991 +ac_top_builddir=$ac_top_build_prefix 2992 + 2993 +case $srcdir in 2994 + .) # We are building in place. 2995 + ac_srcdir=. 2996 + ac_top_srcdir=$ac_top_builddir_sub 2997 + ac_abs_top_srcdir=$ac_pwd ;; 2998 + [\\/]* | ?:[\\/]* ) # Absolute name. 2999 + ac_srcdir=$srcdir$ac_dir_suffix; 3000 + ac_top_srcdir=$srcdir 3001 + ac_abs_top_srcdir=$srcdir ;; 3002 + *) # Relative name. 3003 + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 3004 + ac_top_srcdir=$ac_top_build_prefix$srcdir 3005 + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 3006 +esac 3007 +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 3008 + 3009 + 3010 + case $ac_mode in 3011 + :F) 3012 + # 3013 + # CONFIG_FILE 3014 + # 3015 + 3016 + case $INSTALL in 3017 + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 3018 + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; 989 3019 esac 3020 +_ACEOF 3021 + 3022 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3023 +# If the template does not know about datarootdir, expand it. 3024 +# FIXME: This hack should be removed a few years after 2.60. 3025 +ac_datarootdir_hack=; ac_datarootdir_seen= 3026 +ac_sed_dataroot=' 3027 +/datarootdir/ { 3028 + p 3029 + q 3030 +} 3031 +/@datadir@/p 3032 +/@docdir@/p 3033 +/@infodir@/p 3034 +/@localedir@/p 3035 +/@mandir@/p' 3036 +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 3037 +*datarootdir*) ac_datarootdir_seen=yes;; 3038 +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 3039 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 3040 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 3041 +_ACEOF 3042 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 3043 + ac_datarootdir_hack=' 3044 + s&@datadir@&$datadir&g 3045 + s&@docdir@&$docdir&g 3046 + s&@infodir@&$infodir&g 3047 + s&@localedir@&$localedir&g 3048 + s&@mandir@&$mandir&g 3049 + s&\\\${datarootdir}&$datarootdir&g' ;; 3050 +esac 3051 +_ACEOF 3052 + 3053 +# Neutralize VPATH when `$srcdir' = `.'. 3054 +# Shell code in configure.ac might set extrasub. 3055 +# FIXME: do we really want to maintain this feature? 3056 +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 3057 +ac_sed_extra="$ac_vpsub 3058 +$extrasub 3059 +_ACEOF 3060 +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3061 +:t 3062 +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 3063 +s|@configure_input@|$ac_sed_conf_input|;t t 3064 +s&@top_builddir@&$ac_top_builddir_sub&;t t 3065 +s&@top_build_prefix@&$ac_top_build_prefix&;t t 3066 +s&@srcdir@&$ac_srcdir&;t t 3067 +s&@abs_srcdir@&$ac_abs_srcdir&;t t 3068 +s&@top_srcdir@&$ac_top_srcdir&;t t 3069 +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 3070 +s&@builddir@&$ac_builddir&;t t 3071 +s&@abs_builddir@&$ac_abs_builddir&;t t 3072 +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 3073 +s&@INSTALL@&$ac_INSTALL&;t t 3074 +$ac_datarootdir_hack 3075 +" 3076 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 3077 + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 990 3078 991 - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. 3079 +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 3080 + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 3081 + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 3082 + "$ac_tmp/out"`; test -z "$ac_out"; } && 3083 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 3084 +which seems to be undefined. Please make sure it is defined" >&5 3085 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 3086 +which seems to be undefined. Please make sure it is defined" >&2;} 992 3087 993 - # Remove last slash and all that follows it. Not all systems have dirname. 994 - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 995 - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 996 - # The file is in a subdirectory. 997 - test ! -d "$ac_dir" && mkdir "$ac_dir" 998 - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" 999 - # A "../" for each directory in $ac_dir_suffix. 1000 - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` 1001 - else 1002 - ac_dir_suffix= ac_dots= 1003 - fi 3088 + rm -f "$ac_tmp/stdin" 3089 + case $ac_file in 3090 + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 3091 + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 3092 + esac \ 3093 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 3094 + ;; 3095 + 1004 3096 1005 - case "$ac_given_srcdir" in 1006 - .) srcdir=. 1007 - if test -z "$ac_dots"; then top_srcdir=. 1008 - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; 1009 - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; 1010 - *) # Relative path. 1011 - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" 1012 - top_srcdir="$ac_dots$ac_given_srcdir" ;; 3097 + 1013 3098 esac 1014 3099 1015 - case "$ac_given_INSTALL" in 1016 - [/$]*) INSTALL="$ac_given_INSTALL" ;; 1017 - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; 1018 - esac 3100 +done # for ac_tag 3101 + 3102 + 3103 +as_fn_exit 0 3104 +_ACEOF 3105 +ac_clean_files=$ac_clean_files_save 1019 3106 1020 - echo creating "$ac_file" 1021 - rm -f "$ac_file" 1022 - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." 1023 - case "$ac_file" in 1024 - *Makefile*) ac_comsub="1i\\ 1025 -# $configure_input" ;; 1026 - *) ac_comsub= ;; 1027 - esac 3107 +test $ac_write_fail = 0 || 3108 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 3109 + 1028 3110 1029 - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` 1030 - sed -e "$ac_comsub 1031 -s%@configure_input@%$configure_input%g 1032 -s%@srcdir@%$srcdir%g 1033 -s%@top_srcdir@%$top_srcdir%g 1034 -s%@INSTALL@%$INSTALL%g 1035 -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file 1036 -fi; done 1037 -rm -f conftest.s* 1038 - 1039 -EOF 1040 -cat >> $CONFIG_STATUS <<EOF 1041 - 1042 -EOF 1043 -cat >> $CONFIG_STATUS <<\EOF 1044 - 1045 -exit 0 1046 -EOF 1047 -chmod +x $CONFIG_STATUS 1048 -rm -fr confdefs* $ac_clean_files 1049 -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 3111 +# configure is writing to config.log, and then calls config.status. 3112 +# config.status does its own redirection, appending to config.log. 3113 +# Unfortunately, on DOS this fails, as config.log is still kept open 3114 +# by configure, so config.status won't be able to write to it; its 3115 +# output is simply discarded. So we exec the FD to /dev/null, 3116 +# effectively closing config.log, so it can be properly (re)opened and 3117 +# appended to by config.status. When coming back to configure, we 3118 +# need to make the FD available again. 3119 +if test "$no_create" != yes; then 3120 + ac_cs_success=: 3121 + ac_config_status_args= 3122 + test "$silent" = yes && 3123 + ac_config_status_args="$ac_config_status_args --quiet" 3124 + exec 5>/dev/null 3125 + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 3126 + exec 5>>config.log 3127 + # Use ||, not &&, to avoid exiting from the if with $? = 1, which 3128 + # would make configure fail if this is the last instruction. 3129 + $ac_cs_success || as_fn_exit 1 3130 +fi 3131 +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 3132 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 3133 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 3134 +fi 1050 3135
Changes to extensions/tdomhtml/configure.in.
1 1 #!/bin/bash -norc 2 2 dnl This file is an input file used by the GNU "autoconf" program to 3 3 dnl generate the file "configure", which is run during Tcl installation 4 4 dnl to configure the system for the local environment. 5 -# 6 -# RCS: @(#) $Id$ 7 5 8 6 #----------------------------------------------------------------------- 9 7 # Sample configure.in for Tcl Extensions. The only places you should 10 8 # need to modify this file are marked by the string __CHANGE__ 11 9 #----------------------------------------------------------------------- 12 10 13 11 #-----------------------------------------------------------------------
Changes to extensions/tnc/Makefile.in.
7 7 # replaced in the actual Makefile. 8 8 # 9 9 # Copyright (c) 1999 Scriptics Corporation. 10 10 # Copyright (c) 2002-2005 ActiveState Corporation. 11 11 # 12 12 # See the file "license.terms" for information on usage and redistribution 13 13 # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 14 -# 15 -# RCS: @(#) $Id$ 16 14 17 15 #======================================================================== 18 16 # Add additional lines to handle any additional AC_SUBST cases that 19 17 # have been added in a customized configure script. 20 18 #======================================================================== 21 19 22 20 #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@ ................................................................................ 69 67 70 68 srcdir = @srcdir@ 71 69 prefix = @prefix@ 72 70 exec_prefix = @exec_prefix@ 73 71 74 72 bindir = @bindir@ 75 73 libdir = @libdir@ 74 +includedir = @includedir@ 75 +datarootdir = @datarootdir@ 76 76 datadir = @datadir@ 77 77 mandir = @mandir@ 78 -includedir = @includedir@ 79 78 80 79 DESTDIR = 81 80 82 81 PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 83 82 pkgdatadir = $(datadir)/$(PKG_DIR) 84 83 pkglibdir = $(libdir)/$(PKG_DIR) 85 84 pkgincludedir = $(includedir)/$(PKG_DIR) 86 85 87 86 top_builddir = . 88 87 89 -INSTALL = @INSTALL@ 90 -INSTALL_PROGRAM = @INSTALL_PROGRAM@ 91 -INSTALL_DATA = @INSTALL_DATA@ 92 -INSTALL_SCRIPT = @INSTALL_SCRIPT@ 88 +INSTALL_OPTIONS = 89 +INSTALL = $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS} 90 +INSTALL_DATA_DIR = ${INSTALL} -d -m 755 91 +INSTALL_PROGRAM = ${INSTALL} -m 555 92 +INSTALL_DATA = ${INSTALL} -m 444 93 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} 94 +INSTALL_LIBRARY = ${INSTALL_DATA} 93 95 94 96 PACKAGE_NAME = @PACKAGE_NAME@ 95 97 PACKAGE_VERSION = @PACKAGE_VERSION@ 96 98 CC = @CC@ 97 99 CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 98 100 CFLAGS_WARNING = @CFLAGS_WARNING@ 99 -CLEANFILES = @CLEANFILES@ 100 101 EXEEXT = @EXEEXT@ 101 102 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 102 103 MAKE_LIB = @MAKE_LIB@ 103 104 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 104 105 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 105 106 MAKE_STUB_LIB = @MAKE_STUB_LIB@ 106 107 OBJEXT = @OBJEXT@ ................................................................................ 125 126 # to test against an uninstalled Tcl. Add special env vars that you 126 127 # require for testing here (like TCLX_LIBRARY). 127 128 #======================================================================== 128 129 129 130 EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) 130 131 #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR) 131 132 TCLLIBPATH = $(top_builddir) 132 -TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ 133 - @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 133 +TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` 134 +PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 134 135 PATH="$(EXTRA_PATH):$(PATH)" \ 135 136 TCLLIBPATH="$(TCLLIBPATH)" 136 -# TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` 137 137 138 138 TCLSH_PROG = @TCLSH_PROG@ 139 -TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) 139 +TCLSH = $(PKG_ENV) $(TCLSH_ENV) $(TCLSH_PROG) 140 140 141 +#WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` 141 142 #WISH_PROG = @WISH_PROG@ 142 -#WISH = $(TCLSH_ENV) $(WISH_PROG) 143 - 143 +#WISH = $(PKG_ENV) $(TCLSH_ENV) $(WISH_ENV) $(WISH_PROG) 144 144 145 145 SHARED_BUILD = @SHARED_BUILD@ 146 146 147 147 INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ 148 148 #INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ 149 149 150 150 PKG_CFLAGS = @PKG_CFLAGS@ ................................................................................ 153 153 # must make sure that configure.in checks for the necessary components 154 154 # that your library may use. TCL_DEFS can actually be a problem if 155 155 # you do not compile with a similar machine setup as the Tcl core was 156 156 # compiled with. 157 157 #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) 158 158 DEFS = @DEFS@ $(PKG_CFLAGS) 159 159 160 -CONFIG_CLEAN_FILES = Makefile 160 +# Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile 161 +CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl 162 +CLEANFILES = @CLEANFILES@ 161 163 162 164 CPPFLAGS = @CPPFLAGS@ 163 165 LIBS = @PKG_LIBS@ @LIBS@ 164 166 AR = @AR@ 165 167 CFLAGS = @CFLAGS@ 166 168 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 169 + 170 +.SUFFIXES: .c .$(OBJEXT) 167 171 168 172 #======================================================================== 169 173 # Start of user-definable TARGETS section 170 174 #======================================================================== 171 175 172 176 #======================================================================== 173 177 # TEA TARGETS. Please note that the "libraries:" target refers to platform 174 -# independent files, and the "binaries:" target inclues executable programs and 178 +# independent files, and the "binaries:" target includes executable programs and 175 179 # platform-dependent libraries. Modify these targets so that they install 176 180 # the various pieces of your package. The make and install rules 177 181 # for the BINARIES that you specified above have already been done. 178 182 #======================================================================== 179 183 180 184 all: binaries libraries doc 181 185 ................................................................................ 186 190 # of the Makefile, in the "BINARIES" variable. 187 191 #======================================================================== 188 192 189 193 binaries: $(BINARIES) 190 194 191 195 libraries: 192 196 193 - 194 197 #======================================================================== 195 198 # Your doc target should differentiate from doc builds (by the developer) 196 199 # and doc installs (see install-doc), which just install the docs on the 197 200 # end user machine when building from source. 198 201 #======================================================================== 199 202 200 203 doc: 204 + @echo "If you have documentation to create, place the commands to" 205 + @echo "build the docs in the 'doc:' target. For example:" 206 + @echo " xml2nroff sample.xml > sample.n" 207 + @echo " xml2html sample.xml > sample.html" 201 208 202 -install: all install-binaries install-libraries 209 +install: all install-binaries install-libraries install-doc 203 210 204 211 install-binaries: binaries install-lib-binaries install-bin-binaries 205 212 206 213 #======================================================================== 207 214 # This rule installs platform-independent files, such as header files. 208 215 # The list=...; for p in $$list handles the empty list case x-platform. 209 216 #======================================================================== 210 217 211 218 install-libraries: libraries 212 - @mkdir -p $(DESTDIR)$(includedir) 219 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir) 213 220 @echo "Installing header files in $(DESTDIR)$(includedir)" 214 221 @list='$(PKG_HEADERS)'; for i in $$list; do \ 215 222 echo "Installing $(srcdir)/$$i" ; \ 216 223 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 217 224 done; 218 225 219 226 #======================================================================== 220 227 # Install documentation. Unix manpages should go in the $(mandir) 221 228 # directory. 222 229 #======================================================================== 223 230 224 231 install-doc: doc 225 - @mkdir -p $(DESTDIR)$(mandir)/mann 232 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann 226 233 @echo "Installing documentation in $(DESTDIR)$(mandir)" 227 234 @list='$(srcdir)/doc/*.n'; for i in $$list; do \ 228 235 echo "Installing $$i"; \ 229 - rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ 230 236 $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ 231 237 done 232 238 233 239 test: binaries libraries 234 240 $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 235 241 236 242 shell: binaries libraries 237 243 @$(TCLSH) $(SCRIPT) 238 244 239 245 gdb: 240 246 $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) 247 + 248 +VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high \ 249 + --leak-check=yes --show-reachable=yes -v 250 + 251 +valgrind: binaries libraries 252 + $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) \ 253 + `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 254 + 255 +valgrindshell: binaries libraries 256 + $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT) 241 257 242 258 depend: 243 259 244 260 #======================================================================== 245 261 # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 246 262 # mentioned above. That will ensure that this target is built when you 247 263 # run "make binaries". ................................................................................ 272 288 # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ 273 289 # 274 290 # Setting the VPATH variable to a list of paths will cause the makefile 275 291 # to look into these paths when resolving .c to .obj dependencies. 276 292 # As necessary, add $(srcdir):$(srcdir)/compat:.... 277 293 #======================================================================== 278 294 279 -VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win 295 +VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win:$(srcdir)/macosx 280 296 281 297 .c.@OBJEXT@: 282 298 $(COMPILE) -c `@CYGPATH@ $<` -o $@ 283 299 284 300 #======================================================================== 285 301 # Distribution creation 286 302 # You may need to tweak this target to make it work correctly. 287 303 #======================================================================== 288 304 289 305 #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar 290 -COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 306 +COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 291 307 DIST_ROOT = /tmp/dist 292 308 DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) 293 309 294 310 dist-clean: 295 311 rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 296 312 297 313 dist: dist-clean ................................................................................ 329 345 #======================================================================== 330 346 331 347 #======================================================================== 332 348 # Don't modify the file to clean here. Instead, set the "CLEANFILES" 333 349 # variable in configure.in 334 350 #======================================================================== 335 351 336 -clean: 352 +clean: 337 353 -test -z "$(BINARIES)" || rm -f $(BINARIES) 338 354 -rm -f *.$(OBJEXT) core *.core 339 355 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 340 356 341 357 distclean: clean 342 358 -rm -f *.tab.c 343 359 -rm -f $(CONFIG_CLEAN_FILES) ................................................................................ 351 367 # In addition, this will generate the pkgIndex.tcl 352 368 # file in the install location (assuming it can find a usable tclsh shell) 353 369 # 354 370 # You should not have to modify this target. 355 371 #======================================================================== 356 372 357 373 install-lib-binaries: binaries 358 - @mkdir -p $(DESTDIR)$(pkglibdir) 374 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) 359 375 @list='$(lib_BINARIES)'; for p in $$list; do \ 360 376 if test -f $$p; then \ 361 - echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 362 - $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 377 + echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 378 + $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 363 379 stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ 364 380 if test "x$$stub" = "xstub"; then \ 365 381 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ 366 382 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ 367 383 else \ 368 384 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 369 385 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ ................................................................................ 396 412 # wish and tclsh), like dependent .dll files on Windows. 397 413 # 398 414 # You should not have to modify this target, except to define bin_BINARIES 399 415 # above if necessary. 400 416 #======================================================================== 401 417 402 418 install-bin-binaries: binaries 403 - @mkdir -p $(DESTDIR)$(bindir) 419 + @$(INSTALL_DATA_DIR) $(DESTDIR)$(bindir) 404 420 @list='$(bin_BINARIES)'; for p in $$list; do \ 405 421 if test -f $$p; then \ 406 422 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 407 423 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 408 424 fi; \ 409 425 done 410 426 411 -.SUFFIXES: .c .$(OBJEXT) 412 - 413 427 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 414 428 cd $(top_builddir) \ 415 429 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 416 430 417 431 uninstall-binaries: 418 432 list='$(lib_BINARIES)'; for p in $$list; do \ 419 433 rm -f $(DESTDIR)$(pkglibdir)/$$p; \
Changes to extensions/tnc/configure.
more than 10,000 changes
Changes to extensions/tnc/configure.in.
1 1 #!/bin/bash -norc 2 2 dnl This file is an input file used by the GNU "autoconf" program to 3 3 dnl generate the file "configure", which is run during Tcl installation 4 4 dnl to configure the system for the local environment. 5 -# 6 -# RCS: @(#) $Id$ 7 5 8 6 #----------------------------------------------------------------------- 9 7 # Sample configure.in for Tcl Extensions. The only places you should 10 8 # need to modify this file are marked by the string __CHANGE__ 11 9 #----------------------------------------------------------------------- 12 10 13 11 #----------------------------------------------------------------------- ................................................................................ 23 21 24 22 #-------------------------------------------------------------------- 25 23 # Call TEA_INIT as the first TEA_ macro to set up initial vars. 26 24 # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" 27 25 # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. 28 26 #-------------------------------------------------------------------- 29 27 30 -TEA_INIT([3.6]) 28 +TEA_INIT([3.9]) 31 29 32 30 AC_CONFIG_AUX_DIR(../../tclconfig) 33 31 34 32 #-------------------------------------------------------------------- 35 33 # Load the tclConfig.sh file 36 34 #-------------------------------------------------------------------- 37 35 ................................................................................ 77 75 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS 78 76 # and PKG_TCL_SOURCES. 79 77 #----------------------------------------------------------------------- 80 78 81 79 TEA_ADD_SOURCES([tnc.c]) 82 80 TEA_ADD_HEADERS([]) 83 81 TEA_ADD_INCLUDES([-I${srcdir}/../../generic -I${srcdir}/../../expat]) 82 +TEA_ADD_LIBS([${TDOM_STUB_LIB_SPEC}]) 84 83 TEA_ADD_CFLAGS([-DUSE_TDOM_STUBS=1]) 85 84 TEA_ADD_STUB_SOURCES([]) 86 85 TEA_ADD_TCL_SOURCES([]) 87 86 88 -# See https://sourceforge.net/tracker/index.php?func=detail&aid=1636345&group_id=10894&atid=110894 89 -if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then 90 - TEA_ADD_LIBS([\"`${CYGPATH} ${TDOM_STUB_LIB_PATH}`\"]) 91 -else 92 - TEA_ADD_LIBS([${TDOM_STUB_LIB_SPEC}]) 93 -fi 94 - 95 87 #-------------------------------------------------------------------- 96 88 # __CHANGE__ 97 89 # A few miscellaneous platform-specific items: 98 90 # 99 91 # Define a special symbol for Windows (BUILD_sample in this case) so 100 92 # that we create the export library with the dll. 101 93 #
Changes to extensions/tnc/install-sh.
1 1 #!/bin/sh 2 - 3 -# 4 2 # install - install a program, script, or datafile 5 -# This comes from X11R5; it is not part of GNU. 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. 6 36 # 7 -# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ 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. 8 40 # 9 41 # This script is compatible with the BSD install script, but was written 10 42 # from scratch. 11 -# 12 43 44 +nl=' 45 +' 46 +IFS=" "" $nl" 13 47 14 48 # set DOITPROG to echo to test this script 15 49 16 50 # Don't use :- since 4.3BSD and earlier shells don't like it. 17 -doit="${DOITPROG-}" 18 - 19 - 20 -# put in absolute paths if you don't have them in your path; or use env. vars. 21 - 22 -mvprog="${MVPROG-mv}" 23 -cpprog="${CPPROG-cp}" 24 -chmodprog="${CHMODPROG-chmod}" 25 -chownprog="${CHOWNPROG-chown}" 26 -chgrpprog="${CHGRPPROG-chgrp}" 27 -stripprog="${STRIPPROG-strip}" 28 -rmprog="${RMPROG-rm}" 29 - 30 -instcmd="$mvprog" 31 -chmodcmd="" 32 -chowncmd="" 33 -chgrpcmd="" 34 -stripcmd="" 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 35 91 rmcmd="$rmprog -f" 36 -mvcmd="$mvprog" 37 -src="" 38 -dst="" 39 - 40 -while [ x"$1" != x ]; do 41 - case $1 in 42 - -c) instcmd="$cpprog" 43 - shift 44 - continue;; 45 - 46 - -m) chmodcmd="$chmodprog $2" 47 - shift 48 - shift 49 - continue;; 50 - 51 - -o) chowncmd="$chownprog $2" 52 - shift 53 - shift 54 - continue;; 55 - 56 - -g) chgrpcmd="$chgrpprog $2" 57 - shift 58 - shift 59 - continue;; 60 - 61 - -s) stripcmd="$stripprog" 62 - shift 63 - continue;; 64 - 65 - *) if [ x"$src" = x ] 66 - then 67 - src=$1 68 - else 69 - dst=$1 70 - fi 71 - shift 72 - continue;; 73 - esac 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 74 178 done 75 179 76 -if [ x"$src" = x ] 77 -then 78 - echo "install: no input file specified" 79 - exit 1 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 $@. 184 + for arg 185 + do 186 + if test -n "$dst_arg"; then 187 + # $@ is not empty: it contains at least $arg. 188 + set fnord "$@" "$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 80 235 fi 81 236 82 -if [ x"$dst" = x ] 83 -then 84 - echo "install: no destination specified" 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 85 275 exit 1 86 -fi 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 && 87 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 || 88 492 89 -# If destination is a directory, append the input filename; if your system 90 -# does not like double slashes in filenames, you may need to add some logic 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 + } && 91 512 92 -if [ -d $dst ] 93 -then 94 - dst="$dst"/`basename $src` 95 -fi 513 + # Now rename the file to the real destination. 514 + $doit $mvcmd "$dsttmp" "$dst" 515 + } 516 + fi || exit 1 96 517 97 -# Make a temp file name in the proper directory. 98 - 99 -dstdir=`dirname $dst` 100 -dsttmp=$dstdir/#inst.$$# 101 - 102 -# Move or copy the file name to the temp name 518 + trap '' 0 519 + fi 520 +done 103 521 104 -$doit $instcmd $src $dsttmp 105 - 106 -# and set any options; do chmod last to preserve setuid bits 107 - 108 -if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi 109 -if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi 110 -if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi 111 -if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi 112 - 113 -# Now rename the file to the real destination. 114 - 115 -$doit $rmcmd $dst 116 -$doit $mvcmd $dsttmp $dst 117 - 118 - 119 -exit 0 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:
Changes to extensions/tnc/tests/loadtnc.tcl.
1 +load ../../../unix/libtdom0.8.3.so 2 +load ../libtnc0.3.0.so 1 3 # loadtnc.tcl -- 2 4 # 3 5 # This file is [source]d by all.tcl and all test files, to ensure, that 4 6 # the tcltest package and the lastest tnc build is present. 5 7 6 8 if {[lsearch [namespace children] ::tcltest] == -1} { 7 9 if {$tcl_version < 8.2} { ................................................................................ 10 12 set auto_path [pwd] 11 13 } else { 12 14 package require tcltest 13 15 namespace import ::tcltest::* 14 16 } 15 17 } 16 18 17 -if {[catch {package present tdom}]} { 18 - package require tdom 0.7.5 19 -} 19 +# if {[catch {package present tdom}]} { 20 +# package require tdom 0.7.5 21 +# } 20 22 21 -if {[catch {package require tnc 0.3}]} { 22 - load [file join [file dir [info script]] .. libtnc0.3.0.so] 23 -} 23 +# if {[catch {package require tnc 0.3}]} { 24 +# load [file join [file dir [info script]] .. libtnc0.3.0.so] 25 +# } 24 26
Changes to tclconfig/README.txt.
1 -The other files in this directory are the functional core of the Tcl 2 -Extension Architecture (TEA). For more information on TEA see: 1 +These files comprise the basic building blocks for a Tcl Extension 2 +Architecture (TEA) extension. For more information on TEA see: 3 3 4 4 http://www.tcl.tk/doc/tea/ 5 5 6 -The other files in this directory are out of the tclconfig directory 7 -of: 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 8 21 9 -http://cvs.sourceforge.net/viewcvs.py/tcl/sampleextension/ 22 +install-sh Program used for copying binaries and script files 23 + to their install locations. 10 24 11 -from 2007-07-26 (TEA 3.6). 25 +tcl.m4 Collection of Tcl autoconf macros. Included by a package's 26 + aclocal.m4 to define TEA_* macros.
Changes to tclconfig/install-sh.
1 1 #!/bin/sh 2 - 3 -# 4 2 # install - install a program, script, or datafile 5 -# This comes from X11R5; it is not part of GNU. 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. 6 36 # 7 -# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ 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. 8 40 # 9 41 # This script is compatible with the BSD install script, but was written 10 42 # from scratch. 11 -# 12 43 44 +nl=' 45 +' 46 +IFS=" "" $nl" 13 47 14 48 # set DOITPROG to echo to test this script 15 49 16 50 # Don't use :- since 4.3BSD and earlier shells don't like it. 17 -doit="${DOITPROG-}" 18 - 19 - 20 -# put in absolute paths if you don't have them in your path; or use env. vars. 21 - 22 -mvprog="${MVPROG-mv}" 23 -cpprog="${CPPROG-cp}" 24 -chmodprog="${CHMODPROG-chmod}" 25 -chownprog="${CHOWNPROG-chown}" 26 -chgrpprog="${CHGRPPROG-chgrp}" 27 -stripprog="${STRIPPROG-strip}" 28 -rmprog="${RMPROG-rm}" 29 - 30 -instcmd="$mvprog" 31 -chmodcmd="" 32 -chowncmd="" 33 -chgrpcmd="" 34 -stripcmd="" 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 35 91 rmcmd="$rmprog -f" 36 -mvcmd="$mvprog" 37 -src="" 38 -dst="" 39 - 40 -while [ x"$1" != x ]; do 41 - case $1 in 42 - -c) instcmd="$cpprog" 43 - shift 44 - continue;; 45 - 46 - -m) chmodcmd="$chmodprog $2" 47 - shift 48 - shift 49 - continue;; 50 - 51 - -o) chowncmd="$chownprog $2" 52 - shift 53 - shift 54 - continue;; 55 - 56 - -g) chgrpcmd="$chgrpprog $2" 57 - shift 58 - shift 59 - continue;; 60 - 61 - -s) stripcmd="$stripprog" 62 - shift 63 - continue;; 64 - 65 - *) if [ x"$src" = x ] 66 - then 67 - src=$1 68 - else 69 - dst=$1 70 - fi 71 - shift 72 - continue;; 73 - esac 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 74 178 done 75 179 76 -if [ x"$src" = x ] 77 -then 78 - echo "install: no input file specified" 79 - exit 1 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 $@. 184 + for arg 185 + do 186 + if test -n "$dst_arg"; then 187 + # $@ is not empty: it contains at least $arg. 188 + set fnord "$@" "$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 80 235 fi 81 236 82 -if [ x"$dst" = x ] 83 -then 84 - echo "install: no destination specified" 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 85 275 exit 1 86 -fi 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 && 87 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 || 88 492 89 -# If destination is a directory, append the input filename; if your system 90 -# does not like double slashes in filenames, you may need to add some logic 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 + } && 91 512 92 -if [ -d $dst ] 93 -then 94 - dst="$dst"/`basename $src` 95 -fi 513 + # Now rename the file to the real destination. 514 + $doit $mvcmd "$dsttmp" "$dst" 515 + } 516 + fi || exit 1 96 517 97 -# Make a temp file name in the proper directory. 98 - 99 -dstdir=`dirname $dst` 100 -dsttmp=$dstdir/#inst.$$# 101 - 102 -# Move or copy the file name to the temp name 518 + trap '' 0 519 + fi 520 +done 103 521 104 -$doit $instcmd $src $dsttmp 105 - 106 -# and set any options; do chmod last to preserve setuid bits 107 - 108 -if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi 109 -if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi 110 -if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi 111 -if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi 112 - 113 -# Now rename the file to the real destination. 114 - 115 -$doit $rmcmd $dst 116 -$doit $mvcmd $dsttmp $dst 117 - 118 - 119 -exit 0 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:
Changes to tclconfig/tcl.m4.
4 4 # a Tcl extension. 5 5 # 6 6 # Copyright (c) 1999-2000 Ajuba Solutions. 7 7 # Copyright (c) 2002-2005 ActiveState Corporation. 8 8 # 9 9 # See the file "license.terms" for information on usage and redistribution 10 10 # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 11 -# 12 -# RCS: @(#) $Id$ 13 11 14 12 AC_PREREQ(2.57) 15 13 16 14 dnl TEA extensions pass us the version of TEA they think they 17 15 dnl are compatible with (must be set in TEA_INIT below) 18 -dnl TEA_VERSION="3.6" 16 +dnl TEA_VERSION="3.9" 19 17 20 18 # Possible values for key variables defined: 21 19 # 22 20 # TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem') 23 21 # TEA_PLATFORM - windows unix 24 22 # 25 23 ................................................................................ 39 37 # 40 38 # Defines the following vars: 41 39 # TCL_BIN_DIR Full path to the directory containing 42 40 # the tclConfig.sh file 43 41 #------------------------------------------------------------------------ 44 42 45 43 AC_DEFUN([TEA_PATH_TCLCONFIG], [ 46 - dnl Make sure we are initialized 44 + dnl TEA specific: Make sure we are initialized 47 45 AC_REQUIRE([TEA_INIT]) 48 46 # 49 47 # Ok, lets find the tcl configuration 50 48 # First, look for one uninstalled. 51 49 # the alternative search directory is invoked by --with-tcl 52 50 # 53 51 54 52 if test x"${no_tcl}" = x ; then 55 53 # we reset no_tcl in case something fails here 56 54 no_tcl=true 57 55 AC_ARG_WITH(tcl, 58 56 AC_HELP_STRING([--with-tcl], 59 57 [directory containing tcl configuration (tclConfig.sh)]), 60 - with_tclconfig=${withval}) 58 + with_tclconfig="${withval}") 61 59 AC_MSG_CHECKING([for Tcl configuration]) 62 60 AC_CACHE_VAL(ac_cv_c_tclconfig,[ 63 61 64 62 # First check to see if --with-tcl was specified. 65 63 if test x"${with_tclconfig}" != x ; then 66 - case ${with_tclconfig} in 64 + case "${with_tclconfig}" in 67 65 */tclConfig.sh ) 68 - if test -f ${with_tclconfig}; then 66 + if test -f "${with_tclconfig}"; then 69 67 AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself]) 70 - with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'` 68 + with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`" 71 69 fi ;; 72 70 esac 73 71 if test -f "${with_tclconfig}/tclConfig.sh" ; then 74 - ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` 72 + ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`" 75 73 else 76 74 AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) 77 75 fi 78 76 fi 79 77 80 78 # then check for a private Tcl installation 81 79 if test x"${ac_cv_c_tclconfig}" = x ; then ................................................................................ 88 86 `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 89 87 `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ 90 88 `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ 91 89 ../../../tcl \ 92 90 `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 93 91 `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ 94 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 95 98 if test -f "$i/unix/tclConfig.sh" ; then 96 - ac_cv_c_tclconfig=`(cd $i/unix; pwd)` 99 + ac_cv_c_tclconfig="`(cd $i/unix; pwd)`" 97 100 break 98 101 fi 99 102 done 100 103 fi 101 104 102 105 # on Darwin, check in Framework installation locations 103 106 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then 104 107 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ 105 108 `ls -d /Library/Frameworks 2>/dev/null` \ 106 109 `ls -d /Network/Library/Frameworks 2>/dev/null` \ 107 110 `ls -d /System/Library/Frameworks 2>/dev/null` \ 108 111 ; do 109 112 if test -f "$i/Tcl.framework/tclConfig.sh" ; then 110 - ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` 113 + ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`" 111 114 break 112 115 fi 113 116 done 114 117 fi 115 118 116 - # on Windows, check in common installation locations 119 + # TEA specific: on Windows, check in common installation locations 117 120 if test "${TEA_PLATFORM}" = "windows" \ 118 121 -a x"${ac_cv_c_tclconfig}" = x ; then 119 122 for i in `ls -d C:/Tcl/lib 2>/dev/null` \ 120 123 `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ 121 124 ; do 122 125 if test -f "$i/tclConfig.sh" ; then 123 - ac_cv_c_tclconfig=`(cd $i; pwd)` 126 + ac_cv_c_tclconfig="`(cd $i; pwd)`" 124 127 break 125 128 fi 126 129 done 127 130 fi 128 131 129 132 # check in a few common install locations 130 133 if test x"${ac_cv_c_tclconfig}" = x ; then 131 134 for i in `ls -d ${libdir} 2>/dev/null` \ 132 135 `ls -d ${exec_prefix}/lib 2>/dev/null` \ 133 136 `ls -d ${prefix}/lib 2>/dev/null` \ 134 137 `ls -d /usr/local/lib 2>/dev/null` \ 135 138 `ls -d /usr/contrib/lib 2>/dev/null` \ 136 139 `ls -d /usr/lib 2>/dev/null` \ 140 + `ls -d /usr/lib64 2>/dev/null` \ 137 141 ; do 138 142 if test -f "$i/tclConfig.sh" ; then 139 - ac_cv_c_tclconfig=`(cd $i; pwd)` 143 + ac_cv_c_tclconfig="`(cd $i; pwd)`" 140 144 break 141 145 fi 142 146 done 143 147 fi 144 148 145 149 # check in a few other private locations 146 150 if test x"${ac_cv_c_tclconfig}" = x ; then 147 151 for i in \ 148 152 ${srcdir}/../tcl \ 149 153 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 150 154 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ 151 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 152 161 if test -f "$i/unix/tclConfig.sh" ; then 153 - ac_cv_c_tclconfig=`(cd $i/unix; pwd)` 154 - break 155 - fi 162 + ac_cv_c_tclconfig="`(cd $i/unix; pwd)`" 163 + break 164 + fi 156 165 done 157 166 fi 158 167 ]) 159 168 160 169 if test x"${ac_cv_c_tclconfig}" = x ; then 161 170 TCL_BIN_DIR="# no Tcl configs found" 162 - AC_MSG_WARN([Can't find Tcl configuration definitions]) 163 - exit 0 171 + AC_MSG_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh]) 164 172 else 165 173 no_tcl= 166 - TCL_BIN_DIR=${ac_cv_c_tclconfig} 174 + TCL_BIN_DIR="${ac_cv_c_tclconfig}" 167 175 AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh]) 168 176 fi 169 177 fi 170 178 ]) 171 179 172 180 #------------------------------------------------------------------------ 173 181 # TEA_PATH_TKCONFIG -- ................................................................................ 196 204 197 205 if test x"${no_tk}" = x ; then 198 206 # we reset no_tk in case something fails here 199 207 no_tk=true 200 208 AC_ARG_WITH(tk, 201 209 AC_HELP_STRING([--with-tk], 202 210 [directory containing tk configuration (tkConfig.sh)]), 203 - with_tkconfig=${withval}) 211 + with_tkconfig="${withval}") 204 212 AC_MSG_CHECKING([for Tk configuration]) 205 213 AC_CACHE_VAL(ac_cv_c_tkconfig,[ 206 214 207 215 # First check to see if --with-tkconfig was specified. 208 216 if test x"${with_tkconfig}" != x ; then 209 - case ${with_tkconfig} in 217 + case "${with_tkconfig}" in 210 218 */tkConfig.sh ) 211 - if test -f ${with_tkconfig}; then 219 + if test -f "${with_tkconfig}"; then 212 220 AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself]) 213 - with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'` 221 + with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`" 214 222 fi ;; 215 223 esac 216 224 if test -f "${with_tkconfig}/tkConfig.sh" ; then 217 - ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` 225 + ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`" 218 226 else 219 227 AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) 220 228 fi 221 229 fi 222 230 223 231 # then check for a private Tk library 224 232 if test x"${ac_cv_c_tkconfig}" = x ; then ................................................................................ 231 239 `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 232 240 `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \ 233 241 `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ 234 242 ../../../tk \ 235 243 `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 236 244 `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \ 237 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 238 251 if test -f "$i/unix/tkConfig.sh" ; then 239 - ac_cv_c_tkconfig=`(cd $i/unix; pwd)` 252 + ac_cv_c_tkconfig="`(cd $i/unix; pwd)`" 240 253 break 241 254 fi 242 255 done 243 256 fi 244 257 245 258 # on Darwin, check in Framework installation locations 246 259 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then 247 260 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ 248 261 `ls -d /Library/Frameworks 2>/dev/null` \ 249 262 `ls -d /Network/Library/Frameworks 2>/dev/null` \ 250 263 `ls -d /System/Library/Frameworks 2>/dev/null` \ 251 264 ; do 252 265 if test -f "$i/Tk.framework/tkConfig.sh" ; then 253 - ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` 266 + ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`" 254 267 break 255 268 fi 256 269 done 257 270 fi 258 271 259 272 # check in a few common install locations 260 273 if test x"${ac_cv_c_tkconfig}" = x ; then 261 274 for i in `ls -d ${libdir} 2>/dev/null` \ 262 275 `ls -d ${exec_prefix}/lib 2>/dev/null` \ 263 276 `ls -d ${prefix}/lib 2>/dev/null` \ 264 277 `ls -d /usr/local/lib 2>/dev/null` \ 265 278 `ls -d /usr/contrib/lib 2>/dev/null` \ 266 279 `ls -d /usr/lib 2>/dev/null` \ 280 + `ls -d /usr/lib64 2>/dev/null` \ 267 281 ; do 268 282 if test -f "$i/tkConfig.sh" ; then 269 - ac_cv_c_tkconfig=`(cd $i; pwd)` 283 + ac_cv_c_tkconfig="`(cd $i; pwd)`" 270 284 break 271 285 fi 272 286 done 273 287 fi 274 288 275 - # on Windows, check in common installation locations 289 + # TEA specific: on Windows, check in common installation locations 276 290 if test "${TEA_PLATFORM}" = "windows" \ 277 291 -a x"${ac_cv_c_tkconfig}" = x ; then 278 292 for i in `ls -d C:/Tcl/lib 2>/dev/null` \ 279 293 `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ 280 294 ; do 281 295 if test -f "$i/tkConfig.sh" ; then 282 - ac_cv_c_tkconfig=`(cd $i; pwd)` 296 + ac_cv_c_tkconfig="`(cd $i; pwd)`" 283 297 break 284 298 fi 285 299 done 286 300 fi 287 301 288 302 # check in a few other private locations 289 303 if test x"${ac_cv_c_tkconfig}" = x ; then 290 304 for i in \ 291 305 ${srcdir}/../tk \ 292 306 `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 293 307 `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \ 294 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 295 314 if test -f "$i/unix/tkConfig.sh" ; then 296 - ac_cv_c_tkconfig=`(cd $i/unix; pwd)` 315 + ac_cv_c_tkconfig="`(cd $i/unix; pwd)`" 297 316 break 298 317 fi 299 318 done 300 319 fi 301 320 ]) 302 321 303 322 if test x"${ac_cv_c_tkconfig}" = x ; then 304 323 TK_BIN_DIR="# no Tk configs found" 305 - AC_MSG_WARN([Can't find Tk configuration definitions]) 306 - exit 0 324 + AC_MSG_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh]) 307 325 else 308 326 no_tk= 309 - TK_BIN_DIR=${ac_cv_c_tkconfig} 327 + TK_BIN_DIR="${ac_cv_c_tkconfig}" 310 328 AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh]) 311 329 fi 312 330 fi 313 331 ]) 314 332 315 333 #------------------------------------------------------------------------ 316 334 # TEA_LOAD_TCLCONFIG -- 317 335 # 318 336 # Load the tclConfig.sh file 319 337 # 320 338 # Arguments: 321 -# 339 +# 322 340 # Requires the following vars to be set: 323 341 # TCL_BIN_DIR 324 342 # 325 343 # Results: 326 344 # 327 -# Subst the following vars: 345 +# Substitutes the following vars: 328 346 # TCL_BIN_DIR 329 347 # TCL_SRC_DIR 330 348 # TCL_LIB_FILE 331 -# 332 349 #------------------------------------------------------------------------ 333 350 334 351 AC_DEFUN([TEA_LOAD_TCLCONFIG], [ 335 352 AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh]) 336 353 337 354 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then 338 355 AC_MSG_RESULT([loading]) ................................................................................ 348 365 # If the TCL_BIN_DIR is the build directory (not the install directory), 349 366 # then set the common variable name to the value of the build variables. 350 367 # For example, the variable TCL_LIB_SPEC will be set to the value 351 368 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC 352 369 # instead of TCL_BUILD_LIB_SPEC since it will work with both an 353 370 # installed and uninstalled version of Tcl. 354 371 if test -f "${TCL_BIN_DIR}/Makefile" ; then 355 - TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} 356 - TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} 357 - TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} 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}" 358 375 elif test "`uname -s`" = "Darwin"; then 359 376 # If Tcl was built as a framework, attempt to use the libraries 360 377 # from the framework at the given location so that linking works 361 - # against Tcl.framework installed in an arbitary location. 378 + # against Tcl.framework installed in an arbitrary location. 362 379 case ${TCL_DEFS} in 363 380 *TCL_FRAMEWORK*) 364 381 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then 365 - for i in "`cd ${TCL_BIN_DIR}; pwd`" \ 366 - "`cd ${TCL_BIN_DIR}/../..; pwd`"; do 382 + for i in "`cd "${TCL_BIN_DIR}"; pwd`" \ 383 + "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do 367 384 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then 368 - TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" 385 + TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}" 369 386 break 370 387 fi 371 388 done 372 389 fi 373 390 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then 374 - TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" 391 + TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}" 375 392 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" 376 393 fi 377 394 ;; 378 395 esac 379 396 fi 380 397 381 398 # eval is required to do the TCL_DBGX substitution 382 399 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" 383 400 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" 384 401 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" 385 402 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" 386 403 387 404 AC_SUBST(TCL_VERSION) 405 + AC_SUBST(TCL_PATCH_LEVEL) 388 406 AC_SUBST(TCL_BIN_DIR) 389 407 AC_SUBST(TCL_SRC_DIR) 390 408 391 409 AC_SUBST(TCL_LIB_FILE) 392 410 AC_SUBST(TCL_LIB_FLAG) 393 411 AC_SUBST(TCL_LIB_SPEC) 394 412 395 413 AC_SUBST(TCL_STUB_LIB_FILE) 396 414 AC_SUBST(TCL_STUB_LIB_FLAG) 397 415 AC_SUBST(TCL_STUB_LIB_SPEC) 398 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) 399 441 AC_SUBST(TCL_LIBS) 400 442 AC_SUBST(TCL_DEFS) 401 443 AC_SUBST(TCL_EXTRA_CFLAGS) 402 444 AC_SUBST(TCL_LD_FLAGS) 403 445 AC_SUBST(TCL_SHLIB_LD_LIBS) 404 446 ]) 405 447 406 448 #------------------------------------------------------------------------ 407 449 # TEA_LOAD_TKCONFIG -- 408 450 # 409 451 # Load the tkConfig.sh file 410 452 # 411 453 # Arguments: 412 -# 454 +# 413 455 # Requires the following vars to be set: 414 456 # TK_BIN_DIR 415 457 # 416 458 # Results: 417 459 # 418 460 # Sets the following vars that should be in tkConfig.sh: 419 461 # TK_BIN_DIR ................................................................................ 436 478 # If the TK_BIN_DIR is the build directory (not the install directory), 437 479 # then set the common variable name to the value of the build variables. 438 480 # For example, the variable TK_LIB_SPEC will be set to the value 439 481 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC 440 482 # instead of TK_BUILD_LIB_SPEC since it will work with both an 441 483 # installed and uninstalled version of Tcl. 442 484 if test -f "${TK_BIN_DIR}/Makefile" ; then 443 - TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} 444 - TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} 445 - TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} 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}" 446 488 elif test "`uname -s`" = "Darwin"; then 447 489 # If Tk was built as a framework, attempt to use the libraries 448 490 # from the framework at the given location so that linking works 449 - # against Tk.framework installed in an arbitary location. 491 + # against Tk.framework installed in an arbitrary location. 450 492 case ${TK_DEFS} in 451 493 *TK_FRAMEWORK*) 452 494 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then 453 - for i in "`cd ${TK_BIN_DIR}; pwd`" \ 454 - "`cd ${TK_BIN_DIR}/../..; pwd`"; do 495 + for i in "`cd "${TK_BIN_DIR}"; pwd`" \ 496 + "`cd "${TK_BIN_DIR}"/../..; pwd`"; do 455 497 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then 456 - TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" 498 + TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}" 457 499 break 458 500 fi 459 501 done 460 502 fi 461 503 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then 462 - TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" 504 + TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}" 463 505 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" 464 506 fi 465 507 ;; 466 508 esac 467 509 fi 468 510 469 511 # eval is required to do the TK_DBGX substitution 470 512 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" 471 513 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" 472 514 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" 473 515 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" 474 516 475 - # Ensure windowingsystem is defined 517 + # TEA specific: Ensure windowingsystem is defined 476 518 if test "${TEA_PLATFORM}" = "unix" ; then 477 519 case ${TK_DEFS} in 478 520 *MAC_OSX_TK*) 479 521 AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?]) 480 522 TEA_WINDOWINGSYSTEM="aqua" 481 523 ;; 482 524 *) ................................................................................ 495 537 AC_SUBST(TK_LIB_FLAG) 496 538 AC_SUBST(TK_LIB_SPEC) 497 539 498 540 AC_SUBST(TK_STUB_LIB_FILE) 499 541 AC_SUBST(TK_STUB_LIB_FLAG) 500 542 AC_SUBST(TK_STUB_LIB_SPEC) 501 543 544 + # TEA specific: 502 545 AC_SUBST(TK_LIBS) 503 546 AC_SUBST(TK_XINCLUDES) 504 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 +]) 505 648 506 649 #------------------------------------------------------------------------ 507 650 # TEA_ENABLE_SHARED -- 508 651 # 509 652 # Allows the building of shared libraries 510 653 # 511 654 # Arguments: 512 655 # none 513 -# 656 +# 514 657 # Results: 515 658 # 516 659 # Adds the following arguments to configure: 517 660 # --enable-shared=yes|no 518 661 # 519 662 # Defines the following vars: 520 663 # STATIC_BUILD Used for building import/export libraries ................................................................................ 562 705 # 563 706 # Note that it is legal to have a thread enabled extension run in a 564 707 # threaded or non-threaded Tcl core, but a non-threaded extension may 565 708 # only run in a non-threaded Tcl core. 566 709 # 567 710 # Arguments: 568 711 # none 569 -# 712 +# 570 713 # Results: 571 714 # 572 715 # Adds the following arguments to configure: 573 716 # --enable-threads 574 717 # 575 718 # Sets the following vars: 576 719 # THREADS_LIBS Thread library(s) 577 720 # 578 721 # Defines the following vars: 579 722 # TCL_THREADS 580 723 # _REENTRANT 581 724 # _THREAD_SAFE 582 -# 583 725 #------------------------------------------------------------------------ 584 726 585 727 AC_DEFUN([TEA_ENABLE_THREADS], [ 586 728 AC_ARG_ENABLE(threads, 587 729 AC_HELP_STRING([--enable-threads], 588 730 [build with threads]), 589 731 [tcl_ok=$enableval], [tcl_ok=yes]) ................................................................................ 596 738 fi 597 739 598 740 if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then 599 741 TCL_THREADS=1 600 742 601 743 if test "${TEA_PLATFORM}" != "windows" ; then 602 744 # We are always OK on Windows, so check what this platform wants: 603 - 745 + 604 746 # USE_THREAD_ALLOC tells us to try the special thread-based 605 747 # allocator that significantly reduces lock contention 606 748 AC_DEFINE(USE_THREAD_ALLOC, 1, 607 749 [Do we want to use the threaded memory allocator?]) 608 750 AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) 609 751 if test "`uname -s`" = "SunOS" ; then 610 752 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, ................................................................................ 685 827 # TEA_ENABLE_SYMBOLS -- 686 828 # 687 829 # Specify if debugging symbols should be used. 688 830 # Memory (TCL_MEM_DEBUG) debugging can also be enabled. 689 831 # 690 832 # Arguments: 691 833 # none 692 -# 834 +# 693 835 # TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives 694 836 # the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted. 695 837 # Requires the following vars to be set in the Makefile: 696 838 # CFLAGS_DEFAULT 697 839 # LDFLAGS_DEFAULT 698 -# 840 +# 699 841 # Results: 700 842 # 701 843 # Adds the following arguments to configure: 702 844 # --enable-symbols 703 845 # 704 846 # Defines the following vars: 705 847 # CFLAGS_DEFAULT Sets to $(CFLAGS_DEBUG) if true 706 -# Sets to $(CFLAGS_OPTIMIZE) if false 848 +# Sets to "$(CFLAGS_OPTIMIZE) -DNDEBUG" if false 707 849 # LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true 708 850 # Sets to $(LDFLAGS_OPTIMIZE) if false 709 851 # DBGX Formerly used as debug library extension; 710 852 # always blank now. 711 -# 712 853 #------------------------------------------------------------------------ 713 854 714 855 AC_DEFUN([TEA_ENABLE_SYMBOLS], [ 715 - dnl Make sure we are initialized 856 + dnl TEA specific: Make sure we are initialized 716 857 AC_REQUIRE([TEA_CONFIG_CFLAGS]) 717 858 AC_MSG_CHECKING([for build with symbols]) 718 859 AC_ARG_ENABLE(symbols, 719 860 AC_HELP_STRING([--enable-symbols], 720 861 [build with debugging symbols (default: off)]), 721 862 [tcl_ok=$enableval], [tcl_ok=no]) 722 863 DBGX="" 723 864 if test "$tcl_ok" = "no"; then 724 - CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" 865 + CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG" 725 866 LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" 726 867 AC_MSG_RESULT([no]) 727 868 else 728 869 CFLAGS_DEFAULT="${CFLAGS_DEBUG}" 729 870 LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" 730 871 if test "$tcl_ok" = "yes"; then 731 872 AC_MSG_RESULT([yes (standard debugging)]) 732 873 fi 733 874 fi 875 + # TEA specific: 734 876 if test "${TEA_PLATFORM}" != "windows" ; then 735 877 LDFLAGS_DEFAULT="${LDFLAGS}" 736 878 fi 737 - 738 - AC_SUBST(TCL_DBGX) 739 879 AC_SUBST(CFLAGS_DEFAULT) 740 880 AC_SUBST(LDFLAGS_DEFAULT) 881 + AC_SUBST(TCL_DBGX) 741 882 742 883 if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then 743 884 AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?]) 744 885 fi 745 886 746 887 if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then 747 888 if test "$tcl_ok" = "all"; then ................................................................................ 756 897 # TEA_ENABLE_LANGINFO -- 757 898 # 758 899 # Allows use of modern nl_langinfo check for better l10n. 759 900 # This is only relevant for Unix. 760 901 # 761 902 # Arguments: 762 903 # none 763 -# 904 +# 764 905 # Results: 765 906 # 766 907 # Adds the following arguments to configure: 767 908 # --enable-langinfo=yes|no (default is yes) 768 909 # 769 910 # Defines the following vars: 770 911 # HAVE_LANGINFO Triggers use of nl_langinfo if defined. 771 -# 772 912 #------------------------------------------------------------------------ 773 913 774 914 AC_DEFUN([TEA_ENABLE_LANGINFO], [ 775 915 AC_ARG_ENABLE(langinfo, 776 916 AC_HELP_STRING([--enable-langinfo], 777 917 [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]), 778 918 [langinfo_ok=$enableval], [langinfo_ok=yes]) ................................................................................ 786 926 AC_CACHE_VAL(tcl_cv_langinfo_h, [ 787 927 AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);], 788 928 [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])]) 789 929 AC_MSG_RESULT([$tcl_cv_langinfo_h]) 790 930 if test $tcl_cv_langinfo_h = yes; then 791 931 AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) 792 932 fi 793 - else 933 + else 794 934 AC_MSG_RESULT([$langinfo_ok]) 795 935 fi 796 936 ]) 797 937 798 938 #-------------------------------------------------------------------- 799 939 # TEA_CONFIG_SYSTEM 800 940 # 801 941 # Determine what the system is (some things cannot be easily checked 802 942 # on a feature-driven basis, alas). This can usually be done via the 803 -# "uname" command, but there are a few systems, like Next, where 804 -# this doesn't work. 943 +# "uname" command. 805 944 # 806 945 # Arguments: 807 946 # none 808 947 # 809 948 # Results: 810 949 # Defines the following var: 811 950 # 812 951 # system - System/platform/version identification code. 813 -# 814 952 #-------------------------------------------------------------------- 815 953 816 954 AC_DEFUN([TEA_CONFIG_SYSTEM], [ 817 955 AC_CACHE_CHECK([system version], tcl_cv_sys_version, [ 956 + # TEA specific: 818 957 if test "${TEA_PLATFORM}" = "windows" ; then 819 958 tcl_cv_sys_version=windows 820 - elif test -f /usr/lib/NextStep/software_version; then 821 - tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` 822 959 else 823 960 tcl_cv_sys_version=`uname -s`-`uname -r` 824 961 if test "$?" -ne 0 ; then 825 962 AC_MSG_WARN([can't find uname command]) 826 963 tcl_cv_sys_version=unknown 827 964 else 828 - # Special check for weird MP-RAS system (uname returns weird 829 - # results, and the version is kept in special file). 830 - 831 - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 832 - tcl_cv_sys_version=MP-RAS-`awk '{print $[3]}' /etc/.relid` 833 - fi 834 965 if test "`uname -s`" = "AIX" ; then 835 966 tcl_cv_sys_version=AIX-`uname -v`.`uname -r` 836 967 fi 837 968 fi 838 969 fi 839 970 ]) 840 971 system=$tcl_cv_sys_version ................................................................................ 849 980 # Arguments: 850 981 # none 851 982 # 852 983 # Results: 853 984 # 854 985 # Defines and substitutes the following vars: 855 986 # 856 -# DL_OBJS - Name of the object file that implements dynamic 857 -# loading for Tcl on this system. 858 -# DL_LIBS - Library file(s) to include in tclsh and other base 859 -# applications in order for the "load" command to work. 987 +# DL_OBJS, DL_LIBS - removed for TEA, only needed by core. 860 988 # LDFLAGS - Flags to pass to the compiler when linking object 861 989 # files into an executable application binary such 862 990 # as tclsh. 863 991 # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", 864 992 # that tell the run-time dynamic linker where to look 865 993 # for shared libraries such as libtcl.so. Depends on 866 994 # the variable LIB_RUNTIME_DIR in the Makefile. Could ................................................................................ 873 1001 # of a shared library (may request position-independent 874 1002 # code, among other things). 875 1003 # SHLIB_LD - Base command to use for combining object files 876 1004 # into a shared library. 877 1005 # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when 878 1006 # creating shared libraries. This symbol typically 879 1007 # goes at the end of the "ld" commands that build 880 -# shared libraries. The value of the symbol is 1008 +# shared libraries. The value of the symbol defaults to 881 1009 # "${LIBS}" if all of the dependent libraries should 882 1010 # be specified when creating a shared library. If 883 1011 # dependent libraries should not be specified (as on 884 1012 # SunOS 4.x, where they cause the link to fail, or in 885 1013 # general if Tcl and Tk aren't themselves shared 886 1014 # libraries), then this symbol has an empty string 887 1015 # as its value. ................................................................................ 894 1022 # by platforms that need non-standard library names. 895 1023 # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs 896 1024 # to have a version after the .so, and ${VERSION}.a 897 1025 # on AIX, since a shared library needs to have 898 1026 # a .a extension whereas shared objects for loadable 899 1027 # extensions have a .so extension. Defaults to 900 1028 # ${VERSION}${SHLIB_SUFFIX}. 901 -# TCL_NEEDS_EXP_FILE - 902 -# 1 means that an export file is needed to link to a 903 -# shared library. 904 -# TCL_EXP_FILE - The name of the installed export / import file which 905 -# should be used to link to the Tcl shared library. 906 -# Empty if Tcl is unshared. 907 -# TCL_BUILD_EXP_FILE - 908 -# The name of the built export / import file which 909 -# should be used to link to the Tcl shared library. 910 -# Empty if Tcl is unshared. 911 1029 # CFLAGS_DEBUG - 912 1030 # Flags used when running the compiler in debug mode 913 1031 # CFLAGS_OPTIMIZE - 914 1032 # Flags used when running the compiler in optimize mode 915 1033 # CFLAGS - Additional CFLAGS added as necessary (usually 64-bit) 916 -# 917 1034 #-------------------------------------------------------------------- 918 1035 919 1036 AC_DEFUN([TEA_CONFIG_CFLAGS], [ 920 - dnl Make sure we are initialized 1037 + dnl TEA specific: Make sure we are initialized 921 1038 AC_REQUIRE([TEA_INIT]) 922 1039 923 1040 # Step 0.a: Enable 64 bit support? 924 1041 925 1042 AC_MSG_CHECKING([if 64bit support is requested]) 926 1043 AC_ARG_ENABLE(64bit, 927 1044 AC_HELP_STRING([--enable-64bit], ................................................................................ 933 1050 934 1051 AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) 935 1052 AC_ARG_ENABLE(64bit-vis, 936 1053 AC_HELP_STRING([--enable-64bit-vis], 937 1054 [enable 64bit Sparc VIS support (default: off)]), 938 1055 [do64bitVIS=$enableval], [do64bitVIS=no]) 939 1056 AC_MSG_RESULT([$do64bitVIS]) 1057 + # Force 64bit on with VIS 1058 + AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes]) 940 1059 941 - if test "$do64bitVIS" = "yes"; then 942 - # Force 64bit on with VIS 943 - do64bit=yes 944 - fi 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. 945 1062 946 - # Step 0.c: Cross-compiling options for Windows/CE builds? 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 + ]) 947 1076 948 - if test "${TEA_PLATFORM}" = "windows" ; then 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], [ 949 1089 AC_MSG_CHECKING([if Windows/CE build is requested]) 950 - AC_ARG_ENABLE(wince,[ --enable-wince enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no]) 1090 + AC_ARG_ENABLE(wince, 1091 + AC_HELP_STRING([--enable-wince], 1092 + [enable Win/CE support (where applicable)]), 1093 + [doWince=$enableval], [doWince=no]) 951 1094 AC_MSG_RESULT([$doWince]) 952 - fi 1095 + ]) 953 1096 954 - # Step 1: set the variable "system" to hold the name and version number 1097 + # Set the variable "system" to hold the name and version number 955 1098 # for the system. 956 1099 957 1100 TEA_CONFIG_SYSTEM 958 1101 959 - # Step 2: check for existence of -ldl library. This is needed because 960 - # Linux can use either -ldl or -ldld for dynamic loading. 961 - 962 - AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) 963 - 964 1102 # Require ranlib early so we can override it in special cases below. 965 1103 966 1104 AC_REQUIRE([AC_PROG_RANLIB]) 967 1105 968 - # Step 3: set configuration options based on system name and version. 1106 + # Set configuration options based on system name and version. 969 1107 # This is similar to Tcl's unix/tcl.m4 except that we've added a 970 - # "windows" case. 1108 + # "windows" case and removed some core-only vars. 971 1109 972 1110 do64bit_ok=no 973 - LDFLAGS_ORIG="$LDFLAGS" 1111 + # default to '{$LIBS}' and set to "" on per-platform necessary basis 1112 + SHLIB_LD_LIBS='${LIBS}' 974 1113 # When ld needs options to work in 64-bit mode, put them in 975 1114 # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] 976 1115 # is disabled by the user. [Bug 1016796] 977 1116 LDFLAGS_ARCH="" 978 - TCL_EXPORT_FILE_SUFFIX="" 979 1117 UNSHARED_LIB_SUFFIX="" 1118 + # TEA specific: use PACKAGE_VERSION instead of VERSION 980 1119 TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' 981 1120 ECHO_VERSION='`echo ${PACKAGE_VERSION}`' 982 1121 TCL_LIB_VERSIONS_OK=ok 983 1122 CFLAGS_DEBUG=-g 984 - CFLAGS_OPTIMIZE=-O 985 - if test "$GCC" = "yes" ; then 1123 + AS_IF([test "$GCC" = yes], [ 986 1124 CFLAGS_OPTIMIZE=-O2 987 - CFLAGS_WARNING="-Wall -Wno-implicit-int" 988 - else 1125 + CFLAGS_WARNING="-Wall" 1126 + ], [ 1127 + CFLAGS_OPTIMIZE=-O 989 1128 CFLAGS_WARNING="" 990 - fi 991 - TCL_NEEDS_EXP_FILE=0 992 - TCL_BUILD_EXP_FILE="" 993 - TCL_EXP_FILE="" 994 -dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed. 995 -dnl AC_CHECK_TOOL(AR, ar) 996 - AC_CHECK_PROG(AR, ar, ar) 1129 + ]) 1130 + AC_CHECK_TOOL(AR, ar) 997 1131 STLIB_LD='${AR} cr' 998 1132 LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" 1133 + AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION="1.0"]) 999 1134 case $system in 1135 + # TEA specific: 1000 1136 windows) 1001 1137 # This is a 2-stage check to make sure we have the 64-bit SDK 1002 1138 # We have to know where the SDK is installed. 1003 1139 # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs 1004 1140 # MACHINE is IX86 for LINK, but this is used by the manifest, 1005 1141 # which requires x86|amd64|ia64. 1006 1142 MACHINE="X86" ................................................................................ 1016 1152 PATH64="${MSSDK}/Bin/Win64/x86/AMD64" 1017 1153 ;; 1018 1154 ia64) 1019 1155 MACHINE="IA64" 1020 1156 PATH64="${MSSDK}/Bin/Win64" 1021 1157 ;; 1022 1158 esac 1023 - if test ! -d "${PATH64}" ; then 1159 + if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then 1024 1160 AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode]) 1025 1161 AC_MSG_WARN([Ensure latest Platform SDK is installed]) 1026 1162 do64bit="no" 1027 1163 else 1028 1164 AC_MSG_RESULT([ Using 64-bit $MACHINE mode]) 1029 1165 do64bit_ok="yes" 1030 1166 fi ................................................................................ 1141 1277 CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" 1142 1278 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" 1143 1279 fi 1144 1280 fi 1145 1281 1146 1282 if test "$GCC" = "yes"; then 1147 1283 # mingw gcc mode 1148 - RC="windres" 1284 + AC_CHECK_TOOL(RC, windres) 1149 1285 CFLAGS_DEBUG="-g" 1150 1286 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" 1151 - SHLIB_LD="$CC -shared" 1287 + SHLIB_LD='${CC} -shared' 1152 1288 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 1153 1289 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" 1154 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 + 1155 1321 else 1156 1322 SHLIB_LD="${LINKBIN} -dll ${lflags}" 1157 1323 # link -lib only works when -lib is the first arg 1158 1324 STLIB_LD="${LINKBIN} -lib ${lflags}" 1159 1325 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' 1160 1326 PATHTYPE=-w 1161 1327 # For information on what debugtype is most useful, see: 1162 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 1163 1331 # This essentially turns it all on. 1164 - LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2" 1332 + LDFLAGS_DEBUG="-debug -debugtype:cv" 1165 1333 LDFLAGS_OPTIMIZE="-release" 1166 1334 if test "$doWince" != "no" ; then 1167 1335 LDFLAGS_CONSOLE="-link ${lflags}" 1168 1336 LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} 1169 1337 else 1170 1338 LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" 1171 1339 LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" 1172 1340 fi 1173 1341 fi 1174 1342 1175 - SHLIB_LD_LIBS='${LIBS}' 1176 1343 SHLIB_SUFFIX=".dll" 1177 1344 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' 1178 1345 1179 1346 TCL_LIB_VERSIONS_OK=nodots 1180 - # Bogus to avoid getting this turned off 1181 - DL_OBJS="tclLoadNone.obj" 1182 1347 ;; 1183 1348 AIX-*) 1184 - if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then 1349 + AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [ 1185 1350 # AIX requires the _r compiler when gcc isn't being used 1186 1351 case "${CC}" in 1187 - *_r) 1352 + *_r|*_r\ *) 1188 1353 # ok ... 1189 1354 ;; 1190 1355 *) 1191 - CC=${CC}_r 1356 + # Make sure only first arg gets _r 1357 + CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'` 1192 1358 ;; 1193 1359 esac 1194 1360 AC_MSG_RESULT([Using $CC for compiling with threads]) 1195 - fi 1361 + ]) 1196 1362 LIBS="$LIBS -lc" 1197 1363 SHLIB_CFLAGS="" 1198 - SHLIB_LD_LIBS='${LIBS}' 1199 1364 SHLIB_SUFFIX=".so" 1200 1365 1201 - DL_OBJS="tclLoadDl.o" 1202 1366 LD_LIBRARY_PATH_VAR="LIBPATH" 1203 1367 1204 - # Check to enable 64-bit flags for compiler/linker on AIX 4+ 1205 - if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then 1206 - if test "$GCC" = "yes" ; then 1368 + # Check to enable 64-bit flags for compiler/linker 1369 + AS_IF([test "$do64bit" = yes], [ 1370 + AS_IF([test "$GCC" = yes], [ 1207 1371 AC_MSG_WARN([64bit mode not supported with GCC on $system]) 1208 - else 1372 + ], [ 1209 1373 do64bit_ok=yes 1210 1374 CFLAGS="$CFLAGS -q64" 1211 1375 LDFLAGS_ARCH="-q64" 1212 1376 RANLIB="${RANLIB} -X64" 1213 1377 AR="${AR} -X64" 1214 1378 SHLIB_LD_FLAGS="-b64" 1215 - fi 1216 - fi 1379 + ]) 1380 + ]) 1217 1381 1218 - if test "`uname -m`" = "ia64" ; then 1382 + AS_IF([test "`uname -m`" = ia64], [ 1219 1383 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC 1220 1384 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 1221 - # AIX-5 has dl* in libc.so 1222 - DL_LIBS="" 1223 - if test "$GCC" = "yes" ; then 1385 + AS_IF([test "$GCC" = yes], [ 1224 1386 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 1225 - else 1387 + ], [ 1226 1388 CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' 1227 - fi 1389 + ]) 1228 1390 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 1229 - else 1230 - if test "$GCC" = "yes" ; then 1231 - SHLIB_LD="gcc -shared" 1232 - else 1233 - SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" 1234 - fi 1235 - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" 1236 - DL_LIBS="-ldl" 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}" 1237 1399 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 1238 1400 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1239 - TCL_NEEDS_EXP_FILE=1 1240 - TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp' 1241 - fi 1242 - 1243 - # AIX v<=4.1 has some different flags than 4.2+ 1244 - if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then 1245 - AC_LIBOBJ([tclLoadAix]) 1246 - DL_LIBS="-lld" 1247 - fi 1248 - 1249 - # On AIX <=v4 systems, libbsd.a has to be linked in to support 1250 - # non-blocking file IO. This library has to be linked in after 1251 - # the MATH_LIBS or it breaks the pow() function. The way to 1252 - # insure proper sequencing, is to add it to the tail of MATH_LIBS. 1253 - # This library also supplies gettimeofday. 1254 - # 1255 - # AIX does not have a timezone field in struct tm. When the AIX 1256 - # bsd library is used, the timezone global and the gettimeofday 1257 - # methods are to be avoided for timezone deduction instead, we 1258 - # deduce the timezone by comparing the localtime result on a 1259 - # known GMT value. 1260 - 1261 - AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) 1262 - if test $libbsd = yes; then 1263 - MATH_LIBS="$MATH_LIBS -lbsd" 1264 - AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?]) 1265 - fi 1401 + ]) 1266 1402 ;; 1267 1403 BeOS*) 1268 1404 SHLIB_CFLAGS="-fPIC" 1269 - SHLIB_LD="${CC} -nostart" 1270 - SHLIB_LD_LIBS='${LIBS}' 1405 + SHLIB_LD='${CC} -nostart' 1271 1406 SHLIB_SUFFIX=".so" 1272 - DL_OBJS="tclLoadDl.o" 1273 - DL_LIBS="-ldl" 1274 1407 1275 1408 #----------------------------------------------------------- 1276 1409 # Check for inet_ntoa in -lbind, for BeOS (which also needs 1277 1410 # -lsocket, even if the network functions are in -lnet which 1278 1411 # is always linked to, for compatibility. 1279 1412 #----------------------------------------------------------- 1280 1413 AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"]) 1281 1414 ;; 1282 - BSD/OS-2.1*|BSD/OS-3*) 1283 - SHLIB_CFLAGS="" 1284 - SHLIB_LD="shlicc -r" 1285 - SHLIB_LD_LIBS='${LIBS}' 1286 - SHLIB_SUFFIX=".so" 1287 - DL_OBJS="tclLoadDl.o" 1288 - DL_LIBS="-ldl" 1289 - CC_SEARCH_FLAGS="" 1290 - LD_SEARCH_FLAGS="" 1291 - ;; 1292 1415 BSD/OS-4.*) 1293 1416 SHLIB_CFLAGS="-export-dynamic -fPIC" 1294 - SHLIB_LD="cc -shared" 1295 - SHLIB_LD_LIBS='${LIBS}' 1417 + SHLIB_LD='${CC} -shared' 1296 1418 SHLIB_SUFFIX=".so" 1297 - DL_OBJS="tclLoadDl.o" 1298 - DL_LIBS="-ldl" 1299 1419 LDFLAGS="$LDFLAGS -export-dynamic" 1300 1420 CC_SEARCH_FLAGS="" 1301 1421 LD_SEARCH_FLAGS="" 1302 1422 ;; 1303 - dgux*) 1304 - SHLIB_CFLAGS="-K PIC" 1305 - SHLIB_LD="cc -G" 1306 - SHLIB_LD_LIBS="" 1307 - SHLIB_SUFFIX=".so" 1308 - DL_OBJS="tclLoadDl.o" 1309 - DL_LIBS="-ldl" 1423 + CYGWIN_*) 1424 + SHLIB_CFLAGS="" 1425 + SHLIB_LD='${CC} -shared' 1426 + SHLIB_SUFFIX=".dll" 1427 + EXEEXT=".exe" 1310 1428 CC_SEARCH_FLAGS="" 1311 1429 LD_SEARCH_FLAGS="" 1312 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 + ;; 1313 1438 HP-UX-*.11.*) 1314 1439 # Use updated header definitions where possible 1315 1440 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?]) 1316 - # Needed by Tcl, but not most extensions 1441 + # TEA specific: Needed by Tcl, but not most extensions 1317 1442 #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?]) 1318 1443 #LIBS="$LIBS -lxnet" # Use the XOPEN network library 1319 1444 1320 - if test "`uname -m`" = "ia64" ; then 1445 + AS_IF([test "`uname -m`" = ia64], [ 1321 1446 SHLIB_SUFFIX=".so" 1322 - else 1447 + # Use newer C++ library for C++ extensions 1448 + #if test "$GCC" != "yes" ; then 1449 + # CPPFLAGS="-AA" 1450 + #fi 1451 + ], [ 1323 1452 SHLIB_SUFFIX=".sl" 1324 - fi 1453 + ]) 1325 1454 AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) 1326 - if test "$tcl_ok" = yes; then 1327 - SHLIB_CFLAGS="+z" 1328 - SHLIB_LD="ld -b" 1329 - SHLIB_LD_LIBS='${LIBS}' 1330 - DL_OBJS="tclLoadShl.o" 1331 - DL_LIBS="-ldld" 1455 + AS_IF([test "$tcl_ok" = yes], [ 1332 1456 LDFLAGS="$LDFLAGS -Wl,-E" 1333 1457 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' 1334 1458 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' 1335 1459 LD_LIBRARY_PATH_VAR="SHLIB_PATH" 1336 - fi 1337 - if test "$GCC" = "yes" ; then 1338 - SHLIB_LD="gcc -shared" 1339 - SHLIB_LD_LIBS='${LIBS}' 1460 + ]) 1461 + AS_IF([test "$GCC" = yes], [ 1462 + SHLIB_LD='${CC} -shared' 1340 1463 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1341 - fi 1342 - 1343 - # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc 1344 - #CFLAGS="$CFLAGS +DAportable" 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 + ]) 1345 1471 1346 1472 # Check to enable 64-bit flags for compiler/linker 1347 - if test "$do64bit" = "yes" ; then 1348 - if test "$GCC" = "yes" ; then 1349 - hpux_arch=`${CC} -dumpmachine` 1350 - case $hpux_arch in 1473 + AS_IF([test "$do64bit" = "yes"], [ 1474 + AS_IF([test "$GCC" = yes], [ 1475 + case `${CC} -dumpmachine` in 1351 1476 hppa64*) 1352 1477 # 64-bit gcc in use. Fix flags for GNU ld. 1353 1478 do64bit_ok=yes 1354 - SHLIB_LD="${CC} -shared" 1355 - SHLIB_LD_LIBS='${LIBS}' 1356 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1479 + SHLIB_LD='${CC} -shared' 1480 + AS_IF([test $doRpath = yes], [ 1481 + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) 1357 1482 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1358 1483 ;; 1359 1484 *) 1360 1485 AC_MSG_WARN([64bit mode not supported with GCC on $system]) 1361 1486 ;; 1362 1487 esac 1363 - else 1488 + ], [ 1364 1489 do64bit_ok=yes 1365 1490 CFLAGS="$CFLAGS +DD64" 1366 1491 LDFLAGS_ARCH="+DD64" 1367 - fi 1368 - fi 1369 - ;; 1370 - HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) 1371 - SHLIB_SUFFIX=".sl" 1372 - AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) 1373 - if test "$tcl_ok" = yes; then 1374 - SHLIB_CFLAGS="+z" 1375 - SHLIB_LD="ld -b" 1376 - SHLIB_LD_LIBS="" 1377 - DL_OBJS="tclLoadShl.o" 1378 - DL_LIBS="-ldld" 1379 - LDFLAGS="$LDFLAGS -Wl,-E" 1380 - CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' 1381 - LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' 1382 - LD_LIBRARY_PATH_VAR="SHLIB_PATH" 1383 - fi 1384 - ;; 1385 - IRIX-5.*) 1386 - SHLIB_CFLAGS="" 1387 - SHLIB_LD="ld -shared -rdata_shared" 1388 - SHLIB_LD_LIBS='${LIBS}' 1389 - SHLIB_SUFFIX=".so" 1390 - DL_OBJS="tclLoadDl.o" 1391 - DL_LIBS="" 1392 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1393 - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1394 - ;; 1492 + ]) 1493 + ]) ;; 1395 1494 IRIX-6.*) 1396 1495 SHLIB_CFLAGS="" 1397 1496 SHLIB_LD="ld -n32 -shared -rdata_shared" 1398 - SHLIB_LD_LIBS='${LIBS}' 1399 1497 SHLIB_SUFFIX=".so" 1400 - DL_OBJS="tclLoadDl.o" 1401 - DL_LIBS="" 1402 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1403 - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1404 - if test "$GCC" = "yes" ; then 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], [ 1405 1502 CFLAGS="$CFLAGS -mabi=n32" 1406 1503 LDFLAGS="$LDFLAGS -mabi=n32" 1407 - else 1504 + ], [ 1408 1505 case $system in 1409 1506 IRIX-6.3) 1410 1507 # Use to build 6.2 compatible binaries on 6.3. 1411 1508 CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" 1412 1509 ;; 1413 1510 *) 1414 1511 CFLAGS="$CFLAGS -n32" 1415 1512 ;; 1416 1513 esac 1417 1514 LDFLAGS="$LDFLAGS -n32" 1418 - fi 1515 + ]) 1419 1516 ;; 1420 1517 IRIX64-6.*) 1421 1518 SHLIB_CFLAGS="" 1422 1519 SHLIB_LD="ld -n32 -shared -rdata_shared" 1423 - SHLIB_LD_LIBS='${LIBS}' 1424 1520 SHLIB_SUFFIX=".so" 1425 - DL_OBJS="tclLoadDl.o" 1426 - DL_LIBS="" 1427 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1428 - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1521 + AS_IF([test $doRpath = yes], [ 1522 + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1523 + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) 1429 1524 1430 1525 # Check to enable 64-bit flags for compiler/linker 1431 1526 1432 - if test "$do64bit" = "yes" ; then 1433 - if test "$GCC" = "yes" ; then 1527 + AS_IF([test "$do64bit" = yes], [ 1528 + AS_IF([test "$GCC" = yes], [ 1434 1529 AC_MSG_WARN([64bit mode not supported by gcc]) 1435 - else 1530 + ], [ 1436 1531 do64bit_ok=yes 1437 1532 SHLIB_LD="ld -64 -shared -rdata_shared" 1438 1533 CFLAGS="$CFLAGS -64" 1439 1534 LDFLAGS_ARCH="-64" 1440 - fi 1441 - fi 1535 + ]) 1536 + ]) 1442 1537 ;; 1443 - Linux*) 1538 + Linux*|GNU*|NetBSD-Debian) 1444 1539 SHLIB_CFLAGS="-fPIC" 1445 - SHLIB_LD_LIBS='${LIBS}' 1446 1540 SHLIB_SUFFIX=".so" 1447 1541 1542 + # TEA specific: 1448 1543 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" 1449 - # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 1450 - # when you inline the string and math operations. Turn this off to 1451 - # get rid of the warnings. 1452 - #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" 1453 1544 1454 - # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here: 1545 + # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS 1455 1546 SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}' 1456 - DL_OBJS="tclLoadDl.o" 1457 - DL_LIBS="-ldl" 1458 1547 LDFLAGS="$LDFLAGS -Wl,--export-dynamic" 1459 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1548 + AS_IF([test $doRpath = yes], [ 1549 + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) 1460 1550 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1461 - if test "`uname -m`" = "alpha" ; then 1462 - CFLAGS="$CFLAGS -mieee" 1463 - fi 1464 - if test $do64bit = yes; then 1551 + AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"]) 1552 + AS_IF([test $do64bit = yes], [ 1465 1553 AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [ 1466 1554 hold_cflags=$CFLAGS 1467 1555 CFLAGS="$CFLAGS -m64" 1468 1556 AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no) 1469 1557 CFLAGS=$hold_cflags]) 1470 - if test $tcl_cv_cc_m64 = yes; then 1558 + AS_IF([test $tcl_cv_cc_m64 = yes], [ 1471 1559 CFLAGS="$CFLAGS -m64" 1472 1560 do64bit_ok=yes 1473 - fi 1474 - fi 1561 + ]) 1562 + ]) 1475 1563 1476 - # The combo of gcc + glibc has a bug related 1477 - # to inlining of functions like strtod(). The 1478 - # -fno-builtin flag should address this problem 1479 - # but it does not work. The -fno-inline flag 1480 - # is kind of overkill but it works. 1481 - # Disable inlining only when one of the 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 1482 1568 # files in compat/*.c is being linked in. 1483 - if test x"${USE_COMPAT}" != x ; then 1484 - CFLAGS="$CFLAGS -fno-inline" 1485 - fi 1486 1569 1487 - ;; 1488 - GNU*) 1489 - SHLIB_CFLAGS="-fPIC" 1490 - SHLIB_LD_LIBS='${LIBS}' 1491 - SHLIB_SUFFIX=".so" 1492 - 1493 - SHLIB_LD="${CC} -shared" 1494 - DL_OBJS="" 1495 - DL_LIBS="-ldl" 1496 - LDFLAGS="$LDFLAGS -Wl,--export-dynamic" 1497 - CC_SEARCH_FLAGS="" 1498 - LD_SEARCH_FLAGS="" 1499 - if test "`uname -m`" = "alpha" ; then 1500 - CFLAGS="$CFLAGS -mieee" 1501 - fi 1570 + AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"]) 1502 1571 ;; 1503 1572 Lynx*) 1504 1573 SHLIB_CFLAGS="-fPIC" 1505 - SHLIB_LD_LIBS='${LIBS}' 1506 1574 SHLIB_SUFFIX=".so" 1507 1575 CFLAGS_OPTIMIZE=-02 1508 - SHLIB_LD="${CC} -shared " 1509 - DL_OBJS="tclLoadDl.o" 1510 - DL_LIBS="-mshared -ldl" 1576 + SHLIB_LD='${CC} -shared' 1511 1577 LD_FLAGS="-Wl,--export-dynamic" 1512 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1513 - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1514 - ;; 1515 - MP-RAS-02*) 1516 - SHLIB_CFLAGS="-K PIC" 1517 - SHLIB_LD="cc -G" 1518 - SHLIB_LD_LIBS="" 1519 - SHLIB_SUFFIX=".so" 1520 - DL_OBJS="tclLoadDl.o" 1521 - DL_LIBS="-ldl" 1522 - CC_SEARCH_FLAGS="" 1523 - LD_SEARCH_FLAGS="" 1524 - ;; 1525 - MP-RAS-*) 1526 - SHLIB_CFLAGS="-K PIC" 1527 - SHLIB_LD="cc -G" 1528 - SHLIB_LD_LIBS="" 1529 - SHLIB_SUFFIX=".so" 1530 - DL_OBJS="tclLoadDl.o" 1531 - DL_LIBS="-ldl" 1532 - LDFLAGS="$LDFLAGS -Wl,-Bexport" 1533 - CC_SEARCH_FLAGS="" 1534 - LD_SEARCH_FLAGS="" 1535 - ;; 1536 - NetBSD-*|FreeBSD-[[1-2]].*) 1537 - # NetBSD/SPARC needs -fPIC, -fpic will not do. 1538 - SHLIB_CFLAGS="-fPIC" 1539 - SHLIB_LD="ld -Bshareable -x" 1540 - SHLIB_LD_LIBS='${LIBS}' 1541 - SHLIB_SUFFIX=".so" 1542 - DL_OBJS="tclLoadDl.o" 1543 - DL_LIBS="" 1544 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1545 - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1578 + AS_IF([test $doRpath = yes], [ 1579 + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1580 + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) 1581 + ;; 1582 + OpenBSD-*) 1583 + arch=`arch -s` 1584 + case "$arch" in 1585 + m88k|vax) 1586 + SHLIB_SUFFIX="" 1587 + SHARED_LIB_SUFFIX="" 1588 + ;; 1589 + *) 1590 + SHLIB_CFLAGS="-fPIC" 1591 + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' 1592 + SHLIB_SUFFIX=".so" 1593 + AS_IF([test $doRpath = yes], [ 1594 + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) 1595 + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1596 + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' 1597 + ;; 1598 + esac 1599 + case "$arch" in 1600 + m88k|vax) 1601 + CFLAGS_OPTIMIZE="-O1" 1602 + ;; 1603 + *) 1604 + CFLAGS_OPTIMIZE="-O2" 1605 + ;; 1606 + esac 1546 1607 AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ 1547 1608 AC_EGREP_CPP(yes, [ 1548 1609 #ifdef __ELF__ 1549 1610 yes 1550 1611 #endif 1551 1612 ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) 1552 - if test $tcl_cv_ld_elf = yes; then 1553 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' 1554 - else 1555 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' 1556 - fi 1557 - 1558 - # Ancient FreeBSD doesn't handle version numbers with dots. 1559 - 1560 - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 1561 - TCL_LIB_VERSIONS_OK=nodots 1562 - ;; 1563 - OpenBSD-*) 1564 - # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do. 1565 - case `machine` in 1566 - sparc|sparc64) 1567 - SHLIB_CFLAGS="-fPIC";; 1568 - *) 1569 - SHLIB_CFLAGS="-fpic";; 1570 - esac 1571 - SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" 1572 - SHLIB_LD_LIBS='${LIBS}' 1573 - SHLIB_SUFFIX=".so" 1574 - DL_OBJS="tclLoadDl.o" 1575 - DL_LIBS="" 1576 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1577 - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1578 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' 1579 - AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ 1580 - AC_EGREP_CPP(yes, [ 1581 -#ifdef __ELF__ 1582 - yes 1583 -#endif 1584 - ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) 1585 - if test $tcl_cv_ld_elf = yes; then 1613 + AS_IF([test $tcl_cv_ld_elf = yes], [ 1586 1614 LDFLAGS=-Wl,-export-dynamic 1587 - else 1588 - LDFLAGS="" 1589 - fi 1590 - 1615 + ], [LDFLAGS=""]) 1616 + AS_IF([test "${TCL_THREADS}" = "1"], [ 1617 + # On OpenBSD: Compile with -pthread 1618 + # Don't link with -lpthread 1619 + LIBS=`echo $LIBS | sed s/-lpthread//` 1620 + CFLAGS="$CFLAGS -pthread" 1621 + ]) 1591 1622 # OpenBSD doesn't do version numbers with dots. 1592 1623 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 1593 1624 TCL_LIB_VERSIONS_OK=nodots 1594 1625 ;; 1595 - FreeBSD-*) 1596 - # FreeBSD 3.* and greater have ELF. 1626 + NetBSD-*) 1627 + # NetBSD has ELF and can use 'cc -shared' to build shared libs 1597 1628 SHLIB_CFLAGS="-fPIC" 1598 - SHLIB_LD="ld -Bshareable -x" 1599 - SHLIB_LD_LIBS='${LIBS}' 1629 + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' 1600 1630 SHLIB_SUFFIX=".so" 1601 - DL_OBJS="tclLoadDl.o" 1602 - DL_LIBS="" 1603 1631 LDFLAGS="$LDFLAGS -export-dynamic" 1604 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1605 - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1606 - if test "${TCL_THREADS}" = "1" ; then 1632 + AS_IF([test $doRpath = yes], [ 1633 + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) 1634 + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1635 + AS_IF([test "${TCL_THREADS}" = "1"], [ 1607 1636 # The -pthread needs to go in the CFLAGS, not LIBS 1608 1637 LIBS=`echo $LIBS | sed s/-pthread//` 1609 1638 CFLAGS="$CFLAGS -pthread" 1610 1639 LDFLAGS="$LDFLAGS -pthread" 1611 - fi 1612 - case $system in 1613 - FreeBSD-3.*) 1614 - # FreeBSD-3 doesn't handle version numbers with dots. 1615 - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 1616 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' 1617 - TCL_LIB_VERSIONS_OK=nodots 1618 - ;; 1619 - esac 1640 + ]) 1641 + ;; 1642 + FreeBSD-*) 1643 + # This configuration from FreeBSD Ports. 1644 + SHLIB_CFLAGS="-fPIC" 1645 + SHLIB_LD="${CC} -shared" 1646 + TCL_SHLIB_LD_EXTRAS="-Wl,-soname \$[@]" 1647 + SHLIB_SUFFIX=".so" 1648 + LDFLAGS="" 1649 + AS_IF([test $doRpath = yes], [ 1650 + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1651 + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) 1652 + AS_IF([test "${TCL_THREADS}" = "1"], [ 1653 + # The -pthread needs to go in the LDFLAGS, not LIBS 1654 + LIBS=`echo $LIBS | sed s/-pthread//` 1655 + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 1656 + LDFLAGS="$LDFLAGS $PTHREAD_LIBS"]) 1657 + # Version numbers are dot-stripped by system policy. 1658 + TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` 1659 + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 1660 + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' 1661 + TCL_LIB_VERSIONS_OK=nodots 1620 1662 ;; 1621 1663 Darwin-*) 1622 1664 CFLAGS_OPTIMIZE="-Os" 1623 1665 SHLIB_CFLAGS="-fno-common" 1624 1666 # To avoid discrepancies between what headers configure sees during 1625 1667 # preprocessing tests and compiling tests, move any -isysroot and 1626 1668 # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: 1627 1669 CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ 1628 1670 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ 1629 1671 if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`" 1630 1672 CFLAGS="`echo " ${CFLAGS}" | \ 1631 1673 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ 1632 1674 if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`" 1633 - if test $do64bit = yes; then 1675 + AS_IF([test $do64bit = yes], [ 1634 1676 case `arch` in 1635 1677 ppc) 1636 1678 AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag], 1637 1679 tcl_cv_cc_arch_ppc64, [ 1638 1680 hold_cflags=$CFLAGS 1639 1681 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" 1640 1682 AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes, 1641 1683 tcl_cv_cc_arch_ppc64=no) 1642 1684 CFLAGS=$hold_cflags]) 1643 - if test $tcl_cv_cc_arch_ppc64 = yes; then 1685 + AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [ 1644 1686 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" 1645 1687 do64bit_ok=yes 1646 - fi;; 1688 + ]);; 1647 1689 i386) 1648 1690 AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag], 1649 1691 tcl_cv_cc_arch_x86_64, [ 1650 1692 hold_cflags=$CFLAGS 1651 1693 CFLAGS="$CFLAGS -arch x86_64" 1652 1694 AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes, 1653 1695 tcl_cv_cc_arch_x86_64=no) 1654 1696 CFLAGS=$hold_cflags]) 1655 - if test $tcl_cv_cc_arch_x86_64 = yes; then 1697 + AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [ 1656 1698 CFLAGS="$CFLAGS -arch x86_64" 1657 1699 do64bit_ok=yes 1658 - fi;; 1700 + ]);; 1659 1701 *) 1660 1702 AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);; 1661 1703 esac 1662 - else 1704 + ], [ 1663 1705 # Check for combined 32-bit and 64-bit fat build 1664 - echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \ 1665 - echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \ 1666 - fat_32_64=yes 1667 - fi 1668 - # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here: 1706 + AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ 1707 + && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [ 1708 + fat_32_64=yes]) 1709 + ]) 1710 + # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS 1669 1711 SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' 1670 1712 AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ 1671 1713 hold_ldflags=$LDFLAGS 1672 1714 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" 1673 1715 AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no) 1674 1716 LDFLAGS=$hold_ldflags]) 1675 - if test $tcl_cv_ld_single_module = yes; then 1717 + AS_IF([test $tcl_cv_ld_single_module = yes], [ 1676 1718 SHLIB_LD="${SHLIB_LD} -Wl,-single_module" 1677 - fi 1678 - SHLIB_LD_LIBS='${LIBS}' 1719 + ]) 1720 + # TEA specific: link shlib with current and compatibility version flags 1721 + vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d` 1722 + SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" 1679 1723 SHLIB_SUFFIX=".dylib" 1680 - DL_OBJS="tclLoadDyld.o" 1681 - DL_LIBS="" 1682 1724 # Don't use -prebind when building for Mac OS X 10.4 or later only: 1683 - test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \ 1684 - "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4 && \ 1685 - LDFLAGS="$LDFLAGS -prebind" 1725 + AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \ 1726 + "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [ 1727 + LDFLAGS="$LDFLAGS -prebind"]) 1686 1728 LDFLAGS="$LDFLAGS -headerpad_max_install_names" 1687 - AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ 1729 + AC_CACHE_CHECK([if ld accepts -search_paths_first flag], 1730 + tcl_cv_ld_search_paths_first, [ 1688 1731 hold_ldflags=$LDFLAGS 1689 1732 LDFLAGS="$LDFLAGS -Wl,-search_paths_first" 1690 - AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no) 1733 + AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, 1734 + tcl_cv_ld_search_paths_first=no) 1691 1735 LDFLAGS=$hold_ldflags]) 1692 - if test $tcl_cv_ld_search_paths_first = yes; then 1736 + AS_IF([test $tcl_cv_ld_search_paths_first = yes], [ 1693 1737 LDFLAGS="$LDFLAGS -Wl,-search_paths_first" 1694 - fi 1738 + ]) 1739 + AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [ 1740 + AC_DEFINE(MODULE_SCOPE, [__private_extern__], 1741 + [Compiler support for module scope symbols]) 1742 + tcl_cv_cc_visibility_hidden=yes 1743 + ]) 1695 1744 CC_SEARCH_FLAGS="" 1696 1745 LD_SEARCH_FLAGS="" 1697 1746 LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" 1698 - 1699 - # TEA specific: for Tk extensions, remove 64-bit arch flags from 1700 - # CFLAGS et al. for combined 32 & 64 bit fat builds as neither 1701 - # TkAqua nor TkX11 can be built for 64-bit at present. 1702 - test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}" && for v in CFLAGS CPPFLAGS LDFLAGS; do 1703 - eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'; done 1704 - ;; 1705 - NEXTSTEP-*) 1706 - SHLIB_CFLAGS="" 1707 - SHLIB_LD="cc -nostdlib -r" 1708 - SHLIB_LD_LIBS="" 1709 - SHLIB_SUFFIX=".so" 1710 - DL_OBJS="tclLoadNext.o" 1711 - DL_LIBS="" 1712 - CC_SEARCH_FLAGS="" 1713 - LD_SEARCH_FLAGS="" 1747 + # TEA specific: for combined 32 & 64 bit fat builds of Tk 1748 + # extensions, verify that 64-bit build is possible. 1749 + AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [ 1750 + AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [ 1751 + AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [ 1752 + for v in CFLAGS CPPFLAGS LDFLAGS; do 1753 + eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' 1754 + done 1755 + CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" 1756 + LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" 1757 + AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();], 1758 + tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no) 1759 + for v in CFLAGS CPPFLAGS LDFLAGS; do 1760 + eval $v'="$hold_'$v'"' 1761 + done]) 1762 + ]) 1763 + AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua], [ 1764 + AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [ 1765 + for v in CFLAGS CPPFLAGS LDFLAGS; do 1766 + eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' 1767 + done 1768 + CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}" 1769 + LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}" 1770 + AC_TRY_LINK([#include <tk.h>], [Tk_InitStubs(NULL, "", 0);], 1771 + tcl_cv_lib_tk_64=yes, tcl_cv_lib_tk_64=no) 1772 + for v in CFLAGS CPPFLAGS LDFLAGS; do 1773 + eval $v'="$hold_'$v'"' 1774 + done]) 1775 + ]) 1776 + # remove 64-bit arch flags from CFLAGS et al. if configuration 1777 + # does not support 64-bit. 1778 + AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [ 1779 + AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags]) 1780 + for v in CFLAGS CPPFLAGS LDFLAGS; do 1781 + eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' 1782 + done]) 1783 + ]) 1714 1784 ;; 1715 1785 OS/390-*) 1716 1786 CFLAGS_OPTIMIZE="" # Optimizer is buggy 1717 1787 AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h 1718 1788 [Should OS/390 do the right thing with sockets?]) 1719 - ;; 1720 - OSF1-1.0|OSF1-1.1|OSF1-1.2) 1721 - # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 1722 - SHLIB_CFLAGS="" 1723 - # Hack: make package name same as library name 1724 - SHLIB_LD='ld -R -export $@:' 1725 - SHLIB_LD_LIBS="" 1726 - SHLIB_SUFFIX=".so" 1727 - DL_OBJS="tclLoadOSF.o" 1728 - DL_LIBS="" 1729 - CC_SEARCH_FLAGS="" 1730 - LD_SEARCH_FLAGS="" 1731 - ;; 1732 - OSF1-1.*) 1733 - # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 1734 - SHLIB_CFLAGS="-fPIC" 1735 - if test "$SHARED_BUILD" = "1" ; then 1736 - SHLIB_LD="ld -shared" 1737 - else 1738 - SHLIB_LD="ld -non_shared" 1739 - fi 1740 - SHLIB_LD_LIBS="" 1741 - SHLIB_SUFFIX=".so" 1742 - DL_OBJS="tclLoadDl.o" 1743 - DL_LIBS="" 1744 - CC_SEARCH_FLAGS="" 1745 - LD_SEARCH_FLAGS="" 1746 1789 ;; 1747 1790 OSF1-V*) 1748 1791 # Digital OSF/1 1749 1792 SHLIB_CFLAGS="" 1750 - if test "$SHARED_BUILD" = "1" ; then 1793 + AS_IF([test "$SHARED_BUILD" = 1], [ 1751 1794 SHLIB_LD='ld -shared -expect_unresolved "*"' 1752 - else 1795 + ], [ 1753 1796 SHLIB_LD='ld -non_shared -expect_unresolved "*"' 1754 - fi 1755 - SHLIB_LD_LIBS="" 1797 + ]) 1756 1798 SHLIB_SUFFIX=".so" 1757 - DL_OBJS="tclLoadDl.o" 1758 - DL_LIBS="" 1759 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1760 - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1761 - if test "$GCC" = "yes" ; then 1762 - CFLAGS="$CFLAGS -mieee" 1763 - else 1764 - CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" 1765 - fi 1799 + AS_IF([test $doRpath = yes], [ 1800 + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1801 + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) 1802 + AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [ 1803 + CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"]) 1766 1804 # see pthread_intro(3) for pthread support on osf1, k.furukawa 1767 - if test "${TCL_THREADS}" = "1" ; then 1805 + AS_IF([test "${TCL_THREADS}" = 1], [ 1768 1806 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" 1769 1807 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" 1770 1808 LIBS=`echo $LIBS | sed s/-lpthreads//` 1771 - if test "$GCC" = "yes" ; then 1809 + AS_IF([test "$GCC" = yes], [ 1772 1810 LIBS="$LIBS -lpthread -lmach -lexc" 1773 - else 1811 + ], [ 1774 1812 CFLAGS="$CFLAGS -pthread" 1775 1813 LDFLAGS="$LDFLAGS -pthread" 1776 - fi 1777 - fi 1778 - 1814 + ]) 1815 + ]) 1779 1816 ;; 1780 1817 QNX-6*) 1781 1818 # QNX RTP 1782 1819 # This may work for all QNX, but it was only reported for v6. 1783 1820 SHLIB_CFLAGS="-fPIC" 1784 1821 SHLIB_LD="ld -Bshareable -x" 1785 1822 SHLIB_LD_LIBS="" 1786 1823 SHLIB_SUFFIX=".so" 1787 - DL_OBJS="tclLoadDl.o" 1788 - # dlopen is in -lc on QNX 1789 - DL_LIBS="" 1790 1824 CC_SEARCH_FLAGS="" 1791 1825 LD_SEARCH_FLAGS="" 1792 1826 ;; 1793 1827 SCO_SV-3.2*) 1794 - # Note, dlopen is available only on SCO 3.2.5 and greater. However, 1795 - # this test works, since "uname -s" was non-standard in 3.2.4 and 1796 - # below. 1797 - if test "$GCC" = "yes" ; then 1798 - SHLIB_CFLAGS="-fPIC -melf" 1799 - LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" 1800 - else 1801 - SHLIB_CFLAGS="-Kpic -belf" 1802 - LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" 1803 - fi 1828 + AS_IF([test "$GCC" = yes], [ 1829 + SHLIB_CFLAGS="-fPIC -melf" 1830 + LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" 1831 + ], [ 1832 + SHLIB_CFLAGS="-Kpic -belf" 1833 + LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" 1834 + ]) 1804 1835 SHLIB_LD="ld -G" 1805 1836 SHLIB_LD_LIBS="" 1806 1837 SHLIB_SUFFIX=".so" 1807 - DL_OBJS="tclLoadDl.o" 1808 - DL_LIBS="" 1809 1838 CC_SEARCH_FLAGS="" 1810 1839 LD_SEARCH_FLAGS="" 1811 1840 ;; 1812 - SINIX*5.4*) 1813 - SHLIB_CFLAGS="-K PIC" 1814 - SHLIB_LD="cc -G" 1815 - SHLIB_LD_LIBS="" 1816 - SHLIB_SUFFIX=".so" 1817 - DL_OBJS="tclLoadDl.o" 1818 - DL_LIBS="-ldl" 1819 - CC_SEARCH_FLAGS="" 1820 - LD_SEARCH_FLAGS="" 1821 - ;; 1822 - SunOS-4*) 1823 - SHLIB_CFLAGS="-PIC" 1824 - SHLIB_LD="ld" 1825 - SHLIB_LD_LIBS="" 1826 - SHLIB_SUFFIX=".so" 1827 - DL_OBJS="tclLoadDl.o" 1828 - DL_LIBS="-ldl" 1829 - CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 1830 - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1831 - 1832 - # SunOS can't handle version numbers with dots in them in library 1833 - # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it 1834 - # requires an extra version number at the end of .so file names. 1835 - # So, the library has to have a name like libtcl75.so.1.0 1836 - 1837 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' 1838 - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 1839 - TCL_LIB_VERSIONS_OK=nodots 1840 - ;; 1841 1841 SunOS-5.[[0-6]]) 1842 1842 # Careful to not let 5.10+ fall into this case 1843 1843 1844 1844 # Note: If _REENTRANT isn't defined, then Solaris 1845 1845 # won't define thread-safe library routines. 1846 1846 1847 1847 AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) 1848 1848 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, 1849 1849 [Do we really want to follow the standard? Yes we do!]) 1850 1850 1851 1851 SHLIB_CFLAGS="-KPIC" 1852 - 1853 - # Note: need the LIBS below, otherwise Tk won't find Tcl's 1854 - # symbols when dynamically loaded into tclsh. 1855 - 1856 - SHLIB_LD_LIBS='${LIBS}' 1857 1852 SHLIB_SUFFIX=".so" 1858 - DL_OBJS="tclLoadDl.o" 1859 - DL_LIBS="-ldl" 1860 - if test "$GCC" = "yes" ; then 1861 - SHLIB_LD="$CC -shared" 1853 + AS_IF([test "$GCC" = yes], [ 1854 + SHLIB_LD='${CC} -shared' 1862 1855 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 1863 1856 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1864 - else 1857 + ], [ 1865 1858 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 1866 1859 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 1867 1860 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1868 - fi 1861 + ]) 1869 1862 ;; 1870 1863 SunOS-5*) 1871 1864 # Note: If _REENTRANT isn't defined, then Solaris 1872 1865 # won't define thread-safe library routines. 1873 1866 1874 1867 AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) 1875 1868 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, 1876 1869 [Do we really want to follow the standard? Yes we do!]) 1877 1870 1878 1871 SHLIB_CFLAGS="-KPIC" 1879 1872 1880 1873 # Check to enable 64-bit flags for compiler/linker 1881 - if test "$do64bit" = "yes" ; then 1874 + AS_IF([test "$do64bit" = yes], [ 1882 1875 arch=`isainfo` 1883 - if test "$arch" = "sparcv9 sparc" ; then 1884 - if test "$GCC" = "yes" ; then 1885 - if test "`gcc -dumpversion | awk -F. '{print [$]1}'`" -lt "3" ; then 1886 - AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system]) 1887 - else 1888 - do64bit_ok=yes 1889 - CFLAGS="$CFLAGS -m64 -mcpu=v9" 1890 - LDFLAGS="$LDFLAGS -m64 -mcpu=v9" 1891 - SHLIB_CFLAGS="-fPIC" 1892 - fi 1893 - else 1876 + AS_IF([test "$arch" = "sparcv9 sparc"], [ 1877 + AS_IF([test "$GCC" = yes], [ 1878 + AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [ 1879 + AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system]) 1880 + ], [ 1894 1881 do64bit_ok=yes 1895 - if test "$do64bitVIS" = "yes" ; then 1896 - CFLAGS="$CFLAGS -xarch=v9a" 1897 - LDFLAGS_ARCH="-xarch=v9a" 1898 - else 1899 - CFLAGS="$CFLAGS -xarch=v9" 1900 - LDFLAGS_ARCH="-xarch=v9" 1901 - fi 1902 - # Solaris 64 uses this as well 1903 - #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" 1904 - fi 1905 - elif test "$arch" = "amd64 i386" ; then 1906 - if test "$GCC" = "yes" ; then 1907 - AC_MSG_WARN([64bit mode not supported with GCC on $system]) 1908 - else 1882 + CFLAGS="$CFLAGS -m64 -mcpu=v9" 1883 + LDFLAGS="$LDFLAGS -m64 -mcpu=v9" 1884 + SHLIB_CFLAGS="-fPIC" 1885 + ]) 1886 + ], [ 1887 + do64bit_ok=yes 1888 + AS_IF([test "$do64bitVIS" = yes], [ 1889 + CFLAGS="$CFLAGS -xarch=v9a" 1890 + LDFLAGS_ARCH="-xarch=v9a" 1891 + ], [ 1892 + CFLAGS="$CFLAGS -xarch=v9" 1893 + LDFLAGS_ARCH="-xarch=v9" 1894 + ]) 1895 + # Solaris 64 uses this as well 1896 + #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" 1897 + ]) 1898 + ], [AS_IF([test "$arch" = "amd64 i386"], [ 1899 + AS_IF([test "$GCC" = yes], [ 1900 + case $system in 1901 + SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) 1902 + do64bit_ok=yes 1903 + CFLAGS="$CFLAGS -m64" 1904 + LDFLAGS="$LDFLAGS -m64";; 1905 + *) 1906 + AC_MSG_WARN([64bit mode not supported with GCC on $system]);; 1907 + esac 1908 + ], [ 1909 1909 do64bit_ok=yes 1910 - CFLAGS="$CFLAGS -xarch=amd64" 1911 - LDFLAGS="$LDFLAGS -xarch=amd64" 1912 - fi 1913 - else 1914 - AC_MSG_WARN([64bit mode not supported for $arch]) 1915 - fi 1916 - fi 1917 - 1918 - # Note: need the LIBS below, otherwise Tk won't find Tcl's 1919 - # symbols when dynamically loaded into tclsh. 1910 + case $system in 1911 + SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) 1912 + CFLAGS="$CFLAGS -m64" 1913 + LDFLAGS="$LDFLAGS -m64";; 1914 + *) 1915 + CFLAGS="$CFLAGS -xarch=amd64" 1916 + LDFLAGS="$LDFLAGS -xarch=amd64";; 1917 + esac 1918 + ]) 1919 + ], [AC_MSG_WARN([64bit mode not supported for $arch])])]) 1920 + ]) 1920 1921 1921 - SHLIB_LD_LIBS='${LIBS}' 1922 1922 SHLIB_SUFFIX=".so" 1923 - DL_OBJS="tclLoadDl.o" 1924 - DL_LIBS="-ldl" 1925 - if test "$GCC" = "yes" ; then 1926 - SHLIB_LD="$CC -shared" 1923 + AS_IF([test "$GCC" = yes], [ 1924 + SHLIB_LD='${CC} -shared' 1927 1925 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 1928 1926 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1929 - if test "$do64bit_ok" = "yes" ; then 1930 - # We need to specify -static-libgcc or we need to 1931 - # add the path to the sparv9 libgcc. 1932 - # JH: static-libgcc is necessary for core Tcl, but may 1933 - # not be necessary for extensions. 1934 - SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" 1935 - # for finding sparcv9 libgcc, get the regular libgcc 1936 - # path, remove so name and append 'sparcv9' 1937 - #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." 1938 - #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" 1939 - fi 1940 - else 1941 - SHLIB_LD="/usr/ccs/bin/ld -G -z text" 1927 + AS_IF([test "$do64bit_ok" = yes], [ 1928 + AS_IF([test "$arch" = "sparcv9 sparc"], [ 1929 + # We need to specify -static-libgcc or we need to 1930 + # add the path to the sparv9 libgcc. 1931 + # JH: static-libgcc is necessary for core Tcl, but may 1932 + # not be necessary for extensions. 1933 + SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" 1934 + # for finding sparcv9 libgcc, get the regular libgcc 1935 + # path, remove so name and append 'sparcv9' 1936 + #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." 1937 + #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" 1938 + ], [AS_IF([test "$arch" = "amd64 i386"], [ 1939 + # JH: static-libgcc is necessary for core Tcl, but may 1940 + # not be necessary for extensions. 1941 + SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" 1942 + ])]) 1943 + ]) 1944 + ], [ 1945 + case $system in 1946 + SunOS-5.[[1-9]][[0-9]]*) 1947 + # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS 1948 + SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';; 1949 + *) 1950 + SHLIB_LD='/usr/ccs/bin/ld -G -z text';; 1951 + esac 1942 1952 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 1943 1953 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 1944 - fi 1954 + ]) 1945 1955 ;; 1946 1956 UNIX_SV* | UnixWare-5*) 1947 1957 SHLIB_CFLAGS="-KPIC" 1948 - SHLIB_LD="cc -G" 1958 + SHLIB_LD='${CC} -G' 1949 1959 SHLIB_LD_LIBS="" 1950 1960 SHLIB_SUFFIX=".so" 1951 - DL_OBJS="tclLoadDl.o" 1952 - DL_LIBS="-ldl" 1953 1961 # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers 1954 1962 # that don't grok the -Bexport option. Test that it does. 1955 1963 AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [ 1956 1964 hold_ldflags=$LDFLAGS 1957 1965 LDFLAGS="$LDFLAGS -Wl,-Bexport" 1958 1966 AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no) 1959 1967 LDFLAGS=$hold_ldflags]) 1960 - if test $tcl_cv_ld_Bexport = yes; then 1968 + AS_IF([test $tcl_cv_ld_Bexport = yes], [ 1961 1969 LDFLAGS="$LDFLAGS -Wl,-Bexport" 1962 - fi 1970 + ]) 1963 1971 CC_SEARCH_FLAGS="" 1964 1972 LD_SEARCH_FLAGS="" 1965 1973 ;; 1966 1974 esac 1967 1975 1968 - if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then 1976 + AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [ 1969 1977 AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform]) 1970 - fi 1978 + ]) 1971 1979 1972 1980 dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so 1973 1981 dnl # until the end of configure, as configure's compile and link tests use 1974 1982 dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's 1975 1983 dnl # preprocessing tests use only CPPFLAGS. 1976 1984 AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""]) 1977 1985 1978 - # Step 4: disable dynamic loading if requested via a command-line switch. 1979 - 1980 - AC_ARG_ENABLE(load, 1981 - AC_HELP_STRING([--enable-load], 1982 - [allow dynamic loading and "load" command (default: on)]), 1983 - [tcl_ok=$enableval], [tcl_ok=yes]) 1984 - if test "$tcl_ok" = "no"; then 1985 - DL_OBJS="" 1986 - fi 1987 - 1988 - if test "x$DL_OBJS" != "x" ; then 1989 - BUILD_DLTEST="\$(DLTEST_TARGETS)" 1990 - else 1991 - echo "Can't figure out how to do dynamic loading or shared libraries" 1992 - echo "on this system." 1993 - SHLIB_CFLAGS="" 1994 - SHLIB_LD="" 1995 - SHLIB_SUFFIX="" 1996 - DL_OBJS="tclLoadNone.o" 1997 - DL_LIBS="" 1998 - LDFLAGS="$LDFLAGS_ORIG" 1999 - CC_SEARCH_FLAGS="" 2000 - LD_SEARCH_FLAGS="" 2001 - BUILD_DLTEST="" 2002 - fi 1986 + # Add in the arch flags late to ensure it wasn't removed. 1987 + # Not necessary in TEA, but this is aligned with core 2003 1988 LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" 2004 1989 2005 1990 # If we're running gcc, then change the C flags for compiling shared 2006 1991 # libraries to the right flags for gcc, instead of those for the 2007 1992 # standard manufacturer compiler. 2008 1993 2009 - if test "$DL_OBJS" != "tclLoadNone.o" ; then 2010 - if test "$GCC" = "yes" ; then 2011 - case $system in 2012 - AIX-*) 2013 - ;; 2014 - BSD/OS*) 2015 - ;; 2016 - IRIX*) 2017 - ;; 2018 - NetBSD-*|FreeBSD-*) 2019 - ;; 2020 - Darwin-*) 2021 - ;; 2022 - SCO_SV-3.2*) 2023 - ;; 2024 - windows) 2025 - ;; 2026 - *) 2027 - SHLIB_CFLAGS="-fPIC" 2028 - ;; 2029 - esac 2030 - fi 2031 - fi 2032 - 2033 - if test "$SHARED_LIB_SUFFIX" = "" ; then 2034 - SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}' 2035 - fi 2036 - if test "$UNSHARED_LIB_SUFFIX" = "" ; then 2037 - UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' 2038 - fi 2039 - 2040 - AC_SUBST(DL_LIBS) 1994 + AS_IF([test "$GCC" = yes], [ 1995 + case $system in 1996 + AIX-*) ;; 1997 + BSD/OS*) ;; 1998 + CYGWIN_*|MINGW32_*) ;; 1999 + IRIX*) ;; 2000 + NetBSD-*|FreeBSD-*|OpenBSD-*) ;; 2001 + Darwin-*) ;; 2002 + SCO_SV-3.2*) ;; 2003 + windows) ;; 2004 + *) SHLIB_CFLAGS="-fPIC" ;; 2005 + esac]) 2006 + 2007 + AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [ 2008 + AC_DEFINE(MODULE_SCOPE, [extern], 2009 + [No Compiler support for module scope symbols]) 2010 + AC_DEFINE(NO_VIZ, [], [No visibility hidden passed to zlib?]) 2011 + ]) 2012 + 2013 + AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [ 2014 + # TEA specific: use PACKAGE_VERSION instead of VERSION 2015 + SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}']) 2016 + AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [ 2017 + # TEA specific: use PACKAGE_VERSION instead of VERSION 2018 + UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a']) 2019 + 2020 + if test "${GCC}" = "yes" ; then 2021 + AC_CACHE_CHECK(for SEH support in compiler, 2022 + tcl_cv_seh, 2023 + AC_TRY_RUN([ 2024 + #define WIN32_LEAN_AND_MEAN 2025 + #include <windows.h> 2026 + #undef WIN32_LEAN_AND_MEAN 2027 + 2028 + int main(int argc, char** argv) { 2029 + int a, b = 0; 2030 + __try { 2031 + a = 666 / b; 2032 + } 2033 + __except (EXCEPTION_EXECUTE_HANDLER) { 2034 + return 0; 2035 + } 2036 + return 1; 2037 + } 2038 + ], 2039 + tcl_cv_seh=yes, 2040 + tcl_cv_seh=no, 2041 + tcl_cv_seh=no) 2042 + ) 2043 + if test "$tcl_cv_seh" = "no" ; then 2044 + AC_DEFINE(HAVE_NO_SEH, 1, 2045 + [Defined when mingw does not support SEH]) 2046 + fi 2047 + 2048 + # 2049 + # Check to see if the excpt.h include file provided contains the 2050 + # definition for EXCEPTION_DISPOSITION; if not, which is the case 2051 + # with Cygwin's version as of 2002-04-10, define it to be int, 2052 + # sufficient for getting the current code to work. 2053 + # 2054 + AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files, 2055 + tcl_cv_eh_disposition, 2056 + AC_TRY_COMPILE([ 2057 +# define WIN32_LEAN_AND_MEAN 2058 +# include <windows.h> 2059 +# undef WIN32_LEAN_AND_MEAN 2060 + ],[ 2061 + EXCEPTION_DISPOSITION x; 2062 + ], 2063 + tcl_cv_eh_disposition=yes, 2064 + tcl_cv_eh_disposition=no) 2065 + ) 2066 + if test "$tcl_cv_eh_disposition" = "no" ; then 2067 + AC_DEFINE(EXCEPTION_DISPOSITION, int, 2068 + [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION]) 2069 + fi 2070 + 2071 + # Check to see if winnt.h defines CHAR, SHORT, and LONG 2072 + # even if VOID has already been #defined. The win32api 2073 + # used by mingw and cygwin is known to do this. 2074 + 2075 + AC_CACHE_CHECK(for winnt.h that ignores VOID define, 2076 + tcl_cv_winnt_ignore_void, 2077 + AC_TRY_COMPILE([ 2078 + #define VOID void 2079 + #define WIN32_LEAN_AND_MEAN 2080 + #include <windows.h> 2081 + #undef WIN32_LEAN_AND_MEAN 2082 + ], [ 2083 + CHAR c; 2084 + SHORT s; 2085 + LONG l; 2086 + ], 2087 + tcl_cv_winnt_ignore_void=yes, 2088 + tcl_cv_winnt_ignore_void=no) 2089 + ) 2090 + if test "$tcl_cv_winnt_ignore_void" = "yes" ; then 2091 + AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1, 2092 + [Defined when cygwin/mingw ignores VOID define in winnt.h]) 2093 + fi 2094 + 2095 + # See if the compiler supports casting to a union type. 2096 + # This is used to stop gcc from printing a compiler 2097 + # warning when initializing a union member. 2098 + 2099 + AC_CACHE_CHECK(for cast to union support, 2100 + tcl_cv_cast_to_union, 2101 + AC_TRY_COMPILE([], 2102 + [ 2103 + union foo { int i; double d; }; 2104 + union foo f = (union foo) (int) 0; 2105 + ], 2106 + tcl_cv_cast_to_union=yes, 2107 + tcl_cv_cast_to_union=no) 2108 + ) 2109 + if test "$tcl_cv_cast_to_union" = "yes"; then 2110 + AC_DEFINE(HAVE_CAST_TO_UNION, 1, 2111 + [Defined when compiler supports casting to union type.]) 2112 + fi 2113 + fi 2041 2114 2042 2115 AC_SUBST(CFLAGS_DEBUG) 2043 2116 AC_SUBST(CFLAGS_OPTIMIZE) 2044 2117 AC_SUBST(CFLAGS_WARNING) 2045 2118 2046 2119 AC_SUBST(STLIB_LD) 2047 2120 AC_SUBST(SHLIB_LD) ................................................................................ 2064 2137 # Note that #include lines must begin in leftmost column for 2065 2138 # some compilers to recognize them as preprocessor directives, 2066 2139 # and some build environments have stdin not pointing at a 2067 2140 # pseudo-terminal (usually /dev/null instead.) 2068 2141 # 2069 2142 # Arguments: 2070 2143 # none 2071 -# 2144 +# 2072 2145 # Results: 2073 2146 # 2074 2147 # Defines only one of the following vars: 2075 2148 # HAVE_SYS_MODEM_H 2076 2149 # USE_TERMIOS 2077 2150 # USE_TERMIO 2078 2151 # USE_SGTTY 2079 -# 2080 2152 #-------------------------------------------------------------------- 2081 2153 2082 2154 AC_DEFUN([TEA_SERIAL_PORT], [ 2083 2155 AC_CHECK_HEADERS(sys/modem.h) 2084 2156 AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [ 2085 2157 AC_TRY_RUN([ 2086 2158 #include <termios.h> ................................................................................ 2177 2249 2178 2250 #-------------------------------------------------------------------- 2179 2251 # TEA_MISSING_POSIX_HEADERS 2180 2252 # 2181 2253 # Supply substitutes for missing POSIX header files. Special 2182 2254 # notes: 2183 2255 # - stdlib.h doesn't define strtol, strtoul, or 2184 -# strtod insome versions of SunOS 2256 +# strtod in some versions of SunOS 2185 2257 # - some versions of string.h don't declare procedures such 2186 2258 # as strstr 2187 2259 # 2188 2260 # Arguments: 2189 2261 # none 2190 -# 2262 +# 2191 2263 # Results: 2192 2264 # 2193 2265 # Defines some of the following vars: 2194 2266 # NO_DIRENT_H 2195 2267 # NO_ERRNO_H 2196 2268 # NO_VALUES_H 2197 2269 # HAVE_LIMITS_H or NO_LIMITS_H ................................................................................ 2230 2302 closedir(d); 2231 2303 ], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)]) 2232 2304 2233 2305 if test $tcl_cv_dirent_h = no; then 2234 2306 AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?]) 2235 2307 fi 2236 2308 2309 + # TEA specific: 2237 2310 AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])]) 2238 2311 AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])]) 2239 2312 AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])]) 2240 2313 AC_CHECK_HEADER(limits.h, 2241 2314 [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])], 2242 2315 [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])]) 2243 2316 AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) ................................................................................ 2276 2349 # no include files, so double-check its result just to be safe. 2277 2350 # 2278 2351 # This should be called after TEA_CONFIG_CFLAGS as setting the 2279 2352 # LIBS line can confuse some configure macro magic. 2280 2353 # 2281 2354 # Arguments: 2282 2355 # none 2283 -# 2356 +# 2284 2357 # Results: 2285 2358 # 2286 2359 # Sets the following vars: 2287 2360 # XINCLUDES 2288 2361 # XLIBSW 2289 2362 # PKG_LIBS (appends to) 2290 -# 2291 2363 #-------------------------------------------------------------------- 2292 2364 2293 2365 AC_DEFUN([TEA_PATH_X], [ 2294 2366 if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then 2295 2367 TEA_PATH_UNIX_X 2296 2368 fi 2297 2369 ]) ................................................................................ 2325 2397 fi 2326 2398 else 2327 2399 if test "$x_includes" != ""; then 2328 2400 XINCLUDES="-I$x_includes" 2329 2401 found_xincludes="yes" 2330 2402 fi 2331 2403 fi 2332 - if test found_xincludes = "no"; then 2404 + if test "$found_xincludes" = "no"; then 2333 2405 AC_MSG_RESULT([couldn't find any!]) 2334 2406 fi 2335 2407 2336 2408 if test "$no_x" = yes; then 2337 2409 AC_MSG_CHECKING([for X11 libraries]) 2338 2410 XLIBSW=nope 2339 2411 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" 2340 2412 for i in $dirs ; do 2341 - if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then 2413 + if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then 2342 2414 AC_MSG_RESULT([$i]) 2343 2415 XLIBSW="-L$i -lX11" 2344 2416 x_libraries="$i" 2345 2417 break 2346 2418 fi 2347 2419 done 2348 2420 else ................................................................................ 2355 2427 if test "$XLIBSW" = nope ; then 2356 2428 AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) 2357 2429 fi 2358 2430 if test "$XLIBSW" = nope ; then 2359 2431 AC_MSG_RESULT([could not find any! Using -lX11.]) 2360 2432 XLIBSW=-lX11 2361 2433 fi 2434 + # TEA specific: 2362 2435 if test x"${XLIBSW}" != x ; then 2363 2436 PKG_LIBS="${PKG_LIBS} ${XLIBSW}" 2364 2437 fi 2365 2438 ]) 2366 2439 2367 2440 #-------------------------------------------------------------------- 2368 2441 # TEA_BLOCKING_STYLE 2369 2442 # 2370 2443 # The statements below check for systems where POSIX-style 2371 -# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 2444 +# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 2372 2445 # On these systems (mostly older ones), use the old BSD-style 2373 2446 # FIONBIO approach instead. 2374 2447 # 2375 2448 # Arguments: 2376 2449 # none 2377 -# 2450 +# 2378 2451 # Results: 2379 2452 # 2380 2453 # Defines some of the following vars: 2381 2454 # HAVE_SYS_IOCTL_H 2382 2455 # HAVE_SYS_FILIO_H 2383 2456 # USE_FIONBIO 2384 2457 # O_NONBLOCK 2385 -# 2386 2458 #-------------------------------------------------------------------- 2387 2459 2388 2460 AC_DEFUN([TEA_BLOCKING_STYLE], [ 2389 2461 AC_CHECK_HEADERS(sys/ioctl.h) 2390 2462 AC_CHECK_HEADERS(sys/filio.h) 2391 2463 TEA_CONFIG_SYSTEM 2392 2464 AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) 2393 2465 case $system in 2394 - # There used to be code here to use FIONBIO under AIX. However, it 2395 - # was reported that FIONBIO doesn't work under AIX 3.2.5. Since 2396 - # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO 2397 - # code (JO, 5/31/97). 2398 - 2399 2466 OSF*) 2400 - AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) 2401 - AC_MSG_RESULT([FIONBIO]) 2402 - ;; 2403 - SunOS-4*) 2404 2467 AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) 2405 2468 AC_MSG_RESULT([FIONBIO]) 2406 2469 ;; 2407 2470 *) 2408 2471 AC_MSG_RESULT([O_NONBLOCK]) 2409 2472 ;; 2410 2473 esac 2411 2474 ]) 2412 2475 2413 2476 #-------------------------------------------------------------------- 2414 -# TEA_TIME_HANLDER 2477 +# TEA_TIME_HANDLER 2415 2478 # 2416 2479 # Checks how the system deals with time.h, what time structures 2417 2480 # are used on the system, and what fields the structures have. 2418 2481 # 2419 2482 # Arguments: 2420 2483 # none 2421 -# 2484 +# 2422 2485 # Results: 2423 2486 # 2424 2487 # Defines some of the following vars: 2425 2488 # USE_DELTA_FOR_TZ 2426 2489 # HAVE_TM_GMTOFF 2427 2490 # HAVE_TM_TZADJ 2428 2491 # HAVE_TIMEZONE_VAR 2429 -# 2430 2492 #-------------------------------------------------------------------- 2431 2493 2432 2494 AC_DEFUN([TEA_TIME_HANDLER], [ 2433 2495 AC_CHECK_HEADERS(sys/time.h) 2434 2496 AC_HEADER_TIME 2435 2497 AC_STRUCT_TIMEZONE 2436 2498 ................................................................................ 2486 2548 # and if the problem exists use a substitute procedure 2487 2549 # "fixstrtod" (provided by Tcl) that corrects the error. 2488 2550 # Also, on Compaq's Tru64 Unix 5.0, 2489 2551 # strtod(" ") returns 0.0 instead of a failure to convert. 2490 2552 # 2491 2553 # Arguments: 2492 2554 # none 2493 -# 2555 +# 2494 2556 # Results: 2495 2557 # 2496 2558 # Might defines some of the following vars: 2497 2559 # strtod (=fixstrtod) 2498 -# 2499 2560 #-------------------------------------------------------------------- 2500 2561 2501 2562 AC_DEFUN([TEA_BUGGY_STRTOD], [ 2502 2563 AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) 2503 2564 if test "$tcl_strtod" = 1; then 2504 2565 AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ 2505 2566 AC_TRY_RUN([ ................................................................................ 2536 2597 # 2537 2598 # Search for the libraries needed to link the Tcl shell. 2538 2599 # Things like the math library (-lm) and socket stuff (-lsocket vs. 2539 2600 # -lnsl) are dealt with here. 2540 2601 # 2541 2602 # Arguments: 2542 2603 # Requires the following vars to be set in the Makefile: 2543 -# DL_LIBS 2604 +# DL_LIBS (not in TEA, only needed in core) 2544 2605 # LIBS 2545 2606 # MATH_LIBS 2546 -# 2607 +# 2547 2608 # Results: 2548 2609 # 2549 -# Subst's the following var: 2610 +# Substitutes the following vars: 2550 2611 # TCL_LIBS 2551 2612 # MATH_LIBS 2552 2613 # 2553 2614 # Might append to the following vars: 2554 2615 # LIBS 2555 2616 # 2556 2617 # Might define the following vars: 2557 2618 # HAVE_NET_ERRNO_H 2558 -# 2559 2619 #-------------------------------------------------------------------- 2560 2620 2561 2621 AC_DEFUN([TEA_TCL_LINK_LIBS], [ 2562 2622 #-------------------------------------------------------------------- 2563 2623 # On a few very rare systems, all of the libm.a stuff is 2564 2624 # already in libc.a. Set compiler flags accordingly. 2565 2625 # Also, Linux requires the "ieee" library for math to work ................................................................................ 2605 2665 if test "$tcl_checkBoth" = 1; then 2606 2666 tk_oldLibs=$LIBS 2607 2667 LIBS="$LIBS -lsocket -lnsl" 2608 2668 AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) 2609 2669 fi 2610 2670 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, 2611 2671 [LIBS="$LIBS -lnsl"])]) 2612 - 2613 - # Don't perform the eval of the libraries here because DL_LIBS 2614 - # won't be set until we call TEA_CONFIG_CFLAGS 2672 + 2673 + # TEA specific: Don't perform the eval of the libraries here because 2674 + # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS 2615 2675 2616 2676 TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' 2617 2677 AC_SUBST(TCL_LIBS) 2618 2678 AC_SUBST(MATH_LIBS) 2619 2679 ]) 2620 2680 2621 2681 #-------------------------------------------------------------------- ................................................................................ 2622 2682 # TEA_TCL_EARLY_FLAGS 2623 2683 # 2624 2684 # Check for what flags are needed to be passed so the correct OS 2625 2685 # features are available. 2626 2686 # 2627 2687 # Arguments: 2628 2688 # None 2629 -# 2689 +# 2630 2690 # Results: 2631 2691 # 2632 2692 # Might define the following vars: 2633 2693 # _ISOC99_SOURCE 2634 2694 # _LARGEFILE64_SOURCE 2635 2695 # _LARGEFILE_SOURCE64 2636 -# 2637 2696 #-------------------------------------------------------------------- 2638 2697 2639 2698 AC_DEFUN([TEA_TCL_EARLY_FLAG],[ 2640 2699 AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]), 2641 2700 AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no, 2642 2701 AC_TRY_COMPILE([[#define ]$1[ 1 2643 2702 ]$2], $3, ................................................................................ 2668 2727 #-------------------------------------------------------------------- 2669 2728 # TEA_TCL_64BIT_FLAGS 2670 2729 # 2671 2730 # Check for what is defined in the way of 64-bit features. 2672 2731 # 2673 2732 # Arguments: 2674 2733 # None 2675 -# 2734 +# 2676 2735 # Results: 2677 2736 # 2678 2737 # Might define the following vars: 2679 2738 # TCL_WIDE_INT_IS_LONG 2680 2739 # TCL_WIDE_INT_TYPE 2681 2740 # HAVE_STRUCT_DIRENT64 2682 2741 # HAVE_STRUCT_STAT64 2683 2742 # HAVE_TYPE_OFF64_T 2684 -# 2685 2743 #-------------------------------------------------------------------- 2686 2744 2687 2745 AC_DEFUN([TEA_TCL_64BIT_FLAGS], [ 2688 2746 AC_MSG_CHECKING([for 64-bit integer type]) 2689 2747 AC_CACHE_VAL(tcl_cv_type_64bit,[ 2690 2748 tcl_cv_type_64bit=none 2691 2749 # See if the compiler knows natively about __int64 2692 2750 AC_TRY_COMPILE(,[__int64 value = (__int64) 0;], 2693 2751 tcl_type_64bit=__int64, tcl_type_64bit="long long") 2694 2752 # See if we should use long anyway Note that we substitute in the 2695 2753 # type that is our current guess for a 64-bit type inside this check 2696 2754 # program, so it should be modified only carefully... 2697 - AC_TRY_COMPILE(,[switch (0) { 2698 - case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; 2755 + AC_TRY_COMPILE(,[switch (0) { 2756 + case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; 2699 2757 }],tcl_cv_type_64bit=${tcl_type_64bit})]) 2700 2758 if test "${tcl_cv_type_64bit}" = none ; then 2701 2759 AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) 2702 2760 AC_MSG_RESULT([using long]) 2703 2761 elif test "${tcl_cv_type_64bit}" = "__int64" \ 2704 2762 -a "${TEA_PLATFORM}" = "windows" ; then 2705 - # We actually want to use the default tcl.h checks in this 2706 - # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* 2763 + # TEA specific: We actually want to use the default tcl.h checks in 2764 + # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* 2707 2765 AC_MSG_RESULT([using Tcl header defaults]) 2708 2766 else 2709 2767 AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}, 2710 2768 [What type should be used to define wide integers?]) 2711 2769 AC_MSG_RESULT([${tcl_cv_type_64bit}]) 2712 2770 2713 2771 # Now check for auxiliary declarations ................................................................................ 2779 2837 # is a lightweight replacement for AC_EXEEXT that doesn't require 2780 2838 # a compiler. 2781 2839 #------------------------------------------------------------------------ 2782 2840 2783 2841 AC_DEFUN([TEA_INIT], [ 2784 2842 # TEA extensions pass this us the version of TEA they think they 2785 2843 # are compatible with. 2786 - TEA_VERSION="3.6" 2844 + TEA_VERSION="3.9" 2787 2845 2788 2846 AC_MSG_CHECKING([for correct TEA configuration]) 2789 2847 if test x"${PACKAGE_NAME}" = x ; then 2790 2848 AC_MSG_ERROR([ 2791 2849 The PACKAGE_NAME variable must be defined by your TEA configure.in]) 2792 2850 fi 2793 2851 if test x"$1" = x ; then ................................................................................ 2794 2852 AC_MSG_ERROR([ 2795 2853 TEA version not specified.]) 2796 2854 elif test "$1" != "${TEA_VERSION}" ; then 2797 2855 AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"]) 2798 2856 else 2799 2857 AC_MSG_RESULT([ok (TEA ${TEA_VERSION})]) 2800 2858 fi 2859 + 2860 + # If the user did not set CFLAGS, set it now to keep macros 2861 + # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2". 2862 + if test "${CFLAGS+set}" != "set" ; then 2863 + CFLAGS="" 2864 + fi 2865 + 2801 2866 case "`uname -s`" in 2802 - *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) 2867 + *win32*|*WIN32*|*MINGW32_*) 2803 2868 AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) 2804 2869 EXEEXT=".exe" 2805 2870 TEA_PLATFORM="windows" 2806 2871 ;; 2872 + *CYGWIN_*) 2873 + CYGPATH=echo 2874 + EXEEXT=".exe" 2875 + # TEA_PLATFORM is determined later in LOAD_TCLCONFIG 2876 + ;; 2807 2877 *) 2808 2878 CYGPATH=echo 2809 - EXEEXT="" 2810 - TEA_PLATFORM="unix" 2879 + # Maybe we are cross-compiling.... 2880 + case ${host_alias} in 2881 + *mingw32*) 2882 + EXEEXT=".exe" 2883 + TEA_PLATFORM="windows" 2884 + ;; 2885 + *) 2886 + EXEEXT="" 2887 + TEA_PLATFORM="unix" 2888 + ;; 2889 + esac 2811 2890 ;; 2812 2891 esac 2813 2892 2814 2893 # Check if exec_prefix is set. If not use fall back to prefix. 2815 2894 # Note when adjusted, so that TEA_PREFIX can correct for this. 2816 2895 # This is needed for recursive configures, since autoconf propagates 2817 2896 # $prefix, but not $exec_prefix (doh!). 2818 2897 if test x$exec_prefix = xNONE ; then 2819 2898 exec_prefix_default=yes 2820 2899 exec_prefix=$prefix 2821 2900 fi 2901 + 2902 + AC_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}]) 2822 2903 2823 2904 AC_SUBST(EXEEXT) 2824 2905 AC_SUBST(CYGPATH) 2825 2906 2826 2907 # This package name must be replaced statically for AC_SUBST to work 2827 2908 AC_SUBST(PKG_LIB_FILE) 2828 2909 # Substitute STUB_LIB_FILE in case package creates a stub library too. ................................................................................ 2863 2944 [\$]*) 2864 2945 # allow $-var names 2865 2946 PKG_SOURCES="$PKG_SOURCES $i" 2866 2947 PKG_OBJECTS="$PKG_OBJECTS $i" 2867 2948 ;; 2868 2949 *) 2869 2950 # check for existence - allows for generic/win/unix VPATH 2951 + # To add more dirs here (like 'src'), you have to update VPATH 2952 + # in Makefile.in as well 2870 2953 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ 2871 2954 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ 2955 + -a ! -f "${srcdir}/macosx/$i" \ 2872 2956 ; then 2873 2957 AC_MSG_ERROR([could not find source file '$i']) 2874 2958 fi 2875 2959 PKG_SOURCES="$PKG_SOURCES $i" 2876 2960 # this assumes it is in a VPATH dir 2877 2961 i=`basename $i` 2878 2962 # handle user calling this before or after TEA_SETUP_COMPILER ................................................................................ 2908 2992 #------------------------------------------------------------------------ 2909 2993 AC_DEFUN([TEA_ADD_STUB_SOURCES], [ 2910 2994 vars="$@" 2911 2995 for i in $vars; do 2912 2996 # check for existence - allows for generic/win/unix VPATH 2913 2997 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ 2914 2998 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ 2999 + -a ! -f "${srcdir}/macosx/$i" \ 2915 3000 ; then 2916 3001 AC_MSG_ERROR([could not find stub source file '$i']) 2917 3002 fi 2918 3003 PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" 2919 3004 # this assumes it is in a VPATH dir 2920 3005 i=`basename $i` 2921 3006 # handle user calling this before or after TEA_SETUP_COMPILER ................................................................................ 3046 3131 # Defines and substs the following vars: 3047 3132 # PKG_CFLAGS 3048 3133 #------------------------------------------------------------------------ 3049 3134 AC_DEFUN([TEA_ADD_CFLAGS], [ 3050 3135 PKG_CFLAGS="$PKG_CFLAGS $@" 3051 3136 AC_SUBST(PKG_CFLAGS) 3052 3137 ]) 3138 + 3139 +#------------------------------------------------------------------------ 3140 +# TEA_ADD_CLEANFILES -- 3141 +# 3142 +# Specify one or more CLEANFILES. 3143 +# 3144 +# Arguments: 3145 +# one or more file names to clean target 3146 +# 3147 +# Results: 3148 +# 3149 +# Appends to CLEANFILES, already defined for subst in LOAD_TCLCONFIG 3150 +#------------------------------------------------------------------------ 3151 +AC_DEFUN([TEA_ADD_CLEANFILES], [ 3152 + CLEANFILES="$CLEANFILES $@" 3153 +]) 3053 3154 3054 3155 #------------------------------------------------------------------------ 3055 3156 # TEA_PREFIX -- 3056 3157 # 3057 3158 # Handle the --prefix=... option by defaulting to what Tcl gave 3058 3159 # 3059 3160 # Arguments: ................................................................................ 3101 3202 # 3102 3203 # Sets up CC var and other standard bits we need to make executables. 3103 3204 #------------------------------------------------------------------------ 3104 3205 AC_DEFUN([TEA_SETUP_COMPILER_CC], [ 3105 3206 # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) 3106 3207 # in this macro, they need to go into TEA_SETUP_COMPILER instead. 3107 3208 3108 - # If the user did not set CFLAGS, set it now to keep 3109 - # the AC_PROG_CC macro from adding "-g -O2". 3110 - if test "${CFLAGS+set}" != "set" ; then 3111 - CFLAGS="" 3112 - fi 3113 - 3114 3209 AC_PROG_CC 3115 3210 AC_PROG_CPP 3116 3211 3117 - AC_PROG_INSTALL 3118 - 3119 3212 #-------------------------------------------------------------------- 3120 3213 # Checks to see if the make program sets the $MAKE variable. 3121 3214 #-------------------------------------------------------------------- 3122 3215 3123 3216 AC_PROG_MAKE_SET 3124 3217 3125 3218 #-------------------------------------------------------------------- 3126 3219 # Find ranlib 3127 3220 #-------------------------------------------------------------------- 3128 3221 3129 - AC_PROG_RANLIB 3222 + AC_CHECK_TOOL(RANLIB, ranlib) 3130 3223 3131 3224 #-------------------------------------------------------------------- 3132 3225 # Determines the correct binary file extension (.o, .obj, .exe etc.) 3133 3226 #-------------------------------------------------------------------- 3134 3227 3135 3228 AC_OBJEXT 3136 3229 AC_EXEEXT ................................................................................ 3201 3294 # CFLAGS - Done late here to note disturb other AC macros 3202 3295 # MAKE_LIB - Command to execute to build the Tcl library; 3203 3296 # differs depending on whether or not Tcl is being 3204 3297 # compiled as a shared library. 3205 3298 # MAKE_SHARED_LIB Makefile rule for building a shared library 3206 3299 # MAKE_STATIC_LIB Makefile rule for building a static library 3207 3300 # MAKE_STUB_LIB Makefile rule for building a stub library 3301 +# VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL 3302 +# VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE 3208 3303 #------------------------------------------------------------------------ 3209 3304 3210 3305 AC_DEFUN([TEA_MAKE_LIB], [ 3211 3306 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then 3212 3307 MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)" 3213 3308 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)" 3309 + AC_EGREP_CPP([manifest needed], [ 3310 +#if defined(_MSC_VER) && _MSC_VER >= 1400 3311 +print("manifest needed") 3312 +#endif 3313 + ], [ 3314 + # Could do a CHECK_PROG for mt, but should always be with MSVC8+ 3315 + VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi" 3316 + VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi" 3317 + MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}" 3318 + TEA_ADD_CLEANFILES([*.manifest]) 3319 + ]) 3214 3320 MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)" 3215 3321 else 3216 3322 MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)" 3217 3323 MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" 3218 3324 MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)" 3219 3325 fi 3220 3326 ................................................................................ 3274 3380 fi 3275 3381 3276 3382 AC_SUBST(MAKE_LIB) 3277 3383 AC_SUBST(MAKE_SHARED_LIB) 3278 3384 AC_SUBST(MAKE_STATIC_LIB) 3279 3385 AC_SUBST(MAKE_STUB_LIB) 3280 3386 AC_SUBST(RANLIB_STUB) 3387 + AC_SUBST(VC_MANIFEST_EMBED_DLL) 3388 + AC_SUBST(VC_MANIFEST_EMBED_EXE) 3281 3389 ]) 3282 3390 3283 3391 #------------------------------------------------------------------------ 3284 3392 # TEA_LIB_SPEC -- 3285 3393 # 3286 3394 # Compute the name of an existing object library located in libdir 3287 3395 # from the given base name and produce the appropriate linker flags. ................................................................................ 3321 3429 for i in \ 3322 3430 `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ 3323 3431 `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ 3324 3432 `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ 3325 3433 `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ 3326 3434 `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ 3327 3435 `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ 3436 + `ls -dr /usr/lib64/$1[[0-9]]*.lib 2>/dev/null ` \ 3437 + `ls -dr /usr/lib64/lib$1[[0-9]]* 2>/dev/null ` \ 3328 3438 `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \ 3329 3439 `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do 3330 3440 if test -f "$i" ; then 3331 3441 tea_lib_name_dir=`dirname $i` 3332 3442 $1_LIB_NAME=`basename $i` 3333 3443 $1_LIB_PATH_NAME=$i 3334 3444 break ................................................................................ 3356 3466 # 3357 3467 # Locate the private Tcl include files 3358 3468 # 3359 3469 # Arguments: 3360 3470 # 3361 3471 # Requires: 3362 3472 # TCL_SRC_DIR Assumes that TEA_LOAD_TCLCONFIG has 3363 -# already been called. 3473 +# already been called. 3364 3474 # 3365 3475 # Results: 3366 3476 # 3367 -# Substs the following vars: 3477 +# Substitutes the following vars: 3368 3478 # TCL_TOP_DIR_NATIVE 3369 -# TCL_GENERIC_DIR_NATIVE 3370 -# TCL_UNIX_DIR_NATIVE 3371 -# TCL_WIN_DIR_NATIVE 3372 -# TCL_BMAP_DIR_NATIVE 3373 -# TCL_TOOL_DIR_NATIVE 3374 -# TCL_PLATFORM_DIR_NATIVE 3375 -# TCL_BIN_DIR_NATIVE 3376 3479 # TCL_INCLUDES 3377 3480 #------------------------------------------------------------------------ 3378 3481 3379 3482 AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [ 3483 + # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh} 3484 + AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS]) 3380 3485 AC_MSG_CHECKING([for Tcl private include files]) 3381 3486 3382 3487 TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` 3383 3488 TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" 3384 - TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" 3385 - TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" 3386 - TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" 3387 - TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\" 3388 - TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\" 3389 - TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\" 3390 3489 3391 - if test "${TEA_PLATFORM}" = "windows"; then 3392 - TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} 3490 + # Check to see if tcl<Plat>Port.h isn't already with the public headers 3491 + # Don't look for tclInt.h because that resides with tcl.h in the core 3492 + # sources, but the <plat>Port headers are in a different directory 3493 + if test "${TEA_PLATFORM}" = "windows" -a \ 3494 + -f "${ac_cv_c_tclh}/tclWinPort.h"; then 3495 + result="private headers found with public headers" 3496 + elif test "${TEA_PLATFORM}" = "unix" -a \ 3497 + -f "${ac_cv_c_tclh}/tclUnixPort.h"; then 3498 + result="private headers found with public headers" 3393 3499 else 3394 - TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} 3395 - fi 3396 - # We want to ensure these are substituted so as not to require 3397 - # any *_NATIVE vars be defined in the Makefile 3398 - TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" 3399 - if test "`uname -s`" = "Darwin"; then 3400 - # If Tcl was built as a framework, attempt to use 3401 - # the framework's Headers and PrivateHeaders directories 3402 - case ${TCL_DEFS} in 3403 - *TCL_FRAMEWORK*) 3404 - if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then 3405 - TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else 3406 - TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi 3407 - ;; 3408 - esac 3409 - else 3410 - if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then 3411 - AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}]) 3500 + TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" 3501 + if test "${TEA_PLATFORM}" = "windows"; then 3502 + TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" 3503 + else 3504 + TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" 3505 + fi 3506 + # Overwrite the previous TCL_INCLUDES as this should capture both 3507 + # public and private headers in the same set. 3508 + # We want to ensure these are substituted so as not to require 3509 + # any *_NATIVE vars be defined in the Makefile 3510 + TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" 3511 + if test "`uname -s`" = "Darwin"; then 3512 + # If Tcl was built as a framework, attempt to use 3513 + # the framework's Headers and PrivateHeaders directories 3514 + case ${TCL_DEFS} in 3515 + *TCL_FRAMEWORK*) 3516 + if test -d "${TCL_BIN_DIR}/Headers" -a \ 3517 + -d "${TCL_BIN_DIR}/PrivateHeaders"; then 3518 + TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}" 3519 + else 3520 + TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" 3521 + fi 3522 + ;; 3523 + esac 3524 + result="Using ${TCL_INCLUDES}" 3525 + else 3526 + if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then 3527 + AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}]) 3528 + fi 3529 + result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" 3412 3530 fi 3413 3531 fi 3414 3532 3415 - 3416 3533 AC_SUBST(TCL_TOP_DIR_NATIVE) 3417 - AC_SUBST(TCL_GENERIC_DIR_NATIVE) 3418 - AC_SUBST(TCL_UNIX_DIR_NATIVE) 3419 - AC_SUBST(TCL_WIN_DIR_NATIVE) 3420 - AC_SUBST(TCL_BMAP_DIR_NATIVE) 3421 - AC_SUBST(TCL_TOOL_DIR_NATIVE) 3422 - AC_SUBST(TCL_PLATFORM_DIR_NATIVE) 3423 3534 3424 3535 AC_SUBST(TCL_INCLUDES) 3425 - AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}]) 3536 + AC_MSG_RESULT([${result}]) 3426 3537 ]) 3427 3538 3428 3539 #------------------------------------------------------------------------ 3429 3540 # TEA_PUBLIC_TCL_HEADERS -- 3430 3541 # 3431 3542 # Locate the installed public Tcl header files 3432 3543 # ................................................................................ 3437 3548 # CYGPATH must be set 3438 3549 # 3439 3550 # Results: 3440 3551 # 3441 3552 # Adds a --with-tclinclude switch to configure. 3442 3553 # Result is cached. 3443 3554 # 3444 -# Substs the following vars: 3555 +# Substitutes the following vars: 3445 3556 # TCL_INCLUDES 3446 3557 #------------------------------------------------------------------------ 3447 3558 3448 3559 AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [ 3449 3560 AC_MSG_CHECKING([for Tcl public headers]) 3450 3561 3451 3562 AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval}) ................................................................................ 3456 3567 if test x"${with_tclinclude}" != x ; then 3457 3568 if test -f "${with_tclinclude}/tcl.h" ; then 3458 3569 ac_cv_c_tclh=${with_tclinclude} 3459 3570 else 3460 3571 AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h]) 3461 3572 fi 3462 3573 else 3574 + list="" 3463 3575 if test "`uname -s`" = "Darwin"; then 3464 3576 # If Tcl was built as a framework, attempt to use 3465 3577 # the framework's Headers directory 3466 3578 case ${TCL_DEFS} in 3467 3579 *TCL_FRAMEWORK*) 3468 3580 list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" 3469 3581 ;; ................................................................................ 3526 3638 # 3527 3639 # Requires: 3528 3640 # TK_SRC_DIR Assumes that TEA_LOAD_TKCONFIG has 3529 3641 # already been called. 3530 3642 # 3531 3643 # Results: 3532 3644 # 3533 -# Substs the following vars: 3645 +# Substitutes the following vars: 3534 3646 # TK_INCLUDES 3535 3647 #------------------------------------------------------------------------ 3536 3648 3537 3649 AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [ 3650 + # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh} 3651 + AC_REQUIRE([TEA_PUBLIC_TK_HEADERS]) 3538 3652 AC_MSG_CHECKING([for Tk private include files]) 3539 3653 3540 3654 TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` 3541 3655 TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" 3542 - TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" 3543 - TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" 3544 - TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" 3545 - TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" 3546 - if test "${TEA_PLATFORM}" = "windows"; then 3547 - TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE} 3656 + 3657 + # Check to see if tk<Plat>Port.h isn't already with the public headers 3658 + # Don't look for tkInt.h because that resides with tk.h in the core 3659 + # sources, but the <plat>Port headers are in a different directory 3660 + if test "${TEA_PLATFORM}" = "windows" -a \ 3661 + -f "${ac_cv_c_tkh}/tkWinPort.h"; then 3662 + result="private headers found with public headers" 3663 + elif test "${TEA_PLATFORM}" = "unix" -a \ 3664 + -f "${ac_cv_c_tkh}/tkUnixPort.h"; then 3665 + result="private headers found with public headers" 3548 3666 else 3549 - TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE} 3550 - fi 3551 - # We want to ensure these are substituted so as not to require 3552 - # any *_NATIVE vars be defined in the Makefile 3553 - TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" 3554 - if test "${TEA_WINDOWINGSYSTEM}" = "win32" \ 3555 - -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then 3556 - TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}" 3557 - fi 3558 - if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then 3559 - TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx" 3560 - fi 3561 - if test "`uname -s`" = "Darwin"; then 3562 - # If Tk was built as a framework, attempt to use 3563 - # the framework's Headers and PrivateHeaders directories 3564 - case ${TK_DEFS} in 3565 - *TK_FRAMEWORK*) 3566 - if test -d "${TK_BIN_DIR}/Headers" -a -d "${TK_BIN_DIR}/PrivateHeaders"; then 3567 - TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"; fi 3568 - ;; 3569 - esac 3570 - else 3571 - if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then 3572 - AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}]) 3667 + TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" 3668 + TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" 3669 + if test "${TEA_PLATFORM}" = "windows"; then 3670 + TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" 3671 + else 3672 + TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" 3673 + fi 3674 + # Overwrite the previous TK_INCLUDES as this should capture both 3675 + # public and private headers in the same set. 3676 + # We want to ensure these are substituted so as not to require 3677 + # any *_NATIVE vars be defined in the Makefile 3678 + TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" 3679 + # Detect and add ttk subdir 3680 + if test -d "${TK_SRC_DIR}/generic/ttk"; then 3681 + TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\"" 3682 + fi 3683 + if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then 3684 + TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\"" 3685 + fi 3686 + if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then 3687 + TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\"" 3688 + fi 3689 + if test "`uname -s`" = "Darwin"; then 3690 + # If Tk was built as a framework, attempt to use 3691 + # the framework's Headers and PrivateHeaders directories 3692 + case ${TK_DEFS} in 3693 + *TK_FRAMEWORK*) 3694 + if test -d "${TK_BIN_DIR}/Headers" -a \ 3695 + -d "${TK_BIN_DIR}/PrivateHeaders"; then 3696 + TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}" 3697 + else 3698 + TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" 3699 + fi 3700 + ;; 3701 + esac 3702 + result="Using ${TK_INCLUDES}" 3703 + else 3704 + if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then 3705 + AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}]) 3706 + fi 3707 + result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" 3573 3708 fi 3574 3709 fi 3575 3710 3576 3711 AC_SUBST(TK_TOP_DIR_NATIVE) 3577 - AC_SUBST(TK_UNIX_DIR_NATIVE) 3578 - AC_SUBST(TK_WIN_DIR_NATIVE) 3579 - AC_SUBST(TK_GENERIC_DIR_NATIVE) 3580 3712 AC_SUBST(TK_XLIB_DIR_NATIVE) 3581 - AC_SUBST(TK_PLATFORM_DIR_NATIVE) 3582 3713 3583 3714 AC_SUBST(TK_INCLUDES) 3584 - AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}]) 3715 + AC_MSG_RESULT([${result}]) 3585 3716 ]) 3586 3717 3587 3718 #------------------------------------------------------------------------ 3588 3719 # TEA_PUBLIC_TK_HEADERS -- 3589 3720 # 3590 3721 # Locate the installed public Tk header files 3591 3722 # ................................................................................ 3596 3727 # CYGPATH must be set 3597 3728 # 3598 3729 # Results: 3599 3730 # 3600 3731 # Adds a --with-tkinclude switch to configure. 3601 3732 # Result is cached. 3602 3733 # 3603 -# Substs the following vars: 3734 +# Substitutes the following vars: 3604 3735 # TK_INCLUDES 3605 3736 #------------------------------------------------------------------------ 3606 3737 3607 3738 AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [ 3608 3739 AC_MSG_CHECKING([for Tk public headers]) 3609 3740 3610 3741 AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files], with_tkinclude=${withval}) ................................................................................ 3615 3746 if test x"${with_tkinclude}" != x ; then 3616 3747 if test -f "${with_tkinclude}/tk.h" ; then 3617 3748 ac_cv_c_tkh=${with_tkinclude} 3618 3749 else 3619 3750 AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h]) 3620 3751 fi 3621 3752 else 3753 + list="" 3622 3754 if test "`uname -s`" = "Darwin"; then 3623 3755 # If Tk was built as a framework, attempt to use 3624 3756 # the framework's Headers directory. 3625 3757 case ${TK_DEFS} in 3626 3758 *TK_FRAMEWORK*) 3627 3759 list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`" 3628 3760 ;; ................................................................................ 3632 3764 # Look in the source dir only if Tk is not installed, 3633 3765 # and in that situation, look there before installed locations. 3634 3766 if test -f "${TK_BIN_DIR}/Makefile" ; then 3635 3767 list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`" 3636 3768 fi 3637 3769 3638 3770 # Check order: pkg --prefix location, Tk's --prefix location, 3639 - # relative to directory of tkConfig.sh, Tcl's --prefix location, 3771 + # relative to directory of tkConfig.sh, Tcl's --prefix location, 3640 3772 # relative to directory of tclConfig.sh. 3641 3773 3642 3774 eval "temp_includedir=${includedir}" 3643 3775 list="$list \ 3644 3776 `ls -d ${temp_includedir} 2>/dev/null` \ 3645 3777 `ls -d ${TK_PREFIX}/include 2>/dev/null` \ 3646 3778 `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \ 3647 3779 `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ 3648 3780 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" 3649 3781 if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then 3650 3782 list="$list /usr/local/include /usr/include" 3783 + if test x"${TK_INCLUDE_SPEC}" != x ; then 3784 + d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'` 3785 + list="$list `ls -d ${d} 2>/dev/null`" 3786 + fi 3651 3787 fi 3652 3788 for i in $list ; do 3653 3789 if test -f "$i/tk.h" ; then 3654 3790 ac_cv_c_tkh=$i 3655 3791 break 3656 3792 fi 3657 3793 done ................................................................................ 3670 3806 3671 3807 INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` 3672 3808 3673 3809 TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" 3674 3810 3675 3811 AC_SUBST(TK_INCLUDES) 3676 3812 3677 - if test "${TEA_WINDOWINGSYSTEM}" = "win32" \ 3678 - -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then 3813 + if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then 3679 3814 # On Windows and Aqua, we need the X compat headers 3680 3815 AC_MSG_CHECKING([for X11 header files]) 3681 3816 if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then 3682 3817 INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`" 3683 3818 TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" 3684 3819 AC_SUBST(TK_XINCLUDES) 3685 3820 fi 3686 3821 AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}]) 3687 3822 fi 3688 3823 ]) 3689 3824 3690 -#------------------------------------------------------------------------ 3691 -# TEA_PROG_TCLSH 3692 -# Determine the fully qualified path name of the tclsh executable 3693 -# in the Tcl build directory or the tclsh installed in a bin 3694 -# directory. This macro will correctly determine the name 3695 -# of the tclsh executable even if tclsh has not yet been 3696 -# built in the build directory. The tclsh found is always 3697 -# associated with a tclConfig.sh file. This tclsh should be used 3698 -# only for running extension test cases. It should never be 3699 -# or generation of files (like pkgIndex.tcl) at build time. 3700 -# 3701 -# Arguments 3702 -# none 3703 -# 3704 -# Results 3705 -# Subst's the following values: 3706 -# TCLSH_PROG 3707 -#------------------------------------------------------------------------ 3708 - 3709 -AC_DEFUN([TEA_PROG_TCLSH], [ 3710 - AC_MSG_CHECKING([for tclsh]) 3711 - if test -f "${TCL_BIN_DIR}/Makefile" ; then 3712 - # tclConfig.sh is in Tcl build directory 3713 - if test "${TEA_PLATFORM}" = "windows"; then 3714 - TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" 3715 - else 3716 - TCLSH_PROG="${TCL_BIN_DIR}/tclsh" 3717 - fi 3718 - else 3719 - # tclConfig.sh is in install location 3720 - if test "${TEA_PLATFORM}" = "windows"; then 3721 - TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" 3722 - else 3723 - TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" 3724 - fi 3725 - list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \ 3726 - `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \ 3727 - `ls -d ${TCL_PREFIX}/bin 2>/dev/null`" 3728 - for i in $list ; do 3729 - if test -f "$i/${TCLSH_PROG}" ; then 3730 - REAL_TCL_BIN_DIR="`cd "$i"; pwd`/" 3731 - break 3732 - fi 3733 - done 3734 - TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}" 3735 - fi 3736 - AC_MSG_RESULT([${TCLSH_PROG}]) 3737 - AC_SUBST(TCLSH_PROG) 3738 -]) 3739 - 3740 -#------------------------------------------------------------------------ 3741 -# TEA_PROG_WISH 3742 -# Determine the fully qualified path name of the wish executable 3743 -# in the Tk build directory or the wish installed in a bin 3744 -# directory. This macro will correctly determine the name 3745 -# of the wish executable even if wish has not yet been 3746 -# built in the build directory. The wish found is always 3747 -# associated with a tkConfig.sh file. This wish should be used 3748 -# only for running extension test cases. It should never be 3749 -# or generation of files (like pkgIndex.tcl) at build time. 3750 -# 3751 -# Arguments 3752 -# none 3753 -# 3754 -# Results 3755 -# Subst's the following values: 3756 -# WISH_PROG 3757 -#------------------------------------------------------------------------ 3758 - 3759 -AC_DEFUN([TEA_PROG_WISH], [ 3760 - AC_MSG_CHECKING([for wish]) 3761 - if test -f "${TK_BIN_DIR}/Makefile" ; then 3762 - # tkConfig.sh is in Tk build directory 3763 - if test "${TEA_PLATFORM}" = "windows"; then 3764 - WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" 3765 - else 3766 - WISH_PROG="${TK_BIN_DIR}/wish" 3767 - fi 3768 - else 3769 - # tkConfig.sh is in install location 3770 - if test "${TEA_PLATFORM}" = "windows"; then 3771 - WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" 3772 - else 3773 - WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}" 3774 - fi 3775 - list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \ 3776 - `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \ 3777 - `ls -d ${TK_PREFIX}/bin 2>/dev/null`" 3778 - for i in $list ; do 3779 - if test -f "$i/${WISH_PROG}" ; then 3780 - REAL_TK_BIN_DIR="`cd "$i"; pwd`/" 3781 - break 3782 - fi 3783 - done 3784 - WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}" 3785 - fi 3786 - AC_MSG_RESULT([${WISH_PROG}]) 3787 - AC_SUBST(WISH_PROG) 3788 -]) 3789 - 3790 3825 #------------------------------------------------------------------------ 3791 3826 # TEA_PATH_CONFIG -- 3792 3827 # 3793 3828 # Locate the ${1}Config.sh file and perform a sanity check on 3794 3829 # the ${1} compile flags. These are used by packages like 3795 3830 # [incr Tk] that load *Config.sh files from more than Tcl and Tk. 3796 3831 # ................................................................................ 3876 3911 if test x"${ac_cv_c_$1config}" = x ; then 3877 3912 for i in `ls -d ${libdir} 2>/dev/null` \ 3878 3913 `ls -d ${exec_prefix}/lib 2>/dev/null` \ 3879 3914 `ls -d ${prefix}/lib 2>/dev/null` \ 3880 3915 `ls -d /usr/local/lib 2>/dev/null` \ 3881 3916 `ls -d /usr/contrib/lib 2>/dev/null` \ 3882 3917 `ls -d /usr/lib 2>/dev/null` \ 3918 + `ls -d /usr/lib64 2>/dev/null` \ 3883 3919 ; do 3884 3920 if test -f "$i/$1Config.sh" ; then 3885 3921 ac_cv_c_$1config=`(cd $i; pwd)` 3886 3922 break 3887 3923 fi 3888 3924 done 3889 3925 fi ................................................................................ 3903 3939 3904 3940 #------------------------------------------------------------------------ 3905 3941 # TEA_LOAD_CONFIG -- 3906 3942 # 3907 3943 # Load the $1Config.sh file 3908 3944 # 3909 3945 # Arguments: 3910 -# 3946 +# 3911 3947 # Requires the following vars to be set: 3912 3948 # $1_BIN_DIR 3913 3949 # 3914 3950 # Results: 3915 3951 # 3916 -# Subst the following vars: 3952 +# Substitutes the following vars: 3917 3953 # $1_SRC_DIR 3918 3954 # $1_LIB_FILE 3919 3955 # $1_LIB_SPEC 3920 -# 3921 3956 #------------------------------------------------------------------------ 3922 3957 3923 3958 AC_DEFUN([TEA_LOAD_CONFIG], [ 3924 3959 AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh]) 3925 3960 3926 3961 if test -f "${$1_BIN_DIR}/$1Config.sh" ; then 3927 3962 AC_MSG_RESULT([loading]) ................................................................................ 3940 3975 # 3941 3976 3942 3977 if test -f "${$1_BIN_DIR}/Makefile" ; then 3943 3978 AC_MSG_WARN([Found Makefile - using build library specs for $1]) 3944 3979 $1_LIB_SPEC=${$1_BUILD_LIB_SPEC} 3945 3980 $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC} 3946 3981 $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH} 3982 + $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC} 3983 + $1_LIBRARY_PATH=${$1_LIBRARY_PATH} 3947 3984 fi 3948 3985 3949 3986 AC_SUBST($1_VERSION) 3950 3987 AC_SUBST($1_BIN_DIR) 3951 3988 AC_SUBST($1_SRC_DIR) 3952 3989 3953 3990 AC_SUBST($1_LIB_FILE) 3954 3991 AC_SUBST($1_LIB_SPEC) 3955 3992 3956 3993 AC_SUBST($1_STUB_LIB_FILE) 3957 3994 AC_SUBST($1_STUB_LIB_SPEC) 3958 3995 AC_SUBST($1_STUB_LIB_PATH) 3996 + 3997 + # Allow the caller to prevent this auto-check by specifying any 2nd arg 3998 + AS_IF([test "x$2" = x], [ 3999 + # Check both upper and lower-case variants 4000 + # If a dev wanted non-stubs libs, this function could take an option 4001 + # to not use _STUB in the paths below 4002 + AS_IF([test "x${$1_STUB_LIB_SPEC}" = x], 4003 + [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)], 4004 + [TEA_LOAD_CONFIG_LIB($1_STUB)]) 4005 + ]) 4006 +]) 4007 + 4008 +#------------------------------------------------------------------------ 4009 +# TEA_LOAD_CONFIG_LIB -- 4010 +# 4011 +# Helper function to load correct library from another extension's 4012 +# ${PACKAGE}Config.sh. 4013 +# 4014 +# Results: 4015 +# Adds to LIBS the appropriate extension library 4016 +#------------------------------------------------------------------------ 4017 +AC_DEFUN([TEA_LOAD_CONFIG_LIB], [ 4018 + AC_MSG_CHECKING([For $1 library for LIBS]) 4019 + # This simplifies the use of stub libraries by automatically adding 4020 + # the stub lib to your path. Normally this would add to SHLIB_LD_LIBS, 4021 + # but this is called before CONFIG_CFLAGS. More importantly, this adds 4022 + # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD. 4023 + if test "x${$1_LIB_SPEC}" != "x" ; then 4024 + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then 4025 + TEA_ADD_LIBS([\"`${CYGPATH} ${$1_LIB_PATH}`\"]) 4026 + AC_MSG_RESULT([using $1_LIB_PATH ${$1_LIB_PATH}]) 4027 + else 4028 + TEA_ADD_LIBS([${$1_LIB_SPEC}]) 4029 + AC_MSG_RESULT([using $1_LIB_SPEC ${$1_LIB_SPEC}]) 4030 + fi 4031 + else 4032 + AC_MSG_RESULT([file not found]) 4033 + fi 4034 +]) 4035 + 4036 +#------------------------------------------------------------------------ 4037 +# TEA_EXPORT_CONFIG -- 4038 +# 4039 +# Define the data to insert into the ${PACKAGE}Config.sh file 4040 +# 4041 +# Arguments: 4042 +# 4043 +# Requires the following vars to be set: 4044 +# $1 4045 +# 4046 +# Results: 4047 +# Substitutes the following vars: 4048 +#------------------------------------------------------------------------ 4049 + 4050 +AC_DEFUN([TEA_EXPORT_CONFIG], [ 4051 + #-------------------------------------------------------------------- 4052 + # These are for $1Config.sh 4053 + #-------------------------------------------------------------------- 4054 + 4055 + # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib) 4056 + eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}" 4057 + if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then 4058 + eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}" 4059 + eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}" 4060 + else 4061 + eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}" 4062 + eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}" 4063 + fi 4064 + $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}" 4065 + $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}" 4066 + $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}" 4067 + $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}" 4068 + $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}" 4069 + $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}" 4070 + 4071 + AC_SUBST($1_BUILD_LIB_SPEC) 4072 + AC_SUBST($1_LIB_SPEC) 4073 + AC_SUBST($1_BUILD_STUB_LIB_SPEC) 4074 + AC_SUBST($1_STUB_LIB_SPEC) 4075 + AC_SUBST($1_BUILD_STUB_LIB_PATH) 4076 + AC_SUBST($1_STUB_LIB_PATH) 4077 + 4078 + AC_SUBST(MAJOR_VERSION) 4079 + AC_SUBST(MINOR_VERSION) 4080 + AC_SUBST(PATCHLEVEL) 3959 4081 ]) 4082 + 3960 4083 3961 4084 #------------------------------------------------------------------------ 3962 4085 # TEA_PATH_CELIB -- 3963 4086 # 3964 4087 # Locate Keuchel's celib emulation layer for targeting Win/CE 3965 4088 # 3966 4089 # Arguments:
Changes to unix/tclAppInit.c.
28 28 | 29 29 | written by Rolf Ade 30 30 | August, 2007 31 31 | 32 32 \---------------------------------------------------------------------------*/ 33 33 34 34 #include "tcl.h" 35 + 36 +#ifndef MODULE_SCOPE 37 +# define MODULE_SCOPE extern 38 +#endif 39 +MODULE_SCOPE int Tcl_AppInit(Tcl_Interp *); 40 +MODULE_SCOPE int main(int, char **); 35 41 36 42 extern int Tdom_Init _ANSI_ARGS_((Tcl_Interp *interp)); 37 43 extern int Tdom_SafeInit _ANSI_ARGS_((Tcl_Interp *interp)); 38 44 39 45 /*---------------------------------------------------------------------------- 40 46 | main 41 47 | ................................................................................ 54 60 | Tcl_AppInit 55 61 | 56 62 \---------------------------------------------------------------------------*/ 57 63 int 58 64 Tcl_AppInit(interp) 59 65 Tcl_Interp *interp; 60 66 { 61 - if (Tcl_Init(interp) == TCL_ERROR) { 67 + if ((Tcl_Init)(interp) == TCL_ERROR) { 62 68 return TCL_ERROR; 63 69 } 64 70 if (Tdom_Init(interp) == TCL_ERROR) { 65 71 return TCL_ERROR; 66 72 } 67 73 Tcl_StaticPackage(interp, "tdom", Tdom_Init, Tdom_SafeInit); 68 74 Tcl_SetVar(interp, "tcl_rcFileName", "~/.tcldomshrc", TCL_GLOBAL_ONLY); 69 75 return TCL_OK; 70 76 }