summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2020-06-05 22:50:58 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-06-07 10:38:43 +0200
commitd21b1c5679c60e4e885c750b0a5c417dcc67fe7c (patch)
tree57533712667f6e81c78177af59acb369502dae9e
parent4902b1c554029aa69dfe6eb0ee293aaa94c7700e (diff)
downloadphp-git-d21b1c5679c60e4e885c750b0a5c417dcc67fe7c.tar.gz
Allow defining of uname value for reproducible builds
Extend configure.ac to accept PHP_UNAME as env variable to set the value of the PHP_UNAME define in a reproducible manner. This allows distributions to set a fixed value for php_uname and keep the default behaviour if PHP_UNAME is not set. Motivation: https://reproducible-builds.org/ Closes GH-5671.
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 1c74eae623..809cf682a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1323,7 +1323,8 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
fi
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
-PHP_UNAME=`uname -a | xargs`
+UNAME=`uname -a | xargs`
+PHP_UNAME=${PHP_UNAME:-$UNAME}
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
PHP_OS=`uname | xargs`
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])