diff options
Diffstat (limited to 'unix/configure.in')
-rw-r--r-- | unix/configure.in | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/unix/configure.in b/unix/configure.in index 1c94235..4b26a99 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.140 2007/10/02 18:28:15 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.141 2007/10/15 07:21:53 das Exp $ AC_INIT([tk],[8.5]) AC_PREREQ(2.59) @@ -256,10 +256,29 @@ if test "`uname -s`" = "Darwin" ; then fi fi AC_MSG_RESULT([$tk_aqua]) - # remove 64-bit arch flags from CFLAGS et al. for combined 32 & 64 bit fat - # builds, as neither TkAqua nor TkX11 can be built for 64-bit at present. - test "$fat_32_64" = yes && for v in CFLAGS CPPFLAGS LDFLAGS; do - eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'; done + if test "$fat_32_64" = yes; then + if test $tk_aqua = no; then + AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [ + 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 + CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" + LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" + AC_TRY_LINK([#include <X11/Xlib.h>], [XrmInitialize();], + tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no) + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval $v'="$hold_'$v'"' + done]) + fi + # remove 64-bit arch flags from CFLAGS et al. for combined 32 & 64 bit + # fat builds if configuration does not support 64-bit. + if test $tk_aqua = yes -o "$tcl_cv_lib_x11_64" = no; then + AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags]) + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' + done + fi + fi if test $tk_aqua = no; then # check if weak linking whole libraries is possible. AC_CACHE_CHECK([if ld accepts -weak-l flag], tcl_cv_ld_weak_l, [ |