#!/bin/sh # settings below lifted from alpine linux's APKBUILD for sqlite. CFLAGS="$CFLAGS \ -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_FTS3 \ -DSQLITE_ENABLE_FTS5 \ -DSQLITE_ENABLE_COLUMN_METADATA \ -DSQLITE_SECURE_DELETE \ -DSQLITE_ENABLE_UNLOCK_NOTIFY \ -DSQLITE_ENABLE_RTREE \ -DSQLITE_ENABLE_GEOPOLY \ -DSQLITE_USE_URI \ -DSQLITE_ENABLE_DBSTAT_VTAB \ -DSQLITE_MAX_VARIABLE_NUMBER=250000 \ -DSQLITE_ENABLE_JSON1" ./configure --enable-threadsafe \ --enable-dynamic-extensions \ --enable-fts3 \ --disable-shared \ --enable-static \ --build=$(uname -m)-lix-linux-musl \ --host=$(uname -m)-lix-linux-musl \ --prefix= ## explanations # # CFLAGS: # enables some full-text search options and support, as well as support for # retrieving column metadata, overwriting deleted rows with zeroes before # releasing them, callback notifications when write a table write lock has # been released, support for r-tree indexes (good for range queries), the # "geopoly" module which allows range queries via two-dimensional polygon, # support for uri-format filenames, the dbstat virtual table (which stores # information about how much disk space the database is taking up), bumps # the maximum number of variables up to 250k, and enables functions for # storing and querying json data. # # --enable-threadsafe: make the sqlite library threadsafe. # # --enable-dynamic-extensions: allow loading sqlite extensions dynamically. # # --enable-fts3: make sure full text search is supported! # # --disable-shared: don't build anything with dynamic linking. # # --enable-static: use static linking instead. # # --build: make sure the build string gets set correctly. # # --host: make sure the host string gets set correctly. # # --prefix: respect the "no /usr/local" policy.