Add configure check for C++ 11.
Auto generate dependency, so incremental rebuild would work.