Refactor AC_INIT in configure.ac and PHP versions

Since Autoconf 2.53 the AC_INIT call with only a single argument has
been made obsolete and now includes several other optional arguments to
make installation experience a bit better by providing program version
and links to the project in the `./configure -h` output. This patch also
updates win build version. The phpize.m4 AC_INIT has been updated with
the call without arguments.
This commit is contained in:
Peter Kokot 2019-03-19 23:49:26 +01:00
parent 3eae4f677a
commit afd52f9d99
4 changed files with 21 additions and 23 deletions

View file

@ -105,24 +105,17 @@ var PHP_VERSION_STRING = "7.3.0";
function get_version_numbers()
{
var cin = file_get_contents("configure.ac");
var regex = /AC_INIT.+(\d+)\.(\d+)\.(\d+)([^\,^\]]*).+/g;
if (cin.match(new RegExp("PHP_MAJOR_VERSION=(\\d+)"))) {
if (cin.match(new RegExp(regex))) {
PHP_VERSION = RegExp.$1;
PHP_MINOR_VERSION = RegExp.$2;
PHP_RELEASE_VERSION = RegExp.$3;
PHP_EXTRA_VERSION = RegExp.$4;
}
if (cin.match(new RegExp("PHP_MINOR_VERSION=(\\d+)"))) {
PHP_MINOR_VERSION = RegExp.$1;
}
if (cin.match(new RegExp("PHP_RELEASE_VERSION=(\\d+)"))) {
PHP_RELEASE_VERSION = RegExp.$1;
}
PHP_VERSION_STRING = PHP_VERSION + "." + PHP_MINOR_VERSION + "." + PHP_RELEASE_VERSION;
if (cin.match(new RegExp("PHP_EXTRA_VERSION=\"([^\"]+)\""))) {
PHP_EXTRA_VERSION = RegExp.$1;
if (PHP_EXTRA_VERSION.length) {
PHP_VERSION_STRING += PHP_EXTRA_VERSION;
}
}
PHP_VERSION_STRING = PHP_VERSION + "." + PHP_MINOR_VERSION + "." + PHP_RELEASE_VERSION + PHP_EXTRA_VERSION;
DEFINE('PHP_VERSION_STRING', PHP_VERSION_STRING);
}