Manipulating PKG_CONFIG_LIBDIR is not necessary
Set PHP_AUTOCONF and PHP_AUTOHEADER via ENV
Use ruby
Use opt helpers