Excellent work.
This is nitpick but I don’t like --with(out)-gil option. --with option usually used for external dependency. Since we don’t need --with-gil=/path/to/libgil, I prefer --enable-gil / --disable-gil option.
See 3. Adding Options for reference.
--enable-*/--disable-*argumentsThe arguments starting with –enable- prefix are usually used to enable features of the program. They usually add or remove dependencies only if they are needed for that particular feature being enabled or disabled.
--with-*/--without-*argumentsThe arguments starting with –with- prefix are usually used to add or remove dependencies on external projects. These might add or remove features from the project.