summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authordas <das>2007-06-06 09:55:21 (GMT)
committerdas <das>2007-06-06 09:55:21 (GMT)
commit9f684a33310103c2c81b8afa31efbf646c5354ee (patch)
treef0c4767e19f3ecada05de2dbe8f54e3c76facc42 /unix/tcl.m4
parent036648890d927acf9cb4e812325b311f7710cdf9 (diff)
downloadtk-9f684a33310103c2c81b8afa31efbf646c5354ee.zip
tk-9f684a33310103c2c81b8afa31efbf646c5354ee.tar.gz
tk-9f684a33310103c2c81b8afa31efbf646c5354ee.tar.bz2
* unix/configure.in (Darwin): link the Tk and Wish plists into their
binaries in all cases; fix 64bit arch removal in fat 32&64bit builds. * unix/tcl.m4 (Darwin): fix CF checks in fat 32&64bit builds. * unix/configure: autoconf-2.59
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m423
1 files changed, 14 insertions, 9 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index d2e82c6..3b3dcad 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1680,18 +1680,20 @@ dnl AC_CHECK_TOOL(AR, ar)
AC_MSG_RESULT([$tcl_corefoundation])
if test $tcl_corefoundation = yes; then
AC_CACHE_CHECK([for CoreFoundation.framework], tcl_cv_lib_corefoundation, [
- hold_libs=$LIBS; hold_cflags=$CFLAGS
- if test "$fat_32_64" = yes; then
+ hold_libs=$LIBS
+ if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
# On Tiger there is no 64-bit CF, so remove 64-bit archs
- # from CFLAGS while testing for presence of CF.
+ # from CFLAGS et al. 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
+ eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
+ done; fi
LIBS="$LIBS -framework CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
[CFBundleRef b = CFBundleGetMainBundle();],
tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no)
- LIBS=$hold_libs; CFLAGS=$hold_cflags])
+ if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
+ eval $v'="$hold_'$v'"'
+ done; fi; LIBS=$hold_libs])
if test $tcl_cv_lib_corefoundation = yes; then
LIBS="$LIBS -framework CoreFoundation"
AC_DEFINE(HAVE_COREFOUNDATION, 1,
@@ -1701,12 +1703,15 @@ dnl AC_CHECK_TOOL(AR, ar)
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'`"
+ for v in CFLAGS CPPFLAGS LDFLAGS; do
+ eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
+ done
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])
+ for v in CFLAGS CPPFLAGS LDFLAGS; do
+ eval $v'="$hold_'$v'"'
+ done])
if test $tcl_cv_lib_corefoundation_64 = no; then
AC_DEFINE(NO_COREFOUNDATION_64, 1,
[Is Darwin CoreFoundation unavailable for 64-bit?])