but does this for debug builds: export SQLITE3_CFLAGS="-fPIC \ —> Thx for spotting my mistake. Most (all?) C compilers ignore CFLAGS, as they expect build flags on the command line. It's the configure script that captures the value of CFLAGS and modifies the various build control files accordingly. —> You're correct that the configure script sets the command-line options to compile the code.