Tcl Source Code

Artifact [2b7560df7f]
Login

Artifact 2b7560df7f70df3700d34edccf9c378794c1f9dd:

Attachment "revert.patch" to ticket [1065496fff] added by dgp 2004-11-13 05:58:39.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.2397
retrieving revision 1.2405
diff -u -r1.2397 -r1.2405
--- ChangeLog	12 Nov 2004 14:18:11 -0000	1.2397
+++ ChangeLog	12 Nov 2004 22:52:27 -0000	1.2405
@@ -1,5 +1,47 @@
+2004-11-12  Don Porter  <[email protected]>
+
+	* unix/tclAppInit.c:	Removed tclConfig.h #include, now that tcl.h
+				takes care of it for us.
+
+	* generic/tclInt.h:	Moved verification of ptrdiff_t typedef from
+	* generic/tclExecute.c: multiple .c files into one common header where
+	* generic/tclVar.c:	it is verifiably after tclConfig.h inclusion.
+
+2004-11-12  Daniel Steffen  <[email protected]>
+
+	* generic/tcl.h:
+	* generic/tclInt.h:
+	* unix/Makefile.in: include tclConfig.h from tcl.h and install it
+	as a public header. Normalized compiler include path order to 
+	-I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR}.
+	
+	* unix/dltest/Makefile.in: add ${BUILD_DIR}/.. to include path
+	to pick up tclConfig.h.
+
+	* unix/tclUnixInit.c: moved check for HAVE_CFBUNDLE define after
+	#include "tclInt.h" to ensure tclConfig.h has been included.
+
+2004-11-12  Reinhard Max  <[email protected]>
+
+	* unix/config.h.in:
+	* unix/tclConfig.h.in:	renamed
+
+	* unix/Makefile.in:	Completed support for config header,
+	* unix/configure.in:	fixed building outside of the unix dir,
+	* unix/tclAppinit.c:	and reflected the name change of config.h.
+	* generic/tclInt.h:
+
+	* unix/configure:       generated
+	
 2004-11-12  Donal K. Fellows  <[email protected]>
 
+	* unix/config.h.in:	Allow configure to put all the C #defs into
+	* unix/configure.in:	a file (called config.h) so that Unix builds
+	* unix/tcl.m4:		now take far fewer lines of scrollback to
+	* unix/Makefile.in:	proceed (making it less likely that any errors
+	* generic/tclInt.h:	or warnings will get missed).
+	* unix/tclAppInit.c:	Part of the TIP#34 upgrades.
+
 	* unix/tcl.m4, unix/tclUnixPort.h: Check for pthread_attr_get_np
 	in <pthread.h> before forcing the use of <pthread_np.h> to make
 	things work on NetBSD 2.0.  [Bug 1064882]
