home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / TCL / BLT / _BLT.TAR / usr / lib / blt / applications / extloader / README < prev    next >
Encoding:
Text File  |  1994-04-22  |  3.4 KB  |  124 lines

  1. This is version 1.0 of the "extension" command.  It creates a 
  2. vanilla version of "wish" with one added command to load shared
  3. libraries as extensions.  This command reflects the proposal
  4. made last year for an extension loader.  It is not the last word
  5. on extension loading.  I any welcome comments or suggestions to
  6. improve this or any other loader.
  7.  
  8. The command requires no patching of the Tcl or Tk libraries.
  9. It works with the following releases of Tcl.
  10.  
  11.     Tcl 7.3
  12.     Tcl 7.2
  13.     Tcl 7.1
  14.     Tcl 7.0
  15.  
  16. The "extension" command has been tested on HP-UX, SunOS 4.x, and
  17. SunOS 5.x.  It should work also on ISIX 5.x, OSF1.
  18.  
  19. ---------
  20.  
  21. How to build and test:
  22.  
  23. 0. Run ./configure
  24.  
  25.    Run the auto-configuration script "./configure"
  26.  
  27.     ./configure 
  28.  
  29.    * If you want to use gcc, it's "./configure -with-gcc"
  30.  
  31.     ./configure -with-gcc
  32.  
  33.    * By default, the "wish" program and manual pages will be installed 
  34.      in "/usr/local/blt".  You can change this by giving the -prefix 
  35.      option to ./configure.
  36.  
  37.     ./configure -prefix=/depot/stuff/blt
  38.     
  39.   You may be queried for the location of the Tcl and Tk libraries, if
  40.   "configure" can't find them in the standard locations.
  41.  
  42.   The configure script creates an include file "./extConfig.h".
  43.   It will also generate a new Makefile from its template (Makefile.in).
  44.   If "configure" can't find something (e.g. it can't find the X libraries),
  45.   edit the file "config.status" and run it.
  46.  
  47.     ./config.status
  48.  
  49.   Otherwise, you'll have to edit the Makefiles files by hand.
  50.  
  51.  
  52. 1. Compile 
  53.  
  54.     make 
  55.  
  56. 2. Edit the "extensions.tcl" file.
  57.  
  58.    The first time the "extension" command is used it tries to source 
  59.    the file "[tcl library]/extensions.tcl".  This file can be used to 
  60.    specify the extensions available and their respective libraries.
  61.    You can always use the low-level commands to load a library too.
  62.  
  63.    This file sets two global variables which the "extension" command 
  64.    uses to find shared libraries.
  65.  
  66.    The first is an associative array "tcl_extensions".  This array
  67.    maps an extension name (such as "blt") with the proper initialization
  68.    routine and shared libraries.
  69.  
  70.            set tcl_extensions(blt) { Blt_Init libBLT.so.1.7 }
  71.  
  72.    The second variable is "tcl_extloadpath".  This variable is a list
  73.    of directories to search for the library.  
  74.  
  75.        set tcl_extloadpath { 
  76.             /usr/local/tcl/extensions/lib 
  77.         /usr/local/lib 
  78.            }
  79.  
  80.    Edit the file "./extensions.tcl" to reflect where things are on
  81.    your system and install it in the Tcl library directory.
  82.  
  83.    By default, the "extension" command looks for the file 
  84.    "[tcl library]/extensions.tcl".  But you can override this by 
  85.    setting the environment variable TCL_EXTMAP.  
  86.  
  87.        set env(TCL_EXTMAP) /u/mydir/my_extensions.tcl
  88.  
  89.  
  90. 3. Test by running the demos. 
  91.  
  92.    
  93.    Go into the demos/blt directory
  94.     
  95.     cd demos/blt
  96.  
  97.    and run the test scripts.
  98.     
  99.     ./graph
  100.  
  101.    If your system doesn't support "#!" in shell scripts, then it's
  102.  
  103.     ../../wish -f ./graph
  104.  
  105.    * These demos assume you have previously built a BLT as shared 
  106.      library and that it still resides in the directory 
  107.      ../../src/shared.
  108.    
  109. 4. Install the new "wish" binary and "extensions.tcl" file.
  110.  
  111.    By default, the "wish" is installed in /usr/local/blt/bin and
  112.    the manual page for the extension command is installed in
  113.    /usr/local/blt/man
  114.    
  115.    You can change the top directory by supplying the -prefix option to
  116.    ./configure.
  117.  
  118.  
  119. 5. Send bugs reports, correspondence, etc. to
  120.  
  121.        george.howlett@att.com
  122.  
  123.  
  124.