abbat/pdo_sqlcipher

CFLAGS/LDFLAGS

mig5 opened this issue · 1 comments

mig5 commented

Hi,

Just curious, why you have all these flags:

CFLAGS="
-DSQLITE_HAS_CODEC
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
-DSQLITE_ENABLE_COLUMN_METADATA
-DSQLITE_ENABLE_STAT3
-DSQLITE_ENABLE_RTREE
-DSQLITE_ENABLE_FTS3
-DSQLITE_ENABLE_FTS3_PARENTHESIS
-DSQLITE_ENABLE_FTS4
-DSQLITE_SECURE_DELETE
-DSQLITE_ENABLE_ICU
-DSQLITE_SOUNDEX
-DSQLITE_DEFAULT_FOREIGN_KEYS=1
-I. -I/usr/local/include"

LDFLAGS="-lcrypto -licuuc -licui18n -L/usr/local/lib"

Yet the main SQLcipher for PHP instructions at http://sqlcipher.net/sqlcipher-for-php is much smaller:

./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"

Which is correct? Is it important that they are both the same, or doesn't matter?

You can use first or second form. First form compiles SQLite with additional options such as SQLITE_ENABLE_STAT3: "This option adds additional logic to the ANALYZE command and to the query planner that can help SQLite to chose a better query plan under certain situations." which can be usefull sometimes. For more information see Compilation Options For SQLite.