summaryrefslogtreecommitdiff
blob: dfc01c88b56c28d35d9b9c61ae3e7a633f191b10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Link executables against libsqlite3.so.
Increase timeout for fuzzcheck.
Fix building with dlopen() not available.

--- /Makefile.in
+++ /Makefile.in
@@ -600,25 +600,25 @@
 
 libtclsqlite3.la:	tclsqlite.lo libsqlite3.la
 	$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
-		libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
+		libsqlite3.la @TCL_STUB_LIB_SPEC@ \
 		-rpath "$(TCLLIBDIR)" \
 		-version-info "8:6:8" \
 		-avoid-version
 
-sqlite3$(TEXE):	shell.c sqlite3.c
-	$(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
-		shell.c sqlite3.c \
-		$(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
+sqlite3$(TEXE):	shell.c libsqlite3.la
+	$(LTLINK) $(READLINE_FLAGS) -o $@ \
+		shell.c libsqlite3.la \
+		$(LIBREADLINE)
 
-sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
-	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
+sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c libsqlite3.la
+	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
 
-dbhash$(TEXE):	$(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
-	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
+dbhash$(TEXE):	$(TOP)/tool/dbhash.c libsqlite3.la
+	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
 
-scrub$(TEXE):	$(TOP)/ext/misc/scrub.c sqlite3.lo
+scrub$(TEXE):	$(TOP)/ext/misc/scrub.c libsqlite3.la
 	$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
-		$(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
+		$(TOP)/ext/misc/scrub.c libsqlite3.la
 
 srcck1$(BEXE):	$(TOP)/tool/srcck1.c
 	$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
@@ -694,7 +694,7 @@
 # Rule to build the amalgamation
 #
 sqlite3.lo:	sqlite3.c
-	$(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
+	$(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
 
 # Rules to build the LEMON compiler generator
 #
@@ -1145,13 +1145,13 @@
 
 # Fuzz testing
 fuzztest:	fuzzcheck$(TEXE) $(FUZZDATA)
-	./fuzzcheck$(TEXE) $(FUZZDATA)
+	./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
 
 fastfuzztest:	fuzzcheck$(TEXE) $(FUZZDATA)
-	./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
+	./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
 
 valgrindfuzz:	fuzzcheck$(TEXT) $(FUZZDATA)
-	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
+	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
 
 # The veryquick.test TCL tests.
 #
@@ -1181,30 +1181,30 @@
 smoketest:	$(TESTPROGS) fuzzcheck$(TEXE)
 	./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
 
-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+sqlite3_analyzer.c:	$(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
 
-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
-	$(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
+sqlite3_analyzer$(TEXE):	sqlite3_analyzer.c libsqlite3.la
+	$(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
 
-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
+dbdump$(TEXE):	$(TOP)/ext/misc/dbdump.c libsqlite3.la
 	$(LTLINK) -DDBDUMP_STANDALONE -o $@ \
-           $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
+           $(TOP)/ext/misc/dbdump.c libsqlite3.la
 
-showdb$(TEXE):	$(TOP)/tool/showdb.c sqlite3.lo
-	$(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
+showdb$(TEXE):	$(TOP)/tool/showdb.c libsqlite3.la
+	$(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
 
-showstat4$(TEXE):	$(TOP)/tool/showstat4.c sqlite3.lo
-	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
+showstat4$(TEXE):	$(TOP)/tool/showstat4.c libsqlite3.la
+	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
 
-showjournal$(TEXE):	$(TOP)/tool/showjournal.c sqlite3.lo
-	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
+showjournal$(TEXE):	$(TOP)/tool/showjournal.c
+	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c
 
-showwal$(TEXE):	$(TOP)/tool/showwal.c sqlite3.lo
-	$(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
+showwal$(TEXE):	$(TOP)/tool/showwal.c
+	$(LTLINK) -o $@ $(TOP)/tool/showwal.c
 
-changeset$(TEXE):	$(TOP)/ext/session/changeset.c sqlite3.lo
-	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
+changeset$(TEXE):	$(TOP)/ext/session/changeset.c libsqlite3.la
+	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
 
 rollback-test$(TEXE):	$(TOP)/tool/rollback-test.c sqlite3.lo
 	$(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
@@ -1223,11 +1223,11 @@
 kvtest$(TEXE):	$(TOP)/test/kvtest.c sqlite3.c
 	$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
 
-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo 
-	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
+rbu$(EXE):	$(TOP)/ext/rbu/rbu.c libsqlite3.la
+	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
 
-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
+loadfts$(EXE):	$(TOP)/tool/loadfts.c libsqlite3.la
+	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
 
 # This target will fail if the SQLite amalgamation contains any exported
 # symbols that do not begin with "sqlite3_". It is run as part of the
--- /configure.ac
+++ /configure.ac
@@ -584,6 +584,9 @@
 if test "${use_loadextension}" = "yes" ; then
   OPT_FEATURE_FLAGS=""
   AC_SEARCH_LIBS(dlopen, dl)
+  if test "${ac_cv_search_dlopen}" = "no" ; then
+    OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+  fi
 else
   OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
 fi
--- /tool/sqlite3_analyzer.c.in
+++ /tool/sqlite3_analyzer.c.in
@@ -14,7 +14,6 @@
 #define SQLITE_DEFAULT_MEMSTATUS 0
 #define SQLITE_MAX_EXPR_DEPTH 0
 #define SQLITE_OMIT_LOAD_EXTENSION 1
-INCLUDE sqlite3.c
 INCLUDE $ROOT/src/tclsqlite.c
 
 const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){