diff options
author | das <das> | 2006-07-20 06:21:41 (GMT) |
---|---|---|
committer | das <das> | 2006-07-20 06:21:41 (GMT) |
commit | bed796e06772e11d807d9394771ef16cf766b2cd (patch) | |
tree | 87aa93a682398fe04c4b734c7ea00049bf6fba02 | |
parent | 8cb60c333409bcc5ab4d0388905e7840b41422b2 (diff) | |
download | tcl-bed796e06772e11d807d9394771ef16cf766b2cd.zip tcl-bed796e06772e11d807d9394771ef16cf766b2cd.tar.gz tcl-bed796e06772e11d807d9394771ef16cf766b2cd.tar.bz2 |
* macosx/tclMacOSXNotify.c (Tcl_InitNotifier, Tcl_WaitForEvent): create
notifier thread lazily upon first call to Tcl_WaitForEvent() rather than
in Tcl_InitNotifier(). Allows calling exeve() in processes where the
event loop has not yet been run (Darwin's execve() fails in processes
with more than one thread), in particular allows embedders to call
fork() followed by execve(), previously the pthread_atfork() child
handler's call to Tcl_InitNotifier() would immediately recreate the
notifier thread in the child after a fork.
* macosx/tclMacOSXNotify.c (Tcl_InitNotifier): add support for
* unix/tclUnixFCmd.c (DoRenameFile, CopyFileAtts): weakly importing
* unix/tclUnixInit.c (TclpSetInitialEncodings): symbols not available
on OSX 10.2 or 10.3, enables binaires built on later OSX versions to run
on earlier ones.
* macosx/README: document how to enable weak-linking; cleanup.
* unix/tclUnixPort.h: add support for weak-linking; conditionalize
AvailabilityMacros.h inclusion; only disable realpath on 10.2 or earlier
when threads are enabled.
* unix/tclLoadDyld.c (TclpLoadMemoryGetBuffer): change runtime Darwin
* unix/tclUnixInit.c (TclpInitPlatform): release check to use
global initialized once.
* unix/tclUnixFCmd.c (DoRenameFile, TclpObjNormalizePath): add runtime
Darwin release check to determine if realpath is threadsafe.
* unix/configure.in: add check on Darwin for compiler support of weak
* unix/tcl.m4: import and for AvailabilityMacros.h header; move
Darwin specific checks & defines that are only relevant to the tcl build
out of tcl.m4; restrict framework option to Darwin; cleanup quoting.
* unix/configure: autoconf-2.13
* unix/tclLoadDyld.c (TclpLoadMemory):
* unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned
comparison and other warnings from gcc4 -Wextra.
-rw-r--r-- | ChangeLog | 35 | ||||
-rw-r--r-- | macosx/README | 34 | ||||
-rw-r--r-- | macosx/tclMacOSXNotify.c | 138 | ||||
-rwxr-xr-x | unix/configure | 1485 | ||||
-rw-r--r-- | unix/configure.in | 93 | ||||
-rw-r--r-- | unix/tcl.m4 | 83 | ||||
-rw-r--r-- | unix/tclLoadDyld.c | 32 | ||||
-rw-r--r-- | unix/tclUnixFCmd.c | 120 | ||||
-rw-r--r-- | unix/tclUnixInit.c | 36 | ||||
-rw-r--r-- | unix/tclUnixPipe.c | 7 | ||||
-rw-r--r-- | unix/tclUnixPort.h | 43 |
11 files changed, 1192 insertions, 914 deletions
@@ -1,3 +1,38 @@ +2006-07-20 Daniel Steffen <das@users.sourceforge.net> + + * macosx/tclMacOSXNotify.c (Tcl_InitNotifier, Tcl_WaitForEvent): create + notifier thread lazily upon first call to Tcl_WaitForEvent() rather than + in Tcl_InitNotifier(). Allows calling exeve() in processes where the + event loop has not yet been run (Darwin's execve() fails in processes + with more than one thread), in particular allows embedders to call + fork() followed by execve(), previously the pthread_atfork() child + handler's call to Tcl_InitNotifier() would immediately recreate the + notifier thread in the child after a fork. + + * macosx/tclMacOSXNotify.c (Tcl_InitNotifier): add support for + * unix/tclUnixFCmd.c (DoRenameFile, CopyFileAtts): weakly importing + * unix/tclUnixInit.c (TclpSetInitialEncodings): symbols not available + on OSX 10.2 or 10.3, enables binaires built on later OSX versions to run + on earlier ones. + * macosx/README: document how to enable weak-linking; cleanup. + * unix/tclUnixPort.h: add support for weak-linking; conditionalize + AvailabilityMacros.h inclusion; only disable realpath on 10.2 or earlier + when threads are enabled. + * unix/tclLoadDyld.c (TclpLoadMemoryGetBuffer): change runtime Darwin + * unix/tclUnixInit.c (TclpInitPlatform): release check to use + global initialized once. + * unix/tclUnixFCmd.c (DoRenameFile, TclpObjNormalizePath): add runtime + Darwin release check to determine if realpath is threadsafe. + * unix/configure.in: add check on Darwin for compiler support of weak + * unix/tcl.m4: import and for AvailabilityMacros.h header; move + Darwin specific checks & defines that are only relevant to the tcl build + out of tcl.m4; restrict framework option to Darwin; cleanup quoting. + * unix/configure: autoconf-2.13 + + * unix/tclLoadDyld.c (TclpLoadMemory): + * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned + comparison and other warnings from gcc4 -Wextra. + 2006-07-13 Andreas Kupries <andreask@activestate.com> * unix/tclUnixPort.h: Added the inclusion of diff --git a/macosx/README b/macosx/README index 46469cb..2475ea2 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ Tcl Mac OS X README ----------------- -RCS: @(#) $Id: README,v 1.1.2.4 2005/11/27 02:34:41 das Exp $ +RCS: @(#) $Id: README,v 1.1.2.5 2006/07/20 06:21:41 das Exp $ This is the README file for the Mac OS X/Darwin version of Tcl. @@ -36,9 +36,12 @@ Mac OS X specific bugs should usually be assigned to 'das' or 'wolfsuit'. - At a minimum, Mac OS X 10.1 is required to run Tcl, but OS X 10.3 or higher is recommended (certain [file] operations behave incorrectly on earlier releases). -- Tcl built on Mac OS X 10.x will not run on 10.y for y < x, on the other hand -Tcl built on 10.y will run on 10.x for y < x (but without any of the fixes and -optimizations that would be available in a binary built on 10.x). +- Unless weak-linking is used, Tcl built on Mac OS X 10.x will not run on 10.y +with y < x; on the other hand Tcl built on 10.y will always run on 10.x with +y <= x (but without any of the fixes and optimizations that would be available +in a binary built on 10.x). +Weak-linking is available on OS X 10.2 or later, it additionally allows Tcl +built on 10.x to run on any 10.y with x > y >= z (for a chosen z >= 2). - Tcl extensions can be installed in any of: $HOME/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl @@ -79,10 +82,9 @@ http://connect.apple.com (after you register for free ADC membership). (see below for details), but can also be built with the standard unix configure and make buildsystem in tcl/unix as on any other unix platform (indeed, the Makefile is just a wrapper around the unix buildsystem). -The Mac OS X specifc configure flags are --enable-framework and +The Mac OS X specific configure flags are --enable-framework and --disable-corefoundation (which disables CF and notably reverts to the standard -select based notifier, you will only need this if your require use of naked fork -(i.e. not followed by execve) in an unthreaded core). +select based notifier). - It is also possible to build with Apple's IDE via the tcl/macosx/Tcl.pbproj project, this simply calls through to the tcl/macosx/GNUMakefile. @@ -91,12 +93,22 @@ project, this simply calls through to the tcl/macosx/GNUMakefile. export CFLAGS="-arch ppc -arch ppc64 -arch i386 \ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" This requires Mac OS X 10.4 and Xcode 2.2 (_not_ Xcode 2.1) and will work on any -of the architectures (on i386 DTKs, the -isysroot is not required). Note that it -is not possible to configure correctly if the current architecture is not +of the architectures (on intel Macs, the -isysroot is not required). Note that +it is not possible to configure correctly if the current architecture is not present in CFLAGS (i.e. -arch `arch` must always be there). Universal builds of Tcl TEA extensions are also possible with CFLAGS set as above, they will be [load]able by universal as well as thin binaries of Tcl. +- To enable weak-linking, set the MACOSX_DEPLOYMENT_TARGET environment variable +to the minimal OS version (>= 10.2) the binaries should be able to run on, e.g: + export MACOSX_DEPLOYMENT_TARGET=10.2 +This requires Mac OS X 10.2 and gcc 3.1; if you have gcc 4 or later you can set +CFLAGS instead: + export CFLAGS="-mmacosx-version-min=10.2" +The Tcl.xcodeproj is setup to produce binaires that can run on 10.2 or later, +except for the 'ReleaseUniversal'configuration, where they require 10.4. +Support for weak-linking was added to the code for 8.4.14/8.5a5. + Detailed Instructions for building with macosx/Makefile ------------------------------------------------------- @@ -127,8 +139,8 @@ instead by passing an INSTALL_ROOT argument to make: - The default Makefile targets will build _both_ debug and optimized versions of the Tcl framework with the standard convention of naming the debug library Tcl.framework/Tcl_debug. -This allows you to dynamically link to the debug libraries at runtime by setting - setenv DYLD_IMAGE_SUFFIX _debug +This allows switching to the debug libraries at runtime by setting + export DYLD_IMAGE_SUFFIX=_debug (c.f. man dyld for more details) If you only want to build and install the debug or optimized build, use the diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index bdda1ce..f9cd046 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.1.2.6 2006/05/27 05:23:04 das Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.1.2.7 2006/07/20 06:21:42 das Exp $ */ #include "tclInt.h" @@ -164,6 +164,32 @@ static int receivePipe = -1; /* Output end of triggerPipe */ #include <libkern/OSAtomic.h> +#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +/* + * Support for weakly importing spinlock API. + */ +#define WEAK_IMPORT_SPINLOCKLOCK +extern void OSSpinLockLock(OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; +extern void OSSpinLockUnlock(OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; +extern void _spin_lock(OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; +extern void _spin_unlock(OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; +static void (* lockLock)(OSSpinLock *lock) = NULL; +static void (* lockUnlock)(OSSpinLock *lock) = NULL; +static pthread_once_t spinLockLockInitControl = PTHREAD_ONCE_INIT; +static void SpinLockLockInit(void) { + lockLock = OSSpinLockLock != NULL ? OSSpinLockLock : _spin_lock; + lockUnlock = OSSpinLockUnlock != NULL ? OSSpinLockUnlock : _spin_unlock; + if (lockLock == NULL || lockUnlock == NULL) { + Tcl_Panic("SpinLockLockInit: no spinlock API available."); + } +} +#define SpinLockLock(p) lockLock(p) +#define SpinLockUnlock(p) lockUnlock(p) +#else +#define SpinLockLock(p) OSSpinLockLock(p) +#define SpinLockUnlock(p) OSSpinLockUnlock(p) +#endif /* HAVE_WEAK_IMPORT */ + #else /* * Otherwise, use commpage spinlock SPI directly. @@ -172,8 +198,8 @@ static int receivePipe = -1; /* Output end of triggerPipe */ typedef uint32_t OSSpinLock; extern void _spin_lock(OSSpinLock *lock); extern void _spin_unlock(OSSpinLock *lock); -#define OSSpinLockLock(p) _spin_lock(p) -#define OSSpinLockUnlock(p) _spin_unlock(p) +#define SpinLockLock(p) _spin_lock(p) +#define SpinLockUnlock(p) _spin_unlock(p) #endif /* HAVE_LIBKERN_OSATOMIC_H && HAVE_OSSPINLOCKLOCK */ @@ -188,10 +214,10 @@ static OSSpinLock notifierLock = 0; * Macros abstracting notifier locking/unlocking */ -#define LOCK_NOTIFIER_INIT OSSpinLockLock(¬ifierInitLock) -#define UNLOCK_NOTIFIER_INIT OSSpinLockUnlock(¬ifierInitLock) -#define LOCK_NOTIFIER OSSpinLockLock(¬ifierLock) -#define UNLOCK_NOTIFIER OSSpinLockUnlock(¬ifierLock) +#define LOCK_NOTIFIER_INIT SpinLockLock(¬ifierInitLock) +#define UNLOCK_NOTIFIER_INIT SpinLockUnlock(¬ifierInitLock) +#define LOCK_NOTIFIER SpinLockLock(¬ifierLock) +#define UNLOCK_NOTIFIER SpinLockUnlock(¬ifierLock) /* * The pollState bits @@ -223,7 +249,13 @@ static int atForkInit = 0; static void AtForkPrepare(void); static void AtForkParent(void); static void AtForkChild(void); -#endif +#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +/* Support for weakly importing pthread_atfork. */ +#define WEAK_IMPORT_PTHREAD_ATFORK +extern int pthread_atfork(void (*prepare)(void), void (*parent)(void), + void (*child)(void)) WEAK_IMPORT_ATTRIBUTE; +#endif /* HAVE_WEAK_IMPORT */ +#endif /* HAVE_PTHREAD_ATFORK */ /* *---------------------------------------------------------------------- @@ -248,8 +280,17 @@ Tcl_InitNotifier(void) tsdPtr->eventReady = 0; +#ifdef WEAK_IMPORT_SPINLOCKLOCK + /* + * Initialize support for weakly imported spinlock API. + */ + if (pthread_once(&spinLockLockInitControl, SpinLockLockInit)) { + Tcl_Panic("Tcl_InitNotifier: pthread_once failed."); + } +#endif + /* - * Initialize CFRunLoopSource and add it to CFRunLoop of this thread + * Initialize CFRunLoopSource and add it to CFRunLoop of this thread. */ if (!tsdPtr->runLoop) { @@ -268,28 +309,31 @@ Tcl_InitNotifier(void) tsdPtr->runLoop = runLoop; } - /* - * Initialize trigger pipe and start the Notifier thread if necessary. - */ - LOCK_NOTIFIER_INIT; #ifdef HAVE_PTHREAD_ATFORK /* - * Install pthread_atfork handlers to reinstall the notifier thread in the + * Install pthread_atfork handlers to reinitialize the notifier in the * child of a fork. */ - if (!atForkInit) { + if ( +#ifdef WEAK_IMPORT_PTHREAD_ATFORK + pthread_atfork != NULL && +#endif + !atForkInit) { int result = pthread_atfork(AtForkPrepare, AtForkParent, AtForkChild); if (result) { - Tcl_Panic("Tcl_InitNotifier: pthread_atfork failed"); + Tcl_Panic("Tcl_InitNotifier: pthread_atfork failed."); } atForkInit = 1; } #endif if (notifierCount == 0) { - int fds[2], status, result; - pthread_attr_t attr; + int fds[2], status; + + /* + * Initialize trigger pipe. + */ if (pipe(fds) != 0) { Tcl_Panic("Tcl_InitNotifier: could not create trigger pipe."); @@ -309,16 +353,13 @@ Tcl_InitNotifier(void) receivePipe = fds[0]; triggerPipe = fds[1]; - pthread_attr_init(&attr); - pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); - pthread_attr_setstacksize(&attr, 60 * 1024); - result = pthread_create(¬ifierThread, &attr, - (void * (*)(void *))NotifierThreadProc, NULL); - pthread_attr_destroy(&attr); - if (result) { - Tcl_Panic("Tcl_InitNotifier: unable to start notifier thread."); - } + /* + * Create notifier thread lazily in Tcl_WaitForEvent() to avoid + * interfering with fork() followed immediately by execve() + * (cannot execve() when more than one thread is present). + */ + + notifierThread = 0; } notifierCount++; UNLOCK_NOTIFIER_INIT; @@ -379,9 +420,12 @@ Tcl_FinalizeNotifier(clientData) write(triggerPipe, "q", 1); close(triggerPipe); - result = pthread_join(notifierThread, NULL); - if (result) { - Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread."); + if (notifierThread) { + result = pthread_join(notifierThread, NULL); + if (result) { + Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread."); + } + notifierThread = 0; } close(receivePipe); @@ -764,6 +808,28 @@ Tcl_WaitForEvent(timePtr) } /* + * Start notifier thread if necessary. + */ + + LOCK_NOTIFIER_INIT; + if (!notifierThread) { + int result; + pthread_attr_t attr; + + pthread_attr_init(&attr); + pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); + pthread_attr_setstacksize(&attr, 60 * 1024); + result = pthread_create(¬ifierThread, &attr, + (void * (*)(void *))NotifierThreadProc, NULL); + pthread_attr_destroy(&attr); + if (result || !notifierThread) { + Tcl_Panic("Tcl_WaitForEvent: unable to start notifier thread."); + } + } + UNLOCK_NOTIFIER_INIT; + + /* * Place this thread on the list of interested threads, signal the * notifier thread, and wait for a response or a timeout. */ @@ -1138,9 +1204,13 @@ AtForkChild(void) } if (notifierCount > 0) { notifierCount = 0; - /* Note that Tcl_FinalizeNotifier does not use its clientData - * parameter, so discard return value of Tcl_InitNotifier here and - * leave stale clientData in tclNotify.c's ThreadSpecificData. + /* + * Assume that the return value of Tcl_InitNotifier() in the child + * will be identical to the one stored as clientData in tclNotify.c's + * ThreadSpecificData by the parent's TclInitNotifier(), so discard + * the return value here. This assumption may require the fork() to + * be executed in the main thread of the parent, otherwise + * Tcl_AlertNotifier() may break in the child. */ Tcl_InitNotifier(); } diff --git a/unix/configure b/unix/configure index abb3353..66934ce 100755 --- a/unix/configure +++ b/unix/configure @@ -961,8 +961,9 @@ echo "configure:961: checking dirent.h" >&5 if eval "test \"`echo '$''{'tcl_cv_dirent_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 966 "configure" + + cat > conftest.$ac_ext <<EOF +#line 967 "configure" #include "confdefs.h" #include <sys/types.h> #include <dirent.h> @@ -988,7 +989,7 @@ closedir(d); ; return 0; } EOF -if { (eval echo configure:992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_dirent_h=yes else @@ -1011,17 +1012,17 @@ EOF ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for errno.h""... $ac_c" 1>&6 -echo "configure:1015: checking for errno.h" >&5 +echo "configure:1016: checking for errno.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1020 "configure" +#line 1021 "configure" #include "confdefs.h" #include <errno.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1048,17 +1049,17 @@ fi ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for float.h""... $ac_c" 1>&6 -echo "configure:1052: checking for float.h" >&5 +echo "configure:1053: checking for float.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1057 "configure" +#line 1058 "configure" #include "confdefs.h" #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1085,17 +1086,17 @@ fi ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for values.h""... $ac_c" 1>&6 -echo "configure:1089: checking for values.h" >&5 +echo "configure:1090: checking for values.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1094 "configure" +#line 1095 "configure" #include "confdefs.h" #include <values.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1122,17 +1123,17 @@ fi ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for limits.h""... $ac_c" 1>&6 -echo "configure:1126: checking for limits.h" >&5 +echo "configure:1127: checking for limits.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1131 "configure" +#line 1132 "configure" #include "confdefs.h" #include <limits.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1162,17 +1163,17 @@ fi ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 -echo "configure:1166: checking for stdlib.h" >&5 +echo "configure:1167: checking for stdlib.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1171 "configure" +#line 1172 "configure" #include "confdefs.h" #include <stdlib.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1195,7 +1196,7 @@ tcl_ok=0 fi cat > conftest.$ac_ext <<EOF -#line 1199 "configure" +#line 1200 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1209,7 +1210,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 1213 "configure" +#line 1214 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1223,7 +1224,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 1227 "configure" +#line 1228 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1244,17 +1245,17 @@ EOF fi ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:1248: checking for string.h" >&5 +echo "configure:1249: checking for string.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1253 "configure" +#line 1254 "configure" #include "confdefs.h" #include <string.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1277,7 +1278,7 @@ tcl_ok=0 fi cat > conftest.$ac_ext <<EOF -#line 1281 "configure" +#line 1282 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1291,7 +1292,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 1295 "configure" +#line 1296 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1317,17 +1318,17 @@ EOF ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6 -echo "configure:1321: checking for sys/wait.h" >&5 +echo "configure:1322: checking for sys/wait.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1326 "configure" +#line 1327 "configure" #include "confdefs.h" #include <sys/wait.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1354,17 +1355,17 @@ fi ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:1358: checking for dlfcn.h" >&5 +echo "configure:1359: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1363 "configure" +#line 1364 "configure" #include "confdefs.h" #include <dlfcn.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1395,17 +1396,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1399: checking for $ac_hdr" >&5 +echo "configure:1400: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1404 "configure" +#line 1405 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1441,18 +1442,18 @@ done if test -z "$no_pipe"; then if test -n "$GCC"; then echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6 -echo "configure:1445: checking if the compiler understands -pipe" >&5 +echo "configure:1446: checking if the compiler understands -pipe" >&5 OLDCC="$CC" CC="$CC -pipe" cat > conftest.$ac_ext <<EOF -#line 1449 "configure" +#line 1450 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1507,7 +1508,7 @@ EOF EOF echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1511: checking for pthread_mutex_init in -lpthread" >&5 +echo "configure:1512: checking for pthread_mutex_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1515,7 +1516,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <<EOF -#line 1519 "configure" +#line 1520 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1526,7 +1527,7 @@ int main() { pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1554,7 +1555,7 @@ fi # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1558: checking for __pthread_mutex_init in -lpthread" >&5 +echo "configure:1559: checking for __pthread_mutex_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1562,7 +1563,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <<EOF -#line 1566 "configure" +#line 1567 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1573,7 +1574,7 @@ int main() { __pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1601,7 +1602,7 @@ fi THREADS_LIBS=" -lpthread" else echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6 -echo "configure:1605: checking for pthread_mutex_init in -lpthreads" >&5 +echo "configure:1606: checking for pthread_mutex_init in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1609,7 +1610,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <<EOF -#line 1613 "configure" +#line 1614 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1620,7 +1621,7 @@ int main() { pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1646,7 +1647,7 @@ fi THREADS_LIBS=" -lpthreads" else echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6 -echo "configure:1650: checking for pthread_mutex_init in -lc" >&5 +echo "configure:1651: checking for pthread_mutex_init in -lc" >&5 ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1654,7 +1655,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <<EOF -#line 1658 "configure" +#line 1659 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1665,7 +1666,7 @@ int main() { pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1688,7 +1689,7 @@ fi if test "$tcl_ok" = "no"; then echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6 -echo "configure:1692: checking for pthread_mutex_init in -lc_r" >&5 +echo "configure:1693: checking for pthread_mutex_init in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1696,7 +1697,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <<EOF -#line 1700 "configure" +#line 1701 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1707,7 +1708,7 @@ int main() { pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1747,12 +1748,12 @@ fi for ac_func in pthread_attr_setstacksize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1751: checking for $ac_func" >&5 +echo "configure:1752: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1756 "configure" +#line 1757 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1775,7 +1776,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1802,12 +1803,12 @@ done for ac_func in pthread_atfork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1806: checking for $ac_func" >&5 +echo "configure:1807: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1811 "configure" +#line 1812 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1830,7 +1831,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1860,7 +1861,7 @@ done fi # Do checking message here to not mess up interleaved configure output echo $ac_n "checking for building with threads""... $ac_c" 1>&6 -echo "configure:1864: checking for building with threads" >&5 +echo "configure:1865: checking for building with threads" >&5 if test "${TCL_THREADS}" = 1; then cat >> confdefs.h <<\EOF #define TCL_THREADS 1 @@ -1891,12 +1892,12 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:1895: checking for sin" >&5 +echo "configure:1896: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1900 "configure" +#line 1901 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char sin(); below. */ @@ -1919,7 +1920,7 @@ sin(); ; return 0; } EOF -if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -1940,7 +1941,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:1944: checking for main in -lieee" >&5 +echo "configure:1945: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1948,14 +1949,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <<EOF -#line 1952 "configure" +#line 1953 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:1959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1982,7 +1983,7 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for main in -linet""... $ac_c" 1>&6 -echo "configure:1986: checking for main in -linet" >&5 +echo "configure:1987: checking for main in -linet" >&5 ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1990,14 +1991,14 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <<EOF -#line 1994 "configure" +#line 1995 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2019,17 +2020,17 @@ fi ac_safe=`echo "net/errno.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6 -echo "configure:2023: checking for net/errno.h" >&5 +echo "configure:2024: checking for net/errno.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2028 "configure" +#line 2029 "configure" #include "confdefs.h" #include <net/errno.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2074,12 +2075,12 @@ fi tcl_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2078: checking for connect" >&5 +echo "configure:2079: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2083 "configure" +#line 2084 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -2102,7 +2103,7 @@ connect(); ; return 0; } EOF -if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2124,12 +2125,12 @@ fi if test "$tcl_checkSocket" = 1; then echo $ac_n "checking for setsockopt""... $ac_c" 1>&6 -echo "configure:2128: checking for setsockopt" >&5 +echo "configure:2129: checking for setsockopt" >&5 if eval "test \"`echo '$''{'ac_cv_func_setsockopt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2133 "configure" +#line 2134 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char setsockopt(); below. */ @@ -2152,7 +2153,7 @@ setsockopt(); ; return 0; } EOF -if { (eval echo configure:2156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_setsockopt=yes" else @@ -2170,7 +2171,7 @@ if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6 -echo "configure:2174: checking for setsockopt in -lsocket" >&5 +echo "configure:2175: checking for setsockopt in -lsocket" >&5 ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2178,7 +2179,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 2182 "configure" +#line 2183 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2189,7 +2190,7 @@ int main() { setsockopt() ; return 0; } EOF -if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2217,12 +2218,12 @@ fi tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:2221: checking for accept" >&5 +echo "configure:2222: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2226 "configure" +#line 2227 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char accept(); below. */ @@ -2245,7 +2246,7 @@ accept(); ; return 0; } EOF -if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -2267,12 +2268,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2271: checking for gethostbyname" >&5 +echo "configure:2272: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2276 "configure" +#line 2277 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -2295,7 +2296,7 @@ gethostbyname(); ; return 0; } EOF -if { (eval echo configure:2299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2313,7 +2314,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2317: checking for gethostbyname in -lnsl" >&5 +echo "configure:2318: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2321,7 +2322,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 2325 "configure" +#line 2326 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2332,7 +2333,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2368,7 +2369,7 @@ LIBS="$LIBS$THREADS_LIBS" echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:2372: checking how to build libraries" >&5 +echo "configure:2373: checking how to build libraries" >&5 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -2407,7 +2408,7 @@ EOF # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2411: checking for $ac_word" >&5 +echo "configure:2412: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2439,7 +2440,7 @@ fi # Step 0.a: Enable 64 bit support? echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6 -echo "configure:2443: checking if 64bit support is requested" >&5 +echo "configure:2444: checking if 64bit support is requested" >&5 # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then enableval="$enable_64bit" @@ -2453,7 +2454,7 @@ fi # Step 0.b: Enable Solaris 64 bit VIS support? echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6 -echo "configure:2457: checking if 64bit Sparc VIS support is requested" >&5 +echo "configure:2458: checking if 64bit Sparc VIS support is requested" >&5 # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then enableval="$enable_64bit_vis" @@ -2474,7 +2475,7 @@ fi echo $ac_n "checking system version""... $ac_c" 1>&6 -echo "configure:2478: checking system version" >&5 +echo "configure:2479: checking system version" >&5 if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2509,7 +2510,7 @@ echo "$ac_t""$tcl_cv_sys_version" 1>&6 # Linux can use either -ldl or -ldld for dynamic loading. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:2513: checking for dlopen in -ldl" >&5 +echo "configure:2514: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2517,7 +2518,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 2521 "configure" +#line 2522 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2528,7 +2529,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2576,7 +2577,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2580: checking for $ac_word" >&5 +echo "configure:2581: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2691,7 +2692,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:2695: checking for gettimeofday in -lbsd" >&5 +echo "configure:2696: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2699,7 +2700,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <<EOF -#line 2703 "configure" +#line 2704 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2710,7 +2711,7 @@ int main() { gettimeofday() ; return 0; } EOF -if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2753,7 +2754,7 @@ EOF # is always linked to, for compatibility. #----------------------------------------------------------- echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6 -echo "configure:2757: checking for inet_ntoa in -lbind" >&5 +echo "configure:2758: checking for inet_ntoa in -lbind" >&5 ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2761,7 +2762,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <<EOF -#line 2765 "configure" +#line 2766 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2772,7 +2773,7 @@ int main() { inet_ntoa() ; return 0; } EOF -if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2838,7 +2839,7 @@ EOF SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2842: checking for shl_load in -ldld" >&5 +echo "configure:2843: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2846,7 +2847,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <<EOF -#line 2850 "configure" +#line 2851 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2857,7 +2858,7 @@ int main() { shl_load() ; return 0; } EOF -if { (eval echo configure:2861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2925,7 +2926,7 @@ fi HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2929: checking for shl_load in -ldld" >&5 +echo "configure:2930: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2933,7 +2934,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <<EOF -#line 2937 "configure" +#line 2938 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2944,7 +2945,7 @@ int main() { shl_load() ; return 0; } EOF -if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3068,17 +3069,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:3072: checking for dld.h" >&5 +echo "configure:3073: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3077 "configure" +#line 3078 "configure" #include "confdefs.h" #include <dld.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3142,17 +3143,17 @@ EOF else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:3146: checking for dld.h" >&5 +echo "configure:3147: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3151 "configure" +#line 3152 "configure" #include "confdefs.h" #include <dld.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3220,17 +3221,17 @@ fi # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:3224: checking for dlfcn.h" >&5 +echo "configure:3225: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3229 "configure" +#line 3230 "configure" #include "confdefs.h" #include <dlfcn.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3257,13 +3258,13 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:3261: checking for ELF" >&5 +echo "configure:3262: checking for ELF" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3267 "configure" +#line 3268 "configure" #include "confdefs.h" #ifdef __ELF__ @@ -3342,13 +3343,13 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:3346: checking for ELF" >&5 +echo "configure:3347: checking for ELF" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3352 "configure" +#line 3353 "configure" #include "confdefs.h" #ifdef __ELF__ @@ -3416,7 +3417,7 @@ echo "$ac_t""$tcl_cv_ld_elf" 1>&6 fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6 -echo "configure:3420: checking if ld accepts -single_module flag" >&5 +echo "configure:3421: checking if ld accepts -single_module flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3424,14 +3425,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" cat > conftest.$ac_ext <<EOF -#line 3428 "configure" +#line 3429 "configure" #include "confdefs.h" int main() { int i; ; return 0; } EOF -if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_single_module=yes else @@ -3458,7 +3459,7 @@ echo "$ac_t""$tcl_cv_ld_single_module" 1>&6 LDFLAGS="$LDFLAGS -prebind" LDFLAGS="$LDFLAGS -headerpad_max_install_names" echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6 -echo "configure:3462: checking if ld accepts -search_paths_first flag" >&5 +echo "configure:3463: checking if ld accepts -search_paths_first flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3466,14 +3467,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat > conftest.$ac_ext <<EOF -#line 3470 "configure" +#line 3471 "configure" #include "confdefs.h" int main() { int i; ; return 0; } EOF -if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_search_paths_first=yes else @@ -3496,7 +3497,7 @@ echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6 PLAT_OBJS=\$\(MAC\_OSX_OBJS\) PLAT_SRCS=\$\(MAC\_OSX_SRCS\) echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6 -echo "configure:3500: checking whether to use CoreFoundation" >&5 +echo "configure:3501: checking whether to use CoreFoundation" >&5 # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then enableval="$enable_corefoundation" @@ -3508,7 +3509,7 @@ fi echo "$ac_t""$tcl_corefoundation" 1>&6 if test $tcl_corefoundation = yes; then echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6 -echo "configure:3512: checking for CoreFoundation.framework" >&5 +echo "configure:3513: checking for CoreFoundation.framework" >&5 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3522,14 +3523,14 @@ else fi LIBS="$LIBS -framework CoreFoundation" cat > conftest.$ac_ext <<EOF -#line 3526 "configure" +#line 3527 "configure" #include "confdefs.h" #include <CoreFoundation/CoreFoundation.h> int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:3533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation=yes else @@ -3549,323 +3550,14 @@ echo "$ac_t""$tcl_cv_lib_corefoundation" 1>&6 #define HAVE_COREFOUNDATION 1 EOF - for ac_hdr in libkern/OSAtomic.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3557: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 3562 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in OSSpinLockLock -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3596: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 3601 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in pthread_atfork -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3651: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 3656 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - + else + tcl_corefoundation=no fi fi - for ac_hdr in copyfile.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3709: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 3714 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - for ac_func in copyfile -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3748: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 3753 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - cat >> confdefs.h <<\EOF #define MAC_OSX_TCL 1 EOF - cat >> confdefs.h <<\EOF -#define USE_VFORK 1 -EOF - - cat >> confdefs.h <<\EOF -#define TCL_DEFAULT_ENCODING "utf-8" -EOF - - cat >> confdefs.h <<\EOF -#define TCL_LOAD_FROM_MEMORY 1 -EOF - - # prior to Darwin 7, realpath is not threadsafe, so don't - # use it when threads are enabled, c.f. bug # 711232: - echo $ac_n "checking for realpath""... $ac_c" 1>&6 -echo "configure:3819: checking for realpath" >&5 -if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 3824 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char realpath(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char realpath(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) -choke me -#else -realpath(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_realpath=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_realpath=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'realpath`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_realpath = yes -a "${TCL_THREADS}" = 1 \ - -a `uname -r | awk -F. '{print $1}'` -lt 7 ; then - ac_cv_func_realpath=no - fi ;; NEXTSTEP-*) SHLIB_CFLAGS="" @@ -4153,7 +3845,7 @@ EOF # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6 -echo "configure:4157: checking for ld accepts -Bexport flag" >&5 +echo "configure:3849: checking for ld accepts -Bexport flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4161,14 +3853,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" cat > conftest.$ac_ext <<EOF -#line 4165 "configure" +#line 3857 "configure" #include "confdefs.h" int main() { int i; ; return 0; } EOF -if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_Bexport=yes else @@ -4215,13 +3907,13 @@ echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6 if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:4219: checking sys/exec.h" >&5 +echo "configure:3911: checking sys/exec.h" >&5 if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4225 "configure" +#line 3917 "configure" #include "confdefs.h" #include <sys/exec.h> int main() { @@ -4239,7 +3931,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexec_h=usable else @@ -4259,13 +3951,13 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:4263: checking a.out.h" >&5 +echo "configure:3955: checking a.out.h" >&5 if eval "test \"`echo '$''{'tcl_cv_aout_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4269 "configure" +#line 3961 "configure" #include "confdefs.h" #include <a.out.h> int main() { @@ -4283,7 +3975,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_aout_h=usable else @@ -4303,13 +3995,13 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:4307: checking sys/exec_aout.h" >&5 +echo "configure:3999: checking sys/exec_aout.h" >&5 if eval "test \"`echo '$''{'tcl_cv_sysexecaout_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4313 "configure" +#line 4005 "configure" #include "confdefs.h" #include <sys/exec_aout.h> int main() { @@ -4327,7 +4019,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexecaout_h=usable else @@ -4480,7 +4172,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:4484: checking for build with symbols" >&5 +echo "configure:4176: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -4541,21 +4233,21 @@ TCL_DBGX=${DBGX} echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:4545: checking for required early compiler flags" >&5 +echo "configure:4237: checking for required early compiler flags" >&5 tcl_flags="" if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4552 "configure" +#line 4244 "configure" #include "confdefs.h" #include <stdlib.h> int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -4563,7 +4255,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 4567 "configure" +#line 4259 "configure" #include "confdefs.h" #define _ISOC99_SOURCE 1 #include <stdlib.h> @@ -4571,7 +4263,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -4598,14 +4290,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4602 "configure" +#line 4294 "configure" #include "confdefs.h" #include <sys/stat.h> int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -4613,7 +4305,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 4617 "configure" +#line 4309 "configure" #include "confdefs.h" #define _LARGEFILE64_SOURCE 1 #include <sys/stat.h> @@ -4621,7 +4313,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=yes else @@ -4648,14 +4340,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4652 "configure" +#line 4344 "configure" #include "confdefs.h" #include <sys/stat.h> int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=no else @@ -4663,7 +4355,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 4667 "configure" +#line 4359 "configure" #include "confdefs.h" #define _LARGEFILE_SOURCE64 1 #include <sys/stat.h> @@ -4671,7 +4363,7 @@ int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=yes else @@ -4702,7 +4394,7 @@ EOF echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:4706: checking for 64-bit integer type" >&5 +echo "configure:4398: checking for 64-bit integer type" >&5 if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4710,14 +4402,14 @@ else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat > conftest.$ac_ext <<EOF -#line 4714 "configure" +#line 4406 "configure" #include "confdefs.h" int main() { __int64 value = (__int64) 0; ; return 0; } EOF -if { (eval echo configure:4721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -4731,7 +4423,7 @@ rm -f conftest* # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... cat > conftest.$ac_ext <<EOF -#line 4735 "configure" +#line 4427 "configure" #include "confdefs.h" int main() { @@ -4740,7 +4432,7 @@ switch (0) { } ; return 0; } EOF -if { (eval echo configure:4744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_64bit=${tcl_type_64bit} else @@ -4765,13 +4457,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:4769: checking for struct dirent64" >&5 +echo "configure:4461: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4775 "configure" +#line 4467 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/dirent.h> @@ -4779,7 +4471,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:4783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -4800,13 +4492,13 @@ EOF fi echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:4804: checking for struct stat64" >&5 +echo "configure:4496: checking for struct stat64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4810 "configure" +#line 4502 "configure" #include "confdefs.h" #include <sys/stat.h> int main() { @@ -4814,7 +4506,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:4818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -4837,12 +4529,12 @@ EOF for ac_func in open64 lseek64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4841: checking for $ac_func" >&5 +echo "configure:4533: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4846 "configure" +#line 4538 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4865,7 +4557,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4890,13 +4582,13 @@ fi done echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:4894: checking for off64_t" >&5 +echo "configure:4586: checking for off64_t" >&5 if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4900 "configure" +#line 4592 "configure" #include "confdefs.h" #include <sys/types.h> int main() { @@ -4904,7 +4596,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:4908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -4936,14 +4628,14 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4940: checking whether byte ordering is bigendian" >&5 +echo "configure:4632: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext <<EOF -#line 4947 "configure" +#line 4639 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -4954,11 +4646,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext <<EOF -#line 4962 "configure" +#line 4654 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -4969,7 +4661,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4989,7 +4681,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 4993 "configure" +#line 4685 "configure" #include "confdefs.h" main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -5002,7 +4694,7 @@ main () { exit (u.c[sizeof (long) - 1] == 1); } EOF -if { (eval echo configure:5006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -5035,12 +4727,12 @@ fi for ac_func in getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5039: checking for $ac_func" >&5 +echo "configure:4731: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5044 "configure" +#line 4736 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5063,7 +4755,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5097,12 +4789,12 @@ done for ac_func in opendir strstr strtol strtoll strtoull tmpnam waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5101: checking for $ac_func" >&5 +echo "configure:4793: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5106 "configure" +#line 4798 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5125,7 +4817,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5152,12 +4844,12 @@ done echo $ac_n "checking for strerror""... $ac_c" 1>&6 -echo "configure:5156: checking for strerror" >&5 +echo "configure:4848: checking for strerror" >&5 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5161 "configure" +#line 4853 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char strerror(); below. */ @@ -5180,7 +4872,7 @@ strerror(); ; return 0; } EOF -if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strerror=yes" else @@ -5204,12 +4896,12 @@ EOF fi echo $ac_n "checking for getwd""... $ac_c" 1>&6 -echo "configure:5208: checking for getwd" >&5 +echo "configure:4900: checking for getwd" >&5 if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5213 "configure" +#line 4905 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getwd(); below. */ @@ -5232,7 +4924,7 @@ getwd(); ; return 0; } EOF -if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getwd=yes" else @@ -5256,12 +4948,12 @@ EOF fi echo $ac_n "checking for wait3""... $ac_c" 1>&6 -echo "configure:5260: checking for wait3" >&5 +echo "configure:4952: checking for wait3" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5265 "configure" +#line 4957 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char wait3(); below. */ @@ -5284,7 +4976,7 @@ wait3(); ; return 0; } EOF -if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_wait3=yes" else @@ -5308,12 +5000,12 @@ EOF fi echo $ac_n "checking for uname""... $ac_c" 1>&6 -echo "configure:5312: checking for uname" >&5 +echo "configure:5004: checking for uname" >&5 if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5317 "configure" +#line 5009 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char uname(); below. */ @@ -5336,7 +5028,7 @@ uname(); ; return 0; } EOF -if { (eval echo configure:5340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_uname=yes" else @@ -5359,13 +5051,20 @@ EOF fi + +if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ + test "`uname -r | awk -F. '{print $1}'`" -lt 7; then + # prior to Darwin 7, realpath is not threadsafe, so don't + # use it when threads are enabled, c.f. bug # 711232 + ac_cv_func_realpath=no +fi echo $ac_n "checking for realpath""... $ac_c" 1>&6 -echo "configure:5364: checking for realpath" >&5 +echo "configure:5063: checking for realpath" >&5 if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5369 "configure" +#line 5068 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char realpath(); below. */ @@ -5388,7 +5087,7 @@ realpath(); ; return 0; } EOF -if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_realpath=yes" else @@ -5423,17 +5122,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5427: checking for $ac_hdr" >&5 +echo "configure:5126: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5432 "configure" +#line 5131 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5460,7 +5159,7 @@ fi done echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6 -echo "configure:5464: checking termios vs. termio vs. sgtty" >&5 +echo "configure:5163: checking termios vs. termio vs. sgtty" >&5 if eval "test \"`echo '$''{'tcl_cv_api_serial'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5469,7 +5168,7 @@ else tcl_cv_api_serial=no else cat > conftest.$ac_ext <<EOF -#line 5473 "configure" +#line 5172 "configure" #include "confdefs.h" #include <termios.h> @@ -5484,7 +5183,7 @@ int main() { return 1; } EOF -if { (eval echo configure:5488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=termios else @@ -5501,7 +5200,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext <<EOF -#line 5505 "configure" +#line 5204 "configure" #include "confdefs.h" #include <termio.h> @@ -5515,7 +5214,7 @@ int main() { return 1; } EOF -if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=termio else @@ -5533,7 +5232,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext <<EOF -#line 5537 "configure" +#line 5236 "configure" #include "confdefs.h" #include <sgtty.h> @@ -5548,7 +5247,7 @@ int main() { return 1; } EOF -if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=sgtty else @@ -5566,7 +5265,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext <<EOF -#line 5570 "configure" +#line 5269 "configure" #include "confdefs.h" #include <termios.h> @@ -5583,7 +5282,7 @@ int main() { return 1; } EOF -if { (eval echo configure:5587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=termios else @@ -5601,7 +5300,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext <<EOF -#line 5605 "configure" +#line 5304 "configure" #include "confdefs.h" #include <termio.h> @@ -5617,7 +5316,7 @@ int main() { return 1; } EOF -if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=termio else @@ -5635,7 +5334,7 @@ fi tcl_cv_api_serial=none else cat > conftest.$ac_ext <<EOF -#line 5639 "configure" +#line 5338 "configure" #include "confdefs.h" #include <sgtty.h> @@ -5652,7 +5351,7 @@ int main() { return 1; } EOF -if { (eval echo configure:5656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=sgtty else @@ -5695,19 +5394,20 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 -echo "configure:5699: checking for fd_set in sys/types" >&5 +echo "configure:5398: checking for fd_set in sys/types" >&5 if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 5704 "configure" + + cat > conftest.$ac_ext <<EOF +#line 5404 "configure" #include "confdefs.h" #include <sys/types.h> int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:5711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_fd_set=yes else @@ -5723,12 +5423,13 @@ echo "$ac_t""$tcl_cv_type_fd_set" 1>&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6 -echo "configure:5727: checking for fd_mask in sys/select" >&5 +echo "configure:5427: checking for fd_mask in sys/select" >&5 if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 5732 "configure" + + cat > conftest.$ac_ext <<EOF +#line 5433 "configure" #include "confdefs.h" #include <sys/select.h> EOF @@ -5765,12 +5466,12 @@ fi #------------------------------------------------------------------------------ echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5769: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5470: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5774 "configure" +#line 5475 "configure" #include "confdefs.h" #include <sys/types.h> #include <time.h> @@ -5778,7 +5479,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5803,17 +5504,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5807: checking for $ac_hdr" >&5 +echo "configure:5508: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5812 "configure" +#line 5513 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5840,12 +5541,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5844: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5545: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5849 "configure" +#line 5550 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -5854,7 +5555,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5875,12 +5576,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:5879: checking for tm_zone in struct tm" >&5 +echo "configure:5580: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5884 "configure" +#line 5585 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_cv_struct_tm> @@ -5888,7 +5589,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:5892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -5908,12 +5609,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:5912: checking for tzname" >&5 +echo "configure:5613: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5917 "configure" +#line 5618 "configure" #include "confdefs.h" #include <time.h> #ifndef tzname /* For SGI. */ @@ -5923,7 +5624,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -5948,12 +5649,12 @@ fi for ac_func in gmtime_r localtime_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5952: checking for $ac_func" >&5 +echo "configure:5653: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5957 "configure" +#line 5658 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5976,7 +5677,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6002,19 +5703,20 @@ done echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6 -echo "configure:6006: checking tm_tzadj in struct tm" >&5 +echo "configure:5707: checking tm_tzadj in struct tm" >&5 if eval "test \"`echo '$''{'tcl_cv_member_tm_tzadj'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 6011 "configure" + + cat > conftest.$ac_ext <<EOF +#line 5713 "configure" #include "confdefs.h" #include <time.h> int main() { struct tm tm; tm.tm_tzadj; ; return 0; } EOF -if { (eval echo configure:6018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_member_tm_tzadj=yes else @@ -6035,19 +5737,20 @@ EOF fi echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:6039: checking tm_gmtoff in struct tm" >&5 +echo "configure:5741: checking tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'tcl_cv_member_tm_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 6044 "configure" + + cat > conftest.$ac_ext <<EOF +#line 5747 "configure" #include "confdefs.h" #include <time.h> int main() { struct tm tm; tm.tm_gmtoff; ; return 0; } EOF -if { (eval echo configure:6051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_member_tm_gmtoff=yes else @@ -6072,12 +5775,13 @@ EOF # (like convex) have timezone functions, etc. # echo $ac_n "checking long timezone variable""... $ac_c" 1>&6 -echo "configure:6076: checking long timezone variable" >&5 +echo "configure:5779: checking long timezone variable" >&5 if eval "test \"`echo '$''{'tcl_cv_timezone_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 6081 "configure" + + cat > conftest.$ac_ext <<EOF +#line 5785 "configure" #include "confdefs.h" #include <time.h> int main() { @@ -6086,7 +5790,7 @@ extern long timezone; exit (0); ; return 0; } EOF -if { (eval echo configure:6090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_timezone_long=yes else @@ -6109,12 +5813,13 @@ EOF # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6 -echo "configure:6113: checking time_t timezone variable" >&5 +echo "configure:5817: checking time_t timezone variable" >&5 if eval "test \"`echo '$''{'tcl_cv_timezone_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 6118 "configure" + + cat > conftest.$ac_ext <<EOF +#line 5823 "configure" #include "confdefs.h" #include <time.h> int main() { @@ -6123,7 +5828,7 @@ extern time_t timezone; exit (0); ; return 0; } EOF -if { (eval echo configure:6127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_timezone_time=yes else @@ -6150,12 +5855,12 @@ EOF # in struct stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:6154: checking for st_blksize in struct stat" >&5 +echo "configure:5859: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6159 "configure" +#line 5864 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -6163,7 +5868,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:6167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -6184,12 +5889,12 @@ EOF fi echo $ac_n "checking for fstatfs""... $ac_c" 1>&6 -echo "configure:6188: checking for fstatfs" >&5 +echo "configure:5893: checking for fstatfs" >&5 if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6193 "configure" +#line 5898 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char fstatfs(); below. */ @@ -6212,7 +5917,7 @@ fstatfs(); ; return 0; } EOF -if { (eval echo configure:6216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_fstatfs=yes" else @@ -6241,7 +5946,7 @@ fi # data, this checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:6245: checking for 8-bit clean memcmp" >&5 +echo "configure:5950: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6249,7 +5954,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <<EOF -#line 6253 "configure" +#line 5958 "configure" #include "confdefs.h" main() @@ -6259,7 +5964,7 @@ main() } EOF -if { (eval echo configure:6263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -6283,12 +5988,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" # {The replacement define is in compat/string.h} #-------------------------------------------------------------------- echo $ac_n "checking for memmove""... $ac_c" 1>&6 -echo "configure:6287: checking for memmove" >&5 +echo "configure:5992: checking for memmove" >&5 if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6292 "configure" +#line 5997 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char memmove(); below. */ @@ -6311,7 +6016,7 @@ memmove(); ; return 0; } EOF -if { (eval echo configure:6315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_memmove=yes" else @@ -6344,7 +6049,7 @@ fi #-------------------------------------------------------------------- if test "x${ac_cv_func_strstr}" = "xyes"; then echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6 -echo "configure:6348: checking proper strstr implementation" >&5 +echo "configure:6053: checking proper strstr implementation" >&5 if eval "test \"`echo '$''{'tcl_cv_strstr_unbroken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6353,7 +6058,7 @@ else tcl_cv_strstr_unbroken=broken else cat > conftest.$ac_ext <<EOF -#line 6357 "configure" +#line 6062 "configure" #include "confdefs.h" extern int strstr(); @@ -6362,7 +6067,7 @@ else exit(strstr("\0test", "test") ? 1 : 0); } EOF -if { (eval echo configure:6366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strstr_unbroken=ok else @@ -6389,12 +6094,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for strtoul""... $ac_c" 1>&6 -echo "configure:6393: checking for strtoul" >&5 +echo "configure:6098: checking for strtoul" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6398 "configure" +#line 6103 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char strtoul(); below. */ @@ -6417,7 +6122,7 @@ strtoul(); ; return 0; } EOF -if { (eval echo configure:6421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtoul=yes" else @@ -6439,7 +6144,7 @@ fi if test $tcl_ok = 1; then echo $ac_n "checking proper strtoul implementation""... $ac_c" 1>&6 -echo "configure:6443: checking proper strtoul implementation" >&5 +echo "configure:6148: checking proper strtoul implementation" >&5 if eval "test \"`echo '$''{'tcl_cv_strtoul_unbroken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6448,7 +6153,7 @@ else tcl_cv_strtoul_unbroken=broken else cat > conftest.$ac_ext <<EOF -#line 6452 "configure" +#line 6157 "configure" #include "confdefs.h" extern int strtoul(); @@ -6464,7 +6169,7 @@ else exit(0); } EOF -if { (eval echo configure:6468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtoul_unbroken=ok else @@ -6493,12 +6198,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:6497: checking for strtod" >&5 +echo "configure:6202: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6502 "configure" +#line 6207 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char strtod(); below. */ @@ -6521,7 +6226,7 @@ strtod(); ; return 0; } EOF -if { (eval echo configure:6525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -6543,7 +6248,7 @@ fi if test $tcl_ok = 1; then echo $ac_n "checking proper strtod implementation""... $ac_c" 1>&6 -echo "configure:6547: checking proper strtod implementation" >&5 +echo "configure:6252: checking proper strtod implementation" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_unbroken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6552,7 +6257,7 @@ else tcl_cv_strtod_unbroken=broken else cat > conftest.$ac_ext <<EOF -#line 6556 "configure" +#line 6261 "configure" #include "confdefs.h" extern double strtod(); @@ -6568,7 +6273,7 @@ else exit(0); } EOF -if { (eval echo configure:6572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_unbroken=ok else @@ -6600,12 +6305,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:6604: checking for strtod" >&5 +echo "configure:6309: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6609 "configure" +#line 6314 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char strtod(); below. */ @@ -6628,7 +6333,7 @@ strtod(); ; return 0; } EOF -if { (eval echo configure:6632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -6650,7 +6355,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:6654: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:6359: checking for Solaris2.4/Tru64 strtod bugs" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6659,7 +6364,7 @@ else tcl_cv_strtod_buggy=buggy else cat > conftest.$ac_ext <<EOF -#line 6663 "configure" +#line 6368 "configure" #include "confdefs.h" extern double strtod(); @@ -6682,7 +6387,7 @@ else exit(0); } EOF -if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_buggy=ok else @@ -6713,12 +6418,12 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:6717: checking for ANSI C header files" >&5 +echo "configure:6422: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6722 "configure" +#line 6427 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -6726,7 +6431,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6743,7 +6448,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 6747 "configure" +#line 6452 "configure" #include "confdefs.h" #include <string.h> EOF @@ -6761,7 +6466,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 6765 "configure" +#line 6470 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -6782,7 +6487,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 6786 "configure" +#line 6491 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -6793,7 +6498,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:6797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6817,12 +6522,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:6821: checking for mode_t" >&5 +echo "configure:6526: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6826 "configure" +#line 6531 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -6850,12 +6555,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:6854: checking for pid_t" >&5 +echo "configure:6559: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6859 "configure" +#line 6564 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -6883,12 +6588,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:6887: checking for size_t" >&5 +echo "configure:6592: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6892 "configure" +#line 6597 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -6916,12 +6621,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:6920: checking for uid_t in sys/types.h" >&5 +echo "configure:6625: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6925 "configure" +#line 6630 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -6951,12 +6656,13 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:6955: checking for socklen_t" >&5 +echo "configure:6660: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 6960 "configure" + + cat > conftest.$ac_ext <<EOF +#line 6666 "configure" #include "confdefs.h" #include <sys/types.h> @@ -6995,12 +6701,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for opendir""... $ac_c" 1>&6 -echo "configure:6999: checking for opendir" >&5 +echo "configure:6705: checking for opendir" >&5 if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7004 "configure" +#line 6710 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char opendir(); below. */ @@ -7023,7 +6729,7 @@ opendir(); ; return 0; } EOF -if { (eval echo configure:7027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_opendir=yes" else @@ -7056,12 +6762,13 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking union wait""... $ac_c" 1>&6 -echo "configure:7060: checking union wait" >&5 +echo "configure:6766: checking union wait" >&5 if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 7065 "configure" + + cat > conftest.$ac_ext <<EOF +#line 6772 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -7073,7 +6780,7 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED ; return 0; } EOF -if { (eval echo configure:7077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_union_wait=yes else @@ -7100,12 +6807,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6 -echo "configure:7104: checking for strncasecmp" >&5 +echo "configure:6811: checking for strncasecmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7109 "configure" +#line 6816 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char strncasecmp(); below. */ @@ -7128,7 +6835,7 @@ strncasecmp(); ; return 0; } EOF -if { (eval echo configure:7132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strncasecmp=yes" else @@ -7150,7 +6857,7 @@ fi if test "$tcl_ok" = 0; then echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6 -echo "configure:7154: checking for strncasecmp in -lsocket" >&5 +echo "configure:6861: checking for strncasecmp in -lsocket" >&5 ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7158,7 +6865,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 7162 "configure" +#line 6869 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7169,7 +6876,7 @@ int main() { strncasecmp() ; return 0; } EOF -if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7193,7 +6900,7 @@ fi fi if test "$tcl_ok" = 0; then echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6 -echo "configure:7197: checking for strncasecmp in -linet" >&5 +echo "configure:6904: checking for strncasecmp in -linet" >&5 ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7201,7 +6908,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <<EOF -#line 7205 "configure" +#line 6912 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7212,7 +6919,7 @@ int main() { strncasecmp() ; return 0; } EOF -if { (eval echo configure:7216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7250,12 +6957,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6 -echo "configure:7254: checking for BSDgettimeofday" >&5 +echo "configure:6961: checking for BSDgettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7259 "configure" +#line 6966 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char BSDgettimeofday(); below. */ @@ -7278,7 +6985,7 @@ BSDgettimeofday(); ; return 0; } EOF -if { (eval echo configure:7282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_BSDgettimeofday=yes" else @@ -7300,12 +7007,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 -echo "configure:7304: checking for gettimeofday" >&5 +echo "configure:7011: checking for gettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7309 "configure" +#line 7016 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gettimeofday(); below. */ @@ -7328,7 +7035,7 @@ gettimeofday(); ; return 0; } EOF -if { (eval echo configure:7332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gettimeofday=yes" else @@ -7355,12 +7062,13 @@ fi fi echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6 -echo "configure:7359: checking for gettimeofday declaration" >&5 +echo "configure:7066: checking for gettimeofday declaration" >&5 if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 7364 "configure" + + cat > conftest.$ac_ext <<EOF +#line 7072 "configure" #include "confdefs.h" #include <sys/time.h> EOF @@ -7391,14 +7099,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:7395: checking whether char is unsigned" >&5 +echo "configure:7103: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <<EOF -#line 7402 "configure" +#line 7110 "configure" #include "confdefs.h" #ifdef __CHAR_UNSIGNED__ yes @@ -7420,7 +7128,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7424 "configure" +#line 7132 "configure" #include "confdefs.h" /* volatile prevents gcc2 from optimizing the test away on sparcs. */ #if !defined(__STDC__) || __STDC__ != 1 @@ -7430,7 +7138,7 @@ main() { volatile char c = 255; exit(c < 0); } EOF -if { (eval echo configure:7434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -7454,12 +7162,13 @@ EOF fi echo $ac_n "checking signed char declarations""... $ac_c" 1>&6 -echo "configure:7458: checking signed char declarations" >&5 +echo "configure:7166: checking signed char declarations" >&5 if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 7463 "configure" + + cat > conftest.$ac_ext <<EOF +#line 7172 "configure" #include "confdefs.h" int main() { @@ -7469,7 +7178,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:7473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_char_signed=yes else @@ -7494,20 +7203,21 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6 -echo "configure:7498: checking for a putenv() that copies the buffer" >&5 +echo "configure:7207: checking for a putenv() that copies the buffer" >&5 if eval "test \"`echo '$''{'tcl_cv_putenv_copy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then + + if test "$cross_compiling" = yes; then tcl_cv_putenv_copy=no else cat > conftest.$ac_ext <<EOF -#line 7506 "configure" +#line 7216 "configure" #include "confdefs.h" #include <stdlib.h> #define OURVAR "havecopy=yes" - int main (int argc, char *argv) + int main (int argc, char *argv[]) { char *foo, *bar; foo = (char *)strdup(OURVAR); @@ -7524,7 +7234,7 @@ else } EOF -if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_putenv_copy=no else @@ -7536,7 +7246,6 @@ fi rm -fr conftest* fi - fi echo "$ac_t""$tcl_cv_putenv_copy" 1>&6 @@ -7565,17 +7274,17 @@ fi if test "$langinfo_ok" = "yes"; then ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6 -echo "configure:7569: checking for langinfo.h" >&5 +echo "configure:7278: checking for langinfo.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7574 "configure" +#line 7283 "configure" #include "confdefs.h" #include <langinfo.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7599,20 +7308,20 @@ fi fi echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6 -echo "configure:7603: checking whether to use nl_langinfo" >&5 +echo "configure:7312: checking whether to use nl_langinfo" >&5 if test "$langinfo_ok" = "yes"; then if eval "test \"`echo '$''{'tcl_cv_langinfo_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7609 "configure" +#line 7318 "configure" #include "confdefs.h" #include <langinfo.h> int main() { nl_langinfo(CODESET); ; return 0; } EOF -if { (eval echo configure:7616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_langinfo_h=yes else @@ -7637,28 +7346,384 @@ EOF #-------------------------------------------------------------------- +# Darwin specific API checks and defines +#-------------------------------------------------------------------- + +if test "`uname -s`" = "Darwin" ; then + for ac_hdr in copyfile.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:7358: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7363 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + for ac_func in copyfile +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7397: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7402 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + if test $tcl_corefoundation = yes; then + for ac_hdr in libkern/OSAtomic.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:7454: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7459 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + for ac_func in OSSpinLockLock +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7493: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7498 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + for ac_func in pthread_atfork +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7548: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7553 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + fi + cat >> confdefs.h <<\EOF +#define USE_VFORK 1 +EOF + + cat >> confdefs.h <<\EOF +#define TCL_DEFAULT_ENCODING "utf-8" +EOF + + cat >> confdefs.h <<\EOF +#define TCL_LOAD_FROM_MEMORY 1 +EOF + + for ac_hdr in AvailabilityMacros.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:7617: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7622 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + if test "$ac_cv_header_AvailabilityMacros_h" = yes; then + echo $ac_n "checking if weak import is available""... $ac_c" 1>&6 +echo "configure:7655: checking if weak import is available" >&5 +if eval "test \"`echo '$''{'tcl_cv_cc_weak_import'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" + cat > conftest.$ac_ext <<EOF +#line 7662 "configure" +#include "confdefs.h" + + #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ + #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 + #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 + #endif + #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020 + #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020 + #endif + int rand(void) __attribute__((weak_import)); + +int main() { +rand(); +; return 0; } +EOF +if { (eval echo configure:7678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + tcl_cv_cc_weak_import=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_cc_weak_import=no +fi +rm -f conftest* + CFLAGS=$hold_cflags +fi + +echo "$ac_t""$tcl_cv_cc_weak_import" 1>&6 + if test $tcl_cv_cc_weak_import = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_WEAK_IMPORT 1 +EOF + + fi + fi +fi + +#-------------------------------------------------------------------- # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- echo $ac_n "checking for fts""... $ac_c" 1>&6 -echo "configure:7645: checking for fts" >&5 +echo "configure:7706: checking for fts" >&5 if eval "test \"`echo '$''{'tcl_cv_api_fts'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7651 "configure" +#line 7712 "configure" #include "confdefs.h" -#include <sys/param.h> - #include <sys/stat.h> - #include <fts.h> + + #include <sys/param.h> + #include <sys/stat.h> + #include <fts.h> + int main() { -char*const p[2] = {"/", NULL}; - FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL); - FTSENT *e = fts_read(f); fts_close(f); + + char*const p[2] = {"/", NULL}; + FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL); + FTSENT *e = fts_read(f); fts_close(f); + ; return 0; } EOF -if { (eval echo configure:7662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_api_fts=yes else @@ -7690,17 +7755,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7694: checking for $ac_hdr" >&5 +echo "configure:7759: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7699 "configure" +#line 7764 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7730,17 +7795,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7734: checking for $ac_hdr" >&5 +echo "configure:7799: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7739 "configure" +#line 7804 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7768,7 +7833,7 @@ done echo $ac_n "checking system version""... $ac_c" 1>&6 -echo "configure:7772: checking system version" >&5 +echo "configure:7837: checking system version" >&5 if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7799,7 +7864,7 @@ echo "$ac_t""$tcl_cv_sys_version" 1>&6 system=$tcl_cv_sys_version echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6 -echo "configure:7803: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo "configure:7868: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -7860,38 +7925,38 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then - echo $ac_n "checking how to package libraries""... $ac_c" 1>&6 -echo "configure:7865: checking how to package libraries" >&5 - # Check whether --enable-framework or --disable-framework was given. + if test "`uname -s`" = "Darwin" ; then + echo $ac_n "checking how to package libraries""... $ac_c" 1>&6 +echo "configure:7931: checking how to package libraries" >&5 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then enableval="$enable_framework" - tcl_ok=$enableval + enable_framework=$enableval else - tcl_ok=no + enable_framework=no fi - - if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - tcl_ok=$enableval - else - tcl_ok=no - fi - - if test "$tcl_ok" = "yes" ; then - echo "$ac_t""framework" 1>&6 - FRAMEWORK_BUILD=1 - if test "${SHARED_BUILD}" = "0" ; then - echo "configure: warning: Frameworks can only be built if --enable-shared is yes" 1>&2 - FRAMEWORK_BUILD=0 + if test $enable_framework = yes; then + if test $SHARED_BUILD = 0; then + echo "configure: warning: Frameworks can only be built if --enable-shared is yes" 1>&2 + enable_framework=no + fi + if test $tcl_corefoundation = no; then + echo "configure: warning: Frameworks can only be used when CoreFoundation is available" 1>&2 + enable_framework=no + fi fi - if test $tcl_corefoundation = no; then - echo "configure: warning: Frameworks can only be used when CoreFoundation is available" 1>&2 + if test $enable_framework = yes; then + echo "$ac_t""framework" 1>&6 + FRAMEWORK_BUILD=1 + else + if test $SHARED_BUILD = 1; then + echo "$ac_t""shared library" 1>&6 + else + echo "$ac_t""static library" 1>&6 + fi FRAMEWORK_BUILD=0 fi - else - echo "$ac_t""standard shared library" 1>&6 - FRAMEWORK_BUILD=0 fi TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" diff --git a/unix/configure.in b/unix/configure.in index 13bc03e..c4dc1b3 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ 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.106.2.27 2006/05/04 13:09:19 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.106.2.28 2006/07/20 06:21:45 das Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.13) @@ -133,6 +133,13 @@ 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)]) + +if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ + test "`uname -r | awk -F. '{print [$]1}'`" -lt 7; then + # prior to Darwin 7, realpath is not threadsafe, so don't + # use it when threads are enabled, c.f. bug # 711232 + ac_cv_func_realpath=no +fi AC_CHECK_FUNC(realpath, , [AC_DEFINE(NO_REALPATH)]) #--------------------------------------------------------------------------- @@ -153,14 +160,14 @@ SC_SERIAL_PORT # special flag. #-------------------------------------------------------------------- -AC_CACHE_CHECK([for fd_set in sys/types], tcl_cv_type_fd_set, +AC_CACHE_CHECK([for fd_set in sys/types], tcl_cv_type_fd_set, [ AC_TRY_COMPILE([#include <sys/types.h>],[fd_set readMask, writeMask;], - tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no)) + tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no)]) tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - AC_CACHE_CHECK([for fd_mask in sys/select], tcl_cv_grep_fd_mask, + AC_CACHE_CHECK([for fd_mask in sys/select], tcl_cv_grep_fd_mask, [ AC_EGREP_HEADER(fd_mask, sys/select.h, - tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing)) + tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing)]) if test $tcl_cv_grep_fd_mask = present; then AC_DEFINE(HAVE_SYS_SELECT_H) tcl_ok=yes @@ -295,8 +302,8 @@ AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T -AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, - [AC_EGREP_CPP(changequote(<<,>>)dnl +AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, [ + AC_EGREP_CPP(changequote(<<,>>)dnl <<(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]>>dnl changequote([,]),[ #include <sys/types.h> @@ -327,13 +334,13 @@ AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H)]) # the trick. #-------------------------------------------------------------------- -AC_CACHE_CHECK([union wait], tcl_cv_union_wait, +AC_CACHE_CHECK([union wait], tcl_cv_union_wait, [ AC_TRY_LINK([#include <sys/types.h> #include <sys/wait.h>], [ union wait x; WIFEXITED(x); /* Generates compiler error if WIFEXITED * uses an int. */ - ], tcl_cv_union_wait=yes, tcl_cv_union_wait=no)) + ], tcl_cv_union_wait=yes, tcl_cv_union_wait=no)]) if test $tcl_cv_union_wait = no; then AC_DEFINE(NO_UNION_WAIT) fi @@ -370,9 +377,9 @@ AC_CHECK_FUNC(BSDgettimeofday, [AC_DEFINE(HAVE_BSDGETTIMEOFDAY)], [ AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD)]) ]) -AC_CACHE_CHECK([for gettimeofday declaration], tcl_cv_grep_gettimeofday, +AC_CACHE_CHECK([for gettimeofday declaration], tcl_cv_grep_gettimeofday, [ AC_EGREP_HEADER(gettimeofday, sys/time.h, - tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing)) + tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing)]) if test $tcl_cv_grep_gettimeofday = missing ; then AC_DEFINE(GETTOD_NOT_DECLARED) fi @@ -384,11 +391,11 @@ fi #-------------------------------------------------------------------- AC_C_CHAR_UNSIGNED -AC_CACHE_CHECK([signed char declarations], tcl_cv_char_signed, +AC_CACHE_CHECK([signed char declarations], tcl_cv_char_signed, [ AC_TRY_COMPILE(, [ signed char *p; p = 0; - ], tcl_cv_char_signed=yes, tcl_cv_char_signed=no)) + ], tcl_cv_char_signed=yes, tcl_cv_char_signed=no)]) if test $tcl_cv_char_signed = yes; then AC_DEFINE(HAVE_SIGNED_CHAR) fi @@ -397,7 +404,7 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -AC_CACHE_CHECK([for a putenv() that copies the buffer], tcl_cv_putenv_copy, +AC_CACHE_CHECK([for a putenv() that copies the buffer], tcl_cv_putenv_copy, [ AC_TRY_RUN([ #include <stdlib.h> #define OURVAR "havecopy=yes" @@ -419,8 +426,7 @@ AC_CACHE_CHECK([for a putenv() that copies the buffer], tcl_cv_putenv_copy, ], tcl_cv_putenv_copy=no, tcl_cv_putenv_copy=yes, - tcl_cv_putenv_copy=no) -) + tcl_cv_putenv_copy=no)]) if test $tcl_cv_putenv_copy = yes; then AC_DEFINE(HAVE_PUTENV_THAT_COPIES) fi @@ -432,19 +438,58 @@ fi SC_ENABLE_LANGINFO #-------------------------------------------------------------------- +# Darwin specific API checks and defines +#-------------------------------------------------------------------- + +if test "`uname -s`" = "Darwin" ; then + AC_CHECK_HEADERS(copyfile.h) + AC_CHECK_FUNCS(copyfile) + if test $tcl_corefoundation = yes; then + AC_CHECK_HEADERS(libkern/OSAtomic.h) + AC_CHECK_FUNCS(OSSpinLockLock) + AC_CHECK_FUNCS(pthread_atfork) + fi + AC_DEFINE(USE_VFORK) + AC_DEFINE(TCL_DEFAULT_ENCODING, "utf-8") + AC_DEFINE(TCL_LOAD_FROM_MEMORY) + AC_CHECK_HEADERS(AvailabilityMacros.h) + if test "$ac_cv_header_AvailabilityMacros_h" = yes; then + AC_CACHE_CHECK([if weak import is available], tcl_cv_cc_weak_import, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" + AC_TRY_LINK([ + #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ + #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 + #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 + #endif + #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020 + #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020 + #endif + int rand(void) __attribute__((weak_import)); + ], [rand();], + tcl_cv_cc_weak_import=yes, tcl_cv_cc_weak_import=no) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_weak_import = yes; then + AC_DEFINE(HAVE_WEAK_IMPORT) + fi + fi +fi + +#-------------------------------------------------------------------- # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- AC_CACHE_CHECK([for fts], tcl_cv_api_fts, [ - AC_TRY_LINK([#include <sys/param.h> - #include <sys/stat.h> - #include <fts.h>], - [char*const p[2] = {"/", NULL}; - FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL); - FTSENT *e = fts_read(f); fts_close(f);], - tcl_cv_api_fts=yes, tcl_cv_api_fts=no)]) + AC_TRY_LINK([ + #include <sys/param.h> + #include <sys/stat.h> + #include <fts.h> + ], [ + char*const p[2] = {"/", NULL}; + FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL); + FTSENT *e = fts_read(f); fts_close(f); + ], tcl_cv_api_fts=yes, tcl_cv_api_fts=no)]) if test $tcl_cv_api_fts = yes; then - AC_DEFINE(HAVE_FTS, 1, [Do we have fts functions?]) + AC_DEFINE(HAVE_FTS) fi #-------------------------------------------------------------------- diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 57b053e..f81af6d 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -539,32 +539,32 @@ AC_DEFUN([SC_ENABLE_SHARED], [ #------------------------------------------------------------------------ AC_DEFUN([SC_ENABLE_FRAMEWORK], [ - AC_MSG_CHECKING([how to package libraries]) - AC_ARG_ENABLE(framework, - [ --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]], - [tcl_ok=$enableval], [tcl_ok=no]) - - if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - tcl_ok=$enableval - else - tcl_ok=no - fi - - if test "$tcl_ok" = "yes" ; then - AC_MSG_RESULT([framework]) - FRAMEWORK_BUILD=1 - if test "${SHARED_BUILD}" = "0" ; then - AC_MSG_WARN([Frameworks can only be built if --enable-shared is yes]) - FRAMEWORK_BUILD=0 + if test "`uname -s`" = "Darwin" ; then + AC_MSG_CHECKING([how to package libraries]) + AC_ARG_ENABLE(framework, + [ --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]], + [enable_framework=$enableval], [enable_framework=no]) + if test $enable_framework = yes; then + if test $SHARED_BUILD = 0; then + AC_MSG_WARN([Frameworks can only be built if --enable-shared is yes]) + enable_framework=no + fi + if test $tcl_corefoundation = no; then + AC_MSG_WARN([Frameworks can only be used when CoreFoundation is available]) + enable_framework=no + fi fi - if test $tcl_corefoundation = no; then - AC_MSG_WARN([Frameworks can only be used when CoreFoundation is available]) + if test $enable_framework = yes; then + AC_MSG_RESULT([framework]) + FRAMEWORK_BUILD=1 + else + if test $SHARED_BUILD = 1; then + AC_MSG_RESULT([shared library]) + else + AC_MSG_RESULT([static library]) + fi FRAMEWORK_BUILD=0 fi - else - AC_MSG_RESULT([standard shared library]) - FRAMEWORK_BUILD=0 fi ]) @@ -1603,24 +1603,11 @@ dnl AC_CHECK_TOOL(AR, ar) if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" AC_DEFINE(HAVE_COREFOUNDATION) - AC_CHECK_HEADERS(libkern/OSAtomic.h) - AC_CHECK_FUNCS(OSSpinLockLock) - AC_CHECK_FUNCS(pthread_atfork) + else + tcl_corefoundation=no fi fi - AC_CHECK_HEADERS(copyfile.h) - AC_CHECK_FUNCS(copyfile) AC_DEFINE(MAC_OSX_TCL) - AC_DEFINE(USE_VFORK) - AC_DEFINE(TCL_DEFAULT_ENCODING,"utf-8") - AC_DEFINE(TCL_LOAD_FROM_MEMORY) - # prior to Darwin 7, realpath is not threadsafe, so don't - # use it when threads are enabled, c.f. bug # 711232: - AC_CHECK_FUNC(realpath) - if test $ac_cv_func_realpath = yes -a "${TCL_THREADS}" = 1 \ - -a `uname -r | awk -F. '{print [$]1}'` -lt 7 ; then - ac_cv_func_realpath=no - fi ;; NEXTSTEP-*) SHLIB_CFLAGS="" @@ -2266,7 +2253,7 @@ int main() { #-------------------------------------------------------------------- AC_DEFUN([SC_MISSING_POSIX_HEADERS], [ - AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, + AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [ AC_TRY_LINK([#include <sys/types.h> #include <dirent.h>], [ #ifndef _POSIX_SOURCE @@ -2286,7 +2273,7 @@ d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); -], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)) +], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)]) if test $tcl_cv_dirent_h = no; then AC_DEFINE(NO_DIRENT_H) @@ -2484,16 +2471,16 @@ AC_DEFUN([SC_TIME_HANDLER], [ AC_CHECK_FUNCS(gmtime_r localtime_r) - AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, + AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;], - tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)) + tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)]) if test $tcl_cv_member_tm_tzadj = yes ; then AC_DEFINE(HAVE_TM_TZADJ) fi - AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, + AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;], - tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)) + tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)]) if test $tcl_cv_member_tm_gmtoff = yes ; then AC_DEFINE(HAVE_TM_GMTOFF) fi @@ -2502,24 +2489,24 @@ AC_DEFUN([SC_TIME_HANDLER], [ # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, + AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [ AC_TRY_COMPILE([#include <time.h>], [extern long timezone; timezone += 1; exit (0);], - tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)) + tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)]) if test $tcl_cv_timezone_long = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR) else # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, + AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [ AC_TRY_COMPILE([#include <time.h>], [extern time_t timezone; timezone += 1; exit (0);], - tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)) + tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)]) if test $tcl_cv_timezone_time = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR) fi diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 121792f..10dfd54 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -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: tclLoadDyld.c,v 1.14.2.7 2006/03/16 09:15:50 das Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.14.2.8 2006/07/20 06:21:46 das Exp $ */ #include "tclInt.h" @@ -36,11 +36,7 @@ typedef struct Tcl_DyldLoadHandle { } Tcl_DyldLoadHandle; #ifdef TCL_LOAD_FROM_MEMORY -typedef struct ThreadSpecificData { - int haveLoadMemory; -} ThreadSpecificData; - -static Tcl_ThreadDataKey dataKey; +extern long tclMacOSXDarwinRelease; #endif /* @@ -391,23 +387,13 @@ TclpLoadMemoryGetBuffer(interp, size) Tcl_Interp *interp; /* Used for error reporting. */ int size; /* Size of desired buffer. */ { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); void *buffer = NULL; - if (!tsdPtr->haveLoadMemory) { - /* - * NSCreateObjectFileImageFromMemory is available but always fails - * prior to Darwin 7. - */ - - struct utsname name; - - if (!uname(&name)) { - long release = strtol(name.release, NULL, 10); - tsdPtr->haveLoadMemory = (release >= 7) ? 1 : -1; - } - } - if (tsdPtr->haveLoadMemory > 0) { + /* + * NSCreateObjectFileImageFromMemory is available but always fails + * prior to Darwin 7. + */ + if (tclMacOSXDarwinRelease >= 7) { /* * We must allocate the buffer using vm_allocate, because * NSCreateObjectFileImageFromMemory will dispose of it using @@ -480,14 +466,14 @@ TclpLoadMemory(interp, buffer, size, codeSize, loadHandle, unloadProcPtr) #define mh_size sizeof(struct mach_header_64) #endif - if (codeSize >= sizeof(struct fat_header) + if ((size_t) codeSize >= sizeof(struct fat_header) && fh->magic == OSSwapHostToBigInt32(FAT_MAGIC)) { /* * Fat binary, try to find mach_header for our architecture */ uint32_t fh_nfat_arch = OSSwapBigToHostInt32(fh->nfat_arch); - if (codeSize >= sizeof(struct fat_header) + + if ((size_t) codeSize >= sizeof(struct fat_header) + fh_nfat_arch * sizeof(struct fat_arch)) { void *fatarchs = buffer + sizeof(struct fat_header); CONST NXArchInfo *arch = NXGetLocalArchInfo(); diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 317eca7..84b819e 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -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: tclUnixFCmd.c,v 1.28.2.9 2006/03/28 10:47:09 das Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.28.2.10 2006/07/20 06:21:46 das Exp $ * * Portions of this code were derived from NetBSD source code which has * the following copyright notice: @@ -189,6 +189,22 @@ Realpath(path, resolved) #define Realpath realpath #endif +#ifndef NO_REALPATH +#if defined(__APPLE__) && defined(TCL_THREADS) && \ + defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \ + MAC_OS_X_VERSION_MIN_REQUIRED < 1030 +/* + * prior to Darwin 7, realpath is not threadsafe, c.f. bug 711232; + * if we might potentially be running on pre-10.3 OSX, + * check Darwin release at runtime before using realpath. + */ +extern long tclMacOSXDarwinRelease; +#define haveRealpath (tclMacOSXDarwinRelease >= 7) +#else +#define haveRealpath 1 +#endif +#endif /* NO_REALPATH */ + /* *--------------------------------------------------------------------------- @@ -266,7 +282,7 @@ DoRenameFile(src, dst) * conditionally compiled because realpath() not defined on all systems. */ - if (errno == EINVAL) { + if (errno == EINVAL && haveRealpath) { char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN]; DIR *dirPtr; Tcl_DirEntry *dirEntPtr; @@ -402,6 +418,9 @@ DoCopyFile(src, dst, statBufPtr) return TCL_ERROR; } #ifdef HAVE_COPYFILE +#ifdef WEAK_IMPORT_COPYFILE + if (copyfile != NULL) +#endif copyfile(src, dst, NULL, COPYFILE_XATTR|COPYFILE_NOFOLLOW_SRC); #endif break; @@ -1206,6 +1225,9 @@ CopyFileAtts(src, dst, statBufPtr) return TCL_ERROR; } #ifdef HAVE_COPYFILE +#ifdef WEAK_IMPORT_COPYFILE + if (copyfile != NULL) +#endif copyfile(src, dst, NULL, COPYFILE_XATTR|COPYFILE_ACL); #endif return TCL_OK; @@ -1815,7 +1837,7 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) #ifndef NO_REALPATH /* For speed, try to get the entire path in one go */ - if (nextCheckpoint == 0) { + if (nextCheckpoint == 0 && haveRealpath) { char *lastDir = strrchr(currentPathEndPosition, '/'); if (lastDir != NULL) { nativePath = Tcl_UtfToExternalDString(NULL, path, @@ -1869,57 +1891,59 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) * have 'realpath'. */ #ifndef NO_REALPATH - /* - * If we only had '/foo' or '/' then we never increment nextCheckpoint - * and we don't need or want to go through 'Realpath'. Also, on some - * platforms, passing an empty string to 'Realpath' will give us the - * normalized pwd, which is not what we want at all! - */ - if (nextCheckpoint == 0) return 0; - - nativePath = Tcl_UtfToExternalDString(NULL, path, nextCheckpoint, &ds); - if (Realpath(nativePath, normPath) != NULL) { - int newNormLen; - wholeStringOk: - newNormLen = strlen(normPath); - if ((newNormLen == Tcl_DStringLength(&ds)) - && (strcmp(normPath, nativePath) == 0)) { - /* String is unchanged */ + if (haveRealpath) { + /* + * If we only had '/foo' or '/' then we never increment nextCheckpoint + * and we don't need or want to go through 'Realpath'. Also, on some + * platforms, passing an empty string to 'Realpath' will give us the + * normalized pwd, which is not what we want at all! + */ + if (nextCheckpoint == 0) return 0; + + nativePath = Tcl_UtfToExternalDString(NULL, path, nextCheckpoint, &ds); + if (Realpath(nativePath, normPath) != NULL) { + int newNormLen; + wholeStringOk: + newNormLen = strlen(normPath); + if ((newNormLen == Tcl_DStringLength(&ds)) + && (strcmp(normPath, nativePath) == 0)) { + /* String is unchanged */ + Tcl_DStringFree(&ds); + if (path[nextCheckpoint] != '\0') { + nextCheckpoint++; + } + return nextCheckpoint; + } + + /* + * Free up the native path and put in its place the + * converted, normalized path. + */ Tcl_DStringFree(&ds); + Tcl_ExternalToUtfDString(NULL, normPath, (int) newNormLen, &ds); + if (path[nextCheckpoint] != '\0') { - nextCheckpoint++; + /* not at end, append remaining path */ + int normLen = Tcl_DStringLength(&ds); + Tcl_DStringAppend(&ds, path + nextCheckpoint, + pathLen - nextCheckpoint); + /* + * We recognise up to and including the directory + * separator. + */ + nextCheckpoint = normLen + 1; + } else { + /* We recognise the whole string */ + nextCheckpoint = Tcl_DStringLength(&ds); } - return nextCheckpoint; - } - - /* - * Free up the native path and put in its place the - * converted, normalized path. - */ - Tcl_DStringFree(&ds); - Tcl_ExternalToUtfDString(NULL, normPath, (int) newNormLen, &ds); - - if (path[nextCheckpoint] != '\0') { - /* not at end, append remaining path */ - int normLen = Tcl_DStringLength(&ds); - Tcl_DStringAppend(&ds, path + nextCheckpoint, - pathLen - nextCheckpoint); /* - * We recognise up to and including the directory - * separator. - */ - nextCheckpoint = normLen + 1; - } else { - /* We recognise the whole string */ - nextCheckpoint = Tcl_DStringLength(&ds); + * Overwrite with the normalized path. + */ + Tcl_SetStringObj(pathPtr, Tcl_DStringValue(&ds), + Tcl_DStringLength(&ds)); } - /* - * Overwrite with the normalized path. - */ - Tcl_SetStringObj(pathPtr, Tcl_DStringValue(&ds), - Tcl_DStringLength(&ds)); + Tcl_DStringFree(&ds); } - Tcl_DStringFree(&ds); #endif /* !NO_REALPATH */ return nextCheckpoint; diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 34c36fb..1c1f8fc 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -7,7 +7,7 @@ * Copyright (c) 1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclUnixInit.c,v 1.34.2.12 2006/01/25 23:06:16 dkf Exp $ + * RCS: @(#) $Id: tclUnixInit.c,v 1.34.2.13 2006/07/20 06:21:46 das Exp $ */ #if defined(HAVE_COREFOUNDATION) @@ -17,7 +17,14 @@ #include "tclPort.h" #include <locale.h> #ifdef HAVE_LANGINFO -#include <langinfo.h> +# include <langinfo.h> +# ifdef __APPLE__ +# if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1030 + /* Support for weakly importing nl_langinfo on Darwin. */ +# define WEAK_IMPORT_NL_LANGINFO + extern char *nl_langinfo(nl_item) WEAK_IMPORT_ATTRIBUTE; +# endif +# endif #endif #if defined(__FreeBSD__) && defined(__GNUC__) # include <floatingpoint.h> @@ -151,6 +158,16 @@ static int MacOSXGetLibraryPath _ANSI_ARGS_(( Tcl_Interp *interp, int maxPathLen, char *tclLibPath)); #endif /* HAVE_COREFOUNDATION */ +#if defined(__APPLE__) && (defined(TCL_LOAD_FROM_MEMORY) || ( \ + defined(TCL_THREADS) && defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \ + MAC_OS_X_VERSION_MIN_REQUIRED < 1030)) +/* + * Need to check Darwin release at runtime in tclUnixFCmd.c and tclLoadDyld.c: + * initialize release global at startup from uname(). + */ +#define GET_DARWIN_RELEASE 1 +long tclMacOSXDarwinRelease = 0; +#endif /* @@ -222,6 +239,15 @@ TclpInitPlatform() */ (void) dlopen (NULL, RTLD_NOW); /* INTL: Native. */ #endif + +#ifdef GET_DARWIN_RELEASE + { + struct utsname name; + if (!uname(&name)) { + tclMacOSXDarwinRelease = strtol(name.release, NULL, 10); + } + } +#endif } /* @@ -510,7 +536,11 @@ TclpSetInitialEncodings() * but this does not work on some systems (e.g. Linux/i386 RH 5.0). */ #ifdef HAVE_LANGINFO - if (setlocale(LC_CTYPE, "") != NULL) { + if ( +#ifdef WEAK_IMPORT_NL_LANGINFO + nl_langinfo != NULL && +#endif + setlocale(LC_CTYPE, "") != NULL) { Tcl_DString ds; /* diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 0d3bd0b..de92407 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -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: tclUnixPipe.c,v 1.23.2.5 2005/07/28 15:27:59 dkf Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.23.2.6 2006/07/20 06:21:46 das Exp $ */ #include "tclInt.h" @@ -398,7 +398,7 @@ TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile, * process. */ { TclFile errPipeIn, errPipeOut; - int joinThisError, count, status, fd; + int count, status, fd; char errSpace[200 + TCL_INTEGER_SPACE]; Tcl_DString *dsArray; char **newArgv; @@ -430,9 +430,10 @@ TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile, newArgv[i] = Tcl_UtfToExternalDString(NULL, argv[i], -1, &dsArray[i]); } - joinThisError = errorFile && (errorFile == outputFile); pid = fork(); if (pid == 0) { + int joinThisError = errorFile && (errorFile == outputFile); + fd = GetFd(errPipeOut); /* diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 0fa3803..023cad4 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.27.2.11 2006/07/14 16:20:23 andreas_kupries Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.27.2.12 2006/07/20 06:21:46 das Exp $ */ #ifndef _TCLUNIXPORT @@ -509,11 +509,6 @@ extern double strtod(); */ #ifdef __APPLE__ -/* - * Translate the symbolic values for MAC_OS_X_VERSION_MAX_ALLOWED to - * the numbers used in the comparisons below. - */ -#include <AvailabilityMacros.h> /* * Support for fat compiles: configure runs only once for multiple architectures */ @@ -531,6 +526,25 @@ extern double strtod(); # undef USE_TERMIO # undef USE_SGTTY # endif /* __DARWIN_UNIX03 */ +/* + * Include AvailabilityMacros.h here (when available) to ensure any symbolic + * MAC_OS_X_VERSION_* constants passed on the command line are translated. + */ +# ifdef HAVE_AVAILABILITYMACROS_H +# include <AvailabilityMacros.h> +# endif +/* + * Support for weak import. + */ +# ifdef HAVE_WEAK_IMPORT +# if !defined(HAVE_AVAILABILITYMACROS_H) || !defined(MAC_OS_X_VERSION_MIN_REQUIRED) +# undef HAVE_WEAK_IMPORT +# else +# ifndef WEAK_IMPORT_ATTRIBUTE +# define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import)) +# endif +# endif +# endif /* HAVE_WEAK_IMPORT */ /* * Support for MAC_OS_X_VERSION_MAX_ALLOWED define from AvailabilityMacros.h: * only use API available in the indicated OS version or earlier. @@ -542,14 +556,17 @@ extern double strtod(); # undef HAVE_COPYFILE # endif # if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 -# define NO_REALPATH 1 +# ifdef TCL_THREADS + /* prior to 10.3, realpath is not threadsafe, c.f. bug 711232 */ +# define NO_REALPATH 1 +# endif # undef HAVE_LANGINFO # endif # endif /* MAC_OS_X_VERSION_MAX_ALLOWED */ #endif /* __APPLE__ */ /* - * Darwin 8 copyfile API + * Darwin 8 copyfile API. */ #ifdef HAVE_COPYFILE @@ -560,8 +577,14 @@ int copyfile(const char *from, const char *to, void *state, uint32_t flags); #define COPYFILE_ACL (1<<0) #define COPYFILE_XATTR (1<<2) #define COPYFILE_NOFOLLOW_SRC (1<<18) -#endif -#endif +#endif /* HAVE_COPYFILE_H */ +#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +/* Support for weakly importing copyfile. */ +#define WEAK_IMPORT_COPYFILE +extern int copyfile(const char *from, const char *to, void *state, + uint32_t flags) WEAK_IMPORT_ATTRIBUTE; +#endif /* HAVE_WEAK_IMPORT */ +#endif /* HAVE_COPYFILE */ /* *--------------------------------------------------------------------------- |