Artifact ce47ffcac3500d6058995d001c61bc3a792330a8:
- File
README.extensions
-
2010-11-08 05:26:22
- part of checkin
[9b39a9cf6f]
on branch trunk
- Don't hardcode /lib/jim
Instead, set TCL_LIBRARY based on where jim is installed. This defaults to /usr/local (thus /usr/local/lib/jim), or can be modified with either configure or make. e.g.
./configure --prefix=/usr or make prefix=/usr install
Now auto_path is initialised only to TCL_LIBRARY, and doesn't include "." which could be undesirable.
At the same time, simplify jimsh initialisation using a script instead of C code. Add the path to the executable to auto_path.
Also, no longer use JIM_TCL_COMPAT. Always use the tcl-compatible names, $auto_path and $tcl_interactive.
Signed-off-by: Steve Bennett <steveb@workware.net.au> (user: steveb@workware.net.au
-
2010-11-08 05:26:22
- part of checkin
[9b39a9cf6f]
on branch trunk
- Don't hardcode /lib/jim
0000: 54 68 65 20 2f 6c 69 62 2f 6a 69 6d 20 64 69 72 The /lib/jim dir 0010: 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 73 20 ectory contains 0020: 62 6f 74 68 20 64 79 6e 61 6d 69 63 61 6c 6c 79 both dynamically 0030: 20 6c 6f 61 64 61 62 6c 65 20 65 78 74 65 6e 73 loadable extens 0040: 69 6f 6e 73 0a 61 6e 64 20 70 75 72 65 2d 54 63 ions.and pure-Tc 0050: 6c 20 65 78 74 65 6e 73 69 6f 6e 73 2e 0a 0a 44 l extensions...D 0060: 79 6e 61 6d 69 63 61 6c 6c 79 20 6c 6f 61 64 61 ynamically loada 0070: 62 6c 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 6d ble extensions m 0080: 75 73 74 20 68 61 76 65 20 61 20 2e 73 6f 20 66 ust have a .so f 0090: 69 6c 65 20 65 78 74 65 6e 73 69 6f 6e 0a 54 63 ile extension.Tc 00a0: 6c 20 65 78 74 65 6e 73 69 6f 6e 73 20 6d 75 73 l extensions mus 00b0: 74 20 68 61 76 65 20 61 20 2e 74 63 6c 20 66 69 t have a .tcl fi 00c0: 6c 65 20 65 78 74 65 6e 73 69 6f 6e 0a 0a 41 73 le extension..As 00d0: 20 6c 6f 6e 67 20 61 73 20 2f 6c 69 62 2f 6a 69 long as /lib/ji 00e0: 6d 20 69 73 20 69 6e 20 24 3a 3a 61 75 74 6f 5f m is in $::auto_ 00f0: 70 61 74 68 20 28 69 74 20 69 73 20 62 79 20 64 path (it is by d 0100: 65 66 61 75 6c 74 29 2c 20 65 78 74 65 6e 73 69 efault), extensi 0110: 6f 6e 0a 61 62 63 20 63 61 6e 20 62 65 20 6c 6f on.abc can be lo 0120: 61 64 65 64 20 77 69 74 68 3a 0a 0a 20 20 70 61 aded with:.. pa 0130: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 61 62 ckage require ab 0140: 63 0a 0a 46 69 72 73 74 20 61 62 63 2e 73 6f 20 c..First abc.so 0150: 77 69 6c 6c 20 62 65 20 74 72 69 65 64 2c 20 61 will be tried, a 0160: 6e 64 20 74 68 65 6e 20 61 62 63 2e 74 63 6c 0a nd then abc.tcl. 0170: 0a 4e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 .Note that this 0180: 64 69 72 65 63 74 6f 72 79 20 6d 61 79 20 62 65 directory may be 0190: 20 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 20 something like 01a0: 2f 6c 69 62 2f 6a 69 6d 2c 20 2f 75 73 72 2f 6c /lib/jim, /usr/l 01b0: 69 62 2f 6a 69 6d 20 6f 72 0a 2f 75 73 72 2f 6c ib/jim or./usr/l 01c0: 6f 63 61 6c 2f 6c 69 62 2f 6a 69 6d 2c 20 64 65 ocal/lib/jim, de 01d0: 70 65 6e 64 69 6e 67 20 75 70 6f 6e 20 77 68 65 pending upon whe 01e0: 72 65 20 6a 69 6d 20 77 61 73 20 69 6e 73 74 61 re jim was insta 01f0: 6c 6c 65 64 2e 0a lled..