diff options
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/configure | 7 | ||||
-rw-r--r-- | unix/tcl.m4 | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/unix/configure b/unix/configure index d8fb139..ac93cfb 100755 --- a/unix/configure +++ b/unix/configure @@ -4747,6 +4747,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 @@ -5642,6 +5643,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) 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) |