diff options
author | das <das> | 2007-01-25 02:07:34 (GMT) |
---|---|---|
committer | das <das> | 2007-01-25 02:07:34 (GMT) |
commit | a572429284995679d1520215bcc40acc2491cf2d (patch) | |
tree | 7b7c924ed0d9ed5e4273b20c3130448e013ab478 /unix/tcl.m4 | |
parent | 6d69b5fbc37bbfb7a8ab5d285fce3e66448b0ae9 (diff) | |
download | tk-a572429284995679d1520215bcc40acc2491cf2d.zip tk-a572429284995679d1520215bcc40acc2491cf2d.tar.gz tk-a572429284995679d1520215bcc40acc2491cf2d.tar.bz2 |
* unix/tcl.m4: integrate CPPFLAGS into CFLAGS as late as possible
* unix/configure.in: and move (rather than duplicate) -isysroot flags
from CFLAGS to CPPFLAGS to avoid errors about multiple -isysroot flags
from some older gcc builds.
* unix/configure: autoconf-2.13
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 56142d7..17864a6 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1564,8 +1564,11 @@ dnl AC_CHECK_TOOL(AR, ar) # 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++) \ + awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`" + CFLAGS="`echo " ${CFLAGS}" | \ + awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ + if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`" if test $do64bit = yes; then case `arch` in ppc) @@ -1958,6 +1961,12 @@ dnl AC_CHECK_TOOL(AR, ar) AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform]) fi +dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so +dnl # until the end of configure, as configure's compile and link tests use +dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's +dnl # preprocessing tests use only CPPFLAGS. + SC_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""]) + # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need @@ -3198,3 +3207,21 @@ AC_DEFUN([SC_TCL_GETGRNAM_R], [AC_CHECK_FUNC(getgrnam_r, [ AC_DEFINE(HAVE_GETGRNAM_R) fi ])]) + +#-------------------------------------------------------------------- +# SC_COMMANDS_PRE(CMDS) +# +# Replacement for autoconf 2.5x AC_COMMANDS_PRE: +# Commands to run right before config.status is +# created. Accumulates. +# +# Reauires presence of SC_OUTPUT_COMMANDS_PRE at the end +# of configure.in (right before AC_OUTPUT). +# +#-------------------------------------------------------------------- + +AC_DEFUN([SC_COMMANDS_PRE], [ + define([SC_OUTPUT_COMMANDS_PRE], defn([SC_OUTPUT_COMMANDS_PRE])[$1 +])]) +AC_DEFUN([SC_OUTPUT_COMMANDS_PRE]) + |