SQLite Forum

Detect R*Tree support at compile time
Login
Generally, these options are enabled by using a compiler flag to define this option, so unless your build system does something tricky to add it only to the compile for the library, then you can just test with something like #ifdef SQLITE_ENABLE_RTREE.

If you aren't compiling SQLite statically into the program but will be linking against a precompiled version, then this won't work, but since the library then doesn't even need to exist at compile-time, but only link time (or execute if using dynamic linking), such a test would be impossible.