Skip to content

Commit 892669b

Browse files
committed
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.
1 parent 72e2e25 commit 892669b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

configure.ac

Lines changed: 3 additions & 1 deletion
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)