mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
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:
parent
3eae4f677a
commit
afd52f9d99
4 changed files with 21 additions and 23 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue