diff options
author | das <das@noemail.net> | 2006-12-19 01:19:45 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2006-12-19 01:19:45 (GMT) |
commit | fd9f21f8cdb32f52c4869dc3bbb2a1ee72b4a71e (patch) | |
tree | be41131848bf5f0c1d925c38d4dec8687ee8a3ce /unix/tcl.m4 | |
parent | 977efaa875685613a71d6dc59ac7ea408c23eb7c (diff) | |
download | tcl-fd9f21f8cdb32f52c4869dc3bbb2a1ee72b4a71e.zip tcl-fd9f21f8cdb32f52c4869dc3bbb2a1ee72b4a71e.tar.gz tcl-fd9f21f8cdb32f52c4869dc3bbb2a1ee72b4a71e.tar.bz2 |
* unix/tcl.m4 (Darwin): --enable-64bit: verify linking with 64bit -arch
flag succeeds before enabling 64bit build.
* unix/configure: autoconf-2.13
FossilOrigin-Name: 77a5587d556ef9a3b9a848ad2bbb538bdfb73cc2
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index f3d9f1b..13f533a 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1560,15 +1560,33 @@ dnl AC_CHECK_TOOL(AR, ar) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" if test $do64bit = yes; then - do64bit_ok=yes case `arch` in ppc) - CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5";; + AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag], + tcl_cv_cc_arch_ppc64, [ + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes, + tcl_cv_cc_arch_ppc64=no) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_arch_ppc64 = yes; then + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + do64bit_ok=yes + fi;; i386) - CFLAGS="$CFLAGS -arch x86_64";; + AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag], + tcl_cv_cc_arch_x86_64, [ + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -arch x86_64" + AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes, + tcl_cv_cc_arch_x86_64=no) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_arch_x86_64 = yes; then + CFLAGS="$CFLAGS -arch x86_64" + do64bit_ok=yes + fi;; *) - AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]) - do64bit_ok=no;; + AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);; esac else # Check for combined 32-bit and 64-bit fat build |