diff options
author | dan miller | 2007-10-20 02:49:29 +0000 |
---|---|---|
committer | dan miller | 2007-10-20 02:49:29 +0000 |
commit | e36d23a85ebff914d74bb541558c2b6082b78edb (patch) | |
tree | 54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl | |
parent | * Fixed an issue whereby avatar chat distances were being calculated against ... (diff) | |
download | opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.zip opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2 opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz |
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl')
-rw-r--r-- | libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl b/libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl new file mode 100644 index 0000000..3e12b7f --- /dev/null +++ b/libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl | |||
@@ -0,0 +1,70 @@ | |||
1 | # | ||
2 | # Run this Tcl script to generate the dynload.html file. | ||
3 | # | ||
4 | set rcsid {$Id: dynload.tcl,v 1.1 2001/02/11 16:58:22 drh Exp $} | ||
5 | |||
6 | puts {<html> | ||
7 | <head> | ||
8 | <title>How to build a dynamically loaded Tcl extension for SQLite</title> | ||
9 | </head> | ||
10 | <body bgcolor=white> | ||
11 | <h1 align=center> | ||
12 | How To Build A Dynamically Loaded Tcl Extension | ||
13 | </h1>} | ||
14 | puts {<p> | ||
15 | <i>This note was contributed by | ||
16 | <a href="bsaunder@tampabay.rr.com.nospam">Bill Saunders</a>. Thanks, Bill!</i> | ||
17 | |||
18 | <p> | ||
19 | To compile the SQLite Tcl extension into a dynamically loaded module | ||
20 | I did the following: | ||
21 | </p> | ||
22 | |||
23 | <ol> | ||
24 | <li><p>Do a standard compile | ||
25 | (I had a dir called bld at the same level as sqlite ie | ||
26 | /root/bld | ||
27 | /root/sqlite | ||
28 | I followed the directions and did a standard build in the bld | ||
29 | directory)</p></li> | ||
30 | |||
31 | <li><p> | ||
32 | Now do the following in the bld directory | ||
33 | <blockquote><pre> | ||
34 | gcc -shared -I. -lgdbm ../sqlite/src/tclsqlite.c libsqlite.a -o sqlite.so | ||
35 | </pre></blockquote></p></li> | ||
36 | |||
37 | <li><p> | ||
38 | This should produce the file sqlite.so in the bld directory</p></li> | ||
39 | |||
40 | <li><p> | ||
41 | Create a pkgIndex.tcl file that contains this line | ||
42 | |||
43 | <blockquote><pre> | ||
44 | package ifneeded sqlite 1.0 [list load [file join $dir sqlite.so]] | ||
45 | </pre></blockquote></p></li> | ||
46 | |||
47 | <li><p> | ||
48 | To use this put sqlite.so and pkgIndex.tcl in the same directory</p></li> | ||
49 | |||
50 | <li><p> | ||
51 | From that directory start wish</p></li> | ||
52 | |||
53 | <li><p> | ||
54 | Execute the following tcl command (tells tcl where to fine loadable | ||
55 | modules) | ||
56 | <blockquote><pre> | ||
57 | lappend auto_path [exec pwd] | ||
58 | </pre></blockquote></p></li> | ||
59 | |||
60 | <li><p> | ||
61 | Load the package | ||
62 | <blockquote><pre> | ||
63 | package require sqlite | ||
64 | </pre></blockquote></p></li> | ||
65 | |||
66 | <li><p> | ||
67 | Have fun....</p></li> | ||
68 | </ul> | ||
69 | |||
70 | </body></html>} | ||