improved configure script and some new option