title: While configuring expect, found source tcl directories instead of its installation location
body: <p>I am building <code>gcc</code> from source. I meant to run the tests, which requires <code>dejagnu</code>, <code>expect</code> and <code>tcl</code>.</p>
  
  <p>I first <code>configure</code>d <code>tcl</code> (using <code>dir1</code> instead of the actual dir for brevity), with</p>
  
  <pre><code>$ cd dir1/unix
  $ ./configure --prefix="$HOME/usr/local"
  </code></pre>
  
  <p>and built.
  Then I <code>configure</code>d <code>expect</code> with</p>
  
  <pre><code>$ ./configure --prefix="$HOME/usr/local"
  </code></pre>
  
  <p>At that point, tcl was found in <code>dir1</code>, i.e.,</p>
  
  <pre><code>$ grep tcl config.log
  configure:2650: result: found dir1/unix/tclConfig.sh
  configure:2656: checking for existence of dir1/unix/tclConfig.sh
  configure:5078: result: dir1/generic
  ...
  </code></pre>
  
  <p>My environment produces (using <code>$HOME</code> for brevity)</p>
  
  <pre><code>LIBRARY_PATH=$HOME/usr/local/lib:...
  LD_LIBRARY_PATH=$HOME/usr/local/lib:...
  CPATH=$HOME/usr/local/include:...
  PATH=$HOME/usr/local/bin:...
  </code></pre>
  
  <p><strong>How is it posible that the source directory of <code>tcl</code> was found?
  I expected that <code>tcl</code> was found in <code>$HOME/usr/local</code>.
  Perhaps <code>expect</code> is somehow reading the configuration of <code>tcl</code>, which looks very strange to me.</strong></p>