On Thu, 9 Jan 2020 14:47:44 +0800, you wrote:

> Hi,
>
> How can I pass -Dxxx compile option when I build sqlite? Such as, -
> DSQLITE_ENABLE_INTERNAL_FUNCTIONS.

I don't consider myself an expoert, but the script
below works for me on a Raspberry Pi, Raspbian Jessie.
Note: instead of readline I use the linenoise lib 
that is shipped with fossil. Also, I built a few
of the tools at the same time.
You may have to tweak this a little for your preferences and your platform.

        cd ~/src/sqlite
        test ! -z "$opt_p" && fossil pull --verbose
        test ! -z "$opt_u" && fossil update trunk

        OPTS=-DHAVE_LINENOISE
        export CPPFLAGS="-DSQLITE_ENABLE_API_ARMOR \
-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_DBPAGE_VTAB \
-DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_DESERIALIZE \
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
-DSQLITE_ENABLE_FTS5 \
-DSQLITE_ENABLE_HIDDEN_COLUMNS \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_ENABLE_MEMSYS5 \
-DSQLITE_ENABLE_NORMALIZE \
-DSQLITE_ENABLE_OFFSET_SQL_FUNC \
-DSQLITE_ENABLE_PREUPDATE_HOOK \
-DSQLITE_ENABLE_RBU \
-DSQLITE_ENABLE_RTREE \
-DSQLITE_ENABLE_GEOPOLY \
-DSQLITE_ENABLE_STMT_SCANSTATUS \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
-DSQLITE_INTROSPECTION_PRAGMAS \
-DSQLITE_SOUNDEX \
-DSQLITE_USE_URI \
-DSQLITE_SECURE_DELETE \
-DSQLITE_DQS=0 \
-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1"
        ./configure \
--prefix=/usr/local \
--libdir=/usr/lib/arm-linux-gnueabihf \
--enable-load-extension \
--enable-threadsafe \
--with-readline-lib=auto \
--with-pic \
--with-gnu-ld \
--enable-json1 \
--enable-fts5 \
--enable-rtree \
--enable-session \
--enable-update-limit \
--enable-geopoly \
--enable-tcl \
--disable-debug \
--disable-static \
        && make clean
        && make sqlite3.c \
        && make shell.c \
        && gcc $OPTS $CPPFLAGS \
        -I ../fossil/src \
        -L /usr/lib/arm-linux-gnueabihf -ltcl8.6 -lm -ldl -lz -lpthread \
        shell.c ../fossil/src/linenoise.c sqlite3.c -o sqlite3 \
        && make sqlite3_analyzer \
        && make sqldiff \
        && make scrub \
        && make showdb \
        && make showwal \
        && make showshm \
        && make wordcount


-- 
Regards,
Kees Nuyt
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to