[GRASS5] [bug #1109] (grass) configure failing to find tcl.h depending on argument order

Glynn Clements glynn.clements at virgin.net
Tue Jun 11 15:09:14 EDT 2002


Request Tracker wrote:

> configure was bailing looking for tcl.h, even though I specifically told it to 
> look in /usr/include/tcl8.3 (where Debian has put it) - I also 
> experimented with /usr/include/tk8.3, which debian also has, as well as 
> making sure I point to the lib directories too, all with no effect.

You may need to specify both, e.g.

	--with-tcltk-includes='/usr/include/tcl8.3 /usr/include/tk8.3'

> I first tried bypassing the error using --with-tcltk=no but it seemed to be 
> ignored, I got the same error.

Odd. Did you spell it correctly (see below)?

> Then, on a hunch, tried moving the --with-
> tcltk-includes directive earlier in the ./configure command line, and it 
> WORKED !?!  Now I'm less sure this is a GRASS bug but will submit it 
> here for someone more knowledgeable to judge.
> SO:
> This didn't work:
> 
>  ./configure --with-postgres-includes=/usr/local/pgsql/include --with-
> postgres-libs=/usr/local/pgsql/lib --with-odbc-libs=/usr/local/lib --with-
> odbc-includes=/usr/local/include --with-tcktk-includes=/usr/include/
                                          ^^^^^
> tcl8.3/

I wouldn't expect it to, due to the misspelled option.

An unfortunate fact of autoconf's behaviour is that it (intentionally)
doesn't complain about --with-* options which it doesn't understand;
misspelled options are silently ignored. Unfortunately, this isn't
easy to fix.

> This DID (and now it's compiling):
> 
>  ./configure --with-postgres-includes=/usr/local/pgsql/include --with-
> tcltk-includes=/usr/include/tcl8.3/ --with-postgres-libs=/usr/local/pgsql/
> lib --with-odbc-libs=/usr/local/lib --with-odbc-includes=/usr/local/include
> 
> 
> When there was an error, it logged:
> 
> checking whether to use Tcl/Tk... yes
> checking for location of Tcl/Tk includes... 
> checking for tcl.h... no
> configure: error: *** Unable to locate Tcl includes.
> bouteloua:/vmware/smitch/grass5.0.0pre4> tail config.log
> configure:6978: gcc -o conftest -g -O2    conftest.c -lgd  -lgd   1>&5
> configure:7012: checking whether to use Tcl/Tk
> configure:7032: checking for location of Tcl/Tk includes
> configure:7058: checking for tcl.h
> configure:7066: gcc -E   conftest.c >/dev/null 2>conftest.out

Note the lack of a "-I" switch. This indicates that either
-with-tcltk-includes wasn't specified, or its argument was empty (this
would be the case if there was a space after the '=').

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list