Generate configure script