Index: generic/tcl.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.h,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -r1.187 -r1.188
--- generic/tcl.h	3 Nov 2004 19:13:33 -0000	1.187
+++ generic/tcl.h	12 Nov 2004 20:27:28 -0000	1.188
@@ -13,12 +13,16 @@
  * See the file "license.terms" for information on usage and redistribution
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  *
- * RCS: @(#) $Id: tcl.h,v 1.187 2004/11/03 19:13:33 davygrvy Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.188 2004/11/12 20:27:28 das Exp $
  */
 
 #ifndef _TCL
 #define _TCL
 
+#ifdef HAVE_CONFIG_H
+#include "tclConfig.h"
+#endif
+
 /*
  * The following defines are used to indicate the various release levels.
  */
Index: generic/tclExecute.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclExecute.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- generic/tclExecute.c	2 Nov 2004 15:32:06 -0000	1.166
+++ generic/tclExecute.c	12 Nov 2004 19:16:50 -0000	1.167
@@ -11,15 +11,9 @@
  * See the file "license.terms" for information on usage and redistribution
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  *
- * RCS: @(#) $Id: tclExecute.c,v 1.166 2004/11/02 15:32:06 dkf Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.167 2004/11/12 19:16:50 dgp Exp $
  */
 
-#ifdef STDC_HEADERS
-#include <stddef.h>
-#else
-typedef int ptrdiff_t;
-#endif
-
 #include "tclInt.h"
 #include "tclCompile.h"
 
Index: generic/tclInt.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInt.h,v
retrieving revision 1.193
retrieving revision 1.197
diff -u -r1.193 -r1.197
--- generic/tclInt.h	3 Nov 2004 19:13:38 -0000	1.193
+++ generic/tclInt.h	12 Nov 2004 20:27:28 -0000	1.197
@@ -12,7 +12,7 @@
  * See the file "license.terms" for information on usage and redistribution
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  *
- * RCS: @(#) $Id: tclInt.h,v 1.193 2004/11/03 19:13:38 davygrvy Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.197 2004/11/12 20:27:28 das Exp $
  */
 
 #ifndef _TCLINT
@@ -50,6 +50,11 @@
 #else
 #include <string.h>
 #endif
+#ifdef STDC_HEADERS
+#include <stddef.h>
+#else
+typedef int ptrdiff_t;
+#endif
 
 /*
  * Used to tag functions that are only to be visible within the module
Index: generic/tclPort.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclPort.h,v
retrieving revision 1.9
retrieving revision 1.11
diff -u -r1.9 -r1.11
--- generic/tclPort.h	24 Apr 2004 05:59:18 -0000	1.9
+++ generic/tclPort.h	12 Nov 2004 21:07:31 -0000	1.11
@@ -10,7 +10,7 @@
  * See the file "license.terms" for information on usage and redistribution
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  *
- * RCS: @(#) $Id: tclPort.h,v 1.9 2004/04/24 05:59:18 das Exp $
+ * RCS: @(#) $Id: tclPort.h,v 1.11 2004/11/12 21:07:31 dgp Exp $
  */
 
 #ifndef _TCLPORT
Index: generic/tclVar.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclVar.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- generic/tclVar.c	29 Oct 2004 15:39:06 -0000	1.98
+++ generic/tclVar.c	12 Nov 2004 19:16:53 -0000	1.99
@@ -15,15 +15,9 @@
  * See the file "license.terms" for information on usage and redistribution
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  *
- * RCS: @(#) $Id: tclVar.c,v 1.98 2004/10/29 15:39:06 dkf Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.99 2004/11/12 19:16:53 dgp Exp $
  */
 
-#ifdef STDC_HEADERS
-#include <stddef.h>
-#else
-typedef int ptrdiff_t;
-#endif
-
 #include "tclInt.h"
 
 /*
Index: unix/Makefile.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/Makefile.in,v
retrieving revision 1.148
retrieving revision 1.154
diff -u -r1.148 -r1.154
--- unix/Makefile.in	30 Oct 2004 02:17:08 -0000	1.148
+++ unix/Makefile.in	12 Nov 2004 20:27:29 -0000	1.154
@@ -5,7 +5,7 @@
 # "autoconf" program (constructs like "@foo@" will get replaced in the
 # actual Makefile.
 #
-# RCS: @(#) $Id: Makefile.in,v 1.148 2004/10/30 02:17:08 dgp Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.154 2004/11/12 20:27:29 das Exp $
 
 VERSION 		= @TCL_VERSION@
 MAJOR_VERSION		= @TCL_MAJOR_VERSION@
@@ -96,8 +96,7 @@
 #CFLAGS			= $(CFLAGS_DEBUG)
 #CFLAGS			= $(CFLAGS_OPTIMIZE)
 #CFLAGS			= $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
-CFLAGS			= @CFLAGS_DEFAULT@ @CFLAGS@ -DTCL_DBGX=$(TCL_DBGX) \
-                          -DTCL_UNLOAD_DLLS=1
+CFLAGS			= @CFLAGS_DEFAULT@ @CFLAGS@
 
 # Flags to pass to the linker
 LDFLAGS_DEBUG		= @LDFLAGS_DEBUG@
@@ -138,13 +137,10 @@
 NOTIFY_OBJS = tclUnixNotfy.o
 #NOTIFY_OBJS =
 
-# To enable memory debugging reverse the comment characters on the following
-# lines or call configure with --enable-symbols=mem
+# To enable memory debugging, call configure with --enable-symbols=mem
 # Warning:  if you enable memory debugging, you must do it *everywhere*,
 # including all the code that calls Tcl, and you must use ckalloc and
 # ckfree everywhere instead of malloc and free.
-MEM_DEBUG_FLAGS		=
-#MEM_DEBUG_FLAGS	= -DTCL_MEM_DEBUG
 
 TCL_STUB_LIB_FILE	= @TCL_STUB_LIB_FILE@
 #TCL_STUB_LIB_FILE	= libtclstub.a
@@ -155,11 +151,6 @@
 TCL_STUB_LIB_FLAG	= @TCL_STUB_LIB_FLAG@
 #TCL_STUB_LIB_FLAG	= -ltclstub
 
-# To enable compilation debugging reverse the comment characters on one
-# of the following lines or call configure with --enable-symbols=compile
-COMPILE_DEBUG_FLAGS	=
-#COMPILE_DEBUG_FLAGS	= -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
-
 # To compile without backward compatibility and deprecated code
 # uncomment the following
 NO_DEPRECATED_FLAGS	=
@@ -248,11 +239,12 @@
 AR			= @AR@
 RANLIB			= @RANLIB@
 SRC_DIR			= @srcdir@
-TOP_DIR			= @srcdir@/..
+TOP_DIR			= $(SRC_DIR)/..
+BUILD_DIR		= @builddir@
 GENERIC_DIR		= $(TOP_DIR)/generic
 COMPAT_DIR		= $(TOP_DIR)/compat
 TOOL_DIR		= $(TOP_DIR)/tools
-UNIX_DIR		= $(TOP_DIR)/unix
+UNIX_DIR		= $(SRC_DIR)
 MAC_OSX_DIR		= $(TOP_DIR)/macosx
 # Must be absolute because of the cd dltest $(DLTEST_DIR)/configure below.
 DLTEST_DIR		= @TCL_SRC_DIR@/unix/dltest
@@ -283,22 +275,19 @@
 
 
 CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
--I${GENERIC_DIR} -I${UNIX_DIR} -I${SRC_DIR} \
-${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
-${COMPILE_DEBUG_FLAGS} ${NO_DEPRECATED_FLAGS} ${ENV_FLAGS} \
--DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
+-I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} \
+${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} \
+${NO_DEPRECATED_FLAGS} ${ENV_FLAGS}
 
 STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
--I${GENERIC_DIR} -I${SRC_DIR} \
-${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
-${COMPILE_DEBUG_FLAGS} ${ENV_FLAGS} -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
+-I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} \
+${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${ENV_FLAGS}
 
 LIBS		= @TCL_LIBS@
 
-DEPEND_SWITCHES	= ${CFLAGS} -I${GENERIC_DIR} -I${SRC_DIR} \
+DEPEND_SWITCHES	= ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \
 ${AC_FLAGS} ${MATH_FLAGS} \
-${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
--DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
+${GENERIC_FLAGS} ${PROTO_FLAGS}
 
 TCLSH_OBJS = tclAppInit.o
 
@@ -342,7 +331,8 @@
 	$(GENERIC_DIR)/tclPatch.h \
 	$(GENERIC_DIR)/tclPlatDecls.h \
 	$(GENERIC_DIR)/tclPort.h \
-	$(GENERIC_DIR)/tclRegexp.h
+	$(GENERIC_DIR)/tclRegexp.h \
+	$(BUILD_DIR)/tclConfig.h
 
 GENERIC_SRCS = \
 	$(GENERIC_DIR)/regcomp.c \
@@ -660,7 +650,7 @@
 	    fi
 	@echo "Installing header files";
 	@for i in $(GENERIC_DIR)/tcl.h $(GENERIC_DIR)/tclDecls.h \
-		$(GENERIC_DIR)/tclPlatDecls.h ; \
+		$(GENERIC_DIR)/tclPlatDecls.h $(BUILD_DIR)/tclConfig.h; \
 	    do \
 	    $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \
 	    done;
@@ -770,7 +760,7 @@
 	@echo "Installing private header files";
 	@for i in $(GENERIC_DIR)/tclInt.h $(GENERIC_DIR)/tclIntDecls.h \
 		$(GENERIC_DIR)/tclIntPlatDecls.h $(GENERIC_DIR)/tclPort.h \
-		$(UNIX_DIR)/tclUnixPort.h ; \
+		$(UNIX_DIR)/tclUnixPort.h; \
 	    do \
 	    $(INSTALL_DATA) $$i $(PRIVATE_INCLUDE_INSTALL_DIR); \
 	    done;
@@ -1306,10 +1296,12 @@
 DISTNAME = tcl${VERSION}${PATCH_LEVEL}
 ZIPNAME	 = tcl${MAJOR_VERSION}${MINOR_VERSION}${PATCH_LEVEL}-src.zip
 DISTDIR	 = $(DISTROOT)/$(DISTNAME)
-$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in
-	autoconf $(UNIX_DIR)/configure.in > $(UNIX_DIR)/configure
+$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in $(UNIX_DIR)/tcl.m4
+	cd $(UNIX_DIR); autoconf
+$(UNIX_DIR)/tclConfig.h.in: $(UNIX_DIR)/configure.in $(UNIX_DIR)/tcl.m4
+	cd $(UNIX_DIR); autoheader
 
-dist: $(UNIX_DIR)/configure mklinks
+dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in mklinks
 	rm -rf $(DISTDIR)
 	mkdir -p $(DISTDIR)/unix
 	cp -p $(UNIX_DIR)/*.c $(UNIX_DIR)/*.h $(DISTDIR)/unix
@@ -1319,7 +1311,7 @@
 		$(UNIX_DIR)/tcl.m4 $(UNIX_DIR)/aclocal.m4 \
 		$(UNIX_DIR)/tclConfig.sh.in $(UNIX_DIR)/install-sh \
 		$(UNIX_DIR)/README $(UNIX_DIR)/ldAix $(UNIX_DIR)/tcl.spec \
-		$(UNIX_DIR)/mkLinks \
+		$(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/mkLinks \
 		$(DISTDIR)/unix
 	chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in
 	chmod 775 $(DISTDIR)/unix/ldAix
Index: unix/configure
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure,v
retrieving revision 1.119
retrieving revision 1.121
diff -u -r1.119 -r1.121
--- unix/configure	12 Nov 2004 14:19:23 -0000	1.119
+++ unix/configure	12 Nov 2004 18:07:50 -0000	1.121
@@ -852,6 +852,7 @@
   --enable-langinfo	  use nl_langinfo if possible to determine
 			  encoding at startup, otherwise use old heuristic
   --enable-framework      package shared libraries in MacOSX frameworks --disable-framework
+  --enable-dll-unloading  turn on the 'unload' command (default: on)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1306,6 +1307,8 @@
 
 
 
+          ac_config_headers="$ac_config_headers tclConfig.h"
+
 
 TCL_VERSION=8.5
 TCL_MAJOR_VERSION=8
@@ -2871,7 +2874,8 @@
       conftest$ac_exeext conftest.$ac_ext
 
     if test $tcl_ok = no; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_DIRENT_H 1
 _ACEOF
 
@@ -3019,7 +3023,8 @@
 if test $ac_cv_header_errno_h = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_ERRNO_H 1
 _ACEOF
 
@@ -3166,7 +3171,8 @@
 if test $ac_cv_header_float_h = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_FLOAT_H 1
 _ACEOF
 
@@ -3313,7 +3319,8 @@
 if test $ac_cv_header_values_h = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_VALUES_H 1
 _ACEOF
 
@@ -3458,12 +3465,14 @@
 
 fi
 if test $ac_cv_header_limits_h = yes; then
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIMITS_H 1
 _ACEOF
 
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_LIMITS_H 1
 _ACEOF
 
@@ -3666,7 +3675,8 @@
 rm -f conftest*
 
     if test $tcl_ok = 0; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_STDLIB_H 1
 _ACEOF
 
@@ -3854,7 +3864,8 @@
     # set and why.
 
     if test $tcl_ok = 0; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_STRING_H 1
 _ACEOF
 
@@ -4000,7 +4011,8 @@
 if test $ac_cv_header_sys_wait_h = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_SYS_WAIT_H 1
 _ACEOF
 
@@ -4147,7 +4159,8 @@
 if test $ac_cv_header_dlfcn_h = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_DLFCN_H 1
 _ACEOF
 
@@ -4332,27 +4345,32 @@
 echo "${ECHO_T}yes" >&6
 	fi
 	TCL_THREADS=1
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_THREADS 1
 _ACEOF
 
 	# USE_THREAD_ALLOC tells us to try the special thread-based
 	# allocator that significantly reduces lock contention
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_THREAD_ALLOC 1
 _ACEOF
 
 	# USE_THREAD_STORAGE tells us to use the new generic thread
 	# storage subsystem.
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_THREAD_STORAGE 1
 _ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define _REENTRANT 1
 _ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define _THREAD_SAFE 1
 _ACEOF
 
@@ -4939,7 +4957,8 @@
 fi
 
 	if test $tcl_ok = yes ; then
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_PTHREAD_ATTR_GET_NP 1
 _ACEOF
 
@@ -4970,7 +4989,8 @@
 	    echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5
 echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6
 	    if test $tcl_cv_grep_pthread_attr_get_np = missing ; then
-		cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define ATTRGETNP_NOT_DECLARED 1
 _ACEOF
 
@@ -5073,7 +5093,8 @@
 fi
 
 	    if test $tcl_ok = yes ; then
-		cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_PTHREAD_GETATTR_NP 1
 _ACEOF
 
@@ -5104,7 +5125,8 @@
 		echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5
 echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6
 		if test $tcl_cv_grep_pthread_getattr_np = missing ; then
-		    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define GETATTRNP_NOT_DECLARED 1
 _ACEOF
 
@@ -5235,12 +5257,14 @@
 fi;
 
     if test x"${with_tcencoding}" != x ; then
-	cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
 #define TCL_CFGVAL_ENCODING "${with_tcencoding}"
 _ACEOF
 
     else
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_CFGVAL_ENCODING "iso8859-1"
 _ACEOF
 
@@ -5684,7 +5708,9 @@
 
 fi
 if test $ac_cv_header_net_errno_h = yes; then
-  cat >>confdefs.h <<\_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_NET_ERRNO_H 1
 _ACEOF
 
@@ -6268,7 +6294,8 @@
 	echo "$as_me:$LINENO: result: static" >&5
 echo "${ECHO_T}static" >&6
 	SHARED_BUILD=0
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define STATIC_BUILD 1
 _ACEOF
 
@@ -6765,7 +6792,8 @@
 
 	    if test $libbsd = yes; then
 	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_DELTA_FOR_TZ 1
 _ACEOF
 
@@ -6886,14 +6914,16 @@
 	    ;;
 	HP-UX-*.11.*)
 	    # Use updated header definitions where possible
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define _XOPEN_SOURCE 1
 _ACEOF
-          # Use the XOPEN network library
-	    cat >>confdefs.h <<\_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
 #define _XOPEN_SOURCE_EXTENDED 1
 _ACEOF
- # Use the XOPEN network library
+
 	    LIBS="$LIBS -lxnet"               # Use the XOPEN network library
 
 	    SHLIB_SUFFIX=".sl"
@@ -7351,7 +7381,8 @@
 	    fi
 
 	    # XIM peeking works under XFree86.
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define PEEK_XCLOSEIM 1
 _ACEOF
 
@@ -7823,19 +7854,23 @@
 	    LD_SEARCH_FLAGS=""
 	    CFLAGS_OPTIMIZE="-Os"
 	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define MAC_OSX_TCL 1
 _ACEOF
 
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_CFBUNDLE 1
 _ACEOF
 
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_VFORK 1
 _ACEOF
 
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_DEFAULT_ENCODING "utf-8"
 _ACEOF
 
@@ -7852,11 +7887,12 @@
 	    LD_SEARCH_FLAGS=""
 	    ;;
 	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    cat >>confdefs.h <<\_ACEOF
+	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
+
+cat >>confdefs.h <<\_ACEOF
 #define _OE_SOCKETS 1
 _ACEOF
-  # needed in sys/socket.h
+
 	    ;;
 	OSF1-1.0|OSF1-1.1|OSF1-1.2)
 	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
@@ -7995,11 +8031,13 @@
 	    # Note: If _REENTRANT isn't defined, then Solaris
 	    # won't define thread-safe library routines.
 
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define _REENTRANT 1
 _ACEOF
 
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define _POSIX_PTHREAD_SEMANTICS 1
 _ACEOF
 
@@ -8028,11 +8066,13 @@
 	    # Note: If _REENTRANT isn't defined, then Solaris
 	    # won't define thread-safe library routines.
 
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define _REENTRANT 1
 _ACEOF
 
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define _POSIX_PTHREAD_SEMANTICS 1
 _ACEOF
 
@@ -8160,12 +8200,13 @@
     esac
 
     if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    { echo "$as_me:$LINENO: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&5
+	{ echo "$as_me:$LINENO: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&5
 echo "$as_me: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&2;}
     fi
 
     if test "$do64bit" = "yes" -a "$do64bit_ok" = "yes" ; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_CFG_DO64BIT 1
 _ACEOF
 
@@ -8252,7 +8293,8 @@
 	echo "$as_me:$LINENO: result: $tcl_ok" >&5
 echo "${ECHO_T}$tcl_ok" >&6
 	if test $tcl_ok = usable; then
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_SYS_EXEC_H 1
 _ACEOF
 
@@ -8318,7 +8360,8 @@
 	    echo "$as_me:$LINENO: result: $tcl_ok" >&5
 echo "${ECHO_T}$tcl_ok" >&6
 	    if test $tcl_ok = usable; then
-		cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_A_OUT_H 1
 _ACEOF
 
@@ -8384,7 +8427,8 @@
 		echo "$as_me:$LINENO: result: $tcl_ok" >&5
 echo "${ECHO_T}$tcl_ok" >&6
 		if test $tcl_ok = usable; then
-		    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_SYS_EXEC_AOUT_H 1
 _ACEOF
 
@@ -8524,6 +8568,11 @@
 
 
 
+cat >>confdefs.h <<_ACEOF
+#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}"
+_ACEOF
+
+
 
 
 
@@ -8548,7 +8597,8 @@
 	DBGX=""
 	echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_CFG_OPTIMIZED 1
 _ACEOF
 
@@ -8563,24 +8613,28 @@
     fi
 
 
-    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_CFG_DEBUG 1
 _ACEOF
 
 
     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_MEM_DEBUG 1
 _ACEOF
 
     fi
 
     if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_COMPILE_DEBUG 1
 _ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_COMPILE_STATS 1
 _ACEOF
 
@@ -8704,7 +8758,8 @@
 fi
 
     if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define _ISOC99_SOURCE 1
 _ACEOF
 
@@ -8807,7 +8862,8 @@
 fi
 
     if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define _LARGEFILE64_SOURCE 1
 _ACEOF
 
@@ -8927,14 +8983,16 @@
 fi
 
     if test "${tcl_cv_type_64bit}" = none ; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define TCL_WIDE_INT_IS_LONG 1
 _ACEOF
 
 	echo "$as_me:$LINENO: result: using long" >&5
 echo "${ECHO_T}using long" >&6
     else
-	cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
 #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
 _ACEOF
 
@@ -8997,7 +9055,8 @@
 fi
 
 	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_STRUCT_DIRENT64 1
 _ACEOF
 
@@ -9060,7 +9119,8 @@
 fi
 
 	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_STRUCT_STAT64 1
 _ACEOF
 
@@ -9123,7 +9183,8 @@
 fi
 
 	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_TYPE_OFF64_T 1
 _ACEOF
 
@@ -9474,7 +9535,8 @@
 _ACEOF
 
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USEGETWD 1
 _ACEOF
 
@@ -9807,7 +9869,8 @@
 if test $ac_cv_func_strerror = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_STRERROR 1
 _ACEOF
 
@@ -9906,7 +9969,8 @@
 if test $ac_cv_func_getwd = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_GETWD 1
 _ACEOF
 
@@ -10005,7 +10069,8 @@
 if test $ac_cv_func_wait3 = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_WAIT3 1
 _ACEOF
 
@@ -10104,7 +10169,8 @@
 if test $ac_cv_func_uname = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_UNAME 1
 _ACEOF
 
@@ -10203,7 +10269,8 @@
 if test $ac_cv_func_realpath = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_REALPATH 1
 _ACEOF
 
@@ -10654,15 +10721,18 @@
 fi
 
     case $tcl_cv_api_serial in
-	termios) cat >>confdefs.h <<\_ACEOF
+	termios)
+cat >>confdefs.h <<\_ACEOF
 #define USE_TERMIOS 1
 _ACEOF
 ;;
-	termio)  cat >>confdefs.h <<\_ACEOF
+	termio)
+cat >>confdefs.h <<\_ACEOF
 #define USE_TERMIO 1
 _ACEOF
 ;;
-	sgtty)   cat >>confdefs.h <<\_ACEOF
+	sgtty)
+cat >>confdefs.h <<\_ACEOF
 #define USE_SGTTY 1
 _ACEOF
 ;;
@@ -10764,7 +10834,8 @@
     echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5
 echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6
     if test $tcl_cv_grep_fd_mask = present; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_SYS_SELECT_H 1
 _ACEOF
 
@@ -10772,7 +10843,8 @@
     fi
 fi
 if test $tk_ok = no; then
-    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_FD_SET 1
 _ACEOF
 
@@ -11412,7 +11484,8 @@
     echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5
 echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6
     if test $tcl_cv_member_tm_tzadj = yes ; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_TM_TZADJ 1
 _ACEOF
 
@@ -11473,7 +11546,8 @@
     echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5
 echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6
     if test $tcl_cv_member_tm_gmtoff = yes ; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_TM_GMTOFF 1
 _ACEOF
 
@@ -11540,7 +11614,8 @@
     echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5
 echo "${ECHO_T}$tcl_cv_timezone_long" >&6
     if test $tcl_cv_timezone_long = yes ; then
-	cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_TIMEZONE_VAR 1
 _ACEOF
 
@@ -11605,7 +11680,8 @@
 	echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5
 echo "${ECHO_T}$tcl_cv_timezone_time" >&6
 	if test $tcl_cv_timezone_time = yes ; then
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_TIMEZONE_VAR 1
 _ACEOF
 
@@ -11826,7 +11902,8 @@
 if test $ac_cv_func_fstatfs = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_FSTATFS 1
 _ACEOF
 
@@ -12017,10 +12094,14 @@
 if test $ac_cv_func_memmove = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_MEMMOVE 1
 _ACEOF
- cat >>confdefs.h <<\_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_STRING_H 1
 _ACEOF
 
@@ -12589,7 +12670,8 @@
 esac
 
 	    USE_COMPAT=1
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define strtod fixstrtod
 _ACEOF
 
@@ -12872,7 +12954,8 @@
 echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
 if test $ac_cv_type_socklen_t = no; then
-    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define socklen_t unsigned
 _ACEOF
 
@@ -12978,7 +13061,8 @@
 if test $ac_cv_func_opendir = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_DIRENT2_H 1
 _ACEOF
 
@@ -13054,7 +13138,8 @@
 echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5
 echo "${ECHO_T}$tcl_cv_union_wait" >&6
 if test $tcl_cv_union_wait = no; then
-    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_UNION_WAIT 1
 _ACEOF
 
@@ -13420,7 +13505,8 @@
 echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5
 echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6
 if test $ac_cv_func_BSDgettimeofday = yes; then
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_BSDGETTIMEOFDAY 1
 _ACEOF
 
@@ -13519,7 +13605,8 @@
 if test $ac_cv_func_gettimeofday = yes; then
   :
 else
-  cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define NO_GETTOD 1
 _ACEOF
 
@@ -13555,7 +13642,8 @@
 echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5
 echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6
 if test $tcl_cv_grep_gettimeofday = missing ; then
-    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define GETTOD_NOT_DECLARED 1
 _ACEOF
 
@@ -13688,7 +13776,8 @@
 echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5
 echo "${ECHO_T}$tcl_cv_char_signed" >&6
 if test $tcl_cv_char_signed = yes; then
-    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_SIGNED_CHAR 1
 _ACEOF
 
@@ -13760,7 +13849,8 @@
 echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5
 echo "${ECHO_T}$tcl_cv_putenv_copy" >&6
 if test $tcl_cv_putenv_copy = yes; then
-    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_PUTENV_THAT_COPIES 1
 _ACEOF
 
@@ -13980,7 +14070,8 @@
 	    langinfo_ok="no (could not compile with nl_langinfo)";
 	fi
 	if test "$langinfo_ok" = "yes"; then
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_LANGINFO 1
 _ACEOF
 
@@ -14539,7 +14630,8 @@
 	# code (JO, 5/31/97).
 
 	OSF*)
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_FIONBIO 1
 _ACEOF
 
@@ -14547,7 +14639,8 @@
 echo "${ECHO_T}FIONBIO" >&6
 	    ;;
 	SunOS-4*)
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_FIONBIO 1
 _ACEOF
 
@@ -14555,7 +14648,8 @@
 echo "${ECHO_T}FIONBIO" >&6
 	    ;;
 	ULTRIX-4.*)
-	    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define USE_FIONBIO 1
 _ACEOF
 
@@ -14697,6 +14791,23 @@
 eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
 
 #------------------------------------------------------------------------
+
+# Check whether --enable-dll-unloading or --disable-dll-unloading was given.
+if test "${enable_dll_unloading+set}" = set; then
+  enableval="$enable_dll_unloading"
+  tcl_ok=$enableval
+else
+  tcl_ok=yes
+fi;
+if test $tcl_ok = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TCL_UNLOAD_DLLS 1
+_ACEOF
+
+fi
+
+#------------------------------------------------------------------------
 # tclConfig.sh refers to this by a different name
 #------------------------------------------------------------------------
 
@@ -14721,6 +14832,11 @@
 
 
 
+cat >>confdefs.h <<_ACEOF
+#define TCL_DBGX ${TCL_DBGX}
+_ACEOF
+
+
 
 
 
@@ -14816,38 +14932,7 @@
 }'
 fi
 
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section.  Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
-t quote
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[	 `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output.  A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
+DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
@@ -15181,10 +15266,15 @@
       --recheck    update $as_me by reconfiguring in the same conditions
   --file=FILE[:TEMPLATE]
 		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
 
 Configuration files:
 $config_files
 
+Configuration headers:
+$config_headers
+
 Report bugs to <[email protected]>."
 _ACEOF
 
@@ -15295,6 +15385,7 @@
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile" ;;
   "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;;
+  "tclConfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS tclConfig.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
@@ -15307,6 +15398,7 @@
 # bizarre bug on SunOS 4.1.3.
 if $ac_need_defaults; then
   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
@@ -15683,6 +15775,229 @@
 
 done
 _ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+done
+_ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
 
Index: unix/configure.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure.in,v
retrieving revision 1.115
retrieving revision 1.117
diff -u -r1.115 -r1.117
--- unix/configure.in	16 Jul 2004 23:31:37 -0000	1.115
+++ unix/configure.in	12 Nov 2004 18:07:55 -0000	1.117
@@ -3,10 +3,11 @@
 dnl	generate the file "configure", which is run during Tcl installation
 dnl	to configure the system for the local environment.
 #
-# RCS: @(#) $Id: configure.in,v 1.115 2004/07/16 23:31:37 hobbs Exp $
+# RCS: @(#) $Id: configure.in,v 1.117 2004/11/12 18:07:55 rmax Exp $
 
 AC_INIT(../generic/tcl.h)
 AC_PREREQ(2.57)
+AC_CONFIG_HEADERS(tclConfig.h)
 
 TCL_VERSION=8.5
 TCL_MAJOR_VERSION=8
@@ -129,18 +130,18 @@
 #--------------------------------------------------------------------
 
 # Check if Posix compliant getcwd exists, if not we'll use getwd.
-AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD)])
+AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD, 1, [Is getcwd Posix-compliant?])])
 # Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
 # define USEGETWD even if the posix getcwd exists. Add a test ?
 
 AC_REPLACE_FUNCS(opendir strstr)
 
 AC_REPLACE_FUNCS(strtol strtoll strtoull tmpnam waitpid)
-AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR)])
-AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD)])
-AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3)])
-AC_CHECK_FUNC(uname, , [AC_DEFINE(NO_UNAME)])
-AC_CHECK_FUNC(realpath, , [AC_DEFINE(NO_REALPATH)])
+AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR, 1, [Do we have strerror()])])
+AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD, 1, [Do we have getwd()])])
+AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3, 1, [Do we have wait3()])])
+AC_CHECK_FUNC(uname, , [AC_DEFINE(NO_UNAME, 1, [Do we have uname()])])
+AC_CHECK_FUNC(realpath, , [AC_DEFINE(NO_REALPATH, 1, [Do we have realpath()])])
 
 #---------------------------------------------------------------------------
 #	Determine which interface to use to talk to the serial port.
@@ -173,12 +174,12 @@
 	     tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing))
     AC_MSG_RESULT($tcl_cv_grep_fd_mask)
     if test $tcl_cv_grep_fd_mask = present; then
-	AC_DEFINE(HAVE_SYS_SELECT_H)
+	AC_DEFINE(HAVE_SYS_SELECT_H, 1, [May we include <sys/select.h>?])
 	tk_ok=yes
     fi
 fi
 if test $tk_ok = no; then
-    AC_DEFINE(NO_FD_SET)
+    AC_DEFINE(NO_FD_SET, 1, [Do we have fd_set?])
 fi
 
 #------------------------------------------------------------------------------
@@ -192,7 +193,7 @@
 #	in struct stat.  But we might be able to use fstatfs instead.
 #--------------------------------------------------------------------
 AC_STRUCT_ST_BLKSIZE
-AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS)])
+AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS, 1, [Do we have fstatfs()?])])
 
 #--------------------------------------------------------------------
 #       Some system have no memcmp or it does not work with 8 bit
@@ -205,7 +206,9 @@
 #       have no memmove (we assume they have bcopy instead).
 #       {The replacement define is in compat/string.h}
 #--------------------------------------------------------------------
-AC_CHECK_FUNC(memmove, , [AC_DEFINE(NO_MEMMOVE) AC_DEFINE(NO_STRING_H)])
+AC_CHECK_FUNC(memmove, , [
+    AC_DEFINE(NO_MEMMOVE, 1, [Do we have memmove()?])
+    AC_DEFINE(NO_STRING_H, 1, [May we include <string.h>?]) ])
 
 #--------------------------------------------------------------------
 #	On some systems strstr is broken: it returns a pointer even
@@ -311,7 +314,7 @@
     ], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])
 AC_MSG_RESULT($ac_cv_type_socklen_t)
 if test $ac_cv_type_socklen_t = no; then
-    AC_DEFINE(socklen_t, unsigned)
+    AC_DEFINE(socklen_t, unsigned, [What is the type of socklen_t?])
 fi
 
 #--------------------------------------------------------------------
@@ -321,7 +324,7 @@
 #	provided.  This version only works with V7-style directories.
 #--------------------------------------------------------------------
 
-AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H)])
+AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H, 1, [May we include <dirent2.h>?])])
 
 #--------------------------------------------------------------------
 #	The check below checks whether <sys/wait.h> defines the type
@@ -341,7 +344,7 @@
     ], tcl_cv_union_wait=yes, tcl_cv_union_wait=no))
 AC_MSG_RESULT($tcl_cv_union_wait)
 if test $tcl_cv_union_wait = no; then
-    AC_DEFINE(NO_UNION_WAIT)
+    AC_DEFINE(NO_UNION_WAIT, 1, [Do we have a usable 'union wait'?])
 fi
 
 #--------------------------------------------------------------------
@@ -374,8 +377,8 @@
 #--------------------------------------------------------------------
 
 AC_CHECK_FUNC(BSDgettimeofday,
-    [AC_DEFINE(HAVE_BSDGETTIMEOFDAY)], [
-    AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD)])
+    [AC_DEFINE(HAVE_BSDGETTIMEOFDAY, 1, [Do we have BSDgettimeofday()?])], [
+    AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD, 1, [Do we have gettimeofday()?])])
 ])
 AC_MSG_CHECKING([for gettimeofday declaration])
 AC_CACHE_VAL(tcl_cv_grep_gettimeofday,
@@ -383,7 +386,7 @@
 	tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing))
 AC_MSG_RESULT($tcl_cv_grep_gettimeofday)
 if test $tcl_cv_grep_gettimeofday = missing ; then
-    AC_DEFINE(GETTOD_NOT_DECLARED)
+    AC_DEFINE(GETTOD_NOT_DECLARED, 1, [Is gettimeofday() actually declared in <sys/time.h>?])
 fi
 
 #--------------------------------------------------------------------
@@ -401,7 +404,7 @@
 	], tcl_cv_char_signed=yes, tcl_cv_char_signed=no))
 AC_MSG_RESULT($tcl_cv_char_signed)
 if test $tcl_cv_char_signed = yes; then
-    AC_DEFINE(HAVE_SIGNED_CHAR)
+    AC_DEFINE(HAVE_SIGNED_CHAR, 1, [Are characters signed?])
 fi
 
 #--------------------------------------------------------------------
@@ -435,7 +438,8 @@
 )
 AC_MSG_RESULT($tcl_cv_putenv_copy)
 if test $tcl_cv_putenv_copy = yes; then
-    AC_DEFINE(HAVE_PUTENV_THAT_COPIES)
+    AC_DEFINE(HAVE_PUTENV_THAT_COPIES, 1,
+	[Does putenv() copy strings or incorporate them by reference?])
 fi
 
 #--------------------------------------------------------------------
@@ -561,6 +565,15 @@
 eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
 
 #------------------------------------------------------------------------
+
+AC_ARG_ENABLE(dll-unloading,
+    [  --enable-dll-unloading  turn on the 'unload' command (default: on)],
+    [tcl_ok=$enableval], [tcl_ok=yes])
+if test $tcl_ok = yes; then
+    AC_DEFINE(TCL_UNLOAD_DLLS, 1, [Do we allow unloading of shared libraries?])
+fi
+
+#------------------------------------------------------------------------
 # tclConfig.sh refers to this by a different name
 #------------------------------------------------------------------------
 
@@ -584,6 +597,8 @@
 
 AC_SUBST(TCL_SRC_DIR)
 AC_SUBST(TCL_DBGX)
+AC_DEFINE_UNQUOTED(TCL_DBGX,${TCL_DBGX},
+    [What extra letters do we insert for debugging binary code?])
 AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)
 AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)
 AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)
Index: unix/tcl.m4
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tcl.m4,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- unix/tcl.m4	12 Nov 2004 14:18:29 -0000	1.122
+++ unix/tcl.m4	12 Nov 2004 16:44:59 -0000	1.123
@@ -346,7 +346,7 @@
     else
 	AC_MSG_RESULT([static])
 	SHARED_BUILD=0
-	AC_DEFINE(STATIC_BUILD)
+	AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?])
     fi
 ])
 
@@ -428,15 +428,17 @@
 	    AC_MSG_RESULT([yes])
 	fi
 	TCL_THREADS=1
-	AC_DEFINE(TCL_THREADS)
+	AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?])
 	# USE_THREAD_ALLOC tells us to try the special thread-based
 	# allocator that significantly reduces lock contention
-	AC_DEFINE(USE_THREAD_ALLOC)
+	AC_DEFINE(USE_THREAD_ALLOC, 1,
+	    [Do we want to use the threaded memory allocator?])
 	# USE_THREAD_STORAGE tells us to use the new generic thread 
 	# storage subsystem. 
-	AC_DEFINE(USE_THREAD_STORAGE)
-	AC_DEFINE(_REENTRANT)
-	AC_DEFINE(_THREAD_SAFE)
+	AC_DEFINE(USE_THREAD_STORAGE, 1,
+	    [Use the generic thread storage subsystem?])
+	AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+	AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
 	AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
 	if test "$tcl_ok" = "no"; then
 	    # Check a little harder for __pthread_mutex_init in the same
@@ -478,7 +480,8 @@
 	AC_CHECK_FUNCS(pthread_attr_setstacksize)
 	AC_CHECK_FUNC(pthread_attr_get_np,tcl_ok=yes,tcl_ok=no)
 	if test $tcl_ok = yes ; then
-	    AC_DEFINE(HAVE_PTHREAD_ATTR_GET_NP)
+	    AC_DEFINE(HAVE_PTHREAD_ATTR_GET_NP, 1,
+		[Do we want a BSD-like thread-attribute interface?])
 	    AC_MSG_CHECKING([for pthread_attr_get_np declaration])
 	    AC_CACHE_VAL(tcl_cv_grep_pthread_attr_get_np,
 		AC_EGREP_HEADER(pthread_attr_get_np, pthread.h,
@@ -486,12 +489,14 @@
 		    tcl_cv_grep_pthread_attr_get_np=missing))
 	    AC_MSG_RESULT($tcl_cv_grep_pthread_attr_get_np)
 	    if test $tcl_cv_grep_pthread_attr_get_np = missing ; then
-		AC_DEFINE(ATTRGETNP_NOT_DECLARED)
+		AC_DEFINE(ATTRGETNP_NOT_DECLARED, 1,
+		    [Is pthread_attr_get_np() declared in <pthread.h>?])
 	    fi
 	else
 	    AC_CHECK_FUNC(pthread_getattr_np,tcl_ok=yes,tcl_ok=no)
 	    if test $tcl_ok = yes ; then
-		AC_DEFINE(HAVE_PTHREAD_GETATTR_NP)
+		AC_DEFINE(HAVE_PTHREAD_GETATTR_NP, 1,
+		    [Do we want a Linux-like thread-attribute interface?])
 		AC_MSG_CHECKING([for pthread_getattr_np declaration])
 		AC_CACHE_VAL(tcl_cv_grep_pthread_getattr_np,
 		    AC_EGREP_HEADER(pthread_getattr_np, pthread.h,
@@ -499,7 +504,8 @@
 			tcl_cv_grep_pthread_getattr_np=missing))
 		AC_MSG_RESULT($tcl_cv_grep_pthread_getattr_np)
 		if test $tcl_cv_grep_pthread_getattr_np = missing ; then
-		    AC_DEFINE(GETATTRNP_NOT_DECLARED)
+		    AC_DEFINE(GETATTRNP_NOT_DECLARED, 1,
+			[Is pthread_getattr_np declared in <pthread.h>?])
 		fi
 	    fi
 	fi
@@ -551,7 +557,7 @@
 	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
 	DBGX=""
 	AC_MSG_RESULT([no])
-	AC_DEFINE(TCL_CFG_OPTIMIZED)
+	AC_DEFINE(TCL_CFG_OPTIMIZED, 1, [Is this an optimized build?])
     else
 	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
 	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
@@ -562,15 +568,15 @@
     fi
     AC_SUBST(CFLAGS_DEFAULT)
     AC_SUBST(LDFLAGS_DEFAULT)
-    AC_DEFINE(TCL_CFG_DEBUG)
+    AC_DEFINE(TCL_CFG_DEBUG, 1, [Is debugging enabled?])
 
     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_MEM_DEBUG)
+	AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
     fi
 
     if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
-	AC_DEFINE(TCL_COMPILE_DEBUG)
-	AC_DEFINE(TCL_COMPILE_STATS)
+	AC_DEFINE(TCL_COMPILE_DEBUG, 1, [Is bytecode debugging enabled?])
+	AC_DEFINE(TCL_COMPILE_STATS, 1, [Are bytecode statistics enabled?])
     fi
 
     if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
@@ -621,7 +627,7 @@
 	    langinfo_ok="no (could not compile with nl_langinfo)";
 	fi
 	if test "$langinfo_ok" = "yes"; then
-	    AC_DEFINE(HAVE_LANGINFO)
+	    AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
 	fi
     fi
     AC_MSG_RESULT([$langinfo_ok])
@@ -970,7 +976,7 @@
 	    AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
 	    if test $libbsd = yes; then
 	    	MATH_LIBS="$MATH_LIBS -lbsd"
-	    	AC_DEFINE(USE_DELTA_FOR_TZ)
+	    	AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?])
 	    fi
 	    ;;
 	BeOS*)
@@ -1021,8 +1027,8 @@
 	    ;;
 	HP-UX-*.11.*)
 	    # Use updated header definitions where possible
-	    AC_DEFINE(_XOPEN_SOURCE)          # Use the XOPEN network library
-	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED) # Use the XOPEN network library
+	    AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
+	    AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
 	    LIBS="$LIBS -lxnet"               # Use the XOPEN network library
 
 	    SHLIB_SUFFIX=".sl"
@@ -1199,7 +1205,7 @@
 	    fi
 
 	    # XIM peeking works under XFree86.
-	    AC_DEFINE(PEEK_XCLOSEIM)
+	    AC_DEFINE(PEEK_XCLOSEIM, 1, [May we use XIM peeking safely?])
 
 	    ;;
 	GNU*)
@@ -1352,10 +1358,11 @@
 	    LD_SEARCH_FLAGS=""
 	    CFLAGS_OPTIMIZE="-Os"
 	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-	    AC_DEFINE(MAC_OSX_TCL)
-	    AC_DEFINE(HAVE_CFBUNDLE)
-	    AC_DEFINE(USE_VFORK)
-	    AC_DEFINE(TCL_DEFAULT_ENCODING,"utf-8")
+	    AC_DEFINE(MAC_OSX_TCL, 1, ["Is this a Mac I see before me?"])
+	    AC_DEFINE(HAVE_CFBUNDLE, 1, [Do we have access to Mac bundles?])
+	    AC_DEFINE(USE_VFORK, 1, [Should we use vfork() instead of fork()?])
+	    AC_DEFINE(TCL_DEFAULT_ENCODING,"utf-8",
+		[Are we to override what our default encoding is?])
 	    LIBS="$LIBS -framework CoreFoundation"
 	    ;;
 	NEXTSTEP-*)
@@ -1369,8 +1376,9 @@
 	    LD_SEARCH_FLAGS=""
 	    ;;
 	OS/390-*)
-	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
-	    AC_DEFINE(_OE_SOCKETS)  # needed in sys/socket.h
+	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
+	    AC_DEFINE(_OE_SOCKETS, 1,	# needed in sys/socket.h
+		[Should OS/390 do the right thing with sockets?])
 	    ;;      
 	OSF1-1.0|OSF1-1.1|OSF1-1.2)
 	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
@@ -1509,8 +1517,9 @@
 	    # Note: If _REENTRANT isn't defined, then Solaris
 	    # won't define thread-safe library routines.
 
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+	    AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+		[Do we really want to follow the standard? Yes we do!])
 
 	    SHLIB_CFLAGS="-KPIC"
 
@@ -1536,8 +1545,9 @@
 	    # Note: If _REENTRANT isn't defined, then Solaris
 	    # won't define thread-safe library routines.
 
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+	    AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+		[Do we really want to follow the standard? Yes we do!])
 
 	    SHLIB_CFLAGS="-KPIC"
     
@@ -1614,11 +1624,11 @@
     esac
 
     if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
-    AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
+	AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
     fi
 
     if test "$do64bit" = "yes" -a "$do64bit_ok" = "yes" ; then
-	AC_DEFINE(TCL_CFG_DO64BIT)
+	AC_DEFINE(TCL_CFG_DO64BIT, 1, [Is this a 64-bit build?])
     fi
 
     # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
@@ -1656,7 +1666,8 @@
     ], tcl_ok=usable, tcl_ok=unusable)
 	AC_MSG_RESULT($tcl_ok)
 	if test $tcl_ok = usable; then
-	    AC_DEFINE(USE_SYS_EXEC_H)
+	    AC_DEFINE(USE_SYS_EXEC_H, 1,
+		[Should we use <sys/exec.h> when doing dynamic loading?])
 	else
 	    AC_MSG_CHECKING(a.out.h)
 	    AC_TRY_COMPILE([#include <a.out.h>],[
@@ -1673,7 +1684,8 @@
 	    ], tcl_ok=usable, tcl_ok=unusable)
 	    AC_MSG_RESULT($tcl_ok)
 	    if test $tcl_ok = usable; then
-		AC_DEFINE(USE_A_OUT_H)
+		AC_DEFINE(USE_A_OUT_H, 1,
+		    [Should we use <a.out.h> when doing dynamic loading?])
 	    else
 		AC_MSG_CHECKING(sys/exec_aout.h)
 		AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
@@ -1690,7 +1702,8 @@
 		], tcl_ok=usable, tcl_ok=unusable)
 		AC_MSG_RESULT($tcl_ok)
 		if test $tcl_ok = usable; then
-		    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
+		    AC_DEFINE(USE_SYS_EXEC_AOUT_H, 1,
+			[Should we use <sys/exec_aout.h> when doing dynamic loading?])
 		else
 		    DL_OBJS=""
 		fi
@@ -1834,6 +1847,8 @@
     AC_SUBST(SHLIB_LD_LIBS)
     AC_SUBST(SHLIB_CFLAGS)
     AC_SUBST(SHLIB_SUFFIX)
+    AC_DEFINE_UNQUOTED(TCL_SHLIB_EXT,"${SHLIB_SUFFIX}",
+	[What is the default extension for shared libraries?])
 
     AC_SUBST(MAKE_LIB)
     AC_SUBST(MAKE_STUB_LIB)
@@ -1955,9 +1970,9 @@
 }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
     fi])
     case $tcl_cv_api_serial in
-	termios) AC_DEFINE(USE_TERMIOS);;
-	termio)  AC_DEFINE(USE_TERMIO);;
-	sgtty)   AC_DEFINE(USE_SGTTY);;
+	termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);;
+	termio)  AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
+	sgtty)   AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
     esac
     AC_MSG_RESULT($tcl_cv_api_serial)
 ])
@@ -2016,21 +2031,22 @@
 ], tcl_ok=yes, tcl_ok=no)
 
     if test $tcl_ok = no; then
-	AC_DEFINE(NO_DIRENT_H)
+	AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
     fi
 
     AC_MSG_RESULT($tcl_ok)
-    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
-    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
-    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
+    AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
+    AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
+    AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
     AC_CHECK_HEADER(limits.h,
-	[AC_DEFINE(HAVE_LIMITS_H)], [AC_DEFINE(NO_LIMITS_H)])
+	[AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
+	[AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])])
     AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
     AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
     AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
     AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
     if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STDLIB_H)
+	AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
     fi
     AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
     AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
@@ -2040,11 +2056,11 @@
     # set and why.
 
     if test $tcl_ok = 0; then
-	AC_DEFINE(NO_STRING_H)
+	AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?])
     fi
 
-    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
-    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
+    AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
+    AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])])
 
     # OS/390 lacks sys/param.h (and doesn't need it, by chance).
     AC_HAVE_HEADERS(sys/param.h)
@@ -2185,15 +2201,15 @@
 	# code (JO, 5/31/97).
 
 	OSF*)
-	    AC_DEFINE(USE_FIONBIO)
+	    AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
 	    AC_MSG_RESULT(FIONBIO)
 	    ;;
 	SunOS-4*)
-	    AC_DEFINE(USE_FIONBIO)
+	    AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
 	    AC_MSG_RESULT(FIONBIO)
 	    ;;
 	ULTRIX-4.*)
-	    AC_DEFINE(USE_FIONBIO)
+	    AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
 	    AC_MSG_RESULT(FIONBIO)
 	    ;;
 	*)
@@ -2234,7 +2250,7 @@
 	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
     AC_MSG_RESULT($tcl_cv_member_tm_tzadj)
     if test $tcl_cv_member_tm_tzadj = yes ; then
-	AC_DEFINE(HAVE_TM_TZADJ)
+	AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
     fi
 
     AC_MSG_CHECKING([tm_gmtoff in struct tm])
@@ -2243,7 +2259,7 @@
 	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
     AC_MSG_RESULT($tcl_cv_member_tm_gmtoff)
     if test $tcl_cv_member_tm_gmtoff = yes ; then
-	AC_DEFINE(HAVE_TM_GMTOFF)
+	AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
     fi
 
     #
@@ -2259,7 +2275,7 @@
 	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
     AC_MSG_RESULT($tcl_cv_timezone_long)
     if test $tcl_cv_timezone_long = yes ; then
-	AC_DEFINE(HAVE_TIMEZONE_VAR)
+	AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
     else
 	#
 	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
@@ -2273,7 +2289,7 @@
 		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
 	AC_MSG_RESULT($tcl_cv_timezone_time)
 	if test $tcl_cv_timezone_time = yes ; then
-	    AC_DEFINE(HAVE_TIMEZONE_VAR)
+	    AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
 	fi
     fi
 ])
@@ -2329,7 +2345,7 @@
 	    AC_MSG_RESULT(buggy)
 	    AC_LIBOBJ([fixstrtod])
 	    USE_COMPAT=1
-	    AC_DEFINE(strtod, fixstrtod)
+	    AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
 	fi
     fi
 ])
@@ -2372,7 +2388,8 @@
     #--------------------------------------------------------------------
 
     AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
-    AC_CHECK_HEADER(net/errno.h, [AC_DEFINE(HAVE_NET_ERRNO_H)])
+    AC_CHECK_HEADER(net/errno.h, [
+	AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have <net/errno.h>?])])
 
     #--------------------------------------------------------------------
     #	Check for the existence of the -lsocket and -lnsl libraries.
@@ -2432,7 +2449,7 @@
 		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
 		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
     if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
-	AC_DEFINE($1)
+	AC_DEFINE($1, 1, [Add the ]$1[ flag when building])
 	tcl_flags="$tcl_flags $1"
     fi])
 
@@ -2482,10 +2499,11 @@
             case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; 
         }],tcl_cv_type_64bit=${tcl_type_64bit})])
     if test "${tcl_cv_type_64bit}" = none ; then
-	AC_DEFINE(TCL_WIDE_INT_IS_LONG)
+	AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?])
 	AC_MSG_RESULT(using long)
     else
-	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
+	AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
+	    [What type should be used to define wide integers?])
 	AC_MSG_RESULT(${tcl_cv_type_64bit})
 
 	# Now check for auxiliary declarations
@@ -2495,7 +2513,7 @@
 #include <sys/dirent.h>],[struct dirent64 p;],
 		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
 	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_DIRENT64)
+	    AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
 	fi
 	AC_MSG_RESULT(${tcl_cv_struct_dirent64})
 
@@ -2505,7 +2523,7 @@
 ],
 		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
 	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-	    AC_DEFINE(HAVE_STRUCT_STAT64)
+	    AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?])
 	fi
 	AC_MSG_RESULT(${tcl_cv_struct_stat64})
 
@@ -2515,7 +2533,7 @@
 ],
 		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
 	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
-	    AC_DEFINE(HAVE_TYPE_OFF64_T)
+	    AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
 	fi
 	AC_MSG_RESULT(${tcl_cv_type_off64_t})
     fi])
@@ -2541,7 +2559,13 @@
     AC_ARG_WITH(encoding, [  --with-encoding              encoding for configuration values], with_tcencoding=${withval})
 
     if test x"${with_tcencoding}" != x ; then
-	AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}")
+	AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}",
+	    [What encoding should be used for embedded configuration info?])
     else
-	AC_DEFINE(TCL_CFGVAL_ENCODING,"iso8859-1")
+	AC_DEFINE(TCL_CFGVAL_ENCODING,"iso8859-1",
+	    [What encoding should be used for embedded configuration info?])
     fi])
+
+# Local Variables:
+# mode: autoconf
+# End:
Index: unix/tclAppInit.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclAppInit.c,v
retrieving revision 1.12
retrieving revision 1.15
diff -u -r1.12 -r1.15
--- unix/tclAppInit.c	28 Oct 2004 04:52:53 -0000	1.12
+++ unix/tclAppInit.c	12 Nov 2004 22:52:30 -0000	1.15
@@ -11,7 +11,7 @@
  * See the file "license.terms" for information on usage and redistribution
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  *
- * RCS: @(#) $Id: tclAppInit.c,v 1.12 2004/10/28 04:52:53 davygrvy Exp $
+ * RCS: @(#) $Id: tclAppInit.c,v 1.15 2004/11/12 22:52:30 dgp Exp $
  */
 
 #include "tcl.h"
Index: unix/tclConfig.h.in
===================================================================
RCS file: unix/tclConfig.h.in
diff -N unix/tclConfig.h.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ unix/tclConfig.h.in	12 Nov 2004 18:07:55 -0000	1.1
@@ -0,0 +1,388 @@
+/* tclConfig.h.in.  Generated from configure.in by autoheader.  */
+
+/* Is pthread_attr_get_np() declared in <pthread.h>? */
+#undef ATTRGETNP_NOT_DECLARED
+
+/* Is pthread_getattr_np declared in <pthread.h>? */
+#undef GETATTRNP_NOT_DECLARED
+
+/* Is gettimeofday() actually declared in <sys/time.h>? */
+#undef GETTOD_NOT_DECLARED
+
+/* Do we have BSDgettimeofday()? */
+#undef HAVE_BSDGETTIMEOFDAY
+
+/* Do we have access to Mac bundles? */
+#undef HAVE_CFBUNDLE
+
+/* Define to 1 if you have the `chflags' function. */
+#undef HAVE_CHFLAGS
+
+/* Define to 1 if you have the `getattrlist' function. */
+#undef HAVE_GETATTRLIST
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#undef HAVE_GMTIME_R
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Do we have nl_langinfo()? */
+#undef HAVE_LANGINFO
+
+/* Do we have <limits.h>? */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the `localtime_r' function. */
+#undef HAVE_LOCALTIME_R
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mktime' function. */
+#undef HAVE_MKTIME
+
+/* Do we have <net/errno.h>? */
+#undef HAVE_NET_ERRNO_H
+
+/* Define to 1 if you have the `opendir' function. */
+#undef HAVE_OPENDIR
+
+/* Do we want a BSD-like thread-attribute interface? */
+#undef HAVE_PTHREAD_ATTR_GET_NP
+
+/* Define to 1 if you have the `pthread_attr_setstacksize' function. */
+#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
+
+/* Do we want a Linux-like thread-attribute interface? */
+#undef HAVE_PTHREAD_GETATTR_NP
+
+/* Does putenv() copy strings or incorporate them by reference? */
+#undef HAVE_PUTENV_THAT_COPIES
+
+/* Define to 1 if you have the `readdir_r' function. */
+#undef HAVE_READDIR_R
+
+/* Are characters signed? */
+#undef HAVE_SIGNED_CHAR
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
+
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
+/* Is 'struct dirent64' in <sys/types.h>? */
+#undef HAVE_STRUCT_DIRENT64
+
+/* Is 'struct stat64' in <sys/stat.h>? */
+#undef HAVE_STRUCT_STAT64
+
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLKSIZE
+
+/* Define to 1 if `tm_zone' is member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_ZONE
+
+/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use
+   `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */
+#undef HAVE_ST_BLKSIZE
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+#undef HAVE_SYS_FILIO_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/modem.h> header file. */
+#undef HAVE_SYS_MODEM_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* May we include <sys/select.h>? */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Should we use the global timezone variable? */
+#undef HAVE_TIMEZONE_VAR
+
+/* Define to 1 if you have the `tmpnam' function. */
+#undef HAVE_TMPNAM
+
+/* Should we use the tm_gmtoff field of struct tm? */
+#undef HAVE_TM_GMTOFF
+
+/* Should we use the tm_tzadj field of struct tm? */
+#undef HAVE_TM_TZADJ
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#undef HAVE_TM_ZONE
+
+/* Is off64_t in <sys/types.h>? */
+#undef HAVE_TYPE_OFF64_T
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+   `tzname'. */
+#undef HAVE_TZNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* "Is this a Mac I see before me?" */
+#undef MAC_OSX_TCL
+
+/* Do we have <dirent.h>? */
+#undef NO_DIRENT_H
+
+/* Do we have <dlfcn.h>? */
+#undef NO_DLFCN_H
+
+/* Do we have <errno.h>? */
+#undef NO_ERRNO_H
+
+/* Do we have fd_set? */
+#undef NO_FD_SET
+
+/* Do we have <float.h>? */
+#undef NO_FLOAT_H
+
+/* Do we have fstatfs()? */
+#undef NO_FSTATFS
+
+/* Do we have gettimeofday()? */
+#undef NO_GETTOD
+
+/* Do we have getwd() */
+#undef NO_GETWD
+
+/* Do we have <limits.h>? */
+#undef NO_LIMITS_H
+
+/* Do we have memmove()? */
+#undef NO_MEMMOVE
+
+/* Do we have realpath() */
+#undef NO_REALPATH
+
+/* Do we have <stdlib.h>? */
+#undef NO_STDLIB_H
+
+/* Do we have strerror() */
+#undef NO_STRERROR
+
+/* May we include <string.h>? */
+#undef NO_STRING_H
+
+/* Do we have <sys/wait.h>? */
+#undef NO_SYS_WAIT_H
+
+/* Do we have uname() */
+#undef NO_UNAME
+
+/* Do we have a usable 'union wait'? */
+#undef NO_UNION_WAIT
+
+/* Do we have <values.h>? */
+#undef NO_VALUES_H
+
+/* Do we have wait3() */
+#undef NO_WAIT3
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* May we use XIM peeking safely? */
+#undef PEEK_XCLOSEIM
+
+/* Is this a static build? */
+#undef STATIC_BUILD
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* What encoding should be used for embedded configuration info? */
+#undef TCL_CFGVAL_ENCODING
+
+/* Is debugging enabled? */
+#undef TCL_CFG_DEBUG
+
+/* Is this a 64-bit build? */
+#undef TCL_CFG_DO64BIT
+
+/* Is this an optimized build? */
+#undef TCL_CFG_OPTIMIZED
+
+/* Is bytecode debugging enabled? */
+#undef TCL_COMPILE_DEBUG
+
+/* Are bytecode statistics enabled? */
+#undef TCL_COMPILE_STATS
+
+/* What extra letters do we insert for debugging binary code? */
+#undef TCL_DBGX
+
+/* Are we to override what our default encoding is? */
+#undef TCL_DEFAULT_ENCODING
+
+/* Is memory debugging enabled? */
+#undef TCL_MEM_DEBUG
+
+/* What is the default extension for shared libraries? */
+#undef TCL_SHLIB_EXT
+
+/* Are we building with threads enabled? */
+#undef TCL_THREADS
+
+/* Do we allow unloading of shared libraries? */
+#undef TCL_UNLOAD_DLLS
+
+/* Are wide integers to be implemented with C 'long's? */
+#undef TCL_WIDE_INT_IS_LONG
+
+/* What type should be used to define wide integers? */
+#undef TCL_WIDE_INT_TYPE
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Is getcwd Posix-compliant? */
+#undef USEGETWD
+
+/* Should we use <a.out.h> when doing dynamic loading? */
+#undef USE_A_OUT_H
+
+/* Do we need a special AIX hack for timezones? */
+#undef USE_DELTA_FOR_TZ
+
+/* May we include <dirent2.h>? */
+#undef USE_DIRENT2_H
+
+/* Should we use FIONBIO? */
+#undef USE_FIONBIO
+
+/* Use the sgtty API for serial lines */
+#undef USE_SGTTY
+
+/* Should we use <sys/exec_aout.h> when doing dynamic loading? */
+#undef USE_SYS_EXEC_AOUT_H
+
+/* Should we use <sys/exec.h> when doing dynamic loading? */
+#undef USE_SYS_EXEC_H
+
+/* Use the termio API for serial lines */
+#undef USE_TERMIO
+
+/* Use the termios API for serial lines */
+#undef USE_TERMIOS
+
+/* Do we want to use the threaded memory allocator? */
+#undef USE_THREAD_ALLOC
+
+/* Use the generic thread storage subsystem? */
+#undef USE_THREAD_STORAGE
+
+/* Should we use vfork() instead of fork()? */
+#undef USE_VFORK
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Add the _ISOC99_SOURCE flag when building */
+#undef _ISOC99_SOURCE
+
+/* Add the _LARGEFILE64_SOURCE flag when building */
+#undef _LARGEFILE64_SOURCE
+
+/* # needed in sys/socket.h Should OS/390 do the right thing with sockets? */
+#undef _OE_SOCKETS
+
+/* Do we really want to follow the standard? Yes we do! */
+#undef _POSIX_PTHREAD_SEMANTICS
+
+/* Do we want the reentrant OS API? */
+#undef _REENTRANT
+
+/* Do we want the thread-safe OS API? */
+#undef _THREAD_SAFE
+
+/* Do we want to use the XOPEN network library? */
+#undef _XOPEN_SOURCE
+
+/* Do we want to use the XOPEN network library? */
+#undef _XOPEN_SOURCE_EXTENDED
+
+/* Define to 1 if type `char' is unsigned and you are not using gcc.  */
+#ifndef __CHAR_UNSIGNED__
+# undef __CHAR_UNSIGNED__
+#endif
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef mode_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
+
+/* What is the type of socklen_t? */
+#undef socklen_t
+
+/* Do we want to use the strtod() in compat? */
+#undef strtod
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
Index: unix/tclUnixInit.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixInit.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- unix/tclUnixInit.c	22 Sep 2004 15:51:53 -0000	1.49
+++ unix/tclUnixInit.c	12 Nov 2004 19:08:10 -0000	1.50
@@ -7,12 +7,9 @@
  * Copyright (c) 1999 by Scriptics Corporation.
  * All rights reserved.
  *
- * RCS: @(#) $Id: tclUnixInit.c,v 1.49 2004/09/22 15:51:53 msofer Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.50 2004/11/12 19:08:10 das Exp $
  */
 
-#if defined(HAVE_CFBUNDLE)
-#include <CoreFoundation/CoreFoundation.h>
-#endif
 #include "tclInt.h"
 #include <stddef.h>
 #include <locale.h>
@@ -29,6 +26,9 @@
 #	include <dlfcn.h>
 #   endif
 #endif
+#ifdef HAVE_CFBUNDLE
+#include <CoreFoundation/CoreFoundation.h>
+#endif
 
 /*
  * Define this if you want to revert to the old behavior of
Index: unix/dltest/Makefile.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/dltest/Makefile.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- unix/dltest/Makefile.in	23 Sep 2004 20:02:50 -0000	1.15
+++ unix/dltest/Makefile.in	12 Nov 2004 20:27:29 -0000	1.16
@@ -1,7 +1,7 @@
 # This Makefile is used to create several test cases for Tcl's load
 # command.  It also illustrates how to take advantage of configuration
 # exported by Tcl to set up Makefiles for shared libraries.
-# RCS: @(#) $Id: Makefile.in,v 1.15 2004/09/23 20:02:50 mdejong Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.16 2004/11/12 20:27:29 das Exp $
 
 TCL_DBGX =		@TCL_DBGX@
 CC = @CC@
@@ -12,13 +12,14 @@
 SHLIB_LD_LIBS =		@SHLIB_LD_LIBS@
 SHLIB_SUFFIX =		@SHLIB_SUFFIX@
 SRC_DIR =		@srcdir@
+BUILD_DIR =		@builddir@
 TCL_VERSION=		@TCL_VERSION@
 
 CFLAGS_DEBUG		= @CFLAGS_DEBUG@
 CFLAGS_OPTIMIZE		= @CFLAGS_OPTIMIZE@
 
 CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@
-CC_SWITCHES = $(CFLAGS) -I${SRC_DIR}/../../generic -DTCL_MEM_DEBUG \
+CC_SWITCHES = $(CFLAGS) -I${SRC_DIR}/../../generic -I${BUILD_DIR}/.. -DTCL_MEM_DEBUG \
 	${SHLIB_CFLAGS} -DUSE_TCL_STUBS ${AC_FLAGS}
 
 all: pkga${SHLIB_SUFFIX} pkgb${SHLIB_SUFFIX} pkgc${SHLIB_SUFFIX} pkgd${SHLIB_SUFFIX} pkge${SHLIB_SUFFIX} pkgua${SHLIB_SUFFIX}