From dc316587c0b9053c09dfb532523bcdfd73169adc Mon Sep 17 00:00:00 2001 From: das Date: Fri, 18 Aug 2006 07:47:25 +0000 Subject: * unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for universal builds including x86_64, for 64-bit CoreFoundation on Leopard and for use of -mmacosx-version-min instead of MACOSX_DEPLOYMENT_TARGET. * unix/configure.in (Darwin): remove 64-bit arch flags from CFLAGS for combined 32-bit and 64-bit universal builds, as neither TkAqua nor TkX11 can be built for 64-bit at present. * unix/configure: autoconf-2.13 * macosx/README: updates for x86_64 support in Tcl. * macosx/tkMacOSXInit.c (TkpInit): when available, use public TransformProcessType() API instead of CPSEnableForegroundOperation() SPI to notify the window server that we are a GUI application. * macosx/tkMacOSXWm.c (WmAttrGetTitlePath): use HIWindow API on >=Tiger. * macosx/tkMacOSXMouseEvent.c (GenerateToolbarButtonEvent): * macosx/tkMacOSXMenus.c (GenerateEditEvent): * macosx/tkMacOSXMenu.c (MenuSelectEvent): bzero XVirtualEvent structure before use to ensure all fields are initialized. [Bug 1542205] --- ChangeLog | 25 +++- macosx/README | 22 +-- macosx/tkMacOSXInit.c | 42 ++++-- macosx/tkMacOSXMenu.c | 3 +- macosx/tkMacOSXMenus.c | 3 +- macosx/tkMacOSXMouseEvent.c | 8 +- macosx/tkMacOSXWm.c | 19 ++- unix/configure | 348 +++++++++++++++++++++++++------------------- unix/configure.in | 11 +- unix/tcl.m4 | 41 +++++- 10 files changed, 319 insertions(+), 203 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4197492..3112ea2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2006-08-18 Daniel Steffen + + * unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for + universal builds including x86_64, for 64-bit CoreFoundation on Leopard + and for use of -mmacosx-version-min instead of MACOSX_DEPLOYMENT_TARGET. + * unix/configure.in (Darwin): remove 64-bit arch flags from CFLAGS for + combined 32-bit and 64-bit universal builds, as neither TkAqua nor TkX11 + can be built for 64-bit at present. + * unix/configure: autoconf-2.13 + + * macosx/README: updates for x86_64 support in Tcl. + + * macosx/tkMacOSXInit.c (TkpInit): when available, use public + TransformProcessType() API instead of CPSEnableForegroundOperation() SPI + to notify the window server that we are a GUI application. + + * macosx/tkMacOSXWm.c (WmAttrGetTitlePath): use HIWindow API on >=Tiger. + + * macosx/tkMacOSXMouseEvent.c (GenerateToolbarButtonEvent): + * macosx/tkMacOSXMenus.c (GenerateEditEvent): + * macosx/tkMacOSXMenu.c (MenuSelectEvent): bzero XVirtualEvent structure + before use to ensure all fields are initialized. [Bug 1542205] + 2006-08-16 Jeff Hobbs * macosx/tkMacOSXWm.c (WmAttributesCmd): correct OS X result for @@ -13,7 +36,7 @@ * macosx/tkMacOSXWm.c (TkWmMapWindow): fix incorrect values of wmInfo parentWidth/Height for toplevels by recalculating them once the window - is mapped (i.e. once the window&structure sizes are known). [Bug 1358663] + is mapped (i.e once the window&structure sizes are known). [Bug 1358663] (ParseGeometry): sync with ParseGeometry in tkUnixWm.c/tkWinWm.c. 2006-07-21 Daniel Steffen diff --git a/macosx/README b/macosx/README index 6ec0b55..b0d4a31 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ Tcl/Tk Mac OS X README ---------------------- -RCS: @(#) $Id: README,v 1.6.2.12 2006/07/21 06:03:24 das Exp $ +RCS: @(#) $Id: README,v 1.6.2.13 2006/08/18 07:47:25 das Exp $ This is the README file for the Mac OS X/Darwin version of Tcl/Tk. @@ -166,19 +166,19 @@ build of the tcl/macosx/Tcl.pbproj project. - To build universal binaries, set CFLAGS as follows: 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 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). +This requires Mac OS X 10.4 and Xcode 2.2 (_not_ Xcode 2.1) and will work on any +of the architectures (on intel Macs, the -isysroot may not be required). Note +that it is not possible to configure universal builds correctly if the current +architecture is not present in CFLAGS (i.e. -arch `arch` must be there). Universal builds of Tk TEA extensions are also possible with CFLAGS set as above, they will be [load]able by universal as well as thin binaries of Tk. -Note that while Tcl can be built for the ppc64 architecture, neither TkAqua nor -TkX11 can be built with -arch ppc64 as the corresponding GUI libraries are not +Note that while Tcl can be built for 64-bit architectures, neither TkAqua nor +TkX11 can be built for 64-bit 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; -the same happens with configure in Tk extensions based on TEA 3.5 or later. +binary against a universal 'ppc ppc64 i386 x86_64' Tcl binary works just fine. +The Tk configure script automatically removes the 64-bit -arch flags from CFLAGS +to facilitate universal building of both Tcl and Tk with the same CFLAGS; 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: diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index b14dff9..e5b6735 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXInit.c,v 1.3.2.17 2006/07/20 06:26:45 das Exp $ + * RCS: @(#) $Id: tkMacOSXInit.c,v 1.3.2.18 2006/08/18 07:47:25 das Exp $ */ #include "tkMacOSXInt.h" @@ -246,12 +246,12 @@ TkpInit(interp) } } } -#if MAC_OSX_TK_USE_CPS_SPI + /* * If we are loaded into an executable that is not a bundled application, * the window server does not let us come to the foreground. - * For such an executable, we attempt to use an undocumented SPI to - * notify the window server that we are now a full GUI application. + * For such an executable, notify the window server that we are now a + * full GUI application. */ { /* Check whether we are a bundled executable: */ @@ -285,24 +285,34 @@ TkpInit(interp) CFRelease(bundleUrl); } - /* If we are not a bundled executable, attempt to use the CPS SPI: */ + /* If we are not a bundled executable, notify the window server that + * we are a foregroundable app. */ if (!bundledExecutable) { - /* - * Load the CPS SPI symbol dynamically, so that we don't break - * if it every disappears or changes its name. - */ - TkMacOSXInitNamedSymbol(CoreGraphics, OSErr, \ - CPSEnableForegroundOperation, ProcessSerialNumberPtr); - if (CPSEnableForegroundOperation) { - ProcessSerialNumber psn = { 0, kCurrentProcess }; + OSStatus err = procNotFound; + ProcessSerialNumber psn = { 0, kCurrentProcess }; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 + if (TransformProcessType != NULL) { + err = TransformProcessType(&psn, + kProcessTransformToForegroundApplication); + } +#endif +#if MAC_OSX_TK_USE_CPS_SPI + if (err != noErr) { /* - * Let the window server know that we are a foregroundable app + * When building or running on 10.2 or when the above fails, + * attempt to use undocumented CPS SPI to notify the window + * server. Load the SPI symbol dynamically, so that we don't + * break if it ever disappears or changes its name. */ - CPSEnableForegroundOperation(&psn); + TkMacOSXInitNamedSymbol(CoreGraphics, OSErr, + CPSEnableForegroundOperation, ProcessSerialNumberPtr); + if (CPSEnableForegroundOperation) { + CPSEnableForegroundOperation(&psn); + } } +#endif /* MAC_OSX_TK_USE_CPS_SPI */ } } -#endif /* MAC_OSX_TK_USE_CPS_SPI */ } if (tkLibPath[0] != '\0') { diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index c4a0d7f..e194ddb 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.20 2006/07/20 06:27:34 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.21 2006/08/18 07:47:25 das Exp $ */ #include "tkMacOSXInt.h" @@ -3695,6 +3695,7 @@ MenuSelectEvent( { XVirtualEvent event; + bzero(&event, sizeof(XVirtualEvent)); event.type = VirtualEvent; event.serial = menuPtr->display->request; event.send_event = false; diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c index f996c37..f5c2e1d 100644 --- a/macosx/tkMacOSXMenus.c +++ b/macosx/tkMacOSXMenus.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.2.2.11 2006/07/20 06:27:34 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.2.2.12 2006/08/18 07:47:25 das Exp $ */ #include "tkMacOSXInt.h" @@ -241,6 +241,7 @@ GenerateEditEvent( return; } + bzero(&event, sizeof(XVirtualEvent)); event.type = VirtualEvent; event.serial = Tk_Display(tkwin)->request; event.send_event = false; diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index 6358141..3e274ed 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -54,7 +54,7 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.6.2.15 2006/07/20 06:27:34 das Exp $ + * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.6.2.16 2006/08/18 07:47:25 das Exp $ */ #include "tkMacOSXInt.h" @@ -1009,8 +1009,9 @@ GenerateToolbarButtonEvent(MouseEventData * medPtr) if (!tkwin) { return true; } - winPtr = (TkWindow *)tkwin; + + bzero(&event, sizeof(XVirtualEvent)); event.type = VirtualEvent; event.serial = LastKnownRequestProcessed(winPtr->display); event.send_event = false; @@ -1019,13 +1020,12 @@ GenerateToolbarButtonEvent(MouseEventData * medPtr) event.root = XRootWindow(winPtr->display, 0); event.subwindow = None; event.time = TkpGetMS(); - event.x_root = medPtr->global.h; event.y_root = medPtr->global.v; event.state = medPtr->state; event.same_screen = true; event.name = Tk_GetUid("ToolbarButton"); - Tk_QueueWindowEvent((XEvent *) &event, TCL_QUEUE_TAIL); + Tk_QueueWindowEvent((XEvent *) &event, TCL_QUEUE_TAIL); return true; } diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 6a6bf38..b005143 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.30 2006/08/17 01:07:11 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.31 2006/08/18 07:47:25 das Exp $ */ #include "tkMacOSXInt.h" @@ -963,14 +963,21 @@ static Tcl_Obj * WmAttrGetTitlePath(WindowRef macWindow) { FSRef ref; - AliasHandle alias; Boolean wasChanged; UInt8 path[2048]; - OSStatus err; + OSStatus err = fnfErr; - err = GetWindowProxyAlias(macWindow, &alias); - if (err == noErr) { - err = FSResolveAlias(NULL, alias, &ref, &wasChanged); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + if (HIWindowGetProxyFSRef != NULL) { + err = HIWindowGetProxyFSRef(macWindow, &ref); + } +#endif + if (err != noErr) { + AliasHandle alias; + err = GetWindowProxyAlias(macWindow, &alias); + if (err == noErr) { + err = FSResolveAlias(NULL, alias, &ref, &wasChanged); + } } if (err == noErr) { err = FSRefMakePath(&ref, path, 2048); diff --git a/unix/configure b/unix/configure index 00a53d5..62a6379 100755 --- a/unix/configure +++ b/unix/configure @@ -2909,11 +2909,24 @@ echo "$ac_t""$tcl_cv_ld_elf" 1>&6 SHLIB_CFLAGS="-fno-common" if test $do64bit = yes; then do64bit_ok=yes - CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + case `arch` in + ppc) + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5";; + i386) + CFLAGS="$CFLAGS -arch x86_64";; + *) + echo "configure: warning: Don't know how enable 64-bit on architecture `arch`" 1>&2 + do64bit_ok=no;; + esac + else + # Check for combined 32-bit and 64-bit fat build + echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \ + echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \ + fat_32_64=yes fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6 -echo "configure:2917: checking if ld accepts -single_module flag" >&5 +echo "configure:2930: 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 @@ -2921,14 +2934,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2945: \"$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 @@ -2950,12 +2963,12 @@ echo "$ac_t""$tcl_cv_ld_single_module" 1>&6 DL_OBJS="tclLoadDyld.o" DL_LIBS="" # Don't use -prebind when building for Mac OS X 10.4 or later only: - test -z "${MACOSX_DEPLOYMENT_TARGET}" || \ - test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print $2}'`" -lt 4 && \ + test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ + "`echo "${CFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \ 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:2959: checking if ld accepts -search_paths_first flag" >&5 +echo "configure:2972: 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 @@ -2963,14 +2976,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2987: \"$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 @@ -2993,7 +3006,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:2997: checking whether to use CoreFoundation" >&5 +echo "configure:3010: 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" @@ -3005,28 +3018,28 @@ 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:3009: checking for CoreFoundation.framework" >&5 +echo "configure:3022: 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 hold_libs=$LIBS; hold_cflags=$CFLAGS - if test $do64bit_ok = no ; then - # remove -arch ppc64 from CFLAGS while testing presence - # of CF, otherwise all archs will have CF disabled. - # CF for ppc64 is disabled in tclUnixPort.h instead. - CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/'`" + if test "$fat_32_64" = yes; then + # On Tiger there is no 64-bit CF, so remove 64-bit archs + # from CFLAGS while testing for presence of CF. + # 64-bit CF is disabled in tclUnixPort.h if necessary. + CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`" fi LIBS="$LIBS -framework CoreFoundation" cat > conftest.$ac_ext < int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation=yes else @@ -3049,6 +3062,44 @@ EOF else tcl_corefoundation=no fi + if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then + echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6 +echo "configure:3068: checking for 64-bit CoreFoundation" >&5 +if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + hold_cflags=$CFLAGS + CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc / /g' -e 's/-arch i386 / /g'`" + cat > conftest.$ac_ext < +int main() { +CFBundleRef b = CFBundleGetMainBundle(); +; return 0; } +EOF +if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + tcl_cv_lib_corefoundation_64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_lib_corefoundation_64=no +fi +rm -f conftest* + CFLAGS=$hold_cflags +fi + +echo "$ac_t""$tcl_cv_lib_corefoundation_64" 1>&6 + if test $tcl_cv_lib_corefoundation_64 = no; then + cat >> confdefs.h <<\EOF +#define NO_COREFOUNDATION_64 1 +EOF + + fi + fi fi cat >> confdefs.h <<\EOF #define MAC_OSX_TCL 1 @@ -3341,7 +3392,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:3345: checking for ld accepts -Bexport flag" >&5 +echo "configure:3396: 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 @@ -3349,14 +3400,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:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_Bexport=yes else @@ -3403,13 +3454,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:3407: checking sys/exec.h" >&5 +echo "configure:3458: 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() { @@ -3427,7 +3478,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexec_h=usable else @@ -3447,13 +3498,13 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3451: checking a.out.h" >&5 +echo "configure:3502: 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() { @@ -3471,7 +3522,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_aout_h=usable else @@ -3491,13 +3542,13 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3495: checking sys/exec_aout.h" >&5 +echo "configure:3546: 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() { @@ -3515,7 +3566,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexecaout_h=usable else @@ -3668,7 +3719,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:3672: checking for build with symbols" >&5 +echo "configure:3723: 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" @@ -3729,21 +3780,21 @@ TK_DBGX=${DBGX} echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:3733: checking for required early compiler flags" >&5 +echo "configure:3784: 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:3747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -3751,7 +3802,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -3759,7 +3810,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:3763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -3786,14 +3837,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:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -3801,7 +3852,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -3809,7 +3860,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:3813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=yes else @@ -3836,14 +3887,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:3847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=no else @@ -3851,7 +3902,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -3859,7 +3910,7 @@ int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:3863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=yes else @@ -3890,7 +3941,7 @@ EOF echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:3894: checking for 64-bit integer type" >&5 +echo "configure:3945: 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 @@ -3898,14 +3949,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:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -3919,7 +3970,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:3983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_64bit=${tcl_type_64bit} else @@ -3953,13 +4004,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:3957: checking for struct dirent64" >&5 +echo "configure:4008: 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 @@ -3967,7 +4018,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:3971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -3988,13 +4039,13 @@ EOF fi echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:3992: checking for struct stat64" >&5 +echo "configure:4043: 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() { @@ -4002,7 +4053,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -4025,12 +4076,12 @@ EOF for ac_func in open64 lseek64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4029: checking for $ac_func" >&5 +echo "configure:4080: 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:4108: \"$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 @@ -4078,13 +4129,13 @@ fi done echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:4082: checking for off64_t" >&5 +echo "configure:4133: 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() { @@ -4092,7 +4143,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:4096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -4123,14 +4174,14 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4127: checking whether byte ordering is bigendian" >&5 +echo "configure:4178: 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 @@ -4141,11 +4192,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4196: \"$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 @@ -4156,7 +4207,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4176,7 +4227,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:4244: \"$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 @@ -4241,20 +4292,20 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 -echo "configure:4245: checking for fd_set in sys/types" >&5 +echo "configure:4296: 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 < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:4258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_fd_set=yes else @@ -4270,13 +4321,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:4274: checking for fd_mask in sys/select" >&5 +echo "configure:4325: 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 @@ -4316,17 +4367,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:4320: checking for $ac_hdr" >&5 +echo "configure:4371: 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:4330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4381: \"$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* @@ -4353,12 +4404,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4357: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4408: 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 @@ -4367,7 +4418,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4397,12 +4448,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4401: checking for strtod" >&5 +echo "configure:4452: 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:4480: \"$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 @@ -4447,7 +4498,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:4451: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:4502: 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 @@ -4456,7 +4507,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:4534: \"$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 @@ -4510,12 +4561,12 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4514: checking for ANSI C header files" >&5 +echo "configure:4565: 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 @@ -4523,7 +4574,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4578: \"$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* @@ -4540,7 +4591,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 @@ -4558,7 +4609,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 @@ -4579,7 +4630,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4590,7 +4641,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4614,12 +4665,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4618: checking for mode_t" >&5 +echo "configure:4669: 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 @@ -4647,12 +4698,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4651: checking for pid_t" >&5 +echo "configure:4702: 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 @@ -4680,12 +4731,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4684: checking for size_t" >&5 +echo "configure:4735: 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 @@ -4713,12 +4764,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4717: checking for uid_t in sys/types.h" >&5 +echo "configure:4768: 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 @@ -4752,20 +4803,20 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:4756: checking pw_gecos in struct pwd" >&5 +echo "configure:4807: 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 < int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:4769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_pwd_pw_gecos=yes else @@ -4791,7 +4842,7 @@ 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 +echo "configure:4846: 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" @@ -4815,11 +4866,10 @@ fi 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). - CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`" - fi + # remove 64-bit arch flags from CFLAGS for combined 32-bit and 64-bit fat + # builds, as neither TkAqua nor TkX11 can be built for 64-bit at present. + test "$fat_32_64" = yes && \ + CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`" else tk_aqua=no fi @@ -4854,7 +4904,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:4858: checking for X" >&5 +echo "configure:4908: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4916,12 +4966,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:4925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4975: \"$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* @@ -4990,14 +5040,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:5051: \"$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. @@ -5087,12 +5137,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:5096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5146: \"$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 : @@ -5112,15 +5162,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:5116: checking for X11 header files" >&5 +echo "configure:5166: 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:5124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5174: \"$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* @@ -5156,7 +5206,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:5160: checking for X11 libraries" >&5 +echo "configure:5210: 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 @@ -5176,7 +5226,7 @@ echo "configure:5160: 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:5180: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:5230: 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 @@ -5184,7 +5234,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:5249: \"$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 @@ -5272,7 +5322,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:5276: checking for main in -lXbsd" >&5 +echo "configure:5326: 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 @@ -5280,14 +5330,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:5341: \"$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 @@ -5311,12 +5361,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5315: checking for connect" >&5 +echo "configure:5365: 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:5393: \"$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 @@ -5361,7 +5411,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:5365: checking for main in -lsocket" >&5 +echo "configure:5415: 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 @@ -5369,14 +5419,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:5430: \"$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 @@ -5402,12 +5452,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:5406: checking for accept" >&5 +echo "configure:5456: 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:5484: \"$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 @@ -5452,12 +5502,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5456: checking for gethostbyname" >&5 +echo "configure:5506: 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:5534: \"$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 @@ -5498,7 +5548,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:5502: checking for main in -lnsl" >&5 +echo "configure:5552: 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 @@ -5506,14 +5556,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:5567: \"$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 @@ -5549,13 +5599,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:5553: checking MIT X libraries" >&5 +echo "configure:5603: 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 < @@ -5566,7 +5616,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -5590,14 +5640,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:5594: checking whether char is unsigned" >&5 +echo "configure:5644: 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:5683: \"$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 @@ -5690,7 +5740,7 @@ if test "`uname -s`" = "Darwin" ; then 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 +echo "configure:5744: 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" diff --git a/unix/configure.in b/unix/configure.in index 905278b..2a7559b 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.33 2006/07/20 06:27:35 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.34 2006/08/18 07:47:26 das Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -253,11 +253,10 @@ if test "`uname -s`" = "Darwin" ; then 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). - CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`" - fi + # remove 64-bit arch flags from CFLAGS for combined 32-bit and 64-bit fat + # builds, as neither TkAqua nor TkX11 can be built for 64-bit at present. + test "$fat_32_64" = yes && \ + CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`" else tk_aqua=no fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 6db9b10..0dccb7c 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1549,7 +1549,20 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_CFLAGS="-fno-common" if test $do64bit = yes; then do64bit_ok=yes - CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + case `arch` in + ppc) + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5";; + i386) + CFLAGS="$CFLAGS -arch x86_64";; + *) + AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]) + do64bit_ok=no;; + esac + else + # Check for combined 32-bit and 64-bit fat build + echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \ + echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \ + fat_32_64=yes fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ @@ -1565,8 +1578,8 @@ dnl AC_CHECK_TOOL(AR, ar) DL_OBJS="tclLoadDyld.o" DL_LIBS="" # Don't use -prebind when building for Mac OS X 10.4 or later only: - test -z "${MACOSX_DEPLOYMENT_TARGET}" || \ - test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print [$]2}'`" -lt 4 && \ + test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \ + "`echo "${CFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4 && \ LDFLAGS="$LDFLAGS -prebind" LDFLAGS="$LDFLAGS -headerpad_max_install_names" AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ @@ -1589,11 +1602,11 @@ dnl AC_CHECK_TOOL(AR, ar) if test $tcl_corefoundation = yes; then AC_CACHE_CHECK([for CoreFoundation.framework], tcl_cv_lib_corefoundation, [ hold_libs=$LIBS; hold_cflags=$CFLAGS - if test $do64bit_ok = no ; then - # remove -arch ppc64 from CFLAGS while testing presence - # of CF, otherwise all archs will have CF disabled. - # CF for ppc64 is disabled in tclUnixPort.h instead. - CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/'`" + if test "$fat_32_64" = yes; then + # On Tiger there is no 64-bit CF, so remove 64-bit archs + # from CFLAGS while testing for presence of CF. + # 64-bit CF is disabled in tclUnixPort.h if necessary. + CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`" fi LIBS="$LIBS -framework CoreFoundation" AC_TRY_LINK([#include ], @@ -1606,6 +1619,18 @@ dnl AC_CHECK_TOOL(AR, ar) else tcl_corefoundation=no fi + if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then + AC_CACHE_CHECK([for 64-bit CoreFoundation], tcl_cv_lib_corefoundation_64, [ + hold_cflags=$CFLAGS + CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc / /g' -e 's/-arch i386 / /g'`" + AC_TRY_LINK([#include ], + [CFBundleRef b = CFBundleGetMainBundle();], + tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no) + CFLAGS=$hold_cflags]) + if test $tcl_cv_lib_corefoundation_64 = no; then + AC_DEFINE(NO_COREFOUNDATION_64) + fi + fi fi AC_DEFINE(MAC_OSX_TCL) ;; -- cgit v0.12