Generate configure using autoconf instead of including it in the patch.
(cherry picked from commit e0c197b2f4fa53ebd7896940e6e14170664de8e7)