in configure, relative paths caused problems

I was using $BASH_SOURCE for hashing the configure file
but $BASH_SOURCE gives a relative path which is useless after
the script has changed directory.
replaced `exit` with `return`

`exit`, when the script was run with `source`,
would completely exit the terminal. `return` doesn't
do that.