ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-core
tcl-core
[TCLCORE] Custom tclsh needs to locate library files at run-time
by Sean Morrison other posts by this author
Apr 28 2005 11:12AM messages near this date
Re: [TCLCORE] Custom tclsh needs to locate library files at run-time | [TCLCORE] TIP #246: Unify Pattern Matching
How might I determine where the Tcl library files are installed for a 
particular custom-compiled interpreter at run-time?  What I think I 
need to determine is the TCL_LIBRARY value that would have been valid 
at compile-time for a particular installed libtcl*.[so|a]*.  I'm having 
difficulty locating that value so succinctly on the C side of api.  Is 
there a means to get that information without invoking the interpreter 
and asking for the auto_path?  Is that even the direction I should be 
looking?

We include our own modified version of tclsh and wish in our software 
distribution for various reasons (preloads our command-set, for 
example).  I've recently added configuration checks that attempt to use 
the existing system Tcl library so that we don't have to build Tcl 
ourselves if a suitable one is found.

What basically seems to be happening is that while we can link with the 
Tcl library just fine, the auto_path it ends up searching does not 
include the system-installed tcl scripts, i.e. /usr/lib/tcl8.4 or 
/usr/local/lib/tcl8.4 on many systems.  The same holds true for incrTcl 
which we also link against.  I don't really want to hardcode either/any 
directory just because it exists either.  How might I be able to get my 
build of tclsh to know (in C code) that it needs to search 
/usr/lib/tcl8.4 for scripts when it successfully links against 
-ltcl8.4?  Thank you in advance for any advice.

Cheers!
Sean Morrison
BRL-CAD Open Source



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved