Adding a SOURCE_DIR definition to configure_file invocations

This is to fix a problem that arose from assuming the build directory is in the
root of the source directory.
Merge branch 'fix-bad-configure'