A two liners would be better:

    safe_phpize
    system "./configure", "--prefix=#{prefix}", phpconfig