improving configure script
Merge branch 'emerson' of https://github.com/jegonzal/spark into emerson