summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordas <das>2007-01-19 01:03:58 (GMT)
committerdas <das>2007-01-19 01:03:58 (GMT)
commit34a3970c39dead78485d1bd7b7f4b858922c8f69 (patch)
tree8c889dd8b584c804f47a564d9fc3ed74243866d6 /unix
parent79321316d659aa0a2e5790798db88d38b8a9a835 (diff)
downloadtcl-34a3970c39dead78485d1bd7b7f4b858922c8f69.zip
tcl-34a3970c39dead78485d1bd7b7f4b858922c8f69.tar.gz
tcl-34a3970c39dead78485d1bd7b7f4b858922c8f69.tar.bz2
* macosx/tclMacOSXFCmd.c (TclMacOSXSetFileAttribute): on some versions
of Mac OS X, truncate() fails on resource forks, in that case use open() with O_TRUNC instead. * macosx/tclMacOSXNotify.c: accommodate changes to prototypes of OSSpinLock(Un)Lock API. * macosx/Tcl.xcodeproj/project.pbxproj: ensure HOME and USER env vars * macosx/Tcl.xcodeproj/default.pbxuser: are defined when running testsuite from Xcode. * tests/env.test: add extra system env vars that need to be preserved on some Mac OS X versions for testsuite to work. * unix/Makefile.in: move libtommath defines into configure.in to avoid * unix/configure.in: replicating them across multiple buildsystems. * macosx/Tcl.xcodeproj/project.pbxproj: * unix/tcl.m4: ensure CPPFLAGS env var is used when set. [Bug 1586861] (Darwin): add -isysroot and -mmacosx-version-min flags to CPPFLAGS when present in CFLAGS to avoid discrepancies between what headers configure sees during preprocessing tests and compiling tests. * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in10
-rwxr-xr-xunix/configure18
-rw-r--r--unix/configure.in5
-rw-r--r--unix/tcl.m47
-rw-r--r--unix/tclConfig.h.in6
5 files changed, 40 insertions, 6 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index cd63b0f..76925be 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -4,7 +4,7 @@
# "./configure", which is a configuration script generated by the "autoconf"
# program (constructs like "@foo@" will get replaced in the actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.200 2006/12/17 03:47:08 das Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.201 2007/01/19 01:04:00 das Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -270,13 +270,13 @@ DDD = ddd
CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
--I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} -DTCL_TOMMATH -DMP_PREC=4 \
--I${TOMMATH_DIR} ${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} \
+-I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} -I${TOMMATH_DIR} \
+${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} \
${NO_DEPRECATED_FLAGS} ${ENV_FLAGS} @EXTRA_CC_SWITCHES@
STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
--I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} -DTCL_TOMMATH -DMP_PREC=4 \
--I${TOMMATH_DIR} ${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} \
+-I${BUILD_DIR} -I${UNIX_DIR} -I${GENERIC_DIR} -I${TOMMATH_DIR} \
+${AC_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} \
${ENV_FLAGS} @EXTRA_CC_SWITCHES@
LIBS = @TCL_LIBS@
diff --git a/unix/configure b/unix/configure
index 4d58946..6a5571c 100755
--- a/unix/configure
+++ b/unix/configure
@@ -6471,6 +6471,7 @@ fi
TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
ECHO_VERSION='`echo ${VERSION}`'
TCL_LIB_VERSIONS_OK=ok
+ CFLAGS="${CPPFLAGS} ${CFLAGS}"
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE=-O
if test "$GCC" = "yes" ; then
@@ -7366,6 +7367,12 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6
Darwin-*)
CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
+ # To avoid discrepancies between what headers configure sees during
+ # preprocessing tests and compiling tests, add any -isysroot and
+ # -mmacosx-version-min flags present in CFLAGS to CPPFLAGS:
+ CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
+ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=1;i<=NF;i++) \
+ if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
if test $do64bit = yes; then
case `arch` in
ppc)
@@ -8363,6 +8370,17 @@ echo "${ECHO_T}enabled $tcl_ok debugging" >&6
fi
+
+cat >>confdefs.h <<\_ACEOF
+#define TCL_TOMMATH 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define MP_PREC 4
+_ACEOF
+
+
#--------------------------------------------------------------------
# Detect what compiler flags to set for 64-bit support.
#--------------------------------------------------------------------
diff --git a/unix/configure.in b/unix/configure.in
index a4de014..81fc77b 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 Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.153 2006/12/17 03:47:09 das Exp $
+# RCS: @(#) $Id: configure.in,v 1.154 2007/01/19 01:04:01 das Exp $
AC_INIT([tcl],[8.5])
AC_PREREQ(2.59)
@@ -123,6 +123,9 @@ SC_CONFIG_CFLAGS
SC_ENABLE_SYMBOLS(bccdebug)
+AC_DEFINE(TCL_TOMMATH, 1, [Build libtommath?])
+AC_DEFINE(MP_PREC, 4, [Default libtommath precision.])
+
#--------------------------------------------------------------------
# Detect what compiler flags to set for 64-bit support.
#--------------------------------------------------------------------
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 140d25a..34b9f7a 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1113,6 +1113,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
ECHO_VERSION='`echo ${VERSION}`'
TCL_LIB_VERSIONS_OK=ok
+ CFLAGS="${CPPFLAGS} ${CFLAGS}"
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE=-O
if test "$GCC" = "yes" ; then
@@ -1574,6 +1575,12 @@ dnl AC_CHECK_TOOL(AR, ar)
Darwin-*)
CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
+ # To avoid discrepancies between what headers configure sees during
+ # preprocessing tests and compiling tests, add any -isysroot and
+ # -mmacosx-version-min flags present in CFLAGS to CPPFLAGS:
+ CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
+ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=1;i<=NF;i++) \
+ if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
if test $do64bit = yes; then
case `arch` in
ppc)
diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in
index 0d3e650..6fc1306 100644
--- a/unix/tclConfig.h.in
+++ b/unix/tclConfig.h.in
@@ -268,6 +268,9 @@
/* Linker support for module scope symbols */
#undef MODULE_SCOPE
+/* Default libtommath precision. */
+#undef MP_PREC
+
/* Is Darwin CoreFoundation unavailable for 64-bit? */
#undef NO_COREFOUNDATION_64
@@ -385,6 +388,9 @@
/* Are we building with threads enabled? */
#undef TCL_THREADS
+/* Build libtommath? */
+#undef TCL_TOMMATH
+
/* Do we allow unloading of shared libraries? */
#undef TCL_UNLOAD_DLLS