From Kurt.Hornik at wu-wien.ac.at  Tue Oct 28 19:35:54 2003
From: Kurt.Hornik at wu-wien.ac.at (Kurt Hornik)
Date: Tue Oct 28 19:37:38 2003
Subject: [Rd] configure, config.site and TCLTK_CPPFLAGS
In-Reply-To: <Pine.LNX.4.44.0310280025530.9636-100000@kleigh.nl>
References: <16285.32494.170709.639084@mithrandir.hornik.net>
	<Pine.LNX.4.44.0310280025530.9636-100000@kleigh.nl>
Message-ID: <16286.46858.600817.644383@mithrandir.hornik.net>

>>>>> Peter Kleiweg writes:

> # aldus Kurt Hornik :
>> > I am trying to configure R-1.8.0-patched (fresh rsync) for machines
>> > with the tcltk files in unorthodox locations. I specified a
>> > TCLTK_CPPFLAGS='/usr/freeware/include/' in the file config.site but it
>> > seems that a '# no special path needed' is added when running
>> > configure, causing trouble (See the excerpt from config.site below).
>> > This was working with R-1.7.1. I am not an autoconf/configure expert,
>> > so any hint is welcome.
>> 
>> Could the "no special path needed" comment be something you added in one
>> of your config files?  I cannot seem to find it in the R sources ...

> See PR#1500

Thanks.

I looked into this a bit more.  Seems that Tcl/Tk 8.4 has gotten rid of
these "comments", the Tcl ChangeLog has

2002-07-23  Mo DeJong  <mdejong@users.sourceforge.net>

        * unix/tcl.m4 (SC_PATH_X): Set XINCLUDES to "" instead
        of "# no special path needed" or "# no include files found"
        when x headers cannot be located.

It also seems that the problem is with TK_XINCLUDES only.

Our current Autoconf code in m4/R.m4 does

  if test -n "${TK_XINCLUDES}"; then
    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_XINCLUDES}"
  else
    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${X_CFLAGS}"
  fi

so we could do something like

  if test -n "${TK_XINCLUDES}"; then
    case ${TK_XINCLUDES} in
      #*) ;;
      *) TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_XINCLUDES}" ;;
    esac
  else
    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${X_CFLAGS}"
  fi

Untested: can anyone pls try this change?

Thanks
-k


[Rd] configure, config.site and TCLTK_CPPFLAGS
Kurt Hornik