--- Alexander Smondyrev <[EMAIL PROTECTED]> wrote:
> I am trying to use loadable extensions in Sqlite and I've run into the
> following 2 problems:
>
> 1) I've downloaded src for 3.3.17 Sqlite and build it, but the '.load'
> option does not seem to appear when I run the shell. I've used the default
> build mechanism with one minor change. I set the flag to disable tcl
> extensions. It is likely that I am missing some ./configure option, but I
> can't figure out what I need to do. Any advise would be greatly appreciated.
Comment out the line in Makefile.in (or the generated Makefile) to enable
loadable extensions:
# TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1
Then "./configure && make" as normal.
If you want the FTS1 and FTS2 modules "pre-loaded" in sqlite3, just apply
the attached patch to the latest version of the sqlite source tree, and
"./configure && make". The fts1 and fts2 modules will be statically linked
into sqlite3. No need to load the FTS modules at runtime.
____________________________________________________________________________________
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/
Index: Makefile.in
===================================================================
RCS file: /sqlite/sqlite/Makefile.in,v
retrieving revision 1.172
diff -u -3 -p -r1.172 Makefile.in
--- Makefile.in 17 May 2007 16:38:30 -0000 1.172
+++ Makefile.in 24 May 2007 20:35:40 -0000
@@ -117,6 +117,8 @@ NAWK = @AWK@
# You should not have to change anything below this line
###############################################################################
TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1
+TCC += -DSQLITE_ENABLE_FTS1=1
+TCC += -DSQLITE_ENABLE_FTS2=1
# Object files for the SQLite library.
#
@@ -130,6 +132,12 @@ LIBOBJ = alter.lo analyze.lo attach.lo a
vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbefifo.lo vdbemem.lo \
where.lo utf.lo legacy.lo vtab.lo
+# FTS1 (optional)
+LIBOBJ += fts1.lo fts1_hash.lo fts1_porter.lo fts1_tokenizer1.lo
+
+# FTS2 (optional)
+LIBOBJ += fts2.lo fts2_hash.lo fts2_porter.lo fts2_tokenizer1.lo
+
# All of the source code files.
#
SRC = \
@@ -196,7 +204,14 @@ SRC += \
$(TOP)/ext/fts1/fts1_hash.h \
$(TOP)/ext/fts1/fts1_porter.c \
$(TOP)/ext/fts1/fts1_tokenizer.h \
- $(TOP)/ext/fts1/fts1_tokenizer1.c
+ $(TOP)/ext/fts1/fts1_tokenizer1.c \
+ $(TOP)/ext/fts2/fts2.c \
+ $(TOP)/ext/fts2/fts2.h \
+ $(TOP)/ext/fts2/fts2_hash.c \
+ $(TOP)/ext/fts2/fts2_hash.h \
+ $(TOP)/ext/fts2/fts2_porter.c \
+ $(TOP)/ext/fts2/fts2_tokenizer.h \
+ $(TOP)/ext/fts2/fts2_tokenizer1.c
# Source code to the test files.
@@ -259,7 +274,10 @@ HDR = \
HDR += \
$(TOP)/ext/fts1/fts1.h \
$(TOP)/ext/fts1/fts1_hash.h \
- $(TOP)/ext/fts1/fts1_tokenizer.h
+ $(TOP)/ext/fts1/fts1_tokenizer.h \
+ $(TOP)/ext/fts2/fts2.h \
+ $(TOP)/ext/fts2/fts2_hash.h \
+ $(TOP)/ext/fts2/fts2_tokenizer.h
# Header files used by the VDBE submodule
#
@@ -482,6 +500,30 @@ vtab.lo: $(TOP)/src/vtab.c $(VDBEHDR)
where.lo: $(TOP)/src/where.c $(HDR)
$(LTCOMPILE) -c $(TOP)/src/where.c
+fts1.lo: $(TOP)/ext/fts1/fts1.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts1/fts1.c
+
+fts1_hash.lo: $(TOP)/ext/fts1/fts1_hash.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts1/fts1_hash.c
+
+fts1_porter.lo: $(TOP)/ext/fts1/fts1_porter.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts1/fts1_porter.c
+
+fts1_tokenizer1.lo: $(TOP)/ext/fts1/fts1_tokenizer1.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts1/fts1_tokenizer1.c
+
+fts2.lo: $(TOP)/ext/fts2/fts2.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts2/fts2.c
+
+fts2_hash.lo: $(TOP)/ext/fts2/fts2_hash.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_hash.c
+
+fts2_porter.lo: $(TOP)/ext/fts2/fts2_porter.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_porter.c
+
+fts2_tokenizer1.lo: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR)
+ $(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_tokenizer1.c
+
tclsqlite-shell.lo: $(TOP)/src/tclsqlite.c $(HDR)
$(LTCOMPILE) -DTCLSH=1 -o $@ -c $(TOP)/src/tclsqlite.c
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------