Skip to content

Commit d35df89

Browse files
athos-ribeiropetk
authored andcommitted
Fix #79026: Allow PHP_EXTRA_VERSION overrides
When building from sources, someone distributing PHP may want to add a vendor specific string to the PHP_VERSION so users can differentiate multiple vendor builds from the same PHP version. For instance, a vendor backporting a bug fix to a no-longer-supported PHP version could extend their PHP_EXTRA_VERSION to allow their users to identify that they carry such fix by checking their PHP_VERSION. Closes GH-11706
1 parent b0037ed commit d35df89

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

UPGRADING.INTERNALS

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ PHP 8.3 INTERNALS UPGRADE NOTES
7575
2. Build system changes
7676
========================
7777

78+
* PHP_EXTRA_VERSION can be passed to configure script to control custom PHP
79+
build versions: ./configure PHP_EXTRA_VERSION="-acme"
80+
7881
* LDFLAGS are not unset anymore allowing them to be adjusted e.g.
7982
LDFLAGS="..." ./configure
8083

configure.ac

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ IFS=$ac_IFS
6464
PHP_MAJOR_VERSION=[$]1
6565
PHP_MINOR_VERSION=[$]2
6666
PHP_RELEASE_VERSION=[$]3
67-
PHP_EXTRA_VERSION=[$]4
67+
dnl Allow overriding PHP_EXTRA_VERSION through the homonymous env var
68+
AC_ARG_VAR([PHP_EXTRA_VERSION],[Extra PHP version label suffix, e.g. '-dev', 'rc1', '-acme'])dnl
69+
AS_IF([test -z "$PHP_EXTRA_VERSION"],[PHP_EXTRA_VERSION=[$]4])
6870
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
6971
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
7072

0 commit comments

Comments
 (0)