Skip to content
Tcl Source Code View Ticket
Login

View Ticket

TEA should check actual existence of private headers

Closed / Fixed1631922fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 18 years ago
Descriptionplain2007-01-10 01:23:11
TEA_PRIVATE_(TCL|TK)_HEADERS says "checking for", but only uses whatever values are in tclConfig.sh.  It should error (or at least warn) if TCL|TK_SRC_DIR does not exist (as it will probably just lead to an error in make).
hobbsplain2007-02-09 07:10:37
Logged In: YES 
user_id=72656
Originator: YES

added to sample 2007-02-08.
petasisplain2007-02-09 19:49:33
Logged In: YES 
user_id=92283
Originator: NO

The changes made in tcl.m4 to close this bug are not appropriate. In fact, the smaplextension now fails at least under fedora core 6: The changes should be:

Instead of:
if test ! -d "${TK_SRC_DIR}/tkInt.h" ; then
   AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
fi

Should be:
if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
   AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
fi

Why? 

a) test -d checks for existence of directories. Not for single file. It will return false, even if the file is there. In my system, only test -f works when the file is there...

b) We should also put /generic/<file>, as TK_SRC_SIR in tkConfig.h should point to the root of the sources, and not in the generic directory. If you set TK_SRC_SIR to include generic (to force configure to not fail), you end up ith generic/generic/ in includes :-(

Of course, the same must be changed also for tclInt.h...

Can you please fix this?
hobbsplain2007-02-10 00:12:35
Logged In: YES 
user_id=72656
Originator: YES

fixed
rmaxplain2008-02-04 22:59:45
Logged In: YES 
user_id=124643
Originator: NO

This fix breaks tcl.m4 in systems where the private headers got installed along with the public ones and ${TCL_SRC_DIR} doesn't exist (anymore), which is common when Tcl gets installed as part of the OS distribution. 

So, in addition to ${TCL_SRC_DIR} the location found by TEA_PUBLIC_TCL_HEADERS should be checked for tclInt.h .
rmax Open ticket [1631922fff]. [History diff]2008-02-04 22:59:46
rmax Ticket [1631922fff]: 1 change [History diff]2008-03-18 18:07:39
rmax Ticket [1631922fff]: 1 change [History diff]2008-03-18 18:08:02
hobbsplain2008-11-05 07:09:52
New TEA 3.7 has this in the private header checks.  Note that it should be used in conjunction with the latest private headers from the core because they had unnecessary ../win/tclWinPort.h and ../unix/tclUnixPort.h refs that would bork things.  The ../win and ../unix have been removed across the board now, but were present in 8.4 and 8.5 for Tcl and Tk.
hobbs Closed ticket [1631922fff]. [History diff]2008-11-05 07:10:03
hobbsplain2008-11-05 07:12:30
Making note for Daniel - the tcl.m4 TEA_PRIVATE_TK_HEADERS framework check is missing an 'else' clause that the Tcl one has - correct or no?
hobbs Ticket [1631922fff]: 1 change [History diff]2008-11-05 07:12:33
dasplain2008-11-05 07:41:10
Thanks Jeff, was indeed incorrect, fixed.
Log in (anonymous is fine) to add a comment.