diff options
author | das <das@noemail.net> | 2007-01-25 02:06:35 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2007-01-25 02:06:35 (GMT) |
commit | 00f4d3c67a40acf81da9fe619eaca727825440f8 (patch) | |
tree | fd922e5a653e09b9e641c8660851dce88940ba11 /unix/tcl.m4 | |
parent | dca9ba0db4a05d388cd834ef20375d6891bfaf2a (diff) | |
download | tcl-00f4d3c67a40acf81da9fe619eaca727825440f8.zip tcl-00f4d3c67a40acf81da9fe619eaca727825440f8.tar.gz tcl-00f4d3c67a40acf81da9fe619eaca727825440f8.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
FossilOrigin-Name: dee12fbe420358e1fa601eb9dc34769053aa23d7
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]) + |