updated for compiling when no sqlite is present, and updated to use common slg* m4 macros