89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
-
-
+
+
-
-
+
+
|
# search for the system SQLite once with -ldl, and once without. If
# the library can only be found with $extralibs set to -ldl, then
# the code below will append -ldl to LIBS.
#
foreach extralibs {{} {-ldl}} {
# Locate the system SQLite by searching for sqlite3_open(). Then check
# if sqlite3_vtab_collation() can be found as well. If we can find open() but
# not vtab_collation(), then the system SQLite is too old to link against
# if sqlite3_keyword_check() can be found as well. If we can find open() but
# not keyword_check(), then the system SQLite is too old to link against
# fossil.
#
if {[check-function-in-lib sqlite3_open sqlite3 $extralibs]} {
if {![check-function-in-lib sqlite3_vtab_collation sqlite3 $extralibs]} {
user-error "system sqlite3 too old (require >= 3.22.0)"
if {![check-function-in-lib sqlite3_keyword_check sqlite3 $extralibs]} {
user-error "system sqlite3 too old (require >= 3.24.0)"
}
# Success. Update symbols and return.
#
define USE_SYSTEM_SQLITE 1
define-append LIBS -lsqlite3
define-append LIBS $extralibs
|