Compiling SQLite 3.8.1 on CentOS 5

Taken from Beyond Linux® From Scratch – Version 2013-11-30

SQLite 3.8.1

  1. Download (HTTP): http://sqlite.org/2013/sqlite-autoconf-3080100.tar.gz
  2. Download size: 1.9 MB

SQLite 3.8.1 Documents

  1. Download (HTTP): http://sqlite.org/2013/sqlite-doc-3080100.zip
  2. Download size: 4.1 MB

Compiling SQLite 3.8.1

# ./configure --prefix=/usr/local/sqlite-3.8.1 --disable-static        \
CFLAGS="-g -O2 -DSQLITE_ENABLE_FTS3=1 \
-DSQLITE_ENABLE_COLUMN_METADATA=1     \
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1       \
-DSQLITE_SECURE_DELETE=1" &&
# make
# make install

Compiling SQLite Documents

# install -v -m755 -d /usr/local/sqlite-3.8.1/share/doc/sqlite-3.8.1 &&
# cp -v -R sqlite-doc-3080100/* /usr/local/sqlite-3.8.1/share/doc/sqlite-3.8.1

For more information,

Command Explanations (taken from Beyond Linux® From Scratch – Version 2013-11-30)

–disable-static: This switch prevents installation of static versions of the libraries.

CFLAGS=”-g -O2 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY=1“: Applications such as Firefox require secure delete and enable unlock notify to be turned on. The only way to do this is to include them in the CFLAGS. By default, these are set to “-g -O2” so we specify that to preserve those settings. You may, of course, wish to omit the ‘-g’ if you do not wish to create debugging information. For further information on what can be specified see http://www.sqlite.org/compile.html.