Codebase list itcl4 / 44d5b1a
New upstream version 4.2.1 Sergei Golovan 3 years ago
38 changed file(s) with 1063 addition(s) and 900 deletion(s). Raw diff Collapse all Expand all
142142
143143 TESTLOADARG = if {[catch {package present ${PACKAGE_NAME}}]} {package forget ${PACKAGE_NAME}}; \
144144 package ifneeded ${PACKAGE_NAME} ${PACKAGE_VERSION} \
145 [list load `@CYGPATH@ $(top_builddir)/$(PKG_LIB_FILE)` $(PACKAGE_NAME)]
145 [list load `@CYGPATH@ $(top_builddir)/$(PKG_LIB_FILE)` [string totitle $(PACKAGE_NAME)]]
146146
147147 #WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
148148 #WISH_PROG = @WISH_PROG@
162162 # you do not compile with a similar machine setup as the Tcl core was
163163 # compiled with.
164164 #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
165 DEFS = @DEFS@ $(PKG_CFLAGS) -DITCL_LIBRARY=\"$(pkglibdir)\"
165 DEFS = @DEFS@ $(PKG_CFLAGS) -DITCL_LIBRARY="$(pkglibdir)"
166166
167167 # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
168168 CONFIG_CLEAN_FILES = @CONFIG_CLEAN_FILES@ Makefile itclConfig.sh pkgIndex.tcl
224224 #========================================================================
225225
226226 install-libraries: libraries
227 @$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir)
227 @$(INSTALL_DATA_DIR) "$(DESTDIR)$(includedir)"
228228 @echo "Installing header files in $(DESTDIR)$(includedir)"
229229 @list='$(PKG_HEADERS)'; for i in $$list; do \
230230 echo "Installing $(srcdir)/$$i" ; \
231 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
231 $(INSTALL_DATA) $(srcdir)/$$i "$(DESTDIR)$(includedir)" ; \
232232 done;
233233
234234 #========================================================================
237237 #========================================================================
238238
239239 install-doc: doc
240 @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann
240 @$(INSTALL_DATA_DIR) "$(DESTDIR)$(mandir)/mann"
241241 @echo "Installing documentation in $(DESTDIR)$(mandir)"
242242 @list='$(srcdir)/doc/*.n'; for i in $$list; do \
243243 if test X"$$i" = X'$(srcdir)/doc/*.n'; then break; fi; \
244244 bi=`basename $$i`; \
245245 echo "Installing $$bi"; \
246246 sed -e '/man\.macros/r $(srcdir)/doc/man.macros' -e '/man\.macros/d' $$i > $$bi.tmp \
247 && $(INSTALL_DATA) $$bi.tmp $(DESTDIR)$(mandir)/mann/$$bi \
247 && $(INSTALL_DATA) $$bi.tmp "$(DESTDIR)$(mandir)/mann/$$bi" \
248248 && rm -f $$bi.tmp; \
249249 done
250250
400400 #========================================================================
401401
402402 install-lib-binaries: binaries
403 @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir)
403 @$(INSTALL_DATA_DIR) "$(DESTDIR)$(pkglibdir)"
404404 @list='$(lib_BINARIES)'; for p in $$list; do \
405405 if test -f $$p; then \
406406 echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
407 $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p; \
407 $(INSTALL_LIBRARY) $$p "$(DESTDIR)$(pkglibdir)/$$p"; \
408408 ext=`echo $$p|sed -e "s/.*\.//"`; \
409409 if test "x$$ext" = "xdll"; then \
410410 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
411411 if test -f $$lib; then \
412412 echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
413 $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
413 $(INSTALL_DATA) $$lib "$(DESTDIR)$(pkglibdir)/$$lib"; \
414414 fi; \
415415 fi; \
416416 fi; \
419419 if test -f $(srcdir)/$$p; then \
420420 destp=`basename $$p`; \
421421 echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
422 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
422 $(INSTALL_DATA) $(srcdir)/$$p "$(DESTDIR)$(pkglibdir)/$$destp"; \
423423 fi; \
424424 done
425425 @if test "x$(SHARED_BUILD)" = "x1"; then \
426426 echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
427 $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
427 $(INSTALL_DATA) pkgIndex.tcl "$(DESTDIR)$(pkglibdir)"; \
428428 fi
429 $(INSTALL_DATA) itclConfig.sh $(DESTDIR)$(pkglibdir)
429 $(INSTALL_DATA) itclConfig.sh "$(DESTDIR)$(pkglibdir)"
430430
431431 #========================================================================
432432 # Install binary executables (e.g. .exe files and dependent .dll files)
442442 @list='$(bin_BINARIES)'; for p in $$list; do \
443443 if test -f $$p; then \
444444 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
445 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
445 $(INSTALL_PROGRAM) $$p "$(DESTDIR)$(bindir)/$$p"; \
446446 fi; \
447447 done
448448
452452
453453 uninstall-binaries:
454454 list='$(lib_BINARIES)'; for p in $$list; do \
455 rm -f $(DESTDIR)$(pkglibdir)/$$p; \
455 rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
456456 done
457457 list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
458458 p=`basename $$p`; \
459 rm -f $(DESTDIR)$(pkglibdir)/$$p; \
459 rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
460460 done
461461 list='$(bin_BINARIES)'; for p in $$list; do \
462 rm -f $(DESTDIR)$(bindir)/$$p; \
462 rm -f "$(DESTDIR)$(bindir)/$$p"; \
463463 done
464464
465465 .PHONY: all binaries clean depend distclean doc install libraries test
00 README: Itcl
11
2 This is the 4.2.0 source distribution of Itcl, an object oriented
2 This is the 4.2.1 source distribution of Itcl, an object oriented
33 extension for Tcl. Itcl releases are available from Sourceforge at:
44
55 https://sourceforge.net/projects/incrtcl/files/%5Bincr%20Tcl_Tk%5D-4-source/
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for itcl 4.2.0.
2 # Generated by GNU Autoconf 2.69 for itcl 4.2.1.
33 #
44 #
55 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
576576 # Identity of this package.
577577 PACKAGE_NAME='itcl'
578578 PACKAGE_TARNAME='itcl'
579 PACKAGE_VERSION='4.2.0'
580 PACKAGE_STRING='itcl 4.2.0'
579 PACKAGE_VERSION='4.2.1'
580 PACKAGE_STRING='itcl 4.2.1'
581581 PACKAGE_BUGREPORT=''
582582 PACKAGE_URL=''
583583
637637 MAKE_STATIC_LIB
638638 MAKE_SHARED_LIB
639639 MAKE_LIB
640 TCL_DBGX
641640 LDFLAGS_DEFAULT
642641 CFLAGS_DEFAULT
643642 LD_LIBRARY_PATH_VAR
645644 SHLIB_LD_LIBS
646645 SHLIB_LD
647646 STLIB_LD
647 LDFLAGS_OPTIMIZE
648 LDFLAGS_DEBUG
648649 CFLAGS_WARNING
649650 CFLAGS_OPTIMIZE
650651 CFLAGS_DEBUG
13041305 # Omit some internal or obsolete options to make the list less imposing.
13051306 # This message is too long to be a string in the A/UX 3.1 sh.
13061307 cat <<_ACEOF
1307 \`configure' configures itcl 4.2.0 to adapt to many kinds of systems.
1308 \`configure' configures itcl 4.2.1 to adapt to many kinds of systems.
13081309
13091310 Usage: $0 [OPTION]... [VAR=VALUE]...
13101311
13651366
13661367 if test -n "$ac_init_help"; then
13671368 case $ac_init_help in
1368 short | recursive ) echo "Configuration of itcl 4.2.0:";;
1369 short | recursive ) echo "Configuration of itcl 4.2.1:";;
13691370 esac
13701371 cat <<\_ACEOF
13711372
14651466 test -n "$ac_init_help" && exit $ac_status
14661467 if $ac_init_version; then
14671468 cat <<\_ACEOF
1468 itcl configure 4.2.0
1469 itcl configure 4.2.1
14691470 generated by GNU Autoconf 2.69
14701471
14711472 Copyright (C) 2012 Free Software Foundation, Inc.
18841885 This file contains any messages produced by compilers while
18851886 running configure, to aid debugging if configure makes a mistake.
18861887
1887 It was created by itcl $as_me 4.2.0, which was
1888 It was created by itcl $as_me 4.2.1, which was
18881889 generated by GNU Autoconf 2.69. Invocation command line was
18891890
18901891 $ $0 $@
34253426 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
34263427 fi
34273428
3428 # eval is required to do the TCL_DBGX substitution
3429 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
3430 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
3431
34323429 # If the TCL_BIN_DIR is the build directory (not the install directory),
34333430 # then set the common variable name to the value of the build variables.
34343431 # For example, the variable TCL_LIB_SPEC will be set to the value
34613458 ;;
34623459 esac
34633460 fi
3464
3465 # eval is required to do the TCL_DBGX substitution
3466 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
3467 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
3468 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
3469 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
34703461
34713462
34723463
50865077 for i in $vars; do
50875078 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
50885079 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
5089 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
5080 i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
50905081 fi
50915082 PKG_LIBS="$PKG_LIBS $i"
50925083 done
61006091 case $system in
61016092 # TEA specific:
61026093 windows)
6103 # This is a 2-stage check to make sure we have the 64-bit SDK
6104 # We have to know where the SDK is installed.
6105 # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
6106 # MACHINE is IX86 for LINK, but this is used by the manifest,
6107 # which requires x86|amd64|ia64.
61086094 MACHINE="X86"
61096095 if test "$do64bit" != "no" ; then
6110 if test "x${MSSDK}x" = "xx" ; then
6111 MSSDK="C:/Progra~1/Microsoft Platform SDK"
6112 fi
6113 MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
6114 PATH64=""
61156096 case "$do64bit" in
61166097 amd64|x64|yes)
61176098 MACHINE="AMD64" ; # default to AMD64 64-bit build
6118 PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
61196099 ;;
61206100 ia64)
61216101 MACHINE="IA64"
6122 PATH64="${MSSDK}/Bin/Win64"
61236102 ;;
61246103 esac
6125 if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
6127 $as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5
6129 $as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
6130 do64bit="no"
6131 else
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5
6133 $as_echo " Using 64-bit $MACHINE mode" >&6; }
6134 do64bit_ok="yes"
6135 fi
61366104 fi
61376105
61386106 if test "$GCC" != "yes" ; then
61496117 for i in $vars; do
61506118 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
61516119 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
6152 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6120 i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
61536121 fi
61546122 PKG_LIBS="$PKG_LIBS $i"
61556123 done
61616129 esac
61626130
61636131 if test "$do64bit" != "no" ; then
6164 # All this magic is necessary for the Win64 SDK RC1 - hobbs
6165 CC="\"${PATH64}/cl.exe\""
6166 CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
6167 RC="\"${MSSDK}/bin/rc.exe\""
6168 lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
6169 LINKBIN="\"${PATH64}/link.exe\""
6132 CC="cl.exe"
6133 RC="rc.exe"
6134 lflags="${lflags} -nologo -MACHINE:${MACHINE} "
6135 LINKBIN="link.exe"
61706136 CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
61716137 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
61726138 # Avoid 'unresolved external symbol __security_cookie'
61766142 for i in $vars; do
61776143 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
61786144 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
6179 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6145 i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
61806146 fi
61816147 PKG_LIBS="$PKG_LIBS $i"
61826148 done
63256291 if test "$ac_cv_cross" = "yes"; then
63266292 case "$do64bit" in
63276293 amd64|x64|yes)
6328 CC="x86_64-w64-mingw32-gcc"
6294 CC="x86_64-w64-mingw32-${CC}"
63296295 LD="x86_64-w64-mingw32-ld"
63306296 AR="x86_64-w64-mingw32-ar"
63316297 RANLIB="x86_64-w64-mingw32-ranlib"
63326298 RC="x86_64-w64-mingw32-windres"
63336299 ;;
63346300 *)
6335 CC="i686-w64-mingw32-gcc"
6301 CC="i686-w64-mingw32-${CC}"
63366302 LD="i686-w64-mingw32-ld"
63376303 AR="i686-w64-mingw32-ar"
63386304 RANLIB="i686-w64-mingw32-ranlib"
64136379 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
64146380 if test "$GCC" = yes; then :
64156381
6416 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
6417
6418 else
6419
6420 CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
6421
6422 fi
6423 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
6382 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
6383
6384 else
6385
6386 CC_SEARCH_FLAGS='"-R${LIB_RUNTIME_DIR}"'
6387
6388 fi
6389 LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
64246390
64256391 else
64266392
64356401
64366402 fi
64376403 SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6438 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
6404 CC_SEARCH_FLAGS='"-L${LIB_RUNTIME_DIR}"'
64396405 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
64406406
64416407 fi
65116477 SHLIB_LD='${CC} -shared'
65126478 SHLIB_SUFFIX=".dll"
65136479 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cygwin version of gcc" >&5
6515 $as_echo_n "checking for Cygwin version of gcc... " >&6; }
6516 if ${ac_cv_cygwin+:} false; then :
6517 $as_echo_n "(cached) " >&6
6518 else
6519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6520 /* end confdefs.h. */
6521
6522 #ifdef __CYGWIN__
6523 #error cygwin
6524 #endif
6525
6526 int
6527 main ()
6528 {
6529
6530 ;
6531 return 0;
6532 }
6533 _ACEOF
6534 if ac_fn_c_try_compile "$LINENO"; then :
6535 ac_cv_cygwin=no
6536 else
6537 ac_cv_cygwin=yes
6538 fi
6539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6540
6541 fi
6542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cygwin" >&5
6543 $as_echo "$ac_cv_cygwin" >&6; }
6544 if test "$ac_cv_cygwin" = "no"; then
6545 as_fn_error $? "${CC} is not a cygwin compiler." "$LINENO" 5
6546 fi
65476480 EXEEXT=".exe"
65486481 do64bit_ok=yes
65496482 CC_SEARCH_FLAGS=""
66686601 SHLIB_CFLAGS="+z"
66696602 SHLIB_LD="ld -b"
66706603 LDFLAGS="$LDFLAGS -Wl,-E"
6671 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
6672 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
6604 CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
6605 LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
66736606 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
66746607
66756608 fi
66966629 SHLIB_LD='${CC} -shared'
66976630 if test $doRpath = yes; then :
66986631
6699 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6632 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
67006633 fi
67016634 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
67026635 ;;
67656698 SHLIB_LD="ld -b"
67666699 SHLIB_LD_LIBS=""
67676700 LDFLAGS="$LDFLAGS -Wl,-E"
6768 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
6769 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
6701 CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
6702 LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
67706703 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
67716704
67726705 fi ;;
67826715
67836716 if test $doRpath = yes; then :
67846717
6785 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6786 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
6718 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
6719 LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
67876720 fi
67886721 ;;
67896722 IRIX-6.*)
67926725 SHLIB_SUFFIX=".so"
67936726 if test $doRpath = yes; then :
67946727
6795 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6796 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
6728 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
6729 LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
67976730 fi
67986731 if test "$GCC" = yes; then :
67996732
68216754 SHLIB_SUFFIX=".so"
68226755 if test $doRpath = yes; then :
68236756
6824 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6825 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
6757 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
6758 LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
68266759 fi
68276760
68286761 # Check to enable 64-bit flags for compiler/linker
68456778
68466779 fi
68476780 ;;
6848 Linux*|GNU*|NetBSD-Debian)
6781 Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*)
68496782 SHLIB_CFLAGS="-fPIC"
68506783 SHLIB_SUFFIX=".so"
68516784
68556788 # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
68566789 SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
68576790 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6791
6792 case $system in
6793 DragonFly-*|FreeBSD-*)
6794 if test "${TCL_THREADS}" = "1"; then :
6795
6796 # The -pthread needs to go in the LDFLAGS, not LIBS
6797 LIBS=`echo $LIBS | sed s/-pthread//`
6798 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
6799 LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
6800 fi
6801 ;;
6802 esac
6803
68586804 if test $doRpath = yes; then :
68596805
6860 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6806 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
68616807 fi
68626808 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
68636809 if test "`uname -m`" = "alpha"; then :
69226868 LD_FLAGS="-Wl,--export-dynamic"
69236869 if test $doRpath = yes; then :
69246870
6925 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6926 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6871 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
6872 LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
69276873 fi
69286874 ;;
69296875 OpenBSD-*)
69406886 SHLIB_SUFFIX=".so"
69416887 if test $doRpath = yes; then :
69426888
6943 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6889 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
69446890 fi
69456891 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
69466892 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
6947 LDFLAGS="-Wl,-export-dynamic"
6893 LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
69486894 CFLAGS_OPTIMIZE="-O2"
69496895 # On OpenBSD: Compile with -pthread
69506896 # Don't link with -lpthread
69626908 LDFLAGS="$LDFLAGS -export-dynamic"
69636909 if test $doRpath = yes; then :
69646910
6965 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6911 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
69666912 fi
69676913 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
69686914 # The -pthread needs to go in the CFLAGS, not LIBS
69696915 LIBS=`echo $LIBS | sed s/-pthread//`
69706916 CFLAGS="$CFLAGS -pthread"
69716917 LDFLAGS="$LDFLAGS -pthread"
6972 ;;
6973 DragonFly-*|FreeBSD-*)
6974 # This configuration from FreeBSD Ports.
6975 SHLIB_CFLAGS="-fPIC"
6976 SHLIB_LD="${CC} -shared"
6977 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
6978 SHLIB_SUFFIX=".so"
6979 LDFLAGS=""
6980 if test $doRpath = yes; then :
6981
6982 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6983 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6984 fi
6985 # The -pthread needs to go in the LDFLAGS, not LIBS
6986 LIBS=`echo $LIBS | sed s/-pthread//`
6987 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
6988 LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
6989 case $system in
6990 FreeBSD-3.*)
6991 # Version numbers are dot-stripped by system policy.
6992 TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
6993 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
6994 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
6995 TCL_LIB_VERSIONS_OK=nodots
6996 ;;
6997 esac
69986918 ;;
69996919 Darwin-*)
70006920 CFLAGS_OPTIMIZE="-Os"
73047224 SHLIB_SUFFIX=".so"
73057225 if test $doRpath = yes; then :
73067226
7307 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7227 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
73087228 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
73097229 fi
73107230 if test "$GCC" = yes; then :
73747294 if test "$GCC" = yes; then :
73757295
73767296 SHLIB_LD='${CC} -shared'
7377 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7297 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
73787298 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
73797299
73807300 else
73817301
73827302 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7383 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7303 CC_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
73847304 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
73857305
73867306 fi
74807400 if test "$GCC" = yes; then :
74817401
74827402 SHLIB_LD='${CC} -shared'
7483 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7403 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
74847404 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
74857405 if test "$do64bit_ok" = yes; then :
74867406
75177437 *)
75187438 SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
75197439 esac
7520 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7521 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7440 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7441 LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
75227442
75237443 fi
75247444 ;;
78177737
78187738
78197739
7740
7741
78207742 # These must be called after we do the basic CFLAGS checks and
78217743 # verify any possible 64-bit or similar switches are necessary
78227744
82118133 tcl_ok=no
82128134 fi
82138135
8214 DBGX=""
82158136 if test "$tcl_ok" = "no"; then
82168137 CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
82178138 LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
82258146 $as_echo "yes (standard debugging)" >&6; }
82268147 fi
82278148 fi
8228 # TEA specific:
8229 if test "${TEA_PLATFORM}" != "windows" ; then
8230 LDFLAGS_DEFAULT="${LDFLAGS}"
8231 fi
8232
82338149
82348150
82358151
83158231
83168232 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
83178233 MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
8318 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
8234 MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
83198235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83208236 /* end confdefs.h. */
83218237
83418257 MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
83428258 else
83438259 MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
8344 MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
8260 MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
83458261 MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
83468262 fi
83478263
84298345 if test -f "${TCL_BIN_DIR}/Makefile" ; then
84308346 # tclConfig.sh is in Tcl build directory
84318347 if test "${TEA_PLATFORM}" = "windows"; then
8432 if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" ; then
8433 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
8434 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}" ; then
8435 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}"
8436 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}" ; then
8437 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}"
8438 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}" ; then
8439 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}"
8348 if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}" ; then
8349 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
8350 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}" ; then
8351 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}"
8352 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}" ; then
8353 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}"
8354 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}" ; then
8355 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}"
84408356 fi
84418357 else
84428358 TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
84448360 else
84458361 # tclConfig.sh is in install location
84468362 if test "${TEA_PLATFORM}" = "windows"; then
8447 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
8363 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
84488364 else
8449 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
8365 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
84508366 fi
84518367 list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
84528368 `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \
84778393 # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
84788394 eval pkglibdir="${libdir}/itcl${PACKAGE_VERSION}"
84798395 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
8480 eval itcl_LIB_FLAG="-litcl${PACKAGE_VERSION}${DBGX}"
8481 eval itcl_STUB_LIB_FLAG="-litclstub${PACKAGE_VERSION}${DBGX}"
8396 eval itcl_LIB_FLAG="-litcl${PACKAGE_VERSION}"
8397 eval itcl_STUB_LIB_FLAG="-litclstub${PACKAGE_VERSION}"
84828398 else
8483 eval itcl_LIB_FLAG="-litcl`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
8484 eval itcl_STUB_LIB_FLAG="-litclstub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
8399 eval itcl_LIB_FLAG="-litcl`echo ${PACKAGE_VERSION} | tr -d .`"
8400 eval itcl_STUB_LIB_FLAG="-litclstub`echo ${PACKAGE_VERSION} | tr -d .`"
84858401 fi
84868402 itcl_BUILD_LIB_SPEC="-L`$CYGPATH $(pwd)` ${itcl_LIB_FLAG}"
84878403 itcl_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` ${itcl_LIB_FLAG}"
90628978 # report actual input values of CONFIG_FILES etc. instead of their
90638979 # values after options handling.
90648980 ac_log="
9065 This file was extended by itcl $as_me 4.2.0, which was
8981 This file was extended by itcl $as_me 4.2.1, which was
90668982 generated by GNU Autoconf 2.69. Invocation command line was
90678983
90688984 CONFIG_FILES = $CONFIG_FILES
91159031 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
91169032 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
91179033 ac_cs_version="\\
9118 itcl config.status 4.2.0
9034 itcl config.status 4.2.1
91199035 configured by $0, generated by GNU Autoconf 2.69,
91209036 with options \\"\$ac_cs_config\\"
91219037
1818 # so that we create the export library with the dll.
1919 #-----------------------------------------------------------------------
2020
21 AC_INIT([itcl], [4.2.0])
21 AC_INIT([itcl],[4.2.1])
2222
2323 #--------------------------------------------------------------------
2424 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
271271 # which require substituting the AC variables in. Include these here.
272272 #--------------------------------------------------------------------
273273
274 AC_OUTPUT([Makefile pkgIndex.tcl itclConfig.sh])
274 AC_CONFIG_FILES([Makefile pkgIndex.tcl itclConfig.sh])
275 AC_OUTPUT
5252 of memory of at least \fIsize\fR bytes. All \fIsize\fR bytes are
5353 initialized to zero.
5454 .PP
55 A module calls \fBItcl_PreserveData\fR on a pointer \fIptr\fR
55 A module calls \fBItcl_PreserveData\fR on a pointer \fIptr\fR
5656 allocated by \fBItcl_Alloc\fR to prevent deallocation of that memory while
5757 the module remains interested in it.
5858 .PP
384384 .
385385 With no arguments, this command returns a list of all object-specific
386386 variables and common data members. If \fIvarName\fR is specified, it
387 returns information for a specific data member.
388 Flags can be specified with \fIvarName\fR in an arbitrary order.
387 returns information for a specific data member.
388 Flags can be specified with \fIvarName\fR in an arbitrary order.
389389 The result is a list of the specific information in exactly the
390390 same order as the flags are specified.
391391
392 If no flags are given, this command returns a list
392 If no flags are given, this command returns a list
393393 as if the followings flags have been specified:
394394 .IP
395395 \fB-protection\fR \fB-type\fR \fB-name\fR \fB-init\fR \fB-value\fR ?\fB-config\fR?
396396
397397 The \fB-config\fR result is only present if \fIvarName\fR is a public
398 variable. It contains the code that is executed at initialization
398 variable. It contains the code that is executed at initialization
399399 of \fIvarName\fR. The \fB-scope\fR flag gives the namespace context
400 of \fIvarName\fR. Herewith the variable can be accessed from outside
401 the object like any other variable. It is similar to the result of
400 of \fIvarName\fR. Herewith the variable can be accessed from outside
401 the object like any other variable. It is similar to the result of
402402 the \fBitcl::scope\fR command.
403403
404404 .RE
0 itcl2TclOO.c: framePtr->clientData = NULL;
1 itcl2TclOO.c: framePtr->objc = objc;
2 itcl2TclOO.c: framePtr->objv = objv;
3 itcl2TclOO.c: framePtr->procPtr = procPtr;
4 itcl2TclOO.c: if (framePtr == NULL || !(framePtr->isProcCallFrame & FRAME_IS_METHOD)) {
5 itcl2TclOO.c: contextPtr = framePtr->clientData;
6 itcl2TclOO.c: if (framePtr == NULL || !(framePtr->isProcCallFrame & FRAME_IS_METHOD)) {
7 itclMigrate2TclCore.c: framePtr->isProcCallFrame |= FRAME_HAS_RESOLVER;
8 itclMigrate2TclCore.c: framePtr->resolvePtr = resolvePtr;
9 itclMigrate2TclCore.c: framePtr = framePtr->callerVarPtr;
10 itclMigrate2TclCore.c: framePtr = framePtr->callerVarPtr;
11 itclMigrate2TclCore.c: return (Tcl_Namespace *)framePtr->nsPtr;
12 itclMigrate2TclCore.c: return framePtr->clientData;
13 itclMigrate2TclCore.c: ((Interp *)interp)->framePtr->nsPtr = (Namespace *)nsPtr;
14 itclMigrate2TclCore.c: return ((Interp *)interp)->framePtr->objc;
15 itclMigrate2TclCore.c: return ((Interp *)interp)->framePtr->objv;
8484 #define ITCL_RELEASE_SERIAL 0
8585
8686 #define ITCL_VERSION "4.2"
87 #define ITCL_PATCH_LEVEL "4.2.0"
87 #define ITCL_PATCH_LEVEL "4.2.1"
8888
8989
9090 /*
5151 static int
5252 FreeCommand(
5353 void *data[],
54 Tcl_Interp *interp,
54 Tcl_Interp *dummy,
5555 int result)
5656 {
5757 Command *cmdPtr = (Command *)data[0];
5858 Proc *procPtr = (Proc *)data[1];
59 (void)dummy;
5960
6061 ckfree(cmdPtr);
6162 procPtr->cmdPtr = NULL;
167168 static int
168169 FreeProcedureMethod(
169170 void *data[],
170 Tcl_Interp *interp,
171 Tcl_Interp *dummy,
171172 int result)
172173 {
173174 ProcedureMethod *pmPtr = (ProcedureMethod *)data[0];
175 (void)dummy;
176
174177 ckfree(pmPtr);
175178 return result;
176179 }
236239 Tcl_Object oPtr = (Tcl_Object)clientData;
237240 int result;
238241
239 result = TclOOInvokeObject(interp, oPtr, clsPtr, PUBLIC_METHOD,
242 if (oPtr) {
243 result = TclOOInvokeObject(interp, oPtr, clsPtr, PUBLIC_METHOD,
240244 objc, objv);
245 } else {
246 Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
247 "cannot access object-specific info without an object context",
248 NULL);
249 return TCL_ERROR;
250 }
241251 return result;
242252 }
243253
351361
352362 int
353363 Itcl_SelfCmd(
354 void *clientData,
364 void *dummy,
355365 Tcl_Interp *interp,
356366 int objc,
357367 Tcl_Obj *const *objv)
359369 Interp *iPtr = (Interp *) interp;
360370 CallFrame *framePtr = iPtr->varFramePtr;
361371 CallContext *contextPtr;
372 (void)dummy;
362373
363374 if (!Itcl_IsMethodCallFrame(interp)) {
364375 Tcl_AppendResult(interp, TclGetString(objv[0]),
465465 static int
466466 ItclSetHullWindowName(
467467 void *clientData, /* infoPtr */
468 Tcl_Interp *interp, /* current interpreter */
468 Tcl_Interp *dummy, /* current interpreter */
469469 int objc, /* number of arguments */
470470 Tcl_Obj *const objv[]) /* argument objects */
471471 {
472472 ItclObjectInfo *infoPtr;
473 (void)dummy;
473474
474475 infoPtr = (ItclObjectInfo *)clientData;
475 if (infoPtr->currIoPtr != NULL) {
476 infoPtr->currIoPtr->hullWindowNamePtr = objv[1];
476 if ((infoPtr->currIoPtr != NULL) && (objc > 1)) {
477 infoPtr->currIoPtr->hullWindowNamePtr = objv[1];
477478 Tcl_IncrRefCount(infoPtr->currIoPtr->hullWindowNamePtr);
478479 }
479480 return TCL_OK;
363363 return TCL_ERROR;
364364 }
365365 /*
366 * Install into the master [info] ensemble.
366 * Install into the [info] ensemble.
367367 */
368368
369369 infoCmd = Tcl_FindCommand(interp, "info", NULL, TCL_GLOBAL_ONLY);
489489 /* ARGSUSED */
490490 int
491491 Itcl_BiIsaCmd(
492 void *clientData, /* class definition */
492 void *dummy, /* class definition */
493493 Tcl_Interp *interp, /* current interpreter */
494494 int objc, /* number of arguments */
495495 Tcl_Obj *const objv[]) /* argument objects */
499499
500500 ItclClass *contextIclsPtr;
501501 ItclObject *contextIoPtr;
502 (void)dummy;
502503
503504 /*
504505 * Make sure that this command is being invoked in the proper
568569 /* ARGSUSED */
569570 int
570571 Itcl_BiConfigureCmd(
571 void *clientData, /* class definition */
572 void *dummy, /* class definition */
572573 Tcl_Interp *interp, /* current interpreter */
573574 int objc, /* number of arguments */
574575 Tcl_Obj *const objv[]) /* argument objects */
596597 int i;
597598 int unparsedObjc;
598599 int result;
600 (void)dummy;
599601
600602 ItclShowArgs(1, "Itcl_BiConfigureCmd", objc, objv);
601603 vlookup = NULL;
842844 /* ARGSUSED */
843845 int
844846 Itcl_BiCgetCmd(
845 void *clientData, /* class definition */
847 void *dummy, /* class definition */
846848 Tcl_Interp *interp, /* current interpreter */
847849 int objc, /* number of arguments */
848850 Tcl_Obj *const objv[]) /* argument objects */
855857 const char *name;
856858 const char *val;
857859 int result;
860 (void)dummy;
858861
859862 ItclShowArgs(1,"Itcl_BiCgetCmd", objc, objv);
860863 /*
10991102 int cObjc;
11001103 int idx;
11011104 Tcl_Obj *objPtr;
1105 (void)dummy;
11021106
11031107 ItclShowArgs(1, "Itcl_BiChainCmd", objc, objv);
11041108
19221926 /* ARGSUSED */
19231927 static int
19241928 ItclExtendedConfigure(
1925 void *clientData, /* class definition */
1929 void *dummy, /* class definition */
19261930 Tcl_Interp *interp, /* current interpreter */
19271931 int objc, /* number of arguments */
19281932 Tcl_Obj *const objv[]) /* argument objects */
19651969 int j;
19661970 int isNew;
19671971 int result;
1968 int isOneOption;
1972 int isOneOption;
1973 (void)dummy;
19691974
19701975 ItclShowArgs(1, "ItclExtendedConfigure", objc, objv);
19711976 ioptPtr = NULL;
25892594 /* ARGSUSED */
25902595 static int
25912596 ItclExtendedCget(
2592 void *clientData, /* class definition */
2597 void *dummy, /* class definition */
25932598 Tcl_Interp *interp, /* current interpreter */
25942599 int objc, /* number of arguments */
25952600 Tcl_Obj *const objv[]) /* argument objects */
26132618 const char *val;
26142619 int i;
26152620 int result;
2621 (void)dummy;
26162622
26172623 ItclShowArgs(1,"ItclExtendedCget", objc, objv);
26182624 /*
28272833 /* ARGSUSED */
28282834 static int
28292835 ItclExtendedSetGet(
2830 void *clientData, /* class definition */
2836 void *dummy, /* class definition */
28312837 Tcl_Interp *interp, /* current interpreter */
28322838 int objc, /* number of arguments */
28332839 Tcl_Obj *const objv[]) /* argument objects */
28432849 const char *val;
28442850 int result;
28452851 int setValue;
2852 (void)dummy;
28462853
28472854 ItclShowArgs(1, "ItclExtendedSetGet", objc, objv);
28482855 imvPtr = NULL;
29452952 /* ARGSUSED */
29462953 int
29472954 Itcl_BiInstallComponentCmd(
2948 void *clientData, /* class definition */
2955 void *dummy, /* class definition */
29492956 Tcl_Interp *interp, /* current interpreter */
29502957 int objc, /* number of arguments */
29512958 Tcl_Obj *const objv[]) /* argument objects */
29612968 const char *token;
29622969 int numOpts;
29632970 int result;
2964
2971 (void)dummy;
29652972
29662973 ItclShowArgs(1, "Itcl_BiInstallComponentCmd", objc, objv);
29672974 /*
30803087 /* ARGSUSED */
30813088 static int
30823089 Itcl_BiDestroyCmd(
3083 void *clientData, /* class definition */
3090 void *dummy, /* class definition */
30843091 Tcl_Interp *interp, /* current interpreter */
30853092 int objc, /* number of arguments */
30863093 Tcl_Obj *const objv[]) /* argument objects */
30893096 ItclClass *contextIclsPtr;
30903097 ItclObject *contextIoPtr;
30913098 int result;
3099 (void)dummy;
30923100
30933101 /*
30943102 * Make sure that this command is being invoked in the proper
31573165 /* ARGSUSED */
31583166 int
31593167 Itcl_BiCallInstanceCmd(
3160 void *clientData, /* class definition */
3168 void *dummy, /* class definition */
31613169 Tcl_Interp *interp, /* current interpreter */
31623170 int objc, /* number of arguments */
31633171 Tcl_Obj *const objv[]) /* argument objects */
31703178 ItclObject *ioPtr;
31713179 const char *token;
31723180 int result;
3181 (void)dummy;
31733182
31743183 /*
31753184 * Make sure that this command is being invoked in the proper
32243233 /* ARGSUSED */
32253234 int
32263235 Itcl_BiGetInstanceVarCmd(
3227 void *clientData, /* class definition */
3236 void *dummy, /* class definition */
32283237 Tcl_Interp *interp, /* current interpreter */
32293238 int objc, /* number of arguments */
32303239 Tcl_Obj *const objv[]) /* argument objects */
32373246 ItclObject *ioPtr;
32383247 const char *token;
32393248 int result;
3249 (void)dummy;
32403250
32413251 /*
32423252 * Make sure that this command is being invoked in the proper
32903300 /* ARGSUSED */
32913301 int
32923302 Itcl_BiMyTypeMethodCmd(
3293 void *clientData, /* class definition */
3303 void *dummy, /* class definition */
32943304 Tcl_Interp *interp, /* current interpreter */
32953305 int objc, /* number of arguments */
32963306 Tcl_Obj *const objv[]) /* argument objects */
33003310 ItclClass *contextIclsPtr;
33013311 ItclObject *contextIoPtr;
33023312 int i;
3313 (void)dummy;
33033314
33043315 /*
33053316 * Make sure that this command is being invoked in the proper
33403351 /* ARGSUSED */
33413352 int
33423353 Itcl_BiMyMethodCmd(
3343 void *clientData, /* class definition */
3354 void *dummy, /* class definition */
33443355 Tcl_Interp *interp, /* current interpreter */
33453356 int objc, /* number of arguments */
33463357 Tcl_Obj *const objv[]) /* argument objects */
33493360 int i;
33503361 ItclClass *contextIclsPtr;
33513362 ItclObject *contextIoPtr;
3363 (void)dummy;
33523364
33533365 /*
33543366 * Make sure that this command is being invoked in the proper
33893401 /* ARGSUSED */
33903402 int
33913403 Itcl_BiMyProcCmd(
3392 void *clientData, /* class definition */
3404 void *dummy, /* class definition */
33933405 Tcl_Interp *interp, /* current interpreter */
33943406 int objc, /* number of arguments */
33953407 Tcl_Obj *const objv[]) /* argument objects */
33993411 ItclClass *contextIclsPtr;
34003412 ItclObject *contextIoPtr;
34013413 int i;
3414 (void)dummy;
34023415
34033416 /*
34043417 * Make sure that this command is being invoked in the proper
34403453 /* ARGSUSED */
34413454 int
34423455 Itcl_BiMyTypeVarCmd(
3443 void *clientData, /* class definition */
3456 void *dummy, /* class definition */
34443457 Tcl_Interp *interp, /* current interpreter */
34453458 int objc, /* number of arguments */
34463459 Tcl_Obj *const objv[]) /* argument objects */
34503463 ItclClass *contextIclsPtr;
34513464 ItclObject *contextIoPtr;
34523465 int i;
3466 (void)dummy;
34533467
34543468 /*
34553469 * Make sure that this command is being invoked in the proper
34923506 /* ARGSUSED */
34933507 int
34943508 Itcl_BiMyVarCmd(
3495 void *clientData, /* class definition */
3509 void *dummy, /* class definition */
34963510 Tcl_Interp *interp, /* current interpreter */
34973511 int objc, /* number of arguments */
34983512 Tcl_Obj *const objv[]) /* argument objects */
35003514 Tcl_Obj *resultPtr;
35013515 ItclClass *contextIclsPtr;
35023516 ItclObject *contextIoPtr;
3517 (void)dummy;
35033518
35043519 /*
35053520 * Make sure that this command is being invoked in the proper
35103525 if (Itcl_GetContext(interp, &contextIclsPtr, &contextIoPtr) != TCL_OK) {
35113526 return TCL_ERROR;
35123527 }
3513 if (contextIoPtr != NULL) {
3528 if ((contextIoPtr != NULL) && (objc > 1)) {
35143529 resultPtr = Tcl_NewStringObj(Tcl_GetString(contextIoPtr->varNsNamePtr),
35153530 -1);
35163531 Tcl_AppendToObj(resultPtr, "::", -1);
35363551 /* ARGSUSED */
35373552 int
35383553 Itcl_BiItclHullCmd(
3539 void *clientData, /* class definition */
3554 void *dummy, /* class definition */
35403555 Tcl_Interp *interp, /* current interpreter */
35413556 int objc, /* number of arguments */
35423557 Tcl_Obj *const objv[]) /* argument objects */
35443559 ItclClass *contextIclsPtr;
35453560 ItclObject *contextIoPtr;
35463561 const char *val;
3562 (void)dummy;
3563 (void)objc;
3564 (void)objv;
35473565
35483566 /*
35493567 * Make sure that this command is being invoked in the proper
5656 {
5757 ItclClass *iclsPtr = (ItclClass *)clientData;
5858
59 assert(iclsPtr->refCount != 0);
5960 if (iclsPtr->refCount-- <= 1) {
6061 ItclFreeClass((char *) clientData);
6162 }
6263 }
63
64
65
6466 /*
6567 * ------------------------------------------------------------------------
6668 * Itcl_DeleteMemberFunc()
132134 } else {
133135 ItclDestroyClass2(iclsPtr);
134136 }
135 ItclReleaseClass(iclsPtr);
136137 }
137138
138139 static int
145146 const char *path = (const char *)data[1];
146147 Tcl_Object *oPtr = (Tcl_Object *)data[2];
147148 Tcl_Obj *nameObjPtr = (Tcl_Obj *)data[3];
149 (void)result;
148150
149151 *oPtr = NULL;
150152 if (infoPtr->clazzClassPtr) {
565567 Tcl_Interp *interp,
566568 ItclClass *iclsPtr)
567569 {
570 (void)interp;
571 (void)iclsPtr;
568572 /* TODO: why is this being skipped? */
569573 return;
570574 }
16341638 Tcl_Obj *vnObjPtr;
16351639 int newEntry, processAncestors;
16361640 size_t varLen;
1637
1641
16381642 /* (de)qualify to simple name */
16391643 varName = simpleName = lookupName;
16401644 while(*varName) {
16431647 };
16441648 }
16451649 vnObjPtr = Tcl_NewStringObj(simpleName, -1);
1646
1650
16471651 processAncestors = simpleName != lookupName;
16481652
16491653 Tcl_DStringInit(&buffer);
17061710 }
17071711 /* check leastQualName correction needed */
17081712 if (!vlookup->leastQualName) {
1709 vlookup->leastQualName =
1713 vlookup->leastQualName = (char *)
17101714 Tcl_GetHashKey(&iclsPtr->resolveVars, hPtr);
17111715 }
17121716 /* reset vlookup for full-qualified names - new lookup */
17241728 setResVar:
17251729
17261730 vlookup->ivPtr = ivPtr;
1727 vlookup->leastQualName =
1731 vlookup->leastQualName = (char *)
17281732 Tcl_GetHashKey(&iclsPtr->resolveVars, hPtr);
17291733
17301734 /*
18581862 if (hPtr == NULL) {
18591863 break;
18601864 }
1861 clookupPtr = Tcl_GetHashValue(hPtr);
1865 clookupPtr = (ItclCmdLookup *)Tcl_GetHashValue(hPtr);
18621866 ckfree((char *)clookupPtr);
18631867 Tcl_DeleteHashEntry(hPtr);
18641868 }
21012105
21022106 /*
21032107 * ------------------------------------------------------------------------
2104 * ItclCreateMethodVariable(), Itcl_CreateMethodVariable()
2108 * ItclCreateMethodVariable()
21052109 *
21062110 * Creates a new class methdovariable definition. If this is a public
21072111 * methodvariable,
168168 /* ARGSUSED */
169169 int
170170 Itcl_FindClassesCmd(
171 ClientData clientData, /* class/object info */
171 ClientData dummy, /* class/object info */
172172 Tcl_Interp *interp, /* current interpreter */
173173 int objc, /* number of arguments */
174174 Tcl_Obj *const objv[]) /* argument objects */
188188 int newEntry;
189189 int handledActiveNs;
190190 int forceFullNames = 0;
191 (void)dummy;
191192
192193 ItclShowArgs(2, "Itcl_FindClassesCmd", objc, objv);
193194 if (objc > 2) {
301302 */
302303 int
303304 Itcl_FindObjectsCmd(
304 ClientData clientData, /* class/object info */
305 ClientData dummy, /* class/object info */
305306 Tcl_Interp *interp, /* current interpreter */
306307 int objc, /* number of arguments */
307308 Tcl_Obj *const objv[]) /* argument objects */
331332 Tcl_CmdInfo cmdInfo;
332333 Tcl_Namespace *nsPtr;
333334 Tcl_Obj *objPtr;
335 (void)dummy;
334336
335337 /*
336338 * Parse arguments:
500502 /* ARGSUSED */
501503 static int
502504 NRDelClassCmd(
503 ClientData clientData, /* unused */
505 ClientData dummy, /* unused */
504506 Tcl_Interp *interp, /* current interpreter */
505507 int objc, /* number of arguments */
506508 Tcl_Obj *const objv[]) /* argument objects */
508510 int i;
509511 char *name;
510512 ItclClass *iclsPtr;
513 (void)dummy;
511514
512515 ItclShowArgs(1, "Itcl_DelClassCmd", objc, objv);
513516 /*
585588
586589 static int
587590 NRDelObjectCmd(
588 ClientData clientData, /* object management info */
591 ClientData dummy, /* object management info */
589592 Tcl_Interp *interp, /* current interpreter */
590593 int objc, /* number of arguments */
591594 Tcl_Obj *const objv[]) /* argument objects */
595598 void *callbackPtr;
596599 int i;
597600 int result;
601 (void)dummy;
598602
599603 ItclShowArgs(1, "Itcl_DelObjectCmd", objc, objv);
600604 /*
687691 char *token;
688692 int doAppend;
689693 int result;
694 (void)dummy;
690695
691696 ItclShowArgs(1, "Itcl_ScopeCmd", objc, objv);
692697 if (objc != 2) {
906911 Tcl_Obj *objPtr;
907912 const char *token;
908913 int pos;
914 (void)dummy;
909915
910916 ItclShowArgs(1, "Itcl_CodeCmd", objc, objv);
911917 /*
9961002 */
9971003 int
9981004 Itcl_IsObjectCmd(
999 ClientData clientData, /* class/object info */
1005 ClientData dummy, /* class/object info */
10001006 Tcl_Interp *interp, /* current interpreter */
10011007 int objc, /* number of arguments */
10021008 Tcl_Obj *const objv[]) /* argument objects */
10111017 Tcl_Command cmd;
10121018 Tcl_Namespace *contextNs = NULL;
10131019 ItclClass *iclsPtr = NULL;
1020 (void)dummy;
10141021
10151022 /*
10161023 * Handle the arguments.
11141121 */
11151122 int
11161123 Itcl_IsClassCmd(
1117 ClientData clientData, /* class/object info */
1124 ClientData dummy, /* class/object info */
11181125 Tcl_Interp *interp, /* current interpreter */
11191126 int objc, /* number of arguments */
11201127 Tcl_Obj *const objv[]) /* argument objects */
11241131 char *name;
11251132 ItclClass *iclsPtr = NULL;
11261133 Tcl_Namespace *contextNs = NULL;
1134 (void)dummy;
11271135
11281136 /*
11291137 * Need itcl::is class classname
11821190 {
11831191 Tcl_Obj **newObjv;
11841192 int result;
1193 (void)dummy;
11851194
11861195 ItclShowArgs(1, "Itcl_FilterCmd", objc, objv);
11871196 /* Tcl_Namespace *contextNs = Tcl_GetCurrentNamespace(interp); */
12221231 int objc, /* number of arguments */
12231232 Tcl_Obj *const objv[]) /* argument objects */
12241233 {
1234 (void)dummy;
1235
12251236 ItclShowArgs(1, "Itcl_FilterDeleteCmd", objc, objv);
12261237 /* Tcl_Namespace *contextNs = Tcl_GetCurrentNamespace(interp); */
12271238
12511262 Tcl_Method mPtr;
12521263 ItclObjectInfo *infoPtr;
12531264 ItclClass *iclsPtr;
1265 (void)dummy;
12541266
12551267 ItclShowArgs(1, "Itcl_ForwardAddCmd", objc, objv);
12561268 if (objc < 3) {
12951307 int objc, /* number of arguments */
12961308 Tcl_Obj *const objv[]) /* argument objects */
12971309 {
1310 (void)dummy;
1311
12981312 ItclShowArgs(1, "Itcl_ForwardDeleteCmd", objc, objv);
12991313 /* Tcl_Namespace *contextNs = Tcl_GetCurrentNamespace(interp); */
13001314
13211335 {
13221336 Tcl_Obj **newObjv;
13231337 int result;
1338 (void)dummy;
13241339
13251340 ItclShowArgs(1, "Itcl_MixinAddCmd", objc, objv);
13261341 if (objc < 3) {
13591374 int objc, /* number of arguments */
13601375 Tcl_Obj *const objv[]) /* argument objects */
13611376 {
1377 (void)dummy;
1378
13621379 ItclShowArgs(1, "Itcl_MixinDeleteCmd", objc, objv);
13631380 /* Tcl_Namespace *contextNs = Tcl_GetCurrentNamespace(interp); */
13641381
17151732 /* ARGSUSED */
17161733 int
17171734 Itcl_AddComponentCmd(
1718 ClientData clientData, /* infoPtr */
1735 ClientData dummy, /* infoPtr */
17191736 Tcl_Interp *interp, /* current interpreter */
17201737 int objc, /* number of arguments */
17211738 Tcl_Obj *const objv[]) /* argument objects */
17351752 const char *varName;
17361753 int isNew;
17371754 int result;
1755 (void)dummy;
17381756
17391757 result = TCL_OK;
17401758 contextIoPtr = NULL;
18791897 /* ARGSUSED */
18801898 int
18811899 Itcl_SetComponentCmd(
1882 ClientData clientData, /* infoPtr */
1900 ClientData dummy, /* infoPtr */
18831901 Tcl_Interp *interp, /* current interpreter */
18841902 int objc, /* number of arguments */
18851903 Tcl_Obj *const objv[]) /* argument objects */
18941912 const char *name;
18951913 const char *val;
18961914 int result;
1915 (void)dummy;
18971916
18981917 result = TCL_OK;
18991918 contextIoPtr = NULL;
8181 * Data shared by ensemble access commands and ensemble parser:
8282 */
8383 typedef struct EnsembleParser {
84 Tcl_Interp* master; /* master interp containing ensembles */
85 Tcl_Interp* parser; /* slave interp for parsing */
84 Tcl_Interp* interp; /* interpreter containing ensembles */
85 Tcl_Interp* parser; /* child interp for parsing */
8686 Ensemble* ensData; /* add parts to this ensemble */
8787 } EnsembleParser;
8888
16801680 ensName = Tcl_GetString(objv[1]);
16811681
16821682 if (ensData) {
1683 if (FindEnsemblePart(ensInfo->master, ensData, ensName, &ensPart) != TCL_OK) {
1683 if (FindEnsemblePart(ensInfo->interp, ensData, ensName, &ensPart) != TCL_OK) {
16841684 ensPart = NULL;
16851685 }
16861686 if (ensPart == NULL) {
1687 if (CreateEnsemble(ensInfo->master, ensData, ensName) != TCL_OK) {
1688 Tcl_TransferResult(ensInfo->master, TCL_ERROR, interp);
1687 if (CreateEnsemble(ensInfo->interp, ensData, ensName) != TCL_OK) {
1688 Tcl_TransferResult(ensInfo->interp, TCL_ERROR, interp);
16891689 return TCL_ERROR;
16901690 }
1691 if (FindEnsemblePart(ensInfo->master, ensData, ensName, &ensPart)
1691 if (FindEnsemblePart(ensInfo->interp, ensData, ensName, &ensPart)
16921692 != TCL_OK) {
16931693 Tcl_Panic("Itcl_EnsembleCmd: can't create ensemble");
16941694 }
16951695 }
16961696
16971697 cmd = ensPart->cmdPtr;
1698 infoPtr = (ItclObjectInfo *)Tcl_GetAssocData(ensInfo->master, ITCL_INTERP_DATA, NULL);
1698 infoPtr = (ItclObjectInfo *)Tcl_GetAssocData(ensInfo->interp, ITCL_INTERP_DATA, NULL);
16991699 hPtr = Tcl_FindHashEntry(&infoPtr->ensembleInfo->ensembles,
17001700 (char *)ensPart->cmdPtr);
17011701 if (hPtr == NULL) {
17631763
17641764 /*
17651765 * Copy the result from the parser interpreter to the
1766 * master interpreter. If an error was encountered,
1766 * parent interpreter. If an error was encountered,
17671767 * copy the error info first, and then set the result.
17681768 * Otherwise, the offending command is reported twice.
17691769 */
17941794 *
17951795 * GetEnsembleParser --
17961796 *
1797 * Returns the slave interpreter that acts as a parser for
1797 * Returns the child interpreter that acts as a parser for
17981798 * the body of an "ensemble" definition. The first time that
17991799 * this is called for an interpreter, the parser is created
18001800 * and registered as associated data. After that, it is
18271827 }
18281828
18291829 /*
1830 * Create a slave interpreter that can be used to parse
1830 * Create a child interpreter that can be used to parse
18311831 * the body of an ensemble definition.
18321832 */
18331833 ensInfo = (EnsembleParser*)ckalloc(sizeof(EnsembleParser));
1834 ensInfo->master = interp;
1834 ensInfo->interp = interp;
18351835 ensInfo->parser = Tcl_CreateInterp();
18361836 ensInfo->ensData = NULL;
18371837
18661866 * DeleteEnsParser --
18671867 *
18681868 * Called when an interpreter is destroyed to clean up the
1869 * ensemble parser within it. Destroys the slave interpreter
1869 * ensemble parser within it. Destroys the child interpreter
18701870 * and frees up the data associated with it.
18711871 *
18721872 * Results:
18811881 static void
18821882 DeleteEnsParser(
18831883 ClientData clientData, /* client data for ensemble-related commands */
1884 Tcl_Interp *interp) /* interpreter containing the data */
1884 Tcl_Interp *dummy) /* interpreter containing the data */
18851885 {
18861886 EnsembleParser* ensInfo = (EnsembleParser*)clientData;
1887 (void)dummy;
1888
18871889 Tcl_DeleteInterp(ensInfo->parser);
18881890 ckfree((char*)ensInfo);
18891891 }
19651967 result = TCL_ERROR;
19661968 goto errorOut;
19671969 }
1968 if (Tcl_CreateProc(ensInfo->master, cmdInfo.namespacePtr, partName, objv[2], objv[3],
1970 if (Tcl_CreateProc(ensInfo->interp, cmdInfo.namespacePtr, partName, objv[2], objv[3],
19691971 &procPtr) != TCL_OK) {
1970 Tcl_TransferResult(ensInfo->master, TCL_ERROR, interp);
1972 Tcl_TransferResult(ensInfo->interp, TCL_ERROR, interp);
19711973 result = TCL_ERROR;
19721974 goto errorOut;
19731975 }
19801982 * if we try to compile the Tcl code for the part. If
19811983 * anything goes wrong, clean up before bailing out.
19821984 */
1983 result = AddEnsemblePart(ensInfo->master, ensData, partName, usage,
1985 result = AddEnsemblePart(ensInfo->interp, ensData, partName, usage,
19841986 (Tcl_ObjCmdProc *)Tcl_GetObjInterpProc(), procPtr, _Tcl_ProcDeleteProc,
19851987 ITCL_ENSEMBLE_ENSEMBLE, &ensPart);
19861988 if (result == TCL_ERROR) {
19871989 _Tcl_ProcDeleteProc(procPtr);
19881990 }
1989 Tcl_TransferResult(ensInfo->master, result, interp);
1991 Tcl_TransferResult(ensInfo->interp, result, interp);
19901992
19911993 errorOut:
19921994 Tcl_DecrRefCount(usagePtr);
20302032
20312033 char *cmdName;
20322034 Tcl_Obj *objPtr;
2035 (void)objc;
20332036
20342037 cmdName = Tcl_GetString(objv[0]);
20352038
21292132 ItclObjectInfo *infoPtr;
21302133 EnsemblePart *ensPart;
21312134 Ensemble *ensData;
2135 (void)dummy;
21322136
21332137 ItclShowArgs(2, "EnsembleUnknownCmd", objc, objv);
21342138 cmd = Tcl_GetCommandFromObj(interp, objv[1]);
8181 Tcl_Obj **usagePtr, /* store usage message for arguments here */
8282 ItclArgList **arglistPtrPtr,
8383 /* returns pointer to parsed argument list */
84 ItclMemberFunc *mPtr,
84 ItclMemberFunc *dummy,
8585 const char *commandName)
8686 {
8787 int argc;
9393 int i;
9494 int hadArgsArgument;
9595 int result;
96 (void)dummy;
9697
9798 *arglistPtrPtr = NULL;
9899 lastArglistPtr = NULL;
295296 */
296297 Tcl_Obj*
297298 Itcl_CreateArgs(
298 Tcl_Interp *interp, /* current interpreter */
299 Tcl_Interp *dummy, /* current interpreter */
299300 const char *string, /* first command word */
300301 int objc, /* number of arguments */
301302 Tcl_Obj *const objv[]) /* argument objects */
302303 {
303304 int i;
304305 Tcl_Obj *listPtr;
306 (void)dummy;
305307
306308 ItclShowArgs(1, "Itcl_CreateArgs", objc, objv);
307309 listPtr = Tcl_NewListObj(objc+2, NULL);
322324
323325 int
324326 ItclEnsembleSubCmd(
325 ClientData clientData,
327 ClientData dummy,
326328 Tcl_Interp *interp,
327329 const char *ensembleName,
328330 int objc,
332334 int result;
333335 Tcl_Obj **newObjv;
334336 int isRootEnsemble;
337 (void)dummy;
338 (void)ensembleName;
339 (void)functionName;
340
335341 ItclShowArgs(2, functionName, objc, objv);
336342
337343 newObjv = (Tcl_Obj **)ckalloc(sizeof(Tcl_Obj *)*(objc));
312312 static int
313313 InfoGutsFinish(
314314 ClientData data[],
315 Tcl_Interp *interp,
315 TCL_UNUSED(Tcl_Interp *),
316316 int result)
317317 {
318318 Tcl_CallFrame *framePtr = (Tcl_CallFrame *) data[0];
555555 ItclGetInfoUsage(
556556 Tcl_Interp *interp,
557557 Tcl_Obj *objPtr, /* returns: summary of usage info */
558 ItclObjectInfo *infoPtr,
558 TCL_UNUSED(ItclObjectInfo *),
559559 ItclClass *iclsPtr)
560560 {
561561 const char *spaces = " ";
562562 int i;
563
564563 ItclObject *ioPtr;
564
565565 if (iclsPtr == NULL) {
566566 if (TCL_ERROR == Itcl_GetContext(interp, &iclsPtr, &ioPtr)) {
567567 return;
599599 ItclGetInfoDelegatedUsage(
600600 Tcl_Interp *interp,
601601 Tcl_Obj *objPtr, /* returns: summary of usage info */
602 ItclObjectInfo *infoPtr)
602 TCL_UNUSED(ItclObjectInfo *))
603603 {
604604 ItclClass *iclsPtr;
605605 const char *name;
609609 int i;
610610
611611 ItclObject *ioPtr;
612
612613 if (TCL_ERROR == Itcl_GetContext(interp, &iclsPtr, &ioPtr)) {
613614 return;
614615 }
659660 /* ARGSUSED */
660661 int
661662 Itcl_BiInfoClassCmd(
662 ClientData clientData, /* ItclObjectInfo Ptr */
663 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
663664 Tcl_Interp *interp, /* current interpreter */
664665 int objc, /* number of arguments */
665666 Tcl_Obj *const objv[]) /* argument objects */
739740 /* ARGSUSED */
740741 static int
741742 Itcl_BiInfoClassOptionsCmd(
742 ClientData clientData, /* ItclObjectInfo Ptr */
743 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
743744 Tcl_Interp *interp, /* current interpreter */
744745 int objc, /* number of arguments */
745746 Tcl_Obj *const objv[]) /* argument objects */
850851 /* ARGSUSED */
851852 static int
852853 Itcl_BiInfoContextCmd(
853 ClientData clientData, /* ItclObjectInfo Ptr */
854 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
854855 Tcl_Interp *interp, /* current interpreter */
855856 int objc, /* number of arguments */
856857 Tcl_Obj *const objv[]) /* argument objects */
889890 /* ARGSUSED */
890891 int
891892 Itcl_BiInfoInheritCmd(
892 ClientData clientdata, /* ItclObjectInfo Ptr */
893 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
893894 Tcl_Interp *interp, /* current interpreter */
894895 int objc, /* number of arguments */
895896 Tcl_Obj *const objv[]) /* argument objects */
949950 /* ARGSUSED */
950951 int
951952 Itcl_BiInfoHeritageCmd(
952 ClientData clientData, /* ItclObjectInfo Ptr */
953 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
953954 Tcl_Interp *interp, /* current interpreter */
954955 int objc, /* number of arguments */
955956 Tcl_Obj *const objv[]) /* argument objects */
10191020 /* ARGSUSED */
10201021 int
10211022 Itcl_BiInfoFunctionCmd(
1022 ClientData clientData, /* ItclObjectInfo Ptr */
1023 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
10231024 Tcl_Interp *interp, /* current interpreter */
10241025 int objc, /* number of arguments */
10251026 Tcl_Obj *const objv[]) /* argument objects */
12591260 /* ARGSUSED */
12601261 int
12611262 Itcl_BiInfoVariableCmd(
1262 ClientData clientData, /* ItclObjectInfo Ptr */
1263 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
12631264 Tcl_Interp *interp, /* current interpreter */
12641265 int objc, /* number of arguments */
12651266 Tcl_Obj *const objv[]) /* argument objects */
18281829 /* ARGSUSED */
18291830 int
18301831 Itcl_BiInfoBodyCmd(
1831 ClientData clientData, /* ItclObjectInfo Ptr */
1832 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
18321833 Tcl_Interp *interp, /* current interpreter */
18331834 int objc, /* number of arguments */
18341835 Tcl_Obj *const objv[]) /* argument objects */
19311932 /* ARGSUSED */
19321933 int
19331934 Itcl_BiInfoArgsCmd(
1934 ClientData clientData, /* ItclObjectInfo Ptr */
1935 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
19351936 Tcl_Interp *interp, /* current interpreter */
19361937 int objc, /* number of arguments */
19371938 Tcl_Obj *const objv[]) /* argument objects */
20402041 /* ARGSUSED */
20412042 int
20422043 Itcl_BiInfoOptionCmd(
2043 ClientData clientData, /* ItclObjectInfo Ptr */
2044 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
20442045 Tcl_Interp *interp, /* current interpreter */
20452046 int objc, /* number of arguments */
20462047 Tcl_Obj *const objv[]) /* argument objects */
23432344 /* ARGSUSED */
23442345 int
23452346 Itcl_BiInfoComponentCmd(
2346 ClientData clientData, /* ItclObjectInfo Ptr */
2347 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
23472348 Tcl_Interp *interp, /* current interpreter */
23482349 int objc, /* number of arguments */
23492350 Tcl_Obj *const objv[]) /* argument objects */
25622563 /* ARGSUSED */
25632564 static int
25642565 Itcl_BiInfoWidgetCmd(
2565 ClientData clientData, /* ItclObjectInfo Ptr */
2566 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
25662567 Tcl_Interp *interp, /* current interpreter */
25672568 int objc, /* number of arguments */
25682569 Tcl_Obj *const objv[]) /* argument objects */
26542655 /* ARGSUSED */
26552656 static int
26562657 Itcl_BiInfoExtendedClassCmd(
2657 ClientData clientData, /* ItclObjectInfo Ptr */
2658 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
26582659 Tcl_Interp *interp, /* current interpreter */
26592660 int objc, /* number of arguments */
26602661 Tcl_Obj *const objv[]) /* argument objects */
27142715 }
27152716 contextIclsPtr = Tcl_GetHashValue(hPtr);
27162717
2718 #elif defined __cplusplus
2719 (void)interp;
2720 (void)objc;
2721 (void)objv;
27172722 #endif
27182723
27192724 return TCL_OK;
27372742 /* ARGSUSED */
27382743 static int
27392744 Itcl_BiInfoDelegatedCmd(
2740 ClientData clientData, /* ItclObjectInfo Ptr */
2745 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
27412746 Tcl_Interp *interp, /* current interpreter */
27422747 int objc, /* number of arguments */
27432748 Tcl_Obj *const objv[]) /* argument objects */
27972802 }
27982803 contextIclsPtr = Tcl_GetHashValue(hPtr);
27992804
2805 #elif defined __cplusplus
2806 (void)interp;
2807 (void)objc;
2808 (void)objv;
28002809 #endif
28012810
28022811 return TCL_OK;
28182827 /* ARGSUSED */
28192828 static int
28202829 Itcl_BiInfoTypeCmd(
2821 ClientData clientData, /* ItclObjectInfo Ptr */
2830 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
28222831 Tcl_Interp *interp, /* current interpreter */
28232832 int objc, /* number of arguments */
28242833 Tcl_Obj *const objv[]) /* argument objects */
29062915 /* ARGSUSED */
29072916 static int
29082917 Itcl_BiInfoHullTypeCmd(
2909 ClientData clientData, /* ItclObjectInfo Ptr */
2918 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
29102919 Tcl_Interp *interp, /* current interpreter */
29112920 int objc, /* number of arguments */
29122921 Tcl_Obj *const objv[]) /* argument objects */
29732982 /* ARGSUSED */
29742983 static int
29752984 Itcl_BiInfoDefaultCmd(
2976 ClientData clientData, /* ItclObjectInfo Ptr */
2985 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
29772986 Tcl_Interp *interp, /* current interpreter */
29782987 int objc, /* number of arguments */
29792988 Tcl_Obj *const objv[]) /* argument objects */
30683077 /* ARGSUSED */
30693078 static int
30703079 Itcl_BiInfoMethodCmd(
3071 ClientData clientData, /* ItclObjectInfo Ptr */
3080 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
30723081 Tcl_Interp *interp, /* current interpreter */
30733082 int objc, /* number of arguments */
30743083 Tcl_Obj *const objv[]) /* argument objects */
32953304 /* ARGSUSED */
32963305 static int
32973306 Itcl_BiInfoMethodsCmd(
3298 ClientData clientData, /* ItclObjectInfo Ptr */
3307 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
32993308 Tcl_Interp *interp, /* current interpreter */
33003309 int objc, /* number of arguments */
33013310 Tcl_Obj *const objv[]) /* argument objects */
33933402 /* ARGSUSED */
33943403 static int
33953404 Itcl_BiInfoOptionsCmd(
3396 ClientData clientData, /* ItclObjectInfo Ptr */
3405 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
33973406 Tcl_Interp *interp, /* current interpreter */
33983407 int objc, /* number of arguments */
33993408 Tcl_Obj *const objv[]) /* argument objects */
35663575 /* ARGSUSED */
35673576 static int
35683577 Itcl_BiInfoComponentsCmd(
3569 ClientData clientData, /* ItclObjectInfo Ptr */
3578 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
35703579 Tcl_Interp *interp, /* current interpreter */
35713580 int objc, /* number of arguments */
35723581 Tcl_Obj *const objv[]) /* argument objects */
36373646 /* ARGSUSED */
36383647 static int
36393648 Itcl_BiInfoTypeMethodCmd(
3640 ClientData clientData, /* ItclObjectInfo Ptr */
3649 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
36413650 Tcl_Interp *interp, /* current interpreter */
36423651 int objc, /* number of arguments */
36433652 Tcl_Obj *const objv[]) /* argument objects */
38653874 /* ARGSUSED */
38663875 static int
38673876 Itcl_BiInfoTypeMethodsCmd(
3868 ClientData clientData, /* ItclObjectInfo Ptr */
3877 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
38693878 Tcl_Interp *interp, /* current interpreter */
38703879 int objc, /* number of arguments */
38713880 Tcl_Obj *const objv[]) /* argument objects */
39703979 /* ARGSUSED */
39713980 static int
39723981 Itcl_BiInfoTypeVarsCmd(
3973 ClientData clientData, /* ItclObjectInfo Ptr */
3982 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
39743983 Tcl_Interp *interp, /* current interpreter */
39753984 int objc, /* number of arguments */
39763985 Tcl_Obj *const objv[]) /* argument objects */
40274036 /* ARGSUSED */
40284037 static int
40294038 Itcl_BiInfoTypeVariableCmd(
4030 ClientData clientData, /* ItclObjectInfo Ptr */
4039 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
40314040 Tcl_Interp *interp, /* current interpreter */
40324041 int objc, /* number of arguments */
40334042 Tcl_Obj *const objv[]) /* argument objects */
42774286 /* ARGSUSED */
42784287 static int
42794288 Itcl_BiInfoVariablesCmd(
4280 ClientData clientData, /* ItclObjectInfo Ptr */
4289 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
42814290 Tcl_Interp *interp, /* current interpreter */
42824291 int objc, /* number of arguments */
42834292 Tcl_Obj *const objv[]) /* argument objects */
43024311 /* ARGSUSED */
43034312 static int
43044313 Itcl_BiInfoWidgetadaptorCmd(
4305 ClientData clientData, /* ItclObjectInfo Ptr */
4314 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
43064315 Tcl_Interp *interp, /* current interpreter */
43074316 int objc, /* number of arguments */
43084317 Tcl_Obj *const objv[]) /* argument objects */
44584467 /* ARGSUSED */
44594468 static int
44604469 Itcl_BiInfoDelegatedOptionsCmd(
4461 ClientData clientData, /* ItclObjectInfo Ptr */
4470 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
44624471 Tcl_Interp *interp, /* current interpreter */
44634472 int objc, /* number of arguments */
44644473 Tcl_Obj *const objv[]) /* argument objects */
45294538 /* ARGSUSED */
45304539 static int
45314540 Itcl_BiInfoDelegatedMethodsCmd(
4532 ClientData clientData, /* ItclObjectInfo Ptr */
4541 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
45334542 Tcl_Interp *interp, /* current interpreter */
45344543 int objc, /* number of arguments */
45354544 Tcl_Obj *const objv[]) /* argument objects */
46024611 /* ARGSUSED */
46034612 static int
46044613 Itcl_BiInfoDelegatedTypeMethodsCmd(
4605 ClientData clientData, /* ItclObjectInfo Ptr */
4614 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
46064615 Tcl_Interp *interp, /* current interpreter */
46074616 int objc, /* number of arguments */
46084617 Tcl_Obj *const objv[]) /* argument objects */
47064715 /* ARGSUSED */
47074716 static int
47084717 Itcl_BiInfoDelegatedOptionCmd(
4709 ClientData clientData, /* ItclObjectInfo Ptr */
4718 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
47104719 Tcl_Interp *interp, /* current interpreter */
47114720 int objc, /* number of arguments */
47124721 Tcl_Obj *const objv[]) /* argument objects */
49404949 /* ARGSUSED */
49414950 static int
49424951 Itcl_BiInfoDelegatedMethodCmd(
4943 ClientData clientData, /* ItclObjectInfo Ptr */
4952 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
49444953 Tcl_Interp *interp, /* current interpreter */
49454954 int objc, /* number of arguments */
49464955 Tcl_Obj *const objv[]) /* argument objects */
51645173 /* ARGSUSED */
51655174 static int
51665175 Itcl_BiInfoDelegatedTypeMethodCmd(
5167 ClientData clientData, /* ItclObjectInfo Ptr */
5176 TCL_UNUSED(ClientData), /* ItclObjectInfo Ptr */
51685177 Tcl_Interp *interp, /* current interpreter */
51695178 int objc, /* number of arguments */
51705179 Tcl_Obj *const objv[]) /* argument objects */
5656 # if _MSC_VER >= 1400
5757 # pragma warning(disable:4267)
5858 # pragma warning(disable:4996)
59 # endif
60 #endif
61
62 #ifndef JOIN
63 # define JOIN(a,b) JOIN1(a,b)
64 # define JOIN1(a,b) a##b
65 #endif
66
67 #ifndef TCL_UNUSED
68 # if defined(__cplusplus)
69 # define TCL_UNUSED(T) T
70 # else
71 # define TCL_UNUSED(T) T JOIN(dummy, __LINE__)
5972 # endif
6073 #endif
6174
652665 MODULE_SCOPE void ItclShowArgs(int level, const char *str, int objc,
653666 Tcl_Obj * const* objv);
654667 #else
655 #define ItclShowArgs(a,b,c,d)
668 #define ItclShowArgs(a,b,c,d) do {(void)(c);(void)(d);} while(0)
656669 #endif
657670
658671 MODULE_SCOPE Tcl_ObjCmdProc ItclCallCCommand;
718731 MODULE_SCOPE int ItclCreateMethodVariable(Tcl_Interp *interp,
719732 ItclVariable *ivPtr, Tcl_Obj* defaultPtr, Tcl_Obj* callbackPtr,
720733 ItclMethodVariable** imvPtrPtr);
721 MODULE_SCOPE int Itcl_CreateMethodVariable (Tcl_Interp *interp,
722 ItclClass *iclsPtr, Tcl_Obj *name, Tcl_Obj *defaultPtr,
723 Tcl_Obj *callbackPtr, ItclMethodVariable **imvPtr);
724734 MODULE_SCOPE int DelegationInstall(Tcl_Interp *interp, ItclObject *ioPtr,
725735 ItclClass *iclsPtr);
726736 MODULE_SCOPE ItclClass *ItclNamespace2Class(Tcl_Namespace *nsPtr);
302302 static void
303303 ItclFreeC(
304304 ClientData clientData, /* associated data */
305 Tcl_Interp *interp) /* intepreter being deleted */
305 TCL_UNUSED(Tcl_Interp *)) /* interpreter being deleted */
306306 {
307307 Tcl_HashTable *tablePtr = (Tcl_HashTable*)clientData;
308308 Tcl_HashSearch place;
6363 */
6464 static int
6565 NRBodyCmd(
66 ClientData clientData, /* */
66 TCL_UNUSED(ClientData), /* */
6767 Tcl_Interp *interp, /* current interpreter */
6868 int objc, /* number of arguments */
6969 Tcl_Obj *const *objv) /* argument objects */
188188 /* ARGSUSED */
189189 static int
190190 NRConfigBodyCmd(
191 ClientData dummy, /* unused */
191 TCL_UNUSED(ClientData), /* unused */
192192 Tcl_Interp *interp, /* current interpreter */
193193 int objc, /* number of arguments */
194194 Tcl_Obj *const objv[]) /* argument objects */
13181318
13191319 static int
13201320 EquivArgLists(
1321 Tcl_Interp *interp,
1321 TCL_UNUSED(Tcl_Interp*),
13221322 ItclArgList *origArgs,
13231323 ItclArgList *realArgs)
13241324 {
20552055 */
20562056 int
20572057 Itcl_ReportFuncErrors(
2058 Tcl_Interp* interp, /* interpreter being modified */
2059 ItclMemberFunc *imPtr, /* command member that was invoked */
2060 ItclObject *contextObj, /* object context for this command */
2061 int result) /* integer status code from proc body */
2058 TCL_UNUSED(Tcl_Interp*), /* interpreter being modified */
2059 TCL_UNUSED(ItclMemberFunc*), /* command member that was invoked */
2060 TCL_UNUSED(ItclObject*), /* object context for this command */
2061 int result) /* integer status code from proc body */
20622062 {
20632063 /* FIXME !!! */
20642064 /* adapt to use of ItclProcErrorProc for stubs compatibility !! */
21882188 */
21892189 Tcl_Var
21902190 Itcl_VarAliasProc(
2191 Tcl_Interp *interp,
2191 TCL_UNUSED(Tcl_Interp*),
21922192 Tcl_Namespace *nsPtr,
21932193 const char *varName,
21942194 ClientData clientData)
22652265 ItclCheckCallProc(
22662266 ClientData clientData,
22672267 Tcl_Interp *interp,
2268 Tcl_ObjectContext contextPtr,
2269 Tcl_CallFrame *framePtr,
2268 TCL_UNUSED(Tcl_ObjectContext),
2269 TCL_UNUSED(Tcl_CallFrame*),
22702270 int *isFinished)
22712271 {
22722272 int result;
24552455 Itcl_PushStack(framePtr, stackPtr);
24562456
24572457 if (ioPtr != NULL) {
2458 ioPtr->callRefCount++;
2459 Itcl_PreserveData(ioPtr);
2458 ioPtr->callRefCount++;
2459 Itcl_PreserveData(ioPtr); /* ++ preserve until ItclAfterCallMethod releases it */
24602460 }
24612461 imPtr->iclsPtr->callRefCount++;
24622462 if (!imPtr->iclsPtr->infoPtr->useOldResolvers) {
24852485 ClientData clientData,
24862486 Tcl_Interp *interp,
24872487 Tcl_ObjectContext contextPtr,
2488 Tcl_Namespace *nsPtr,
2488 TCL_UNUSED(Tcl_Namespace*),
24892489 int call_result)
24902490 {
24912491 Tcl_HashEntry *hPtr;
25702570 if (hPtr == NULL) {
25712571 ckfree((char *)callContextPtr);
25722572 }
2573 Itcl_ReleaseData(ioPtr);
25742573 } else {
25752574 ckfree((char *)callContextPtr);
25762575 }
2576 }
2577
2578 if (ioPtr != NULL) {
2579 Itcl_ReleaseData(ioPtr); /* -- paired release for preserve in ItclCheckCallMethod */
25772580 }
25782581 result = call_result;
25792582 finishReturn:
25842587 void
25852588 ItclProcErrorProc(
25862589 Tcl_Interp *interp,
2587 Tcl_Obj *procNameObj)
2590 TCL_UNUSED(Tcl_Obj*))
25882591 {
25892592 Tcl_Obj *objPtr;
25902593 Tcl_HashEntry *hPtr;
2525 CallFrame *framePtr = ((Interp *)interp)->framePtr;
2626 if (framePtr != NULL) {
2727 #ifdef ITCL_USE_MODIFIED_TCL_H
28 framePtr->isProcCallFrame |= FRAME_HAS_RESOLVER;
28 framePtr->isProcCallFrame |= FRAME_HAS_RESOLVER;
2929 framePtr->resolvePtr = resolvePtr;
30 #elif defined(__cplusplus)
31 (void)resolvePtr;
3032 #endif
31 return TCL_OK;
33 return TCL_OK;
3234 }
3335 return TCL_ERROR;
3436 }
4345 }
4446 #ifdef ITCL_USE_MODIFIED_TCL_H
4547 ((Namespace *)nsPtr)->resolvePtr = resolvePtr;
48 #elif defined(__cplusplus)
49 (void)resolvePtr;
4650 #endif
4751 return TCL_OK;
4852 }
4953
5054 Tcl_Var
5155 Tcl_NewNamespaceVar(
52 Tcl_Interp *interp,
56 TCL_UNUSED(Tcl_Interp *),
5357 Tcl_Namespace *nsPtr,
5458 const char *varName)
5559 {
108108 static void
109109 ObjectRenamedTrace(
110110 ClientData clientData, /* The object being deleted. */
111 Tcl_Interp *interp, /* The interpreter containing the object. */
111 Tcl_Interp *dummy, /* The interpreter containing the object. */
112112 const char *oldName, /* What the object was (last) called. */
113113 const char *newName, /* Always NULL ??. not for itk!! */
114114 int flags) /* Why was the object deleted? */
115115 {
116116 ItclObject *ioPtr = (ItclObject *)clientData;
117117 Itcl_InterpState istate;
118 (void)dummy;
119 (void)oldName;
120 (void)flags;
118121
119122 if (newName != NULL) {
120123 /* FIXME should enter the new name in the hashtables for objects etc. */
732735 ItclClass *iclsPtr,
733736 const char *name)
734737 {
738 (void)interp;
739 (void)ioPtr;
740 (void)iclsPtr;
741 (void)name;
742
735743 return TCL_OK;
736744 }
737745
11491157 */
11501158 int
11511159 ItclInitObjectMethodVariables(
1152 Tcl_Interp *interp,
1160 Tcl_Interp *dummy,
11531161 ItclObject *ioPtr,
11541162 ItclClass *iclsPtr,
11551163 const char *name)
11611169 Tcl_HashEntry *hPtr2;
11621170 Tcl_HashSearch place;
11631171 int isNew;
1172 (void)dummy;
1173 (void)name;
11641174
11651175 imvPtr = NULL;
11661176 Itcl_InitHierIter(&hier, iclsPtr);
19391949 char *name;
19401950 int ignore;
19411951 int cmp;
1952 (void)callerNsPtr;
19421953
19431954 if (contextIoPtr == NULL) {
19441955 resultPtr = Tcl_GetObjResult(interp);
20802091 ItclObject *contextIoPtr = (ItclObject*)cdata;
20812092 Tcl_Obj *objPtr;
20822093 const char *objName;
2094 (void)name2;
20832095
20842096 /* because of SF bug #187 use a different trace handler for "this", "win", "type"
20852097 * *self" and "selfns"
21402152 const char *objName;
21412153 const char *head;
21422154 const char *tail;
2155 (void)name2;
21432156
21442157 /*
21452158 * Handle read traces on "win"
21972210 ItclObject *contextIoPtr = (ItclObject*)cdata;
21982211 Tcl_Obj *objPtr;
21992212 const char *objName;
2213 (void)name2;
22002214
22012215 /*
22022216 * Handle read traces on "type"
22482262 ItclObject *contextIoPtr = (ItclObject*)cdata;
22492263 Tcl_Obj *objPtr;
22502264 const char *objName;
2265 (void)name2;
22512266
22522267 /*
22532268 * Handle read traces on "self"
23152330 ItclObject *contextIoPtr = (ItclObject*)cdata;
23162331 Tcl_Obj *objPtr;
23172332 const char *objName;
2333 (void)name2;
23182334
23192335 /*
23202336 * Handle read traces on "selfns"
23622378 {
23632379 ItclObject *ioPtr;
23642380 ItclOption *ioptPtr;
2381 (void)interp;
2382 (void)name1;
2383 (void)name2;
23652384
23662385 /* FIXME !!! */
23672386 /* don't know yet if ItclTraceOptionVar is really needed !! */
24182437 ItclComponent *icPtr;
24192438 ItclDelegatedFunction *idmPtr;
24202439 const char *val;
2440 (void)name2;
24212441
24222442 /* FIXME should free memory on unset or rename!! */
24232443 if (cdata != NULL) {
25152535 ItclObjectInfo *infoPtr;
25162536 ItclObject *ioPtr;
25172537 ItclVariable *ivPtr;
2538 (void)name2;
25182539
25192540 /* FIXME !!! */
25202541 /* FIXME should free memory on unset or rename!! */
33103331 }
33113332 break;
33123333 } else {
3313 /* fall through */
33143334 }
3335 /* FALLTHRU */
33153336 default:
33163337 {
33173338 char buf[2];
34363457
34373458 int
34383459 DelegatedOptionsInstall(
3439 Tcl_Interp *interp,
3460 Tcl_Interp *dummy,
34403461 ItclClass *iclsPtr)
34413462 {
34423463 Tcl_HashEntry *hPtr2;
34453466 ItclOption *ioptPtr;
34463467 FOREACH_HASH_DECLS;
34473468 char *optionName;
3469 (void)dummy;
34483470
34493471 FOREACH_HASH_VALUE(idoPtr, &iclsPtr->delegatedOptions) {
34503472 optionName = Tcl_GetString(idoPtr->namePtr);
651651
652652 static int
653653 CloneProc(
654 Tcl_Interp *interp,
654 Tcl_Interp *dummy,
655655 ClientData original,
656656 ClientData *copyPtr)
657657 {
658 (void)dummy;
659
658660 Itcl_PreserveData((ItclMemberFunc *)original);
659661 *copyPtr = original;
660662 return TCL_OK;
667669 int result)
668670 {
669671 ClientData clientData = data[0];
672
670673 Tcl_ObjectContext context = (Tcl_ObjectContext)data[1];
671674
672675 return ItclAfterCallMethod(clientData, interp, context, NULL, result);
705708 int objc,
706709 Tcl_Obj *const *objv)
707710 {
711 (void)clientData;
712 (void)interp;
713 (void)context;
714 (void)objc;
715 (void)objv;
716
708717 return TCL_ERROR;
709718 }
710719
24752484 int objc, /* number of arguments */
24762485 Tcl_Obj *const objv[]) /* argument objects */
24772486 {
2487 (void)clientData;
2488 (void)interp;
2489
24782490 ItclShowArgs(0, "Itcl_ClassMixinCmd", objc, objv);
24792491 return TCL_OK;
24802492 }
25932605 int result;
25942606 int i;
25952607 const char *cp;
2608 (void)infoPtr;
25962609
25972610 ItclShowArgs(1, "ItclParseOption", objc, objv);
25982611 pLevel = Itcl_Protection(interp, 0);
30493062 " Only these can have components", NULL);
30503063 return TCL_ERROR;
30513064 }
3052 if ((objc < 2) && (objc > 6)) {
3065 if ((objc < 2) || (objc > 6)) {
30533066 Tcl_AppendResult(interp, "wrong # args should be: ", usage, NULL);
30543067 return TCL_ERROR;
30553068 }
648648
649649 Tcl_HashEntry *hPtr;
650650 ItclVarLookup *vlookup;
651 (void)flags;
651652
652653 /*
653654 * See if the requested variable is a recognized "common" member.
6161 */
6262 int
6363 Itcl_StubCreateCmd(
64 ClientData clientData, /* not used */
64 TCL_UNUSED(ClientData), /* not used */
6565 Tcl_Interp *interp, /* current interpreter */
6666 int objc, /* number of arguments */
6767 Tcl_Obj *const objv[]) /* argument objects */
111111 */
112112 int
113113 Itcl_StubExistsCmd(
114 ClientData clientData, /* not used */
114 TCL_UNUSED(ClientData), /* not used */
115115 Tcl_Interp *interp, /* current interpreter */
116116 int objc, /* number of arguments */
117117 Tcl_Obj *const objv[]) /* argument objects */
223223 /* ARGSUSED */
224224 static void
225225 ItclDeleteStub(
226 ClientData cdata) /* not used */
226 TCL_UNUSED(ClientData)) /* not used */
227227 {
228228 /* do nothing */
229229 }
125125 Tcl_Interp *interp,
126126 int numRemoved,
127127 int numInserted,
128 int objc,
128 TCL_UNUSED(int) /* objc */,
129129 Tcl_Obj *const *objv)
130130 {
131131 return TclInitRewriteEnsemble(interp, numRemoved, numInserted, objv);
627627 /* Free cdata now */
628628 freeProc = blk->freeProc;
629629 blk->freeProc = NULL;
630 freeProc(cdata);
630 freeProc((char *)cdata);
631631 }
632632
633633 /*
673673 */
674674 void Itcl_Free(void *ptr) {
675675 PresMemoryPrefix *blk;
676
676
677677 if (ptr == NULL) {
678678 return;
679679 }
00 # Tcl package index file, version 1.0
11 #
22 # Do NOT try this command
3 #
3 #
44 # if {![package vsatisfies [package provide Tcl] 8.6-]} {return}
55 #
66 # as a way to accept working with all of Tcl 8.6, Tcl 8.X, X>6, and
1616
1717 if {![package vsatisfies [package provide Tcl] 8.6]} {return}
1818
19 package ifneeded itcl @PACKAGE_VERSION@ [list load [file join $dir "@PKG_LIB_FILE@"] itcl]
20 package ifneeded Itcl @PACKAGE_VERSION@ [list load [file join $dir "@PKG_LIB_FILE@"] itcl]
19 package ifneeded itcl @PACKAGE_VERSION@ [list load [file join $dir "@PKG_LIB_FILE@"] Itcl]
20 package ifneeded Itcl @PACKAGE_VERSION@ [list load [file join $dir "@PKG_LIB_FILE@"] Itcl]
22
33 http://www.tcl.tk/doc/tea/
44
5 This package is part of the Tcl project at SourceForge, and latest
6 sources should be available there:
5 This package is part of the Tcl project at SourceForge, but sources
6 and bug/patch database are hosted on fossil here:
77
8 http://tcl.sourceforge.net/
8 https://core.tcl-lang.org/tclconfig
99
1010 This package is a freely available open source package. You can do
1111 virtually anything you like with it, such as modifying it, redistributing
00 #!/bin/sh
11 # install - install a program, script, or datafile
22
3 scriptversion=2011-04-20.01; # UTC
3 scriptversion=2020-07-26.22; # UTC
44
55 # This originates from X11R5 (mit/util/scripts/install.sh), which was
66 # later released in X11R6 (xc/config/util/install.sh) with the
3434 # FSF changes to this file are in the public domain.
3535 #
3636 # Calling this script install-sh is preferred over install.sh, to prevent
37 # `make' implicit rules from creating a file called install from it
37 # 'make' implicit rules from creating a file called install from it
3838 # when there is no Makefile.
3939 #
4040 # This script is compatible with the BSD install script, but was written
4141 # from scratch.
4242
43 tab=' '
4344 nl='
4445 '
45 IFS=" "" $nl"
46
47 # set DOITPROG to echo to test this script
48
49 # Don't use :- since 4.3BSD and earlier shells don't like it.
46 IFS=" $tab$nl"
47
48 # Set DOITPROG to "echo" to test this script.
49
5050 doit=${DOITPROG-}
51 if test -z "$doit"; then
52 doit_exec=exec
53 else
54 doit_exec=$doit
55 fi
51 doit_exec=${doit:-exec}
5652
5753 # Put in absolute file names if you don't have them in your path;
5854 # or use environment vars.
6763 rmprog=${RMPROG-rm}
6864 stripprog=${STRIPPROG-strip}
6965
70 posix_glob='?'
71 initialize_posix_glob='
72 test "$posix_glob" != "?" || {
73 if (set -f) 2>/dev/null; then
74 posix_glob=
75 else
76 posix_glob=:
77 fi
78 }
79 '
80
8166 posix_mkdir=
8267
8368 # Desired mode of installed file.
8469 mode=0755
70
71 # Create dirs (including intermediate dirs) using mode 755.
72 # This is like GNU 'install' as of coreutils 8.32 (2020).
73 mkdir_umask=22
8574
8675 chgrpcmd=
8776 chmodcmd=$chmodprog
9685 dst_arg=
9786
9887 copy_on_change=false
99 no_target_directory=
88 is_target_a_directory=possibly
10089
10190 usage="\
10291 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
119108 -m MODE $chmodprog installed files to MODE.
120109 -o USER $chownprog installed files to USER.
121110 -s $stripprog installed files.
122 -S $stripprog installed files.
111 -S OPTION $stripprog installed files using OPTION.
123112 -t DIRECTORY install into DIRECTORY.
124113 -T report an error if DSTFILE is a directory.
125114
137126 -d) dir_arg=true;;
138127
139128 -g) chgrpcmd="$chgrpprog $2"
140 shift;;
129 shift;;
141130
142131 --help) echo "$usage"; exit $?;;
143132
144133 -m) mode=$2
145 case $mode in
146 *' '* | *' '* | *'
147 '* | *'*'* | *'?'* | *'['*)
148 echo "$0: invalid mode: $mode" >&2
149 exit 1;;
150 esac
151 shift;;
134 case $mode in
135 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
136 echo "$0: invalid mode: $mode" >&2
137 exit 1;;
138 esac
139 shift;;
152140
153141 -o) chowncmd="$chownprog $2"
154 shift;;
142 shift;;
155143
156144 -s) stripcmd=$stripprog;;
157145
158146 -S) stripcmd="$stripprog $2"
159 shift;;
160
161 -t) dst_arg=$2
162 shift;;
163
164 -T) no_target_directory=true;;
147 shift;;
148
149 -t)
150 is_target_a_directory=always
151 dst_arg=$2
152 # Protect names problematic for 'test' and other utilities.
153 case $dst_arg in
154 -* | [=\(\)!]) dst_arg=./$dst_arg;;
155 esac
156 shift;;
157
158 -T) is_target_a_directory=never;;
165159
166160 --version) echo "$0 $scriptversion"; exit $?;;
167161
168 --) shift
169 break;;
170
171 -*) echo "$0: invalid option: $1" >&2
172 exit 1;;
162 --) shift
163 break;;
164
165 -*) echo "$0: invalid option: $1" >&2
166 exit 1;;
173167
174168 *) break;;
175169 esac
176170 shift
177171 done
172
173 # We allow the use of options -d and -T together, by making -d
174 # take the precedence; this is for compatibility with GNU install.
175
176 if test -n "$dir_arg"; then
177 if test -n "$dst_arg"; then
178 echo "$0: target directory not allowed when installing a directory." >&2
179 exit 1
180 fi
181 fi
178182
179183 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
180184 # When -d is used, all remaining arguments are directories to create.
189193 fi
190194 shift # arg
191195 dst_arg=$arg
196 # Protect names problematic for 'test' and other utilities.
197 case $dst_arg in
198 -* | [=\(\)!]) dst_arg=./$dst_arg;;
199 esac
192200 done
193201 fi
194202
197205 echo "$0: no input file specified." >&2
198206 exit 1
199207 fi
200 # It's OK to call `install-sh -d' without argument.
208 # It's OK to call 'install-sh -d' without argument.
201209 # This can happen when creating conditional directories.
202210 exit 0
211 fi
212
213 if test -z "$dir_arg"; then
214 if test $# -gt 1 || test "$is_target_a_directory" = always; then
215 if test ! -d "$dst_arg"; then
216 echo "$0: $dst_arg: Is not a directory." >&2
217 exit 1
218 fi
219 fi
203220 fi
204221
205222 if test -z "$dir_arg"; then
218235
219236 *[0-7])
220237 if test -z "$stripcmd"; then
221 u_plus_rw=
238 u_plus_rw=
222239 else
223 u_plus_rw='% 200'
240 u_plus_rw='% 200'
224241 fi
225242 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
226243 *)
227244 if test -z "$stripcmd"; then
228 u_plus_rw=
245 u_plus_rw=
229246 else
230 u_plus_rw=,u+rw
247 u_plus_rw=,u+rw
231248 fi
232249 cp_umask=$mode$u_plus_rw;;
233250 esac
235252
236253 for src
237254 do
238 # Protect names starting with `-'.
255 # Protect names problematic for 'test' and other utilities.
239256 case $src in
240 -*) src=./$src;;
257 -* | [=\(\)!]) src=./$src;;
241258 esac
242259
243260 if test -n "$dir_arg"; then
259276 echo "$0: no destination specified." >&2
260277 exit 1
261278 fi
262
263279 dst=$dst_arg
264 # Protect names starting with `-'.
265 case $dst in
266 -*) dst=./$dst;;
267 esac
268
269 # If destination is a directory, append the input filename; won't work
270 # if double slashes aren't ignored.
280
281 # If destination is a directory, append the input filename.
271282 if test -d "$dst"; then
272 if test -n "$no_target_directory"; then
273 echo "$0: $dst_arg: Is a directory" >&2
274 exit 1
283 if test "$is_target_a_directory" = never; then
284 echo "$0: $dst_arg: Is a directory" >&2
285 exit 1
275286 fi
276287 dstdir=$dst
277 dst=$dstdir/`basename "$src"`
288 dstbase=`basename "$src"`
289 case $dst in
290 */) dst=$dst$dstbase;;
291 *) dst=$dst/$dstbase;;
292 esac
278293 dstdir_status=0
279294 else
280 # Prefer dirname, but fall back on a substitute if dirname fails.
281 dstdir=`
282 (dirname "$dst") 2>/dev/null ||
283 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
284 X"$dst" : 'X\(//\)[^/]' \| \
285 X"$dst" : 'X\(//\)$' \| \
286 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
287 echo X"$dst" |
288 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
289 s//\1/
290 q
291 }
292 /^X\(\/\/\)[^/].*/{
293 s//\1/
294 q
295 }
296 /^X\(\/\/\)$/{
297 s//\1/
298 q
299 }
300 /^X\(\/\).*/{
301 s//\1/
302 q
303 }
304 s/.*/./; q'
305 `
306
295 dstdir=`dirname "$dst"`
307296 test -d "$dstdir"
308297 dstdir_status=$?
309298 fi
310299 fi
311300
301 case $dstdir in
302 */) dstdirslash=$dstdir;;
303 *) dstdirslash=$dstdir/;;
304 esac
305
312306 obsolete_mkdir_used=false
313307
314308 if test $dstdir_status != 0; then
315309 case $posix_mkdir in
316310 '')
317 # Create intermediate dirs using mode 755 as modified by the umask.
318 # This is like FreeBSD 'install' as of 1997-10-28.
319 umask=`umask`
320 case $stripcmd.$umask in
321 # Optimize common cases.
322 *[2367][2367]) mkdir_umask=$umask;;
323 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
324
325 *[0-7])
326 mkdir_umask=`expr $umask + 22 \
327 - $umask % 100 % 40 + $umask % 20 \
328 - $umask % 10 % 4 + $umask % 2
329 `;;
330 *) mkdir_umask=$umask,go-w;;
331 esac
332
333 # With -d, create the new directory with the user-specified mode.
334 # Otherwise, rely on $mkdir_umask.
335 if test -n "$dir_arg"; then
336 mkdir_mode=-m$mode
311 # With -d, create the new directory with the user-specified mode.
312 # Otherwise, rely on $mkdir_umask.
313 if test -n "$dir_arg"; then
314 mkdir_mode=-m$mode
315 else
316 mkdir_mode=
317 fi
318
319 posix_mkdir=false
320 # The $RANDOM variable is not portable (e.g., dash). Use it
321 # here however when possible just to lower collision chance.
322 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
323
324 trap '
325 ret=$?
326 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
327 exit $ret
328 ' 0
329
330 # Because "mkdir -p" follows existing symlinks and we likely work
331 # directly in world-writeable /tmp, make sure that the '$tmpdir'
332 # directory is successfully created first before we actually test
333 # 'mkdir -p'.
334 if (umask $mkdir_umask &&
335 $mkdirprog $mkdir_mode "$tmpdir" &&
336 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
337 then
338 if test -z "$dir_arg" || {
339 # Check for POSIX incompatibilities with -m.
340 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
341 # other-writable bit of parent directory when it shouldn't.
342 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
343 test_tmpdir="$tmpdir/a"
344 ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
345 case $ls_ld_tmpdir in
346 d????-?r-*) different_mode=700;;
347 d????-?--*) different_mode=755;;
348 *) false;;
349 esac &&
350 $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
351 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
352 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
353 }
354 }
355 then posix_mkdir=:
356 fi
357 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
337358 else
338 mkdir_mode=
359 # Remove any dirs left behind by ancient mkdir implementations.
360 rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
339361 fi
340
341 posix_mkdir=false
342 case $umask in
343 *[123567][0-7][0-7])
344 # POSIX mkdir -p sets u+wx bits regardless of umask, which
345 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
346 ;;
347 *)
348 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
349 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
350
351 if (umask $mkdir_umask &&
352 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
353 then
354 if test -z "$dir_arg" || {
355 # Check for POSIX incompatibilities with -m.
356 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
357 # other-writeable bit of parent directory when it shouldn't.
358 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
359 ls_ld_tmpdir=`ls -ld "$tmpdir"`
360 case $ls_ld_tmpdir in
361 d????-?r-*) different_mode=700;;
362 d????-?--*) different_mode=755;;
363 *) false;;
364 esac &&
365 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
366 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
367 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
368 }
369 }
370 then posix_mkdir=:
371 fi
372 rmdir "$tmpdir/d" "$tmpdir"
373 else
374 # Remove any dirs left behind by ancient mkdir implementations.
375 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
376 fi
377 trap '' 0;;
378 esac;;
362 trap '' 0;;
379363 esac
380364
381365 if
382366 $posix_mkdir && (
383 umask $mkdir_umask &&
384 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
367 umask $mkdir_umask &&
368 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
385369 )
386370 then :
387371 else
388372
389 # The umask is ridiculous, or mkdir does not conform to POSIX,
373 # mkdir does not conform to POSIX,
390374 # or it failed possibly due to a race condition. Create the
391375 # directory the slow way, step by step, checking for races as we go.
392376
393377 case $dstdir in
394 /*) prefix='/';;
395 -*) prefix='./';;
396 *) prefix='';;
378 /*) prefix='/';;
379 [-=\(\)!]*) prefix='./';;
380 *) prefix='';;
397381 esac
398
399 eval "$initialize_posix_glob"
400382
401383 oIFS=$IFS
402384 IFS=/
403 $posix_glob set -f
385 set -f
404386 set fnord $dstdir
405387 shift
406 $posix_glob set +f
388 set +f
407389 IFS=$oIFS
408390
409391 prefixes=
410392
411393 for d
412394 do
413 test -z "$d" && continue
414
415 prefix=$prefix$d
416 if test -d "$prefix"; then
417 prefixes=
418 else
419 if $posix_mkdir; then
420 (umask=$mkdir_umask &&
421 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
422 # Don't fail if two instances are running concurrently.
423 test -d "$prefix" || exit 1
424 else
425 case $prefix in
426 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
427 *) qprefix=$prefix;;
428 esac
429 prefixes="$prefixes '$qprefix'"
430 fi
431 fi
432 prefix=$prefix/
395 test X"$d" = X && continue
396
397 prefix=$prefix$d
398 if test -d "$prefix"; then
399 prefixes=
400 else
401 if $posix_mkdir; then
402 (umask $mkdir_umask &&
403 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
404 # Don't fail if two instances are running concurrently.
405 test -d "$prefix" || exit 1
406 else
407 case $prefix in
408 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
409 *) qprefix=$prefix;;
410 esac
411 prefixes="$prefixes '$qprefix'"
412 fi
413 fi
414 prefix=$prefix/
433415 done
434416
435417 if test -n "$prefixes"; then
436 # Don't fail if two instances are running concurrently.
437 (umask $mkdir_umask &&
438 eval "\$doit_exec \$mkdirprog $prefixes") ||
439 test -d "$dstdir" || exit 1
440 obsolete_mkdir_used=true
418 # Don't fail if two instances are running concurrently.
419 (umask $mkdir_umask &&
420 eval "\$doit_exec \$mkdirprog $prefixes") ||
421 test -d "$dstdir" || exit 1
422 obsolete_mkdir_used=true
441423 fi
442424 fi
443425 fi
450432 else
451433
452434 # Make a couple of temp file names in the proper directory.
453 dsttmp=$dstdir/_inst.$$_
454 rmtmp=$dstdir/_rm.$$_
435 dsttmp=${dstdirslash}_inst.$$_
436 rmtmp=${dstdirslash}_rm.$$_
455437
456438 # Trap to clean up those temp files at exit.
457439 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
458440
459441 # Copy the file name to the temp name.
460 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
442 (umask $cp_umask &&
443 { test -z "$stripcmd" || {
444 # Create $dsttmp read-write so that cp doesn't create it read-only,
445 # which would cause strip to fail.
446 if test -z "$doit"; then
447 : >"$dsttmp" # No need to fork-exec 'touch'.
448 else
449 $doit touch "$dsttmp"
450 fi
451 }
452 } &&
453 $doit_exec $cpprog "$src" "$dsttmp") &&
461454
462455 # and set any options; do chmod last to preserve setuid bits.
463456 #
472465
473466 # If -C, don't bother to copy if it wouldn't change the file.
474467 if $copy_on_change &&
475 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
476 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
477
478 eval "$initialize_posix_glob" &&
479 $posix_glob set -f &&
468 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
469 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
470 set -f &&
480471 set X $old && old=:$2:$4:$5:$6 &&
481472 set X $new && new=:$2:$4:$5:$6 &&
482 $posix_glob set +f &&
483
473 set +f &&
484474 test "$old" = "$new" &&
485475 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
486476 then
493483 # to itself, or perhaps because mv is so ancient that it does not
494484 # support -f.
495485 {
496 # Now remove or move aside any old file at destination location.
497 # We try this two ways since rm can't unlink itself on some
498 # systems and the destination file might be busy for other
499 # reasons. In this case, the final cleanup might fail but the new
500 # file should still install successfully.
501 {
502 test ! -f "$dst" ||
503 $doit $rmcmd -f "$dst" 2>/dev/null ||
504 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
505 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
506 } ||
507 { echo "$0: cannot unlink or rename $dst" >&2
508 (exit 1); exit 1
509 }
510 } &&
511
512 # Now rename the file to the real destination.
513 $doit $mvcmd "$dsttmp" "$dst"
486 # Now remove or move aside any old file at destination location.
487 # We try this two ways since rm can't unlink itself on some
488 # systems and the destination file might be busy for other
489 # reasons. In this case, the final cleanup might fail but the new
490 # file should still install successfully.
491 {
492 test ! -f "$dst" ||
493 $doit $rmcmd -f "$dst" 2>/dev/null ||
494 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
495 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
496 } ||
497 { echo "$0: cannot unlink or rename $dst" >&2
498 (exit 1); exit 1
499 }
500 } &&
501
502 # Now rename the file to the real destination.
503 $doit $mvcmd "$dsttmp" "$dst"
514504 }
515505 fi || exit 1
516506
519509 done
520510
521511 # Local variables:
522 # eval: (add-hook 'write-file-hooks 'time-stamp)
512 # eval: (add-hook 'before-save-hook 'time-stamp)
523513 # time-stamp-start: "scriptversion="
524514 # time-stamp-format: "%:y-%02m-%02d.%02H"
525 # time-stamp-time-zone: "UTC"
515 # time-stamp-time-zone: "UTC0"
526516 # time-stamp-end: "; # UTC"
527 # End:
517 # End:
4949 # we reset no_tcl in case something fails here
5050 no_tcl=true
5151 AC_ARG_WITH(tcl,
52 AC_HELP_STRING([--with-tcl],
52 AS_HELP_STRING([--with-tcl],
5353 [directory containing tcl configuration (tclConfig.sh)]),
54 with_tclconfig="${withval}")
54 [with_tclconfig="${withval}"])
5555 AC_MSG_CHECKING([for Tcl configuration])
5656 AC_CACHE_VAL(ac_cv_c_tclconfig,[
5757
211211 # we reset no_tk in case something fails here
212212 no_tk=true
213213 AC_ARG_WITH(tk,
214 AC_HELP_STRING([--with-tk],
214 AS_HELP_STRING([--with-tk],
215215 [directory containing tk configuration (tkConfig.sh)]),
216 with_tkconfig="${withval}")
216 [with_tkconfig="${withval}"])
217217 AC_MSG_CHECKING([for Tk configuration])
218218 AC_CACHE_VAL(ac_cv_c_tkconfig,[
219219
265265 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
266266 `ls -d /Library/Frameworks 2>/dev/null` \
267267 `ls -d /Network/Library/Frameworks 2>/dev/null` \
268 `ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks/Tcl.framework 2>/dev/null` \
269 `ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Network/Library/Frameworks/Tcl.framework 2>/dev/null` \
270 `ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework 2>/dev/null` \
271268 ; do
272269 if test -f "$i/Tk.framework/tkConfig.sh" ; then
273270 ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
284281 `ls -d /usr/local/lib 2>/dev/null` \
285282 `ls -d /usr/contrib/lib 2>/dev/null` \
286283 `ls -d /usr/pkg/lib 2>/dev/null` \
284 `ls -d /usr/lib/tk8.6 2>/dev/null` \
285 `ls -d /usr/lib/tk8.5 2>/dev/null` \
287286 `ls -d /usr/lib 2>/dev/null` \
288287 `ls -d /usr/lib64 2>/dev/null` \
289 `ls -d /usr/lib/tk8.6 2>/dev/null` \
290 `ls -d /usr/lib/tk8.5 2>/dev/null` \
291288 `ls -d /usr/local/lib/tk8.6 2>/dev/null` \
292289 `ls -d /usr/local/lib/tk8.5 2>/dev/null` \
293290 `ls -d /usr/local/lib/tcl/tk8.6 2>/dev/null` \
373370 else
374371 AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh])
375372 fi
376
377 # eval is required to do the TCL_DBGX substitution
378 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
379 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
380373
381374 # If the TCL_BIN_DIR is the build directory (not the install directory),
382375 # then set the common variable name to the value of the build variables.
411404 esac
412405 fi
413406
414 # eval is required to do the TCL_DBGX substitution
415 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
416 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
417 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
418 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
419
420407 AC_SUBST(TCL_VERSION)
421408 AC_SUBST(TCL_PATCH_LEVEL)
422409 AC_SUBST(TCL_BIN_DIR)
491478 else
492479 AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
493480 fi
494
495 # eval is required to do the TK_DBGX substitution
496 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
497 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
498481
499482 # If the TK_BIN_DIR is the build directory (not the install directory),
500483 # then set the common variable name to the value of the build variables.
529512 esac
530513 fi
531514
532 # eval is required to do the TK_DBGX substitution
533 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
534 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
535 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
536 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
537
538515 # TEA specific: Ensure windowingsystem is defined
539516 if test "${TEA_PLATFORM}" = "unix" ; then
540517 case ${TK_DEFS} in
591568 if test -f "${TCL_BIN_DIR}/Makefile" ; then
592569 # tclConfig.sh is in Tcl build directory
593570 if test "${TEA_PLATFORM}" = "windows"; then
594 if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" ; then
595 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
596 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}" ; then
597 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}"
598 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}" ; then
599 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}"
600 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}" ; then
601 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}"
571 if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}" ; then
572 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
573 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}" ; then
574 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}"
575 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}" ; then
576 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}"
577 elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}" ; then
578 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}"
602579 fi
603580 else
604581 TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
606583 else
607584 # tclConfig.sh is in install location
608585 if test "${TEA_PLATFORM}" = "windows"; then
609 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
586 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
610587 else
611 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
588 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
612589 fi
613590 list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
614591 `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \
649626 if test -f "${TK_BIN_DIR}/Makefile" ; then
650627 # tkConfig.sh is in Tk build directory
651628 if test "${TEA_PLATFORM}" = "windows"; then
652 if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" ; then
653 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
654 elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}s${EXEEXT}" ; then
655 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}$s{EXEEXT}"
656 elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}t${EXEEXT}" ; then
657 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}t${EXEEXT}"
658 elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}st${EXEEXT}" ; then
659 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}st${EXEEXT}"
629 if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}" ; then
630 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
631 elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}s${EXEEXT}" ; then
632 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}$s{EXEEXT}"
633 elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}" ; then
634 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}"
635 elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}" ; then
636 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}"
660637 fi
661638 else
662639 WISH_PROG="${TK_BIN_DIR}/wish"
664641 else
665642 # tkConfig.sh is in install location
666643 if test "${TEA_PLATFORM}" = "windows"; then
667 WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
644 WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
668645 else
669 WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
646 WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}"
670647 fi
671648 list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
672649 `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \
712689 AC_DEFUN([TEA_ENABLE_SHARED], [
713690 AC_MSG_CHECKING([how to build libraries])
714691 AC_ARG_ENABLE(shared,
715 AC_HELP_STRING([--enable-shared],
692 AS_HELP_STRING([--enable-shared],
716693 [build and link with shared libraries (default: on)]),
717694 [shared_ok=$enableval], [shared_ok=yes])
718695
724701 fi
725702
726703 AC_ARG_ENABLE(stubs,
727 AC_HELP_STRING([--enable-stubs],
704 AS_HELP_STRING([--enable-stubs],
728705 [build and link with stub libraries. Always true for shared builds (default: on)]),
729706 [stubs_ok=$enableval], [stubs_ok=yes])
730707
796773
797774 AC_DEFUN([TEA_ENABLE_THREADS], [
798775 AC_ARG_ENABLE(threads,
799 AC_HELP_STRING([--enable-threads],
776 AS_HELP_STRING([--enable-threads],
800777 [build with threads (default: on)]),
801778 [tcl_ok=$enableval], [tcl_ok=yes])
802779
910887 # Sets to "$(CFLAGS_OPTIMIZE) -DNDEBUG" if false
911888 # LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true
912889 # Sets to $(LDFLAGS_OPTIMIZE) if false
913 # DBGX Formerly used as debug library extension;
914 # always blank now.
915890 #------------------------------------------------------------------------
916891
917892 AC_DEFUN([TEA_ENABLE_SYMBOLS], [
919894 AC_REQUIRE([TEA_CONFIG_CFLAGS])
920895 AC_MSG_CHECKING([for build with symbols])
921896 AC_ARG_ENABLE(symbols,
922 AC_HELP_STRING([--enable-symbols],
897 AS_HELP_STRING([--enable-symbols],
923898 [build with debugging symbols (default: off)]),
924899 [tcl_ok=$enableval], [tcl_ok=no])
925 DBGX=""
926900 if test "$tcl_ok" = "no"; then
927901 CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
928902 LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
934908 AC_MSG_RESULT([yes (standard debugging)])
935909 fi
936910 fi
937 # TEA specific:
938 if test "${TEA_PLATFORM}" != "windows" ; then
939 LDFLAGS_DEFAULT="${LDFLAGS}"
940 fi
941911 AC_SUBST(CFLAGS_DEFAULT)
942912 AC_SUBST(LDFLAGS_DEFAULT)
943 AC_SUBST(TCL_DBGX)
944913
945914 if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
946915 AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
975944
976945 AC_DEFUN([TEA_ENABLE_LANGINFO], [
977946 AC_ARG_ENABLE(langinfo,
978 AC_HELP_STRING([--enable-langinfo],
947 AS_HELP_STRING([--enable-langinfo],
979948 [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
980949 [langinfo_ok=$enableval], [langinfo_ok=yes])
981950
11071076
11081077 AC_MSG_CHECKING([if 64bit support is requested])
11091078 AC_ARG_ENABLE(64bit,
1110 AC_HELP_STRING([--enable-64bit],
1079 AS_HELP_STRING([--enable-64bit],
11111080 [enable 64bit support (default: off)]),
11121081 [do64bit=$enableval], [do64bit=no])
11131082 AC_MSG_RESULT([$do64bit])
11161085
11171086 AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
11181087 AC_ARG_ENABLE(64bit-vis,
1119 AC_HELP_STRING([--enable-64bit-vis],
1088 AS_HELP_STRING([--enable-64bit-vis],
11201089 [enable 64bit Sparc VIS support (default: off)]),
11211090 [do64bitVIS=$enableval], [do64bitVIS=no])
11221091 AC_MSG_RESULT([$do64bitVIS])
11451114
11461115 AC_MSG_CHECKING([if rpath support is requested])
11471116 AC_ARG_ENABLE(rpath,
1148 AC_HELP_STRING([--disable-rpath],
1117 AS_HELP_STRING([--disable-rpath],
11491118 [disable rpath support (default: on)]),
11501119 [doRpath=$enableval], [doRpath=yes])
11511120 AC_MSG_RESULT([$doRpath])
11901159 case $system in
11911160 # TEA specific:
11921161 windows)
1193 # This is a 2-stage check to make sure we have the 64-bit SDK
1194 # We have to know where the SDK is installed.
1195 # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
1196 # MACHINE is IX86 for LINK, but this is used by the manifest,
1197 # which requires x86|amd64|ia64.
11981162 MACHINE="X86"
11991163 if test "$do64bit" != "no" ; then
1200 if test "x${MSSDK}x" = "xx" ; then
1201 MSSDK="C:/Progra~1/Microsoft Platform SDK"
1202 fi
1203 MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
1204 PATH64=""
12051164 case "$do64bit" in
12061165 amd64|x64|yes)
12071166 MACHINE="AMD64" ; # default to AMD64 64-bit build
1208 PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
12091167 ;;
12101168 ia64)
12111169 MACHINE="IA64"
1212 PATH64="${MSSDK}/Bin/Win64"
12131170 ;;
12141171 esac
1215 if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
1216 AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
1217 AC_MSG_WARN([Ensure latest Platform SDK is installed])
1218 do64bit="no"
1219 else
1220 AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
1221 do64bit_ok="yes"
1222 fi
12231172 fi
12241173
12251174 if test "$GCC" != "yes" ; then
12381187 esac
12391188
12401189 if test "$do64bit" != "no" ; then
1241 # All this magic is necessary for the Win64 SDK RC1 - hobbs
1242 CC="\"${PATH64}/cl.exe\""
1243 CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
1244 RC="\"${MSSDK}/bin/rc.exe\""
1245 lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
1246 LINKBIN="\"${PATH64}/link.exe\""
1190 CC="cl.exe"
1191 RC="rc.exe"
1192 lflags="${lflags} -nologo -MACHINE:${MACHINE} "
1193 LINKBIN="link.exe"
12471194 CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
12481195 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
12491196 # Avoid 'unresolved external symbol __security_cookie'
12811228 if test "$ac_cv_cross" = "yes"; then
12821229 case "$do64bit" in
12831230 amd64|x64|yes)
1284 CC="x86_64-w64-mingw32-gcc"
1231 CC="x86_64-w64-mingw32-${CC}"
12851232 LD="x86_64-w64-mingw32-ld"
12861233 AR="x86_64-w64-mingw32-ar"
12871234 RANLIB="x86_64-w64-mingw32-ranlib"
12881235 RC="x86_64-w64-mingw32-windres"
12891236 ;;
12901237 *)
1291 CC="i686-w64-mingw32-gcc"
1238 CC="i686-w64-mingw32-${CC}"
12921239 LD="i686-w64-mingw32-ld"
12931240 AR="i686-w64-mingw32-ar"
12941241 RANLIB="i686-w64-mingw32-ranlib"
13571304 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
13581305 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
13591306 AS_IF([test "$GCC" = yes], [
1360 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
1307 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
13611308 ], [
1362 CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
1309 CC_SEARCH_FLAGS='"-R${LIB_RUNTIME_DIR}"'
13631310 ])
1364 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
1311 LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
13651312 ], [
13661313 AS_IF([test "$GCC" = yes], [
13671314 SHLIB_LD='${CC} -shared -Wl,-bexpall'
13701317 LDFLAGS="$LDFLAGS -brtl"
13711318 ])
13721319 SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
1373 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
1320 CC_SEARCH_FLAGS='"-L${LIB_RUNTIME_DIR}"'
13741321 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
13751322 ])
13761323 ;;
14061353 SHLIB_LD='${CC} -shared'
14071354 SHLIB_SUFFIX=".dll"
14081355 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
1409 AC_CACHE_CHECK(for Cygwin version of gcc,
1410 ac_cv_cygwin,
1411 AC_TRY_COMPILE([
1412 #ifdef __CYGWIN__
1413 #error cygwin
1414 #endif
1415 ], [],
1416 ac_cv_cygwin=no,
1417 ac_cv_cygwin=yes)
1418 )
1419 if test "$ac_cv_cygwin" = "no"; then
1420 AC_MSG_ERROR([${CC} is not a cygwin compiler.])
1421 fi
14221356 EXEEXT=".exe"
14231357 do64bit_ok=yes
14241358 CC_SEARCH_FLAGS=""
14561390 SHLIB_CFLAGS="+z"
14571391 SHLIB_LD="ld -b"
14581392 LDFLAGS="$LDFLAGS -Wl,-E"
1459 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
1460 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
1393 CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
1394 LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
14611395 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
14621396 ])
14631397 AS_IF([test "$GCC" = yes], [
14761410 do64bit_ok=yes
14771411 SHLIB_LD='${CC} -shared'
14781412 AS_IF([test $doRpath = yes], [
1479 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
1413 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
14801414 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
14811415 ;;
14821416 *)
14971431 SHLIB_LD="ld -b"
14981432 SHLIB_LD_LIBS=""
14991433 LDFLAGS="$LDFLAGS -Wl,-E"
1500 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
1501 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
1434 CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
1435 LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
15021436 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
15031437 ]) ;;
15041438 IRIX-5.*)
15071441 SHLIB_SUFFIX=".so"
15081442 AC_LIBOBJ(mkstemp)
15091443 AS_IF([test $doRpath = yes], [
1510 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
1511 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
1444 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
1445 LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'])
15121446 ;;
15131447 IRIX-6.*)
15141448 SHLIB_CFLAGS=""
15151449 SHLIB_LD="ld -n32 -shared -rdata_shared"
15161450 SHLIB_SUFFIX=".so"
15171451 AS_IF([test $doRpath = yes], [
1518 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
1519 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
1452 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
1453 LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'])
15201454 AS_IF([test "$GCC" = yes], [
15211455 CFLAGS="$CFLAGS -mabi=n32"
15221456 LDFLAGS="$LDFLAGS -mabi=n32"
15381472 SHLIB_LD="ld -n32 -shared -rdata_shared"
15391473 SHLIB_SUFFIX=".so"
15401474 AS_IF([test $doRpath = yes], [
1541 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
1542 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
1475 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
1476 LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'])
15431477
15441478 # Check to enable 64-bit flags for compiler/linker
15451479
15541488 ])
15551489 ])
15561490 ;;
1557 Linux*|GNU*|NetBSD-Debian)
1491 Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*)
15581492 SHLIB_CFLAGS="-fPIC"
15591493 SHLIB_SUFFIX=".so"
15601494
15641498 # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
15651499 SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
15661500 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
1501
1502 case $system in
1503 DragonFly-*|FreeBSD-*)
1504 AS_IF([test "${TCL_THREADS}" = "1"], [
1505 # The -pthread needs to go in the LDFLAGS, not LIBS
1506 LIBS=`echo $LIBS | sed s/-pthread//`
1507 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1508 LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
1509 ;;
1510 esac
1511
15671512 AS_IF([test $doRpath = yes], [
1568 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
1513 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
15691514 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
15701515 AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
15711516 AS_IF([test $do64bit = yes], [
15951540 SHLIB_LD='${CC} -shared'
15961541 LD_FLAGS="-Wl,--export-dynamic"
15971542 AS_IF([test $doRpath = yes], [
1598 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
1599 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
1543 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
1544 LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
16001545 ;;
16011546 OpenBSD-*)
16021547 arch=`arch -s`
16111556 SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
16121557 SHLIB_SUFFIX=".so"
16131558 AS_IF([test $doRpath = yes], [
1614 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
1559 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
16151560 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
16161561 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
1617 LDFLAGS="-Wl,-export-dynamic"
1562 LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
16181563 CFLAGS_OPTIMIZE="-O2"
16191564 # On OpenBSD: Compile with -pthread
16201565 # Don't link with -lpthread
16311576 SHLIB_SUFFIX=".so"
16321577 LDFLAGS="$LDFLAGS -export-dynamic"
16331578 AS_IF([test $doRpath = yes], [
1634 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
1579 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
16351580 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
16361581 # The -pthread needs to go in the CFLAGS, not LIBS
16371582 LIBS=`echo $LIBS | sed s/-pthread//`
16381583 CFLAGS="$CFLAGS -pthread"
16391584 LDFLAGS="$LDFLAGS -pthread"
1640 ;;
1641 DragonFly-*|FreeBSD-*)
1642 # This configuration from FreeBSD Ports.
1643 SHLIB_CFLAGS="-fPIC"
1644 SHLIB_LD="${CC} -shared"
1645 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
1646 SHLIB_SUFFIX=".so"
1647 LDFLAGS=""
1648 AS_IF([test $doRpath = yes], [
1649 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
1650 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
1651 # The -pthread needs to go in the LDFLAGS, not LIBS
1652 LIBS=`echo $LIBS | sed s/-pthread//`
1653 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
1654 LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
1655 case $system in
1656 FreeBSD-3.*)
1657 # Version numbers are dot-stripped by system policy.
1658 TCL_TRIM_DOTS=`echo ${PACKAGE_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
1662 ;;
1663 esac
16641585 ;;
16651586 Darwin-*)
16661587 CFLAGS_OPTIMIZE="-Os"
17951716 ])
17961717 SHLIB_SUFFIX=".so"
17971718 AS_IF([test $doRpath = yes], [
1798 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
1719 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
17991720 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
18001721 AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
18011722 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
18481769 SHLIB_SUFFIX=".so"
18491770 AS_IF([test "$GCC" = yes], [
18501771 SHLIB_LD='${CC} -shared'
1851 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
1772 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
18521773 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
18531774 ], [
18541775 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
1855 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
1776 CC_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
18561777 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
18571778 ])
18581779 ;;
19181839 SHLIB_SUFFIX=".so"
19191840 AS_IF([test "$GCC" = yes], [
19201841 SHLIB_LD='${CC} -shared'
1921 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
1842 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
19221843 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
19231844 AS_IF([test "$do64bit_ok" = yes], [
19241845 AS_IF([test "$arch" = "sparcv9 sparc"], [
19451866 *)
19461867 SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
19471868 esac
1948 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
1949 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
1869 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
1870 LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
19501871 ])
19511872 ;;
19521873 UNIX_SV* | UnixWare-5*)
21122033 AC_SUBST(CFLAGS_DEBUG)
21132034 AC_SUBST(CFLAGS_OPTIMIZE)
21142035 AC_SUBST(CFLAGS_WARNING)
2036 AC_SUBST(LDFLAGS_DEBUG)
2037 AC_SUBST(LDFLAGS_OPTIMIZE)
21152038
21162039 AC_SUBST(STLIB_LD)
21172040 AC_SUBST(SHLIB_LD)
23952318 # HAVE_TM_GMTOFF
23962319 # HAVE_TM_TZADJ
23972320 # HAVE_TIMEZONE_VAR
2321 #
23982322 #--------------------------------------------------------------------
23992323
24002324 AC_DEFUN([TEA_TIME_HANDLER], [
24022326 AC_HEADER_TIME
24032327 AC_STRUCT_TIMEZONE
24042328
2405 AC_CHECK_FUNCS(gmtime_r localtime_r)
2329 AC_CHECK_FUNCS(gmtime_r localtime_r mktime)
24062330
24072331 AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [
24082332 AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
24702394 if test "$tcl_strtod" = 1; then
24712395 AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
24722396 AC_TRY_RUN([
2397 #include <stdlib.h>
24732398 extern double strtod();
24742399 int main() {
24752400 char *infString="Inf", *nanString="NaN", *spaceString=" ";
24992424 ])
25002425
25012426 #--------------------------------------------------------------------
2427 # TEA_TCL_LINK_LIBS
2428 #
2429 # Search for the libraries needed to link the Tcl shell.
2430 # Things like the math library (-lm), socket stuff (-lsocket vs.
2431 # -lnsl), zlib (-lz) and libtommath (-ltommath) are dealt with here.
2432 #
2433 # Arguments:
2434 # None.
2435 #
2436 # Results:
2437 #
2438 # Might append to the following vars:
2439 # LIBS
2440 # MATH_LIBS
2441 #
2442 # Might define the following vars:
2443 # HAVE_NET_ERRNO_H
2444 #
2445 #--------------------------------------------------------------------
2446
2447 AC_DEFUN([TEA_TCL_LINK_LIBS], [
2448 #--------------------------------------------------------------------
2449 # On a few very rare systems, all of the libm.a stuff is
2450 # already in libc.a. Set compiler flags accordingly.
2451 #--------------------------------------------------------------------
2452
2453 AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
2454
2455 #--------------------------------------------------------------------
2456 # Interactive UNIX requires -linet instead of -lsocket, plus it
2457 # needs net/errno.h to define the socket-related error codes.
2458 #--------------------------------------------------------------------
2459
2460 AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
2461 AC_CHECK_HEADER(net/errno.h, [
2462 AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have <net/errno.h>?])])
2463
2464 #--------------------------------------------------------------------
2465 # Check for the existence of the -lsocket and -lnsl libraries.
2466 # The order here is important, so that they end up in the right
2467 # order in the command line generated by make. Here are some
2468 # special considerations:
2469 # 1. Use "connect" and "accept" to check for -lsocket, and
2470 # "gethostbyname" to check for -lnsl.
2471 # 2. Use each function name only once: can't redo a check because
2472 # autoconf caches the results of the last check and won't redo it.
2473 # 3. Use -lnsl and -lsocket only if they supply procedures that
2474 # aren't already present in the normal libraries. This is because
2475 # IRIX 5.2 has libraries, but they aren't needed and they're
2476 # bogus: they goof up name resolution if used.
2477 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
2478 # To get around this problem, check for both libraries together
2479 # if -lsocket doesn't work by itself.
2480 #--------------------------------------------------------------------
2481
2482 tcl_checkBoth=0
2483 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
2484 if test "$tcl_checkSocket" = 1; then
2485 AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
2486 LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
2487 fi
2488 if test "$tcl_checkBoth" = 1; then
2489 tk_oldLibs=$LIBS
2490 LIBS="$LIBS -lsocket -lnsl"
2491 AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
2492 fi
2493 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
2494 [LIBS="$LIBS -lnsl"])])
2495 AC_CHECK_FUNC(mp_log_u32, , [AC_CHECK_LIB(tommath, mp_log_u32,
2496 [LIBS="$LIBS -ltommath"])])
2497 AC_CHECK_FUNC(deflateSetHeader, , [AC_CHECK_LIB(z, deflateSetHeader,
2498 [LIBS="$LIBS -lz"])])
2499 ])
2500
2501 #--------------------------------------------------------------------
25022502 # TEA_TCL_EARLY_FLAGS
25032503 #
25042504 # Check for what flags are needed to be passed so the correct OS
25132513 # _ISOC99_SOURCE
25142514 # _LARGEFILE64_SOURCE
25152515 # _LARGEFILE_SOURCE64
2516 #
25162517 #--------------------------------------------------------------------
25172518
25182519 AC_DEFUN([TEA_TCL_EARLY_FLAG],[
29332934 for i in $vars; do
29342935 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
29352936 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
2936 i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'`
2937 i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.[[lL]][[iI]][[bB]][$]/-l\1/'`
29372938 fi
29382939 PKG_LIBS="$PKG_LIBS $i"
29392940 done
31203121 AC_DEFUN([TEA_MAKE_LIB], [
31213122 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
31223123 MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
3123 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)"
3124 MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
31243125 AC_EGREP_CPP([manifest needed], [
31253126 #if defined(_MSC_VER) && _MSC_VER >= 1400
31263127 print("manifest needed")
31353136 MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\[$]@ \$(PKG_STUB_OBJECTS)"
31363137 else
31373138 MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
3138 MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
3139 MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
31393140 MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
31403141 fi
31413142
38773878 # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
38783879 eval pkglibdir="[$]{libdir}/$1${PACKAGE_VERSION}"
38793880 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
3880 eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}${DBGX}"
3881 eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}${DBGX}"
3881 eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}"
3882 eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}"
38823883 else
3883 eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
3884 eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
3884 eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`"
3885 eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`"
38853886 fi
38863887 $1_BUILD_LIB_SPEC="-L`$CYGPATH $(pwd)` ${$1_LIB_FLAG}"
38873888 $1_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` ${$1_LIB_FLAG}"
113113 namespace which -command x
114114 } -cleanup $cleanup2 -result ::x
115115
116 test basic-1.7a {objects are added to the master list
116 test basic-1.7a {objects are added to the global list
117117 } -setup $setup2 -body {
118118 itcl::find objects x
119119 } -cleanup $cleanup2 -result x
120120
121 test basic-1.7b {objects are added to the master list
121 test basic-1.7b {objects are added to the global list
122122 } -setup $setup2 -body {
123123 itcl::find objects -class Counter x
124124 } -cleanup $cleanup2 -result x
1313 package require tcltest 2.2
1414 namespace import ::tcltest::test
1515 ::tcltest::loadTestedCommands
16 set ::itcllib [lindex [package ifneeded itcl [package require itcl]] 1]
16 package require itcl
17 set ::itcllib [lindex [lsearch -exact -index 1 -inline [info loaded] Itcl] 0]
1718
1819 # ----------------------------------------------------------------------
1920 # Test "itcl::import::stub" command
4445 set interp [interp create]
4546 $interp eval {set ::tcl::inl_mem_test 0}
4647 $interp eval "
47 [list ::load $::itcllib itcl]
48 [list ::load $::itcllib Itcl]
4849 [::tcltest::configure -load]
4950 proc auto_load {cmd {namespace {}}} {
5051 global debug
9495 set interp [interp create]
9596 $interp eval {set ::tcl::inl_mem_test 0}
9697 $interp eval "
97 [list ::load $::itcllib itcl]
98 [list ::load $::itcllib Itcl]
9899 [::tcltest::configure -load]
99100 proc auto_load {cmd {namespace {}}} {
100101 proc \$cmd {args} \[format {return \"%s: \$args\"} \$cmd\]
00 #
1 # Tests for using [incr Tcl] in slave interpreters
1 # Tests for using [incr Tcl] in child interpreters
22 # ----------------------------------------------------------------------
33 # AUTHOR: Michael J. McLennan
44 # Bell Labs Innovations for Lucent Technologies
1616 package require itcl
1717
1818 # ----------------------------------------------------------------------
19 # Make sure that slave interpreters can be created and loaded
19 # Make sure that child interpreters can be created and loaded
2020 # with [incr Tcl]...
2121 # ----------------------------------------------------------------------
22 test interp-1.1 {create a slave interp with [incr Tcl]} {
23 interp create slave
24 load "" Itcl slave
25 list [slave eval "namespace children :: itcl"] [interp delete slave]
22 test interp-1.1 {create a child interp with [incr Tcl]} {
23 interp create child
24 load "" Itcl child
25 list [child eval "namespace children :: itcl"] [interp delete child]
2626 } {::itcl {}}
2727
28 test interp-1.2 {create a safe slave interp with [incr Tcl]} {
29 interp create -safe slave
30 load "" Itcl slave
31 list [slave eval "namespace children :: itcl"] [interp delete slave]
28 test interp-1.2 {create a safe child interp with [incr Tcl]} {
29 interp create -safe child
30 load "" Itcl child
31 list [child eval "namespace children :: itcl"] [interp delete child]
3232 } {::itcl {}}
3333
34 test interp-1.3 {errors are okay when slave interp is deleted} {
35 catch {interp delete slave}
36 interp create slave
37 load "" Itcl slave
38 slave eval {
34 test interp-1.3 {errors are okay when child interp is deleted} {
35 catch {interp delete child}
36 interp create child
37 load "" Itcl child
38 child eval {
3939 itcl::class Troublemaker {
4040 destructor { error "cannot delete this object" }
4141 }
5050 }
5151 Foo f
5252 }
53 interp delete slave
53 interp delete child
5454 } {}
5555
5656 test interp-1.4 {one namespace can cause another to be destroyed} {
57 interp create slave
58 load "" Itcl slave
59 slave eval {
57 interp create child
58 load "" Itcl child
59 child eval {
6060 namespace eval group {
6161 itcl::class base1 {}
6262 itcl::class base2 {}
6565 inherit group::base1 group::base2
6666 }
6767 }
68 interp delete slave
68 interp delete child
6969 } {}
7070
7171 test interp-1.5 {cleanup interp object list, this should not
7272 include an object that deletes itself in ctor} {
73 interp create slave
74 load "" Itcl slave
75 slave eval {
73 interp create child
74 load "" Itcl child
75 child eval {
7676 itcl::class DeleteSelf {
7777 constructor {} {
7878 itcl::delete object $this
8080 }
8181 DeleteSelf ds
8282 }
83 interp delete slave
83 interp delete child
8484 } {}
8585
8686 ::tcltest::cleanupTests
152152 }
153153 list 0
154154 } 0
155 test methods-2.2 {covers leak condition test for nested methods calls within eval, bug [8e632ce049]} -setup {
156 itcl::class C1 {
157 proc factory {} {
158 set obj [C1 #auto]
159 $obj myeval [list $obj read]
160 itcl::delete object $obj
161 }
162 method myeval {script} { eval $script }
163 method read {} { myeval {} }
164 }
165 } -body {
166 time { C1::factory } 50
167 list 0
168 } -result 0 -cleanup {
169 itcl::delete class C1
170 }
171 test methods-2.3 {call of method after object is destroyed inside other methods, SF-bug [c1289b1c32]} -setup {
172 proc c1test {} {
173 return c1test
174 }
175 itcl::class C1 {
176 public method m1 {} {
177 itcl::delete object $this
178 c1test
179 }
180 public method m2 {} {
181 rename $this {}
182 c1test
183 }
184 public method c1test {} {
185 return C1::c1test
186 }
187 }
188 } -body {
189 set result {}
190 set obj [C1 #auto]
191 lappend result [catch {$obj m1} v] $v [namespace which -command $obj]
192 set obj [C1 #auto]
193 lappend result [catch {$obj m2} v] $v [namespace which -command $obj]
194 } -match glob -result {1 * {} 1 * {}} -cleanup {
195 itcl::delete class C1
196 rename c1test {}
197 }
155198
156199 # ----------------------------------------------------------------------
157200 # Clean up
456456 -cleanup {interp delete $interp}
457457
458458 test sfbug-259 { SF bug #257 } -setup {
459 interp create slave
460 load {} Itcl slave
461 } -cleanup {
462 interp delete slave
463 } -body {
464 slave eval {
459 interp create child
460 load {} Itcl child
461 } -cleanup {
462 interp delete child
463 } -body {
464 child eval {
465465 proc do_uplevel { body } {
466466 uplevel 1 $body
467467 }
3030 # We extract version numbers using the nmakehlp program. For now use
3131 # the local copy of nmakehlp. Once we locate Tcl, we will use that
3232 # one if it is newer.
33 !if [$(CC) -nologo "nmakehlp.c" -link -subsystem:console > nul]
33 !if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
3434 !endif
3535
3636 # First locate the Tcl directory that we are working with.
37 !ifdef TCLDIR
37 !if "$(TCLDIR)" != ""
3838
3939 _RULESDIR = $(TCLDIR:/=\)
4040
55 # compiler switches, defining common targets and macros. The Tcl makefile
66 # directly includes this. Extensions include it via "rules-ext.vc".
77 #
8 # See TIP 477 (https://core.tcl.tk/tips/doc/trunk/tip/477.md) for
8 # See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for
99 # detailed documentation.
1010 #
1111 # See the file "license.terms" for information on usage and redistribution
2323 # For modifications that are not backward-compatible, you *must* change
2424 # the major version.
2525 RULES_VERSION_MAJOR = 1
26 RULES_VERSION_MINOR = 4
26 RULES_VERSION_MINOR = 8
2727
2828 # The PROJECT macro must be defined by parent makefile.
2929 !if "$(PROJECT)" == ""
301301 _TCLDIR = $(_INSTALLDIR)\..
302302 _TCL_H = $(_TCLDIR)\include\tcl.h
303303
304 !else # exist(...) && ! $(NEED_TCL_SOURCE)
304 !else # exist(...) && !$(NEED_TCL_SOURCE)
305305
306306 !if [echo _TCLDIR = \> nmakehlp.out] \
307307 || [nmakehlp -L generic\tcl.h >> nmakehlp.out]
312312 TCLDIR = $(_TCLDIR)
313313 _TCL_H = $(_TCLDIR)\generic\tcl.h
314314
315 !endif # exist(...) && ! $(NEED_TCL_SOURCE)
315 !endif # exist(...) && !$(NEED_TCL_SOURCE)
316316
317317 !endif # TCLDIR
318318
414414 # NATIVE_ARCH - set to IX86 or AMD64 for the host machine
415415 # MACHINE - same as $(ARCH) - legacy
416416 # _VC_MANIFEST_EMBED_{DLL,EXE} - commands for embedding a manifest if needed
417 # CFG_ENCODING - set to an character encoding.
418 # TBD - this is passed to compiler as TCL_CFGVAL_ENCODING but can't
419 # see where it is used
420417
421418 cc32 = $(CC) # built-in default.
422419 link32 = link
502499 _VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
503500 !endif
504501
505 !ifndef CFG_ENCODING
506 CFG_ENCODING = \"cp1252\"
507 !endif
508
509502 ################################################################
510503 # 4. Build the nmakehlp program
511504 # This is a helper app we need to overcome nmake's limiting
513506 # information about supported compiler options etc.
514507 #
515508 # Tcl itself will always use the nmakehlp.c program which is
516 # in its own source. This is the "master" copy and kept updated.
509 # in its own source. It will be kept updated there.
517510 #
518511 # Extensions built against an installed Tcl will use the installed
519512 # copy of Tcl's nmakehlp.c if there is one and their own version
536529 !if exist("$(_TCLDIR)\lib\nmake\nmakehlp.c")
537530 NMAKEHLPC = $(_TCLDIR)\lib\nmake\nmakehlp.c
538531 !endif
539 !else # ! $(TCLINSTALL)
532 !else # !$(TCLINSTALL)
540533 !if exist("$(_TCLDIR)\win\nmakehlp.c")
541534 NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
542535 !endif
658651 !endif
659652 !endif
660653
654
655 ################################################################
656 # 6. Extract various version numbers from headers
657 # For Tcl and Tk, version numbers are extracted from tcl.h and tk.h
658 # respectively. For extensions, versions are extracted from the
659 # configure.in or configure.ac from the TEA configuration if it
660 # exists, and unset otherwise.
661 # Sets the following macros:
662 # TCL_MAJOR_VERSION
663 # TCL_MINOR_VERSION
664 # TCL_RELEASE_SERIAL
665 # TCL_PATCH_LEVEL
666 # TCL_PATCH_LETTER
667 # TCL_VERSION
668 # TK_MAJOR_VERSION
669 # TK_MINOR_VERSION
670 # TK_RELEASE_SERIAL
671 # TK_PATCH_LEVEL
672 # TK_PATCH_LETTER
673 # TK_VERSION
674 # DOTVERSION - set as (for example) 2.5
675 # VERSION - set as (for example 25)
676 #--------------------------------------------------------------
677
678 !if [echo REM = This file is generated from rules.vc > versions.vc]
679 !endif
680 !if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
681 && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
682 !endif
683 !if [echo TCL_MINOR_VERSION = \>> versions.vc] \
684 && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
685 !endif
686 !if [echo TCL_RELEASE_SERIAL = \>> versions.vc] \
687 && [nmakehlp -V "$(_TCL_H)" TCL_RELEASE_SERIAL >> versions.vc]
688 !endif
689 !if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
690 && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc]
691 !endif
692
693 !if defined(_TK_H)
694 !if [echo TK_MAJOR_VERSION = \>> versions.vc] \
695 && [nmakehlp -V $(_TK_H) TK_MAJOR_VERSION >> versions.vc]
696 !endif
697 !if [echo TK_MINOR_VERSION = \>> versions.vc] \
698 && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc]
699 !endif
700 !if [echo TK_RELEASE_SERIAL = \>> versions.vc] \
701 && [nmakehlp -V "$(_TK_H)" TK_RELEASE_SERIAL >> versions.vc]
702 !endif
703 !if [echo TK_PATCH_LEVEL = \>> versions.vc] \
704 && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc]
705 !endif
706 !endif # _TK_H
707
708 !include versions.vc
709
710 TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
711 TCL_DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
712 !if [nmakehlp -f $(TCL_PATCH_LEVEL) "a"]
713 TCL_PATCH_LETTER = a
714 !elseif [nmakehlp -f $(TCL_PATCH_LEVEL) "b"]
715 TCL_PATCH_LETTER = b
716 !else
717 TCL_PATCH_LETTER = .
718 !endif
719
720 !if defined(_TK_H)
721
722 TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
723 TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
724 !if [nmakehlp -f $(TK_PATCH_LEVEL) "a"]
725 TK_PATCH_LETTER = a
726 !elseif [nmakehlp -f $(TK_PATCH_LEVEL) "b"]
727 TK_PATCH_LETTER = b
728 !else
729 TK_PATCH_LETTER = .
730 !endif
731
732 !endif
733
734 # Set DOTVERSION and VERSION
735 !if $(DOING_TCL)
736
737 DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
738 VERSION = $(TCL_VERSION)
739
740 !elseif $(DOING_TK)
741
742 DOTVERSION = $(TK_DOTVERSION)
743 VERSION = $(TK_VERSION)
744
745 !else # Doing a non-Tk extension
746
747 # If parent makefile has not defined DOTVERSION, try to get it from TEA
748 # first from a configure.in file, and then from configure.ac
749 !ifndef DOTVERSION
750 !if [echo DOTVERSION = \> versions.vc] \
751 || [nmakehlp -V $(ROOT)\configure.in ^[$(PROJECT)^] >> versions.vc]
752 !if [echo DOTVERSION = \> versions.vc] \
753 || [nmakehlp -V $(ROOT)\configure.ac ^[$(PROJECT)^] >> versions.vc]
754 !error *** Could not figure out extension version. Please define DOTVERSION in parent makefile before including rules.vc.
755 !endif
756 !endif
757 !include versions.vc
758 !endif # DOTVERSION
759 VERSION = $(DOTVERSION:.=)
760
761 !endif # $(DOING_TCL) ... etc.
762
763 # Windows RC files have 3 version components. Ensure this irrespective
764 # of how many components the package has specified. Basically, ensure
765 # minimum 4 components by appending 4 0's and then pick out the first 4.
766 # Also take care of the fact that DOTVERSION may have "a" or "b" instead
767 # of "." separating the version components.
768 DOTSEPARATED=$(DOTVERSION:a=.)
769 DOTSEPARATED=$(DOTSEPARATED:b=.)
770 !if [echo RCCOMMAVERSION = \> versions.vc] \
771 || [for /f "tokens=1,2,3,4,5* delims=." %a in ("$(DOTSEPARATED).0.0.0.0") do echo %a,%b,%c,%d >> versions.vc]
772 !error *** Could not generate RCCOMMAVERSION ***
773 !endif
774 !include versions.vc
775
661776 ########################################################################
662 # 6. Parse the OPTS macro to work out the requested build configuration.
777 # 7. Parse the OPTS macro to work out the requested build configuration.
663778 # Based on this, we will construct the actual switches to be passed to the
664779 # compiler and linker using the macros defined in the previous section.
665780 # The following macros are defined by this section based on OPTS
673788 # MSVCRT - 1 -> link to dynamic C runtime even when building static Tcl build
674789 # 0 -> link to static C runtime for static Tcl build.
675790 # Does not impact shared Tcl builds (STATIC_BUILD == 0)
791 # Default: 1 for Tcl 8.7 and up, 0 otherwise.
676792 # TCL_USE_STATIC_PACKAGES - 1 -> statically link the registry and dde extensions
677 # in the Tcl shell. 0 -> keep them as shared libraries
678 # Does not impact shared Tcl builds.
793 # in the Tcl and Wish shell. 0 -> keep them as shared libraries. Does
794 # not impact shared Tcl builds. Implied by STATIC_BUILD since Tcl 8.7.
679795 # USE_THREAD_ALLOC - 1 -> Use a shared global free pool for allocation.
680796 # 0 -> Use the non-thread allocator.
681797 # UNCHECKED - 1 -> when doing a debug build with symbols, use the release
684800 # CONFIG_CHECK - 1 -> check current build configuration against Tcl
685801 # configuration (ignored for Tcl itself)
686802 # _USE_64BIT_TIME_T - forces a build using 64-bit time_t for 32-bit build
687 # (CRT library should support this)
803 # (CRT library should support this, not needed for Tcl 9.x)
804 # TCL_UTF_MAX=4 - forces a build allowing 4-byte UTF-8 sequences internally.
805 # (Not needed for Tcl 9.x)
688806 # Further, LINKERFLAGS are modified based on above.
689807
690808 # Default values for all the above
727845 !else
728846 !if [nmakehlp -f $(OPTS) "msvcrt"]
729847 !message *** Doing msvcrt
730 MSVCRT = 1
731 !else
732 !if !$(STATIC_BUILD)
733 MSVCRT = 1
734 !else
848 !else
849 !if $(TCL_MAJOR_VERSION) == 8 && $(TCL_MINOR_VERSION) < 7 && $(STATIC_BUILD)
735850 MSVCRT = 0
736851 !endif
737852 !endif
740855 !if [nmakehlp -f $(OPTS) "staticpkg"] && $(STATIC_BUILD)
741856 !message *** Doing staticpkg
742857 TCL_USE_STATIC_PACKAGES = 1
743 !else
744 TCL_USE_STATIC_PACKAGES = 0
745858 !endif
746859
747860 !if [nmakehlp -f $(OPTS) "nothreads"]
748861 !message *** Compile explicitly for non-threaded tcl
749862 TCL_THREADS = 0
750863 USE_THREAD_ALLOC= 0
751 !else
752 TCL_THREADS = 1
753 USE_THREAD_ALLOC= 1
754 !endif
755
864 !endif
865
866 !if $(TCL_MAJOR_VERSION) == 8
756867 !if [nmakehlp -f $(OPTS) "time64bit"]
757868 !message *** Force 64-bit time_t
758869 _USE_64BIT_TIME_T = 1
870 !endif
871
872 !if [nmakehlp -f $(OPTS) "utfmax"]
873 !message *** Force allowing 4-byte UTF-8 sequences internally
874 TCL_UTF_MAX = 4
875 !endif
759876 !endif
760877
761878 # Yes, it's weird that the "symbols" option controls DEBUG and
841958 !endif
842959
843960 ################################################################
844 # 7. Parse the STATS macro to configure code instrumentation
961 # 8. Parse the STATS macro to configure code instrumentation
845962 # The following macros are set by this section:
846963 # TCL_MEM_DEBUG - 1 -> enables memory allocation instrumentation
847964 # 0 -> disables
871988 !endif
872989
873990 ####################################################################
874 # 8. Parse the CHECKS macro to configure additional compiler checks
991 # 9. Parse the CHECKS macro to configure additional compiler checks
875992 # The following macros are set by this section:
876993 # WARNINGS - compiler switches that control the warnings level
877994 # TCL_NO_DEPRECATED - 1 -> disable support for deprecated functions
9031020
9041021 !endif
9051022
906 ################################################################
907 # 9. Extract various version numbers
908 # For Tcl and Tk, version numbers are extracted from tcl.h and tk.h
909 # respectively. For extensions, versions are extracted from the
910 # configure.in or configure.ac from the TEA configuration if it
911 # exists, and unset otherwise.
912 # Sets the following macros:
913 # TCL_MAJOR_VERSION
914 # TCL_MINOR_VERSION
915 # TCL_PATCH_LEVEL
916 # TCL_VERSION
917 # TK_MAJOR_VERSION
918 # TK_MINOR_VERSION
919 # TK_PATCH_LEVEL
920 # TK_VERSION
921 # DOTVERSION - set as (for example) 2.5
922 # VERSION - set as (for example 25)
923 #--------------------------------------------------------------
924
925 !if [echo REM = This file is generated from rules.vc > versions.vc]
926 !endif
927 !if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
928 && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
929 !endif
930 !if [echo TCL_MINOR_VERSION = \>> versions.vc] \
931 && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
932 !endif
933 !if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
934 && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc]
935 !endif
936
937 !if defined(_TK_H)
938 !if [echo TK_MAJOR_VERSION = \>> versions.vc] \
939 && [nmakehlp -V $(_TK_H) TK_MAJOR_VERSION >> versions.vc]
940 !endif
941 !if [echo TK_MINOR_VERSION = \>> versions.vc] \
942 && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc]
943 !endif
944 !if [echo TK_PATCH_LEVEL = \>> versions.vc] \
945 && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc]
946 !endif
947 !endif # _TK_H
948
949 !include versions.vc
950
951 TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
952 TCL_DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
953 !if defined(_TK_H)
954 TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
955 TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
956 !endif
957
958 # Set DOTVERSION and VERSION
959 !if $(DOING_TCL)
960
961 DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
962 VERSION = $(TCL_VERSION)
963
964 !elseif $(DOING_TK)
965
966 DOTVERSION = $(TK_DOTVERSION)
967 VERSION = $(TK_VERSION)
968
969 !else # Doing a non-Tk extension
970
971 # If parent makefile has not defined DOTVERSION, try to get it from TEA
972 # first from a configure.in file, and then from configure.ac
973 !ifndef DOTVERSION
974 !if [echo DOTVERSION = \> versions.vc] \
975 || [nmakehlp -V $(ROOT)\configure.in ^[$(PROJECT)^] >> versions.vc]
976 !if [echo DOTVERSION = \> versions.vc] \
977 || [nmakehlp -V $(ROOT)\configure.ac ^[$(PROJECT)^] >> versions.vc]
978 !error *** Could not figure out extension version. Please define DOTVERSION in parent makefile before including rules.vc.
979 !endif
980 !endif
981 !include versions.vc
982 !endif # DOTVERSION
983 VERSION = $(DOTVERSION:.=)
984
985 !endif # $(DOING_TCL) ... etc.
9861023
9871024 ################################################################
9881025 # 10. Construct output directory and file paths
10281065 BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER)
10291066 !endif
10301067
1031 !if !$(DEBUG) || $(DEBUG) && $(UNCHECKED)
1068 !if !$(DEBUG) || $(TCL_VERSION) > 86 || $(DEBUG) && $(UNCHECKED)
10321069 SUFX = $(SUFX:g=)
10331070 !endif
10341071
10791116 # The name of the stubs library for the project being built
10801117 STUBPREFIX = $(PROJECT)stub
10811118
1119 #
10821120 # Set up paths to various Tcl executables and libraries needed by extensions
1121 #
1122
1123 # TIP 430. Unused for 8.6 but no harm defining it to allow a common rules.vc
1124 !if "$(TCL_PATCH_LETTER)" == "."
1125 TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_RELEASE_SERIAL).zip
1126 !else
1127 TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip
1128 !endif
1129 !if "$(TK_PATCH_LETTER)" == "."
1130 TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_RELEASE_SERIAL).zip
1131 !else
1132 TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
1133 !endif
1134
10831135 !if $(DOING_TCL)
1084
10851136 TCLSHNAME = $(PROJECT)sh$(VERSION)$(SUFX).exe
10861137 TCLSH = $(OUT_DIR)\$(TCLSHNAME)
10871138 TCLIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
10881139 TCLLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
10891140 TCLLIB = $(OUT_DIR)\$(TCLLIBNAME)
1141 TCLSCRIPTZIP = $(OUT_DIR)\$(TCLSCRIPTZIPNAME)
10901142
10911143 TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
10921144 TCLSTUBLIB = $(OUT_DIR)\$(TCLSTUBLIBNAME)
10931145 TCL_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)"
10941146
1095 !else # ! $(DOING_TCL)
1147 !else # !$(DOING_TCL)
10961148
10971149 !if $(TCLINSTALL) # Building against an installed Tcl
10981150
11141166 TCL_LIBRARY = $(_TCLDIR)\lib
11151167 TCLREGLIB = $(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib
11161168 TCLDDELIB = $(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib
1169 TCLSCRIPTZIP = $(_TCLDIR)\lib\$(TCLSCRIPTZIPNAME)
11171170 TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
11181171 TCL_INCLUDES = -I"$(_TCLDIR)\include"
11191172
11331186 TCL_LIBRARY = $(_TCLDIR)\library
11341187 TCLREGLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib
11351188 TCLDDELIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib
1189 TCLSCRIPTZIP = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCLSCRIPTZIPNAME)
11361190 TCLTOOLSDIR = $(_TCLDIR)\tools
11371191 TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
11381192
11651219 TKSTUBLIB = $(OUT_DIR)\$(TKSTUBLIBNAME)
11661220 TKIMPLIB = $(OUT_DIR)\$(TKIMPLIBNAME)
11671221 TKLIB = $(OUT_DIR)\$(TKLIBNAME)
1168 TK_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)"
1222 TK_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)"
1223 TKSCRIPTZIP = $(OUT_DIR)\$(TKSCRIPTZIPNAME)
11691224
11701225 !else # effectively NEED_TK
11711226
11801235 TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME)
11811236 !endif
11821237 TK_INCLUDES = -I"$(_TKDIR)\include"
1238 TKSCRIPTZIP = $(_TKDIR)\lib\$(TKSCRIPTZIPNAME)
1239
11831240 !else # Building against Tk sources
1241
11841242 WISH = $(_TKDIR)\win\$(BUILDDIRTOP)\$(WISHNAME)
11851243 TKSTUBLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSTUBLIBNAME)
11861244 TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
11911249 TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
11921250 !endif
11931251 TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
1252 TKSCRIPTZIP = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSCRIPTZIPNAME)
1253
11941254 !endif # TKINSTALL
1255
11951256 tklibs = "$(TKSTUBLIB)" "$(TKIMPLIB)"
11961257
11971258 !endif # $(DOING_TK)
12321293 DOC_INSTALL_DIR = $(_INSTALLDIR)\doc
12331294 !if $(DOING_TCL)
12341295 SCRIPT_INSTALL_DIR = $(_INSTALLDIR)\lib\$(PROJECT)$(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
1296 MODULE_INSTALL_DIR = $(_INSTALLDIR)\lib\tcl$(TCL_MAJOR_VERSION)
12351297 !else # DOING_TK
12361298 SCRIPT_INSTALL_DIR = $(_INSTALLDIR)\lib\$(PROJECT)$(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
12371299 !endif
12761338 # baselibs - minimum Windows libraries required. Parent makefile can
12771339 # define PRJ_LIBS before including rules.rc if additional libs are needed
12781340
1279 OPTDEFINES = /DTCL_CFGVAL_ENCODING=$(CFG_ENCODING) /DSTDC_HEADERS
1341 OPTDEFINES = /DSTDC_HEADERS
1342 !if $(VCVERSION) > 1600
1343 OPTDEFINES = $(OPTDEFINES) /DHAVE_STDINT_H=1
1344 !else
1345 OPTDEFINES = $(OPTDEFINES) /DMP_NO_STDINT=1
1346 !endif
1347 !if $(VCVERSION) >= 1800
1348 OPTDEFINES = $(OPTDEFINES) /DHAVE_INTTYPES_H=1 /DHAVE_STDBOOL_H=1
1349 !endif
12801350
12811351 !if $(TCL_MEM_DEBUG)
12821352 OPTDEFINES = $(OPTDEFINES) /DTCL_MEM_DEBUG
12921362 !endif
12931363 !if $(STATIC_BUILD)
12941364 OPTDEFINES = $(OPTDEFINES) /DSTATIC_BUILD
1365 !elseif $(TCL_VERSION) > 86
1366 OPTDEFINES = $(OPTDEFINES) /DTCL_WITH_EXTERNAL_TOMMATH
1367 !if "$(MACHINE)" == "AMD64"
1368 OPTDEFINES = $(OPTDEFINES) /DMP_64BIT
1369 !endif
12951370 !endif
12961371 !if $(TCL_NO_DEPRECATED)
12971372 OPTDEFINES = $(OPTDEFINES) /DTCL_NO_DEPRECATED
13001375 !if $(USE_STUBS)
13011376 # Note we do not define USE_TCL_STUBS even when building tk since some
13021377 # test targets in tk do not use stubs
1303 !if ! $(DOING_TCL)
1378 !if !$(DOING_TCL)
13041379 USE_STUBS_DEFS = /DUSE_TCL_STUBS /DUSE_TCLOO_STUBS
13051380 !if $(NEED_TK)
13061381 USE_STUBS_DEFS = $(USE_STUBS_DEFS) /DUSE_TK_STUBS
13211396 OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_DO64BIT
13221397 !endif
13231398 !if $(VCVERSION) < 1300
1324 OPTDEFINES = $(OPTDEFINES) /DNO_STRTOI64
1325 !endif
1326
1399 OPTDEFINES = $(OPTDEFINES) /DNO_STRTOI64=1
1400 !endif
1401
1402 !if "$(TCL_MAJOR_VERSION)" == "8"
13271403 !if "$(_USE_64BIT_TIME_T)" == "1"
1328 OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T
1404 OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T=1
1405 !endif
1406 !if "$(TCL_UTF_MAX)" == "4"
1407 OPTDEFINES = $(OPTDEFINES) /DTCL_UTF_MAX=4
13291408 !endif
13301409
13311410 # _ATL_XP_TARGETING - Newer SDK's need this to build for XP
13321411 COMPILERFLAGS = /D_ATL_XP_TARGETING
1412 !endif
13331413
13341414 # Like the TEA system only set this non empty for non-Tk extensions
13351415 # Note: some extensions use PACKAGE_NAME and others use PACKAGE_TCLNAME
14541534 lflags = $(lflags) -nodefaultlib:libucrt.lib
14551535 !endif
14561536
1457 # Old linkers (Visual C++ 6 in particular) will link for fast loading
1458 # on Win98. Since we do not support Win98 any more, we specify nowin98
1459 # as recommended for NT and later. However, this is only required by
1460 # IX86 on older compilers and only needed if we are not doing a static build.
1461
1462 !if "$(MACHINE)" == "IX86" && !$(STATIC_BUILD)
1463 !if [nmakehlp -l -opt:nowin98 $(LINKER_TESTFLAGS)]
1464 # Align sections for PE size savings.
1465 lflags = $(lflags) -opt:nowin98
1466 !endif
1467 !endif
1468
14691537 dlllflags = $(lflags) -dll
14701538 conlflags = $(lflags) -subsystem:console
14711539 guilflags = $(lflags) -subsystem:windows
15071575 RESCMD = $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TMP_DIR)" \
15081576 $(TCL_INCLUDES) \
15091577 /DDEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
1510 /DCOMMAVERSION=$(DOTVERSION:.=,),0 \
1578 /DCOMMAVERSION=$(RCCOMMAVERSION) \
15111579 /DDOTVERSION=\"$(DOTVERSION)\" \
15121580 /DVERSION=\"$(VERSION)\" \
15131581 /DSUFX=\"$(SUFX)\" \
15231591 !if $(MULTIPLATFORM_INSTALL)
15241592 default-pkgindex:
15251593 @echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \
1526 [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl
1594 [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl
15271595 !else
15281596 default-pkgindex:
15291597 @echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \
1530 [list load [file join $$dir $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl
1598 [list load [file join $$dir $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl
15311599 !endif
15321600
15331601 default-pkgindex-tea:
15721640 @echo Installing PDBs to '$(LIB_INSTALL_DIR)'
15731641 @if not exist "$(LIB_INSTALL_DIR)" mkdir "$(LIB_INSTALL_DIR)"
15741642 @$(CPY) "$(OUT_DIR)\*.pdb" "$(LIB_INSTALL_DIR)\"
1643
1644 # "emacs font-lock highlighting fix
15751645
15761646 default-install-docs-html:
15771647 @echo Installing documentation files to '$(DOC_INSTALL_DIR)'
16351705 !ifdef RCFILE
16361706
16371707 # Note: don't use $** in below rule because there may be other dependencies
1638 # and only the "master" rc must be passed to the resource compiler
1708 # and only the "main" rc must be passed to the resource compiler
16391709 $(TMP_DIR)\$(PROJECT).res: $(RCDIR)\$(PROJECT).rc
16401710 $(RESCMD) $(RCDIR)\$(PROJECT).rc
16411711
16891759
16901760 !if !$(DISABLE_IMPLICIT_RULES)
16911761 # Implicit rule definitions - only for building library objects. For stubs and
1692 # main application, the master makefile should define explicit rules.
1762 # main application, the makefile should define explicit rules.
16931763
16941764 {$(ROOT)}.c{$(TMP_DIR)}.obj::
16951765 $(CCPKGCMD) @<<
17301800 # When building an extension, certain configuration options should
17311801 # match the ones used when Tcl was built. Here we check and
17321802 # warn on a mismatch.
1733 !if ! $(DOING_TCL)
1803 !if !$(DOING_TCL)
17341804
17351805 !if $(TCLINSTALL) # Building against an installed Tcl
17361806 !if exist("$(_TCLDIR)\lib\nmake\tcl.nmake")
17371807 TCLNMAKECONFIG = "$(_TCLDIR)\lib\nmake\tcl.nmake"
17381808 !endif
1739 !else # ! $(TCLINSTALL) - building against Tcl source
1740 !if exist("$(OUT_DIR)\tcl.nmake")
1741 TCLNMAKECONFIG = "$(OUT_DIR)\tcl.nmake"
1809 !else # !$(TCLINSTALL) - building against Tcl source
1810 !if exist("$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl.nmake")
1811 TCLNMAKECONFIG = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl.nmake"
17421812 !endif
17431813 !endif # TCLINSTALL
17441814
17591829
17601830 !endif # TCLNMAKECONFIG
17611831
1762 !endif # ! $(DOING_TCL)
1832 !endif # !$(DOING_TCL)
17631833
17641834
17651835 #----------------------------------------------------------
33 # Part of the nmake based build system for Tcl and its extensions.
44 # This file defines some standard targets for the convenience of extensions
55 # and can be optionally included by the extension makefile.
6 # See TIP 477 (https://core.tcl.tk/tips/doc/trunk/tip/477.md) for docs.
6 # See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for docs.
77
88 $(PROJECT): setup pkgindex $(PRJLIB)
99