summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authordas <das>2006-08-18 07:47:25 (GMT)
committerdas <das>2006-08-18 07:47:25 (GMT)
commitdc316587c0b9053c09dfb532523bcdfd73169adc (patch)
treef254078a6fbdec5ff6dc35a289513a269d6227f6 /unix/tcl.m4
parent5ee6ad27caa9604bea6497f069083d463a106d80 (diff)
downloadtk-dc316587c0b9053c09dfb532523bcdfd73169adc.zip
tk-dc316587c0b9053c09dfb532523bcdfd73169adc.tar.gz
tk-dc316587c0b9053c09dfb532523bcdfd73169adc.tar.bz2
* 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]
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m441
1 files changed, 33 insertions, 8 deletions
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 <CoreFoundation/CoreFoundation.h>],
@@ -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 <CoreFoundation/CoreFoundation.h>],
+ [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)
;;