summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-11-12 16:44:54 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-11-12 16:44:54 (GMT)
commitd2ccdc3e5003ca2340946dd13dec6a4783f716f5 (patch)
tree5c1d1a11287554dfa45381eb9bd5bae42d7e2cc4 /unix
parent51f2943afd57e033279f3ed72c4b15f31427c412 (diff)
downloadtcl-d2ccdc3e5003ca2340946dd13dec6a4783f716f5.zip
tcl-d2ccdc3e5003ca2340946dd13dec6a4783f716f5.tar.gz
tcl-d2ccdc3e5003ca2340946dd13dec6a4783f716f5.tar.bz2
Adapt Tcl so it uses a config.h header instead of stuffing all #defs on the
command line. Third parties using generic/tclInt.h, unix/tclAppInit.c or unix/tcl.m4 should be unaffected. Part of the general TIP#34 project.
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in26
-rw-r--r--unix/config.h.in388
-rwxr-xr-xunix/configure555
-rw-r--r--unix/configure.in53
-rw-r--r--unix/tcl.m4152
-rw-r--r--unix/tclAppInit.c9
6 files changed, 960 insertions, 223 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 578c4ee..643274e 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -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.149 2004/11/12 16:44:56 dkf Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -96,8 +96,7 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
#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 @@ UNIX_OBJS = tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o \
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 @@ STUB_LIB_FILE = ${TCL_STUB_LIB_FILE}
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 =
@@ -284,21 +275,18 @@ DDD = ddd
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}\"
+${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}\"
+${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${ENV_FLAGS}
LIBS = @TCL_LIBS@
DEPEND_SWITCHES = ${CFLAGS} -I${GENERIC_DIR} -I${SRC_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
diff --git a/unix/config.h.in b/unix/config.h.in
new file mode 100644
index 0000000..e12f57f
--- /dev/null
+++ b/unix/config.h.in
@@ -0,0 +1,388 @@
+/* config.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
diff --git a/unix/configure b/unix/configure
index cf5b117..a9276b2 100755
--- a/unix/configure
+++ b/unix/configure
@@ -852,6 +852,7 @@ Optional Features:
--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_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_config_headers="$ac_config_headers config.h"
+
TCL_VERSION=8.5
TCL_MAJOR_VERSION=8
@@ -2871,7 +2874,8 @@ rm -f conftest.err conftest.$ac_objext \
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 @@ fi
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 @@ fi
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 @@ fi
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 @@ echo "${ECHO_T}$ac_cv_header_limits_h" >&6
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 @@ fi
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 @@ rm -f conftest*
# 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 @@ fi
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 @@ fi
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 (threaded core)" >&6
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 @@ else
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 @@ fi
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 @@ else
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 @@ fi
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 @@ if test "${with_encoding+set}" = set; then
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 @@ echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
fi
if test $ac_cv_header_net_errno_h = yes; then
- cat >>confdefs.h <<\_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_NET_ERRNO_H 1
_ACEOF
@@ -6268,7 +6294,8 @@ echo "${ECHO_T}shared" >&6
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 @@ fi
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 @@ fi
;;
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
fi
# XIM peeking works under XFree86.
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define PEEK_XCLOSEIM 1
_ACEOF
@@ -7823,19 +7854,23 @@ rm -f conftest*
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 @@ _ACEOF
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 @@ _ACEOF
# 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 @@ _ACEOF
# 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 @@ echo "${ECHO_T}$found" >&6
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 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 @@ fi;
+cat >>confdefs.h <<_ACEOF
+#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}"
+_ACEOF
+
+
@@ -8548,7 +8597,8 @@ fi;
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 @@ echo "${ECHO_T}yes (standard debugging)" >&6
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 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _ISOC99_SOURCE 1
_ACEOF
@@ -8807,7 +8862,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _LARGEFILE64_SOURCE 1
_ACEOF
@@ -8927,14 +8983,16 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
_ACEOF
else
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USEGETWD 1
_ACEOF
@@ -9807,7 +9869,8 @@ echo "${ECHO_T}$ac_cv_func_strerror" >&6
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 @@ echo "${ECHO_T}$ac_cv_func_getwd" >&6
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 @@ echo "${ECHO_T}$ac_cv_func_wait3" >&6
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 @@ echo "${ECHO_T}$ac_cv_func_uname" >&6
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 @@ echo "${ECHO_T}$ac_cv_func_realpath" >&6
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
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 @@ fi
echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5
echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6
if test $tcl_cv_grep_fd_mask = present; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_SELECT_H 1
_ACEOF
@@ -10772,7 +10843,8 @@ _ACEOF
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 @@ fi
echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5
echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6
if test $tcl_cv_member_tm_tzadj = yes ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_TM_TZADJ 1
_ACEOF
@@ -11473,7 +11546,8 @@ fi
echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5
echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6
if test $tcl_cv_member_tm_gmtoff = yes ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_TM_GMTOFF 1
_ACEOF
@@ -11540,7 +11614,8 @@ fi
echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5
echo "${ECHO_T}$tcl_cv_timezone_long" >&6
if test $tcl_cv_timezone_long = yes ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_TIMEZONE_VAR 1
_ACEOF
@@ -11605,7 +11680,8 @@ fi
echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5
echo "${ECHO_T}$tcl_cv_timezone_time" >&6
if test $tcl_cv_timezone_time = yes ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_TIMEZONE_VAR 1
_ACEOF
@@ -11826,7 +11902,8 @@ echo "${ECHO_T}$ac_cv_func_fstatfs" >&6
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 @@ echo "${ECHO_T}$ac_cv_func_memmove" >&6
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 @@ echo "${ECHO_T}buggy" >&6
esac
USE_COMPAT=1
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define strtod fixstrtod
_ACEOF
@@ -12872,7 +12954,8 @@ fi
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 @@ echo "${ECHO_T}$ac_cv_func_opendir" >&6
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 @@ fi
echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5
echo "${ECHO_T}$tcl_cv_union_wait" >&6
if test $tcl_cv_union_wait = no; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define NO_UNION_WAIT 1
_ACEOF
@@ -13420,7 +13505,8 @@ fi
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 @@ echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
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 @@ fi
echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5
echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6
if test $tcl_cv_grep_gettimeofday = missing ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define GETTOD_NOT_DECLARED 1
_ACEOF
@@ -13688,7 +13776,8 @@ fi
echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5
echo "${ECHO_T}$tcl_cv_char_signed" >&6
if test $tcl_cv_char_signed = yes; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_SIGNED_CHAR 1
_ACEOF
@@ -13760,7 +13849,8 @@ fi
echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5
echo "${ECHO_T}$tcl_cv_putenv_copy" >&6
if test $tcl_cv_putenv_copy = yes; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_PUTENV_THAT_COPIES 1
_ACEOF
@@ -13980,7 +14070,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
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 @@ echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&
# code (JO, 5/31/97).
OSF*)
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_FIONBIO 1
_ACEOF
@@ -14547,7 +14639,8 @@ _ACEOF
echo "${ECHO_T}FIONBIO" >&6
;;
SunOS-4*)
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_FIONBIO 1
_ACEOF
@@ -14555,7 +14648,8 @@ _ACEOF
echo "${ECHO_T}FIONBIO" >&6
;;
ULTRIX-4.*)
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_FIONBIO 1
_ACEOF
@@ -14697,6 +14791,23 @@ TCL_STUB_LIB_PATH="${libdir}/${TCL_STUB_LIB_FILE}"
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 @@ TCL_SHARED_BUILD=${SHARED_BUILD}
+cat >>confdefs.h <<_ACEOF
+#define TCL_DBGX ${TCL_DBGX}
+_ACEOF
+
+
@@ -14816,38 +14932,7 @@ s/^[^=]*=[ ]*$//;
}'
fi
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
+DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
@@ -15181,10 +15266,15 @@ Usage: $0 [OPTIONS] [FILE]...
--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 <bug-autoconf@gnu.org>."
_ACEOF
@@ -15295,6 +15385,7 @@ do
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile" ;;
"tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.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 @@ done
# 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 @@ s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
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
diff --git a/unix/configure.in b/unix/configure.in
index 6929bb6..fe8b3a8 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,10 +3,11 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.115 2004/07/16 23:31:37 hobbs Exp $
+# RCS: @(#) $Id: configure.in,v 1.116 2004/11/12 16:44:58 dkf Exp $
AC_INIT(../generic/tcl.h)
AC_PREREQ(2.57)
+AC_CONFIG_HEADERS(config.h)
TCL_VERSION=8.5
TCL_MAJOR_VERSION=8
@@ -129,18 +130,18 @@ AC_C_BIGENDIAN
#--------------------------------------------------------------------
# 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 @@ if test $tcl_cv_type_fd_set = no; then
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 @@ SC_TIME_HANDLER
# 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 @@ AC_FUNC_MEMCMP
# 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 @@ changequote([,]),[
], 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 @@ fi
# 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 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED
], 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 @@ fi
#--------------------------------------------------------------------
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 @@ AC_CACHE_VAL(tcl_cv_grep_gettimeofday,
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 @@ AC_CACHE_VAL(tcl_cv_char_signed,
], 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_CACHE_VAL(tcl_cv_putenv_copy,
)
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 @@ TCL_STUB_LIB_PATH="${libdir}/${TCL_STUB_LIB_FILE}"
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_BUILD_STUB_LIB_PATH)
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)
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 55175ad..2d8db2d 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -346,7 +346,7 @@ AC_DEFUN(SC_ENABLE_SHARED, [
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_DEFUN(SC_ENABLE_THREADS, [
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_DEFUN(SC_ENABLE_THREADS, [
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 @@ AC_DEFUN(SC_ENABLE_THREADS, [
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 @@ AC_DEFUN(SC_ENABLE_THREADS, [
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 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
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 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
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 @@ AC_DEFUN(SC_ENABLE_LANGINFO, [
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 @@ dnl AC_CHECK_TOOL(AR, ar)
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 @@ dnl AC_CHECK_TOOL(AR, ar)
;;
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 @@ dnl AC_CHECK_TOOL(AR, ar)
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 @@ dnl AC_CHECK_TOOL(AR, ar)
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 @@ dnl AC_CHECK_TOOL(AR, ar)
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 @@ dnl AC_CHECK_TOOL(AR, ar)
# 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 @@ dnl AC_CHECK_TOOL(AR, ar)
# 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 @@ dnl AC_CHECK_TOOL(AR, ar)
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 @@ dnl AC_CHECK_TOOL(AR, ar)
], 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 @@ dnl AC_CHECK_TOOL(AR, ar)
], 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 @@ dnl AC_CHECK_TOOL(AR, ar)
], 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 @@ dnl esac
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 @@ int main() {
}], 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 @@ closedir(d);
], 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 @@ closedir(d);
# 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 @@ AC_DEFUN(SC_BLOCKING_STYLE, [
# 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 @@ AC_DEFUN(SC_TIME_HANDLER, [
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 @@ AC_DEFUN(SC_TIME_HANDLER, [
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 @@ AC_DEFUN(SC_TIME_HANDLER, [
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 @@ AC_DEFUN(SC_TIME_HANDLER, [
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_DEFUN(SC_BUGGY_STRTOD, [
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_DEFUN(SC_TCL_LINK_LIBS, [
#--------------------------------------------------------------------
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 @@ AC_DEFUN(SC_TCL_EARLY_FLAG,[
[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 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [
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 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [
#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 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [
],
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 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [
],
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_DEFUN(SC_TCL_CFG_ENCODING, [
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:
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index dd83707..ec6f48d 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.c
@@ -11,9 +11,16 @@
* 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.13 2004/11/12 16:44:59 dkf Exp $
*/
+/*
+ * The core stores all its #defs in config.h for clarity...
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "tcl.h"
#ifdef TCL_TEST