Skip to content

display info about system used to build #5798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,11 @@ 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])
PHP_BUILD_SYSTEM=${PHP_BUILD_SYSTEM:-$PHP_UNAME}
AC_DEFINE_UNQUOTED(PHP_BUILD_SYSTEM,"$PHP_BUILD_SYSTEM",[builder uname output])
if test -n "${PHP_BUILD_PROVIDER}"; then
AC_DEFINE_UNQUOTED(PHP_BUILD_PROVIDER,"$PHP_BUILD_PROVIDER",[build provider])
fi

PHP_SUBST_OLD(PHP_INSTALLED_SAPIS)

Expand Down
6 changes: 6 additions & 0 deletions ext/standard/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,12 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
php_info_print_table_start();
php_info_print_table_row(2, "System", ZSTR_VAL(php_uname));
php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__);
#ifdef PHP_BUILD_SYSTEM
php_info_print_table_row(2, "Build System", PHP_BUILD_SYSTEM);
#endif
#ifdef PHP_BUILD_PROVIDER
php_info_print_table_row(2, "Build Provider", PHP_BUILD_PROVIDER);
#endif
#ifdef COMPILER
php_info_print_table_row(2, "Compiler", COMPILER);
#endif
Expand Down
11 changes: 11 additions & 0 deletions win32/build/confutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@ build_dirs = new Array();
extension_include_code = "";
extension_module_ptrs = "";

(function () {
var wmiservice = GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2");
var oss = wmiservice.ExecQuery("Select * from Win32_OperatingSystem");
var os = oss.ItemIndex(0);
AC_DEFINE("PHP_BUILD_SYSTEM", os.Caption + " [" + os.Version + "]", "Windows build system version");
var build_provider = WshShell.Environment("Process").Item("PHP_BUILD_PROVIDER");
if (build_provider) {
AC_DEFINE("PHP_BUILD_PROVIDER", build_provider);
}
}());

if (!MODE_PHPIZE) {
get_version_numbers();
}
Expand Down