| 1 |
# -- CVS $Id: INSTALL,v 1.2 2003/01/24 19:27:40 andreas_kupries Exp $ |
| 2 |
# |
| 3 |
|
| 4 |
Installation and compilation instructions |
| 5 |
with regard to the Memchan extension to TCL |
| 6 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
|
| 8 |
This extension requires plain tcl, version 7.6 or higher. If |
| 9 |
you don't have it installed, do this now. The configure |
| 10 |
script (-> UNIX) will check the version of the installed tcl. |
| 11 |
|
| 12 |
Prerequisites: |
| 13 |
|
| 14 |
Tcl, Tcllib |
| 15 |
(The latter provides us with doctools and textutil::expander). |
| 16 |
|
| 17 |
|
| 18 |
1.) Windows |
| 19 |
=============== |
| 20 |
|
| 21 |
The current distribution features a makefile for MSVC++ |
| 22 |
only. Just copy 'makefile.vc' to 'makefile', adapt the |
| 23 |
paths at the top of it as required by your setup |
| 24 |
(= directory structure, see comments), then type inside |
| 25 |
a DOS-box: |
| 26 |
|
| 27 |
> nmake |
| 28 |
> nmake install |
| 29 |
|
| 30 |
The 2nd command will place the new dll in a directory |
| 31 |
being a sibling to 'tcl\lib\tclX.Y', as required by the |
| 32 |
package loader. |
| 33 |
|
| 34 |
|
| 35 |
2.) Mac |
| 36 |
=========== |
| 37 |
|
| 38 |
I don't have a Mac, nor do I have access to one. Because |
| 39 |
of this I am unable to provide a Mac port of this |
| 40 |
extension. I will most happily integrate any required |
| 41 |
changes, makefiles, et cetera into the distribution, |
| 42 |
if they are send to me ([email protected]). |
| 43 |
|
| 44 |
|
| 45 |
3.) Unix |
| 46 |
============ |
| 47 |
|
| 48 |
o That you are reading this text means, that you extracted |
| 49 |
the gzipped tar-archive in a directory of your choice. |
| 50 |
This operation should have created a subdirectory with |
| 51 |
the name 'memchan<version>'. It is refered to as |
| 52 |
"source-directory" from now on. |
| 53 |
|
| 54 |
o 'cd' into the source-directory, e.g. make it your working |
| 55 |
directory, then start the automatic setup by typing |
| 56 |
'configure'. If your system does not understand the |
| 57 |
'#!' notation of specifying script-interpreters, you |
| 58 |
have to type 'sh configure' (or '/bin/sh configure', ...). |
| 59 |
|
| 60 |
o The configure script searches for tcl.h in the following |
| 61 |
places: |
| 62 |
|
| 63 |
-1 $(TCL_INCLUDE_DIR) |
| 64 |
-2 ../tcl8.0*/generic (b1, a2, a1, in this order) |
| 65 |
-3 ../tcl7.6/generic |
| 66 |
-4 ../tcl/generic |
| 67 |
-5 ../tcl |
| 68 |
-6 $(prefix) |
| 69 |
-7 /usr/local/include |
| 70 |
-8 /usr/include |
| 71 |
|
| 72 |
By default $(TCL_INCLUDE_DIR) is empty and $(prefix) points |
| 73 |
to the location of an installed 'tclsh' or is /usr/local if |
| 74 |
tclsh could not be found via $PATH. |
| 75 |
|
| 76 |
Use the following options to overide the defaults: |
| 77 |
|
| 78 |
--prefix=DIR -> $(prefix)=DIR |
| 79 |
--with-tcl=DIR -> $(TCL_INCLUDE_DIR)=DIR/include |
| 80 |
--with-tcl-include-dir=DIR -> $(TCL_INCLUDE_DIR)=DIR |
| 81 |
|
| 82 |
|
| 83 |
o To find libtcl.a (libtcl.so.??) the paths |
| 84 |
|
| 85 |
-1 $(TCL_LIB_DIR) |
| 86 |
-2 ../tcl8.0*/unix (b1, a2, a1, in this order) |
| 87 |
-3 ../tcl7.6/unix |
| 88 |
-4 ../tcl/unix |
| 89 |
-5 ../tcl |
| 90 |
-6 $(exec_prefix) |
| 91 |
-7 /usr/local/include |
| 92 |
-8 /usr/include |
| 93 |
|
| 94 |
are searched. $(TCL_LIB_DIR) is empty by default, but |
| 95 |
can be set via --with-tcl or --with-tcl-lib-dir. |
| 96 |
|
| 97 |
--with-tcl=DIR -> $(TCL_LIB_DIR)=DIR/lib |
| 98 |
--with-tcl-lib-dir=DIR -> $(TCL_LIB_DIR)=DIR |
| 99 |
|
| 100 |
$(exec_prefix) contains the same value as $(prefix) by |
| 101 |
default, but can be set explicitly via --exec-prefix |
| 102 |
|
| 103 |
|
| 104 |
o Another notable configure option is --enable-shared whose |
| 105 |
appearance commands the script to configure the Makefile |
| 106 |
for creation of shared libraries (as required for dynamic |
| 107 |
loading). |
| 108 |
|
| 109 |
|
| 110 |
o Now start the compilation by typing 'make'. |
| 111 |
The makefile will then compile the sources and build the |
| 112 |
library. |
| 113 |
|
| 114 |
o At last type 'make install' to install the generated |
| 115 |
library. |
| 116 |
|
| 117 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 118 |
Enjoy |
| 119 |
Andreas Kupries ([email protected]) |