summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
authordas <das>2006-11-26 06:05:11 (GMT)
committerdas <das>2006-11-26 06:05:11 (GMT)
commitf9e2925711ddf6f1acc994cb233cf91c8bdb11b2 (patch)
tree8ba0141cf5847954ba9af6266c948b04a0783921 /unix/configure
parent9884ed53da0071aa546af02ce43cc5d1df4940e7 (diff)
downloadtk-f9e2925711ddf6f1acc994cb233cf91c8bdb11b2.zip
tk-f9e2925711ddf6f1acc994cb233cf91c8bdb11b2.tar.gz
tk-f9e2925711ddf6f1acc994cb233cf91c8bdb11b2.tar.bz2
* tcl.m4 (Linux): --enable-64bit support. [Patch 1597389], [Bug 1230558]
* configure: autoconf-2.59
Diffstat (limited to 'unix/configure')
-rwxr-xr-xunix/configure120
1 files changed, 92 insertions, 28 deletions
diff --git a/unix/configure b/unix/configure
index 911751a..d7d57c5 100755
--- a/unix/configure
+++ b/unix/configure
@@ -5367,7 +5367,7 @@ echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
# get rid of the warnings.
#CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
- SHLIB_LD="${CC} -shared"
+ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
@@ -5376,6 +5376,70 @@ echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
if test "`uname -m`" = "alpha" ; then
CFLAGS="$CFLAGS -mieee"
fi
+ if test $do64bit = yes; then
+ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
+echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
+if test "${tcl_cv_cc_m64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ hold_cflags=$CFLAGS
+ CFLAGS="$CFLAGS -m64"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_cc_m64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_cc_m64=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS=$hold_cflags
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
+echo "${ECHO_T}$tcl_cv_cc_m64" >&6
+ if test $tcl_cv_cc_m64 = yes; then
+ CFLAGS="$CFLAGS -m64"
+ do64bit_ok=yes
+ fi
+ fi
# The combo of gcc + glibc has a bug related
# to inlining of functions like strtod(). The
@@ -9376,20 +9440,20 @@ fi;
XFT_CFLAGS=""
XFT_LIBS=""
if test "$enable_xft" = "no" ; then
- echo "$as_me:$LINENO: result: $enable_xft" >&5
+ echo "$as_me:$LINENO: result: $enable_xft" >&5
echo "${ECHO_T}$enable_xft" >&6
else
- found_xft="yes"
- XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || found_xft="no"
- XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no"
- if test "$found_xft" = "no" ; then
- found_xft=yes
- XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no"
- XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no"
- fi
+ found_xft="yes"
+ XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || found_xft="no"
+ XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no"
+ if test "$found_xft" = "no" ; then
+ found_xft=yes
+ XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no"
+ XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no"
+ fi
echo "$as_me:$LINENO: result: $found_xft" >&5
echo "${ECHO_T}$found_xft" >&6
- if test "$found_xft" = "yes" ; then
+ if test "$found_xft" = "yes" ; then
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS"
tk_oldLibs=$LIBS
@@ -9446,15 +9510,15 @@ if test $ac_cv_header_X11_Xft_Xft_h = yes; then
:
else
- found_xft=no
+ found_xft=no
fi
- CFLAGS=$tk_oldCFlags
- LIBS=$tk_oldLibs
- fi
- if test "$found_xft" = "yes" ; then
+ CFLAGS=$tk_oldCFlags
+ LIBS=$tk_oldLibs
+ fi
+ if test "$found_xft" = "yes" ; then
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS"
tk_oldLibs=$LIBS
@@ -9533,30 +9597,30 @@ _ACEOF
else
- found_xft=no
+ found_xft=no
fi
- CFLAGS=$tk_oldCFlags
- LIBS=$tk_oldLibs
- fi
- if test "$found_xft" = "no" ; then
- if test "$enable_xft" = "yes" ; then
- { echo "$as_me:$LINENO: WARNING: Can't find xft configuration, or xft is unusable" >&5
+ CFLAGS=$tk_oldCFlags
+ LIBS=$tk_oldLibs
+ fi
+ if test "$found_xft" = "no" ; then
+ if test "$enable_xft" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: Can't find xft configuration, or xft is unusable" >&5
echo "$as_me: WARNING: Can't find xft configuration, or xft is unusable" >&2;}
- fi
- enable_xft=no
- fi
+ fi
+ enable_xft=no
+ fi
fi
if test $enable_xft = "yes" ; then
- UNIX_FONT_OBJS=tkUnixRFont.o
+ UNIX_FONT_OBJS=tkUnixRFont.o
cat >>confdefs.h <<\_ACEOF
#define HAVE_XFT 1
_ACEOF
else
- UNIX_FONT_OBJS=tkUnixFont.o
+ UNIX_FONT_OBJS=tkUnixFont.o
fi