Better ./configure script
Precompile static part of the query