From 472d82cf26c06e8d849e9ff1ed4af3f0a2154ddc Mon Sep 17 00:00:00 2001 From: das Date: Thu, 20 Jul 2006 06:27:34 +0000 Subject: * macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): add support for weakly importing 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/configure.in: enforce requirement of OSX 10.2 for TkAqua; move * unix/tcl.m4: 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 * macosx/tkMacOSXKeyEvent.c: ifdef out diagnostic messages to stderr. * macosx/tkMacOSXEvent.h: standardize MAC_OS_X_VERSION_MAX_ALLOWED * macosx/tkMacOSXMenu.c: checks per QA1316, ensure define can be * macosx/tkMacOSXMenubutton.c: overriden on command line (from default * macosx/tkMacOSXMenus.c: of current OS version). * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXWm.c: --- ChangeLog | 26 ++ macosx/README | 37 ++- macosx/tkMacOSXEvent.h | 7 +- macosx/tkMacOSXKeyEvent.c | 19 +- macosx/tkMacOSXMenu.c | 5 +- macosx/tkMacOSXMenubutton.c | 5 +- macosx/tkMacOSXMenus.c | 5 +- macosx/tkMacOSXMouseEvent.c | 5 +- macosx/tkMacOSXWm.c | 52 ++-- unix/configure | 640 ++++++++++++-------------------------------- unix/configure.in | 37 +-- unix/tcl.m4 | 83 +++--- 12 files changed, 329 insertions(+), 592 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c27ae9..622823e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2006-07-20 Daniel Steffen + + * macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): add support + for weakly importing 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/configure.in: enforce requirement of OSX 10.2 for TkAqua; move + * unix/tcl.m4: 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 + + * macosx/tkMacOSXKeyEvent.c: ifdef out diagnostic messages to stderr. + + * macosx/tkMacOSXEvent.h: standardize MAC_OS_X_VERSION_MAX_ALLOWED + * macosx/tkMacOSXMenu.c: checks per QA1316, ensure define can be + * macosx/tkMacOSXMenubutton.c: overriden on command line (from default + * macosx/tkMacOSXMenus.c: of current OS version). + * macosx/tkMacOSXMouseEvent.c: + * macosx/tkMacOSXWm.c: + + * macosx/tkMacOSXCursor.c (TkMacOSXCursor): + * macosx/tkMacOSXDebug.c (TkMacOSXGetNamedDebugSymbol): + * macosx/tkMacOSXInit.c (Map): fix signed-with-unsigned comparison and + other warnings from gcc4 -Wextra. + 2006-07-14 Andreas Kupries * generic/tkWindow.c (Initialize): Modify change of 2006-05-25 diff --git a/macosx/README b/macosx/README index 8fad1a0..ff002ca 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ Tcl/Tk Mac OS X README ---------------------- -RCS: @(#) $Id: README,v 1.6.2.10 2005/11/27 06:44:16 das Exp $ +RCS: @(#) $Id: README,v 1.6.2.11 2006/07/20 06:27:34 das Exp $ This is the README file for the Mac OS X/Darwin version of Tcl/Tk. @@ -43,9 +43,12 @@ TkAqua and TkX11 can be distinguished at runtime via [tk windowingsystem]. required to run TkAqua. However OS X 10.3 or higher is recommended (certain [file] operations behave incorrectly on earlier releases). -- Tcl/Tk built on Mac OS X 10.x will not run on 10.y for y < x, on the other -hand Tcl/Tk 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/Tk built on Mac OS X 10.x will not run on +10.y with y < x; on the other hand Tcl/Tk 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/Tk +built on 10.x to run on any 10.y with x > y >= z (for a chosen z >= 2). - Wish checks the Resources/Scripts directory in its application bundle for a file called AppMain.tcl, if found it is used as the startup script and the @@ -151,11 +154,10 @@ tcl/macosx and tk/macosx (see below for details), but can also be built with the standard unix configure and make buildsystem in tcl/unix resp. tk/unix as on any other unix platform (indeed, the GNUmakefiles are just wrappers around the unix buildsystem). -The Mac OS X specifc configure flags are --enable-aqua, --enable-framework and +The Mac OS X specific configure flags are --enable-aqua, --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). Note that --enable-aqua is -incompatible with --disable-corefoundation (for both Tcl and Tk configure). +select based notifier). Note that --enable-aqua is incompatible with +--disable-corefoundation (for both Tcl and Tk configure). - It is also possible to build with Apple's IDE via the tk/macosx/Wish.pbproj project, this simply calls through to the tk/macosx/GNUMakefile. It requires a @@ -165,7 +167,7 @@ build of the tcl/macosx/Tcl.pbproj project. export CFLAGS="-arch ppc -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). +any 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 Tk TEA extensions are also possible with CFLAGS set as @@ -175,7 +177,18 @@ TkX11 can be built with -arch ppc64 as the corresponding GUI libraries are not available for 64bit at present. However, linking a universal 'ppc i386' Tk binary against a universal 'ppc ppc64 i386' Tcl binary works just fine. The Tk configure script automatically removes '-arch ppc64' from CFLAGS to -facilitate universal building of both Tcl and Tk with the same CFLAGS setting. +facilitate universal building of both Tcl and Tk with the same CFLAGS setting; +the same happens with configure in Tk extensions based on TEA 3.5 or later. + +- 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 Wish.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/GNUmakefile ---------------------------------------------------------- @@ -216,8 +229,8 @@ instead by passing an INSTALL_ROOT argument to make: - The default Makefile targets will build _both_ debug and optimized versions of the Tcl and Tk frameworks with the standard convention of naming the debug library Tcl.framework/Tcl_debug resp. Tk.framework/Tk_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/tkMacOSXEvent.h b/macosx/tkMacOSXEvent.h index 6787f97..10eba80 100644 --- a/macosx/tkMacOSXEvent.h +++ b/macosx/tkMacOSXEvent.h @@ -50,7 +50,7 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXEvent.h,v 1.3.2.6 2006/04/28 06:02:59 das Exp $ + * RCS: @(#) $Id: tkMacOSXEvent.h,v 1.3.2.7 2006/07/20 06:27:34 das Exp $ */ #ifndef _TKMACEVENT @@ -100,10 +100,9 @@ MODULE_SCOPE int TkMacOSXKeycodeToUnicode( MODULE_SCOPE OSStatus TkMacOSXStartTclEventLoopCarbonTimer(); MODULE_SCOPE OSStatus TkMacOSXStopTclEventLoopCarbonTimer(); -#if !defined(MAC_OS_X_VERSION_10_3) || \ - (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3) +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 /* Define constants only available on Mac OS X 10.3 or later */ -enum { kEventAppAvailableWindowBoundsChanged = 110 }; +#define kEventAppAvailableWindowBoundsChanged 110 #endif #endif diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index 1a37b75..3a48fa0 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -54,12 +54,18 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXKeyEvent.c,v 1.6.2.9 2006/05/12 18:17:55 das Exp $ + * RCS: @(#) $Id: tkMacOSXKeyEvent.c,v 1.6.2.10 2006/07/20 06:27:34 das Exp $ */ #include "tkMacOSXInt.h" #include "tkMacOSXEvent.h" +/* +#ifdef TK_MAC_DEBUG +#define TK_MAC_DEBUG_KEYBOARD +#endif +*/ + typedef struct { WindowRef whichWindow; int global_x, global_y; @@ -563,8 +569,7 @@ InitKeyEvent( * duplicate enums and typedefs would give errrors. */ -#if !defined(MAC_OS_X_VERSION_10_2) || \ - (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2) +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1020 #define KeyboardLayoutRef Ptr #define KeyboardLayoutPropertyTag UInt32 #define kKLKCHRData 0 @@ -643,7 +648,7 @@ GetKeyboardLayout (Ptr * resourcePtr, TextEncoding * encodingPtr) if ((lastLayout != currentLayout) || (lastLayoutId != currentLayoutId)) { -#ifdef TK_MAC_DEBUG +#ifdef TK_MAC_DEBUG_KEYBOARD fprintf (stderr, "GetKeyboardLayout(): Use KLS\n"); #endif @@ -684,7 +689,7 @@ GetKeyboardLayout (Ptr * resourcePtr, TextEncoding * encodingPtr) if ((lastLayout == NULL) || (lastLayoutId != currentLayoutId)) { -#ifdef TK_MAC_DEBUG +#ifdef TK_MAC_DEBUG_KEYBOARD fprintf (stderr, "GetKeyboardLayout(): Use GetResource()\n"); #endif @@ -719,7 +724,7 @@ GetKeyboardLayout (Ptr * resourcePtr, TextEncoding * encodingPtr) if (hasLayoutChanged) { -#ifdef TK_MAC_DEBUG +#ifdef TK_MAC_DEBUG_KEYBOARD if (KCHR != NULL) { fprintf (stderr, "GetKeyboardLayout(): New 'KCHR' layout %d\n", (int) (short) currentLayoutId); @@ -747,7 +752,7 @@ GetKeyboardLayout (Ptr * resourcePtr, TextEncoding * encodingPtr) if (KCHR != NULL) { lastEncoding = GetKCHREncoding(currentKeyScript, currentLayoutId); -#ifdef TK_MAC_DEBUG +#ifdef TK_MAC_DEBUG_KEYBOARD fprintf (stderr, "GetKeyboardLayout(): New 'KCHR' encoding %lu " "(%lu + 0x%lX)\n", lastEncoding, lastEncoding & 0xFFFFL, diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 2df2ba4..c4a0d7f 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.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: tkMacOSXMenu.c,v 1.6.2.19 2006/05/12 18:18:52 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.20 2006/07/20 06:27:34 das Exp $ */ #include "tkMacOSXInt.h" @@ -28,8 +28,7 @@ #endif */ -#if !defined(MAC_OS_X_VERSION_10_3) || \ - (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3) +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 /* Define constants only available on Mac OS X 10.3 or later */ #define kMenuAttrDoNotUseUserCommandKeys (1 << 7) #endif diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c index 511354f..d5ae817 100644 --- a/macosx/tkMacOSXMenubutton.c +++ b/macosx/tkMacOSXMenubutton.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: tkMacOSXMenubutton.c,v 1.2.2.8 2006/04/28 06:03:00 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenubutton.c,v 1.2.2.9 2006/07/20 06:27:34 das Exp $ */ #include "tkMacOSXInt.h" @@ -19,8 +19,7 @@ #include "tkMacOSXFont.h" #include "tkMacOSXDebug.h" -#if !defined(MAC_OS_X_VERSION_10_3) || \ - (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3) +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 /* Define constants only available on Mac OS X 10.3 or later */ #define kMenuAttrDoNotUseUserCommandKeys (1 << 7) #endif diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c index fbcb239..f996c37 100644 --- a/macosx/tkMacOSXMenus.c +++ b/macosx/tkMacOSXMenus.c @@ -11,13 +11,12 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.2.2.10 2006/05/16 06:54:04 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.2.2.11 2006/07/20 06:27:34 das Exp $ */ #include "tkMacOSXInt.h" -#if !defined(MAC_OS_X_VERSION_10_3) || \ - (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3) +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 /* Define constants only available on Mac OS X 10.3 or later */ #define kMenuAttrDoNotUseUserCommandKeys (1 << 7) #endif diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index b716a41..6358141 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -54,15 +54,14 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.6.2.14 2006/04/28 06:03:00 das Exp $ + * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.6.2.15 2006/07/20 06:27:34 das Exp $ */ #include "tkMacOSXInt.h" #include "tkMacOSXEvent.h" #include "tkMacOSXDebug.h" -#if !defined(MAC_OS_X_VERSION_10_3) || \ - (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3) +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 /* Define constants only available on Mac OS X 10.3 or later */ #define kEventParamWindowPartCode 'wpar' #define typeWindowPartCode 'wpar' diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 28bda54..04d8144 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.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: tkMacOSXWm.c,v 1.7.2.27 2006/05/16 07:37:21 das Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.28 2006/07/20 06:27:34 das Exp $ */ #include "tkMacOSXInt.h" @@ -22,14 +22,12 @@ #include "tkMacOSXEvent.h" /* Define constants only available on Mac OS X 10.3 or later */ -#if !defined(MAC_OS_X_VERSION_10_3) || \ - (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3) +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 #define kSimpleWindowClass 18 #define kWindowDoesNotCycleAttribute (1L << 15) #endif /* Define constants only available on Mac OS X 10.4 or later */ -#if !defined(MAC_OS_X_VERSION_10_4) || \ - (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4) +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1040 #define kWindowNoTitleBarAttribute (1L << 9) #define kWindowMetalNoContentSeparatorAttribute (1L << 11) #endif @@ -865,17 +863,19 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */ Boolean d; err = FSPathMakeRef((unsigned char*) path, &ref, &d); if (err == noErr) { -#if defined(MAC_OS_X_VERSION_10_4) && \ - (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) - err = HIWindowSetProxyFSRef(macWindow, &ref); -#else - AliasHandle alias; - err = FSNewAlias(NULL, &ref, &alias); - if (err == noErr) { - err = SetWindowProxyAlias(macWindow, alias); - DisposeHandle((Handle) alias); - } +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + if (HIWindowSetProxyFSRef != NULL) { + err = HIWindowSetProxyFSRef(macWindow, &ref); + } else #endif + { + AliasHandle alias; + err = FSNewAlias(NULL, &ref, &alias); + if (err == noErr) { + err = SetWindowProxyAlias(macWindow, alias); + DisposeHandle((Handle) alias); + } + } } } else { int len; @@ -1630,17 +1630,19 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */ } macWindow = GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)); if (len) { -#if defined(MAC_OS_X_VERSION_10_4) && \ - (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) - err = HIWindowSetProxyFSRef(macWindow, &ref); -#else - AliasHandle alias; - err = FSNewAlias(NULL, &ref, &alias); - if (err == noErr) { - err = SetWindowProxyAlias(macWindow, alias); - DisposeHandle((Handle) alias); - } +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + if (HIWindowSetProxyFSRef != NULL) { + err = HIWindowSetProxyFSRef(macWindow, &ref); + } else #endif + { + AliasHandle alias; + err = FSNewAlias(NULL, &ref, &alias); + if (err == noErr) { + err = SetWindowProxyAlias(macWindow, alias); + DisposeHandle((Handle) alias); + } + } } else { err = RemoveWindowProxy(macWindow); if (wmPtr->hints.icon_pixmap != None) { diff --git a/unix/configure b/unix/configure index c4e72a8..00a53d5 100755 --- a/unix/configure +++ b/unix/configure @@ -3046,323 +3046,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:3054: 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 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3064: \"$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 <&6 -fi -done - - for ac_func in OSSpinLockLock -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3093: 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 < -/* 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:3121: \"$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 <&6 -fi -done - - for ac_func in pthread_atfork -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3148: 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 < -/* 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:3176: \"$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 <&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:3206: 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 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3216: \"$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 <&6 -fi -done - - for ac_func in copyfile -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3245: 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 < -/* 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:3273: \"$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 <&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:3316: 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 < -/* 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:3344: \"$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="" @@ -3650,7 +3341,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:3654: checking for ld accepts -Bexport flag" >&5 +echo "configure:3345: 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 @@ -3658,14 +3349,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_Bexport=yes else @@ -3712,13 +3403,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:3716: checking sys/exec.h" >&5 +echo "configure:3407: 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 < int main() { @@ -3736,7 +3427,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexec_h=usable else @@ -3756,13 +3447,13 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3760: checking a.out.h" >&5 +echo "configure:3451: 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 < int main() { @@ -3780,7 +3471,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_aout_h=usable else @@ -3800,13 +3491,13 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3804: checking sys/exec_aout.h" >&5 +echo "configure:3495: 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 < int main() { @@ -3824,7 +3515,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexecaout_h=usable else @@ -3977,7 +3668,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:3981: checking for build with symbols" >&5 +echo "configure:3672: 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" @@ -4038,21 +3729,21 @@ TK_DBGX=${DBGX} echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:4042: checking for required early compiler flags" >&5 +echo "configure:3733: 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 < int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -4060,7 +3751,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4068,7 +3759,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -4095,14 +3786,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -4110,7 +3801,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4118,7 +3809,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=yes else @@ -4145,14 +3836,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=no else @@ -4160,7 +3851,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4168,7 +3859,7 @@ int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=yes else @@ -4199,7 +3890,7 @@ EOF echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:4203: checking for 64-bit integer type" >&5 +echo "configure:3894: 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 @@ -4207,14 +3898,14 @@ else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -4228,7 +3919,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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_64bit=${tcl_type_64bit} else @@ -4262,13 +3953,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:4266: checking for struct dirent64" >&5 +echo "configure:3957: 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 < #include @@ -4276,7 +3967,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:4280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -4297,13 +3988,13 @@ EOF fi echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:4301: checking for struct stat64" >&5 +echo "configure:3992: 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 < int main() { @@ -4311,7 +4002,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:4315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -4334,12 +4025,12 @@ EOF for ac_func in open64 lseek64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4338: checking for $ac_func" >&5 +echo "configure:4029: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4057: \"$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 @@ -4387,13 +4078,13 @@ fi done echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:4391: checking for off64_t" >&5 +echo "configure:4082: 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 < int main() { @@ -4401,7 +4092,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:4405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -4432,14 +4123,14 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4436: checking whether byte ordering is bigendian" >&5 +echo "configure:4127: 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 < #include @@ -4450,11 +4141,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4145: \"$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 < #include @@ -4465,7 +4156,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4485,7 +4176,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4193: \"$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 @@ -4550,19 +4241,20 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 -echo "configure:4554: checking for fd_set in sys/types" >&5 +echo "configure:4245: 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 < conftest.$ac_ext < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:4566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_fd_set=yes else @@ -4578,12 +4270,13 @@ echo "$ac_t""$tcl_cv_type_fd_set" 1>&6 tk_ok=$tcl_cv_type_fd_set if test $tk_ok = no; then echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6 -echo "configure:4582: checking for fd_mask in sys/select" >&5 +echo "configure:4274: 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 < conftest.$ac_ext < EOF @@ -4623,17 +4316,17 @@ for ac_hdr in sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4627: checking for $ac_hdr" >&5 +echo "configure:4320: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4330: \"$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* @@ -4660,12 +4353,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4664: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4357: 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 < #include @@ -4674,7 +4367,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4704,12 +4397,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4708: checking for strtod" >&5 +echo "configure:4401: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4429: \"$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 @@ -4754,7 +4447,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:4758: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:4451: 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 @@ -4763,7 +4456,7 @@ else tcl_cv_strtod_buggy=buggy else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4483: \"$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 @@ -4817,12 +4510,12 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4821: checking for ANSI C header files" >&5 +echo "configure:4514: 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 < #include @@ -4830,7 +4523,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4527: \"$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* @@ -4847,7 +4540,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 @@ -4865,7 +4558,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 @@ -4886,7 +4579,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4897,7 +4590,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4921,12 +4614,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4925: checking for mode_t" >&5 +echo "configure:4618: 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 < #if STDC_HEADERS @@ -4954,12 +4647,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4958: checking for pid_t" >&5 +echo "configure:4651: 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 < #if STDC_HEADERS @@ -4987,12 +4680,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4991: checking for size_t" >&5 +echo "configure:4684: 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 < #if STDC_HEADERS @@ -5020,12 +4713,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5024: checking for uid_t in sys/types.h" >&5 +echo "configure:4717: 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 @@ -5059,19 +4752,20 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:5063: checking pw_gecos in struct pwd" >&5 +echo "configure:4756: checking pw_gecos in struct pwd" >&5 if eval "test \"`echo '$''{'tcl_cv_pwd_pw_gecos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:5075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_pwd_pw_gecos=yes else @@ -5096,6 +4790,8 @@ fi #-------------------------------------------------------------------- if test "`uname -s`" = "Darwin" ; then + echo $ac_n "checking whether to use Aqua""... $ac_c" 1>&6 +echo "configure:4795: checking whether to use Aqua" >&5 # Check whether --enable-aqua or --disable-aqua was given. if test "${enable_aqua+set}" = set; then enableval="$enable_aqua" @@ -5105,14 +4801,20 @@ else fi if test $tk_aqua = yes; then - if test $tcl_corefoundation = no; then - echo "configure: warning: Aqua can only be used when CoreFoundation is available" 1>&2 - tk_aqua=no - elif test ! -d /System/Library/Frameworks/Carbon.framework; then - echo "configure: warning: Aqua can only be used when Carbon is available" 1>&2 - tk_aqua=no - fi + if test $tcl_corefoundation = no; then + echo "configure: warning: Aqua can only be used when CoreFoundation is available" 1>&2 + tk_aqua=no + fi + if test ! -d /System/Library/Frameworks/Carbon.framework; then + echo "configure: warning: Aqua can only be used when Carbon is available" 1>&2 + tk_aqua=no + fi + if test "`uname -r | awk -F. '{print $1}'`" -lt 6; then + echo "configure: warning: Aqua requires Mac OS X 10.2 or later" 1>&2 + tk_aqua=no + fi fi + echo "$ac_t""$tk_aqua" 1>&6 if test $do64bit_ok = no ; then # remove -arch ppc64 from CFLAGS for fat builds as neither Aqua nor X11 # can be built for 64bit at present (no 64bit GUI libraries). @@ -5152,7 +4854,7 @@ else # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:5156: checking for X" >&5 +echo "configure:4858: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5214,12 +4916,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4925: \"$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* @@ -5288,14 +4990,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5385,12 +5087,12 @@ fi if test "$no_x" = ""; then if test "$x_includes" = ""; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5096: \"$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 : @@ -5410,15 +5112,15 @@ rm -f conftest* fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then echo $ac_n "checking for X11 header files""... $ac_c" 1>&6 -echo "configure:5414: checking for X11 header files" >&5 +echo "configure:5116: checking for X11 header files" >&5 found_xincludes="no" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5124: \"$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* @@ -5454,7 +5156,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:5458: checking for X11 libraries" >&5 +echo "configure:5160: checking for X11 libraries" >&5 XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do @@ -5474,7 +5176,7 @@ echo "configure:5458: checking for X11 libraries" >&5 fi if test "$XLIBSW" = nope ; then echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6 -echo "configure:5478: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:5180: checking for XCreateWindow in -lXwindow" >&5 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5482,7 +5184,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXwindow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5199: \"$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 @@ -5570,7 +5272,7 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\"" if test $tk_aqua = no; then echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5574: checking for main in -lXbsd" >&5 +echo "configure:5276: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'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 @@ -5578,14 +5280,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5291: \"$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 @@ -5609,12 +5311,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5613: checking for connect" >&5 +echo "configure:5315: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5343: \"$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 @@ -5659,7 +5361,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:5663: checking for main in -lsocket" >&5 +echo "configure:5365: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'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 @@ -5667,14 +5369,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5380: \"$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 @@ -5700,12 +5402,12 @@ if test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:5704: checking for accept" >&5 +echo "configure:5406: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5434: \"$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 @@ -5750,12 +5452,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5754: checking for gethostbyname" >&5 +echo "configure:5456: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5484: \"$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 @@ -5796,7 +5498,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:5800: checking for main in -lnsl" >&5 +echo "configure:5502: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'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 @@ -5804,14 +5506,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5517: \"$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 @@ -5847,13 +5549,13 @@ fi if test -d /usr/include/mit -a $tk_aqua = no; then echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6 -echo "configure:5851: checking MIT X libraries" >&5 +echo "configure:5553: checking MIT X libraries" >&5 tk_oldCFlags=$CFLAGS CFLAGS="$CFLAGS -I/usr/include/mit" tk_oldLibs=$LIBS LIBS="$LIBS -lX11-mit" cat > conftest.$ac_ext < @@ -5864,7 +5566,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -5888,14 +5590,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:5892: checking whether char is unsigned" >&5 +echo "configure:5594: 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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5633: \"$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 @@ -5986,38 +5688,38 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc' if test "`uname -s`" = "Darwin" ; then - echo $ac_n "checking how to package libraries""... $ac_c" 1>&6 -echo "configure:5991: 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:5694: 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 TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" diff --git a/unix/configure.in b/unix/configure.in index aa90f07..905278b 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 Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.32 2006/05/04 13:09:47 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.33 2006/07/20 06:27:35 das Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -175,14 +175,14 @@ fi # 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 ],[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)]) tk_ok=$tcl_cv_type_fd_set if test $tk_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) tk_ok=yes @@ -222,10 +222,10 @@ AC_TYPE_UID_T # In OS/390 struct pwd has no pw_gecos field #------------------------------------------- -AC_CACHE_CHECK([pw_gecos in struct pwd], tcl_cv_pwd_pw_gecos, +AC_CACHE_CHECK([pw_gecos in struct pwd], tcl_cv_pwd_pw_gecos, [ AC_TRY_COMPILE([#include ], [struct passwd pwd; pwd.pw_gecos;], - tcl_cv_pwd_pw_gecos=yes, tcl_cv_pwd_pw_gecos=no)) + tcl_cv_pwd_pw_gecos=yes, tcl_cv_pwd_pw_gecos=no)]) if test $tcl_cv_pwd_pw_gecos = yes; then AC_DEFINE(HAVE_PW_GECOS) fi @@ -235,17 +235,24 @@ fi #-------------------------------------------------------------------- if test "`uname -s`" = "Darwin" ; then + AC_MSG_CHECKING([whether to use Aqua]) AC_ARG_ENABLE(aqua, [ --enable-aqua enable Aqua windowingsystem on Mac OS X [--disable-aqua]], - [tk_aqua=$enableval], [tk_aqua=no]) + [tk_aqua=$enableval], [tk_aqua=no]) if test $tk_aqua = yes; then - if test $tcl_corefoundation = no; then - AC_MSG_WARN([Aqua can only be used when CoreFoundation is available]) - tk_aqua=no - elif test ! -d /System/Library/Frameworks/Carbon.framework; then - AC_MSG_WARN([Aqua can only be used when Carbon is available]) - tk_aqua=no - fi + if test $tcl_corefoundation = no; then + AC_MSG_WARN([Aqua can only be used when CoreFoundation is available]) + tk_aqua=no + fi + if test ! -d /System/Library/Frameworks/Carbon.framework; then + AC_MSG_WARN([Aqua can only be used when Carbon is available]) + tk_aqua=no + fi + if test "`uname -r | awk -F. '{print [$]1}'`" -lt 6; then + AC_MSG_WARN([Aqua requires Mac OS X 10.2 or later]) + tk_aqua=no + fi fi + AC_MSG_RESULT([$tk_aqua]) if test $do64bit_ok = no ; then # remove -arch ppc64 from CFLAGS for fat builds as neither Aqua nor X11 # can be built for 64bit at present (no 64bit GUI libraries). 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 #include ], [ #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 ], [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 ], [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 ], [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 ], [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 -- cgit v0.12