forked from ursetto/sql-de-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-sql-de-lite
More file actions
executable file
·25 lines (21 loc) · 919 Bytes
/
Copy pathbuild-sql-de-lite
File metadata and controls
executable file
·25 lines (21 loc) · 919 Bytes
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
#!/bin/sh
set -e
# terrible workaround for passing the correct options to the manual
# compile of sqlite3/sqlite3.c:
static=`$CHICKEN_CSI -s fixup.scm -s "$@"`
opts=`$CHICKEN_CSI -s fixup.scm -o sql-de-lite.scm "$@"`
# If threadsafe=1, pthreads is required, so let's not.
sqlite3_options="-C -DSQLITE_ENABLE_FTS3 -C -DSQLITE_ENABLE_FTS3_PARENTHESIS -C -DSQLITE_THREADSAFE=0"
if /bin/sh ./use-system-sqlite3; then
echo "SQlite3 version `./version-check` found"
"$CHICKEN_CSC" -C "$CFLAGS" -L "$LDFLAGS -lsqlite3" "$@"
else
echo "Using built-in SQLite3"
if ! test -f sqlite3/sqlite3$static.o; then
"$CHICKEN_CSC" $opts -C "$CFLAGS" -L "$LDFLAGS" \
-c -Isqlite3 sqlite3/sqlite3.c $sqlite3_options \
-o sqlite3/sqlite3$static.o
fi
"$CHICKEN_CSC" -C "$CFLAGS" -L "$LDFLAGS" "$@" \
-Isqlite3 sqlite3/sqlite3$static.o $sqlite3_options
fi