com php-src: generalize --with-php-build option handling: win32/build/config.w32 win32/build/config.w32.phpize.in win32/build/confutils.js

From: Date: Tue, 11 Nov 2014 17:24:20 +0000
Subject: com php-src: generalize --with-php-build option handling: win32/build/config.w32 win32/build/config.w32.phpize.in win32/build/confutils.js
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83020@lists.php.net to get a copy of this message
Commit: 9757d9adbf00d3bfabdd3532408f05e92781989f Author: Anatol Belski <ab@php.net> Tue, 11 Nov 2014 15:28:20 +0100 Parents: c0db5cd93d8ce040a71eb883650723107c562e43 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9757d9adbf00d3bfabdd3532408f05e92781989f Log: generalize --with-php-build option handling Changed paths: M win32/build/config.w32 M win32/build/config.w32.phpize.in M win32/build/confutils.js Diff: diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 8e63fc8..6c66267 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -103,32 +103,7 @@ else if (PHP_DEBUG != "yes" && PHP_PGO != "no") { // Find the php_build dir - it contains headers and libraries // that we need ARG_WITH('php-build', 'Path to where you extracted the development libraries (http://wiki.php.net/internals/windows/libs). Assumes that it is a sibling of this source dir (..\\deps) if not specified', 'no'); - -if (PHP_PHP_BUILD == 'no') { - if (FSO.FolderExists("..\\deps")) { - PHP_PHP_BUILD = "..\\deps"; - } else { - if (FSO.FolderExists("..\\php_build")) { - PHP_PHP_BUILD = "..\\php_build"; - } else { - if (X64) { - if (FSO.FolderExists("..\\win64build")) { - PHP_PHP_BUILD = "..\\win64build"; - } else if (FSO.FolderExists("..\\php-win64-dev\\php_build")) { - PHP_PHP_BUILD = "..\\php-win64-dev\\php_build"; - } - } else { - if (FSO.FolderExists("..\\win32build")) { - PHP_PHP_BUILD = "..\\win32build"; - } else if (FSO.FolderExists("..\\php-win32-dev\\php_build")) { - PHP_PHP_BUILD = "..\\php-win32-dev\\php_build"; - } - } - } - } - PHP_PHP_BUILD = FSO.GetAbsolutePathName(PHP_PHP_BUILD); -} -DEFINE("PHP_BUILD", PHP_PHP_BUILD); +php_build_option_handle(); ARG_WITH('extra-includes', 'Extra include path to use when building everything', ''); ARG_WITH('extra-libs', 'Extra library path to use when linking everything', ''); diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in index a82369a..91b3552 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -87,32 +87,7 @@ if (MODE_PHPIZE) { // Find the php_build dir - it contains headers and libraries // that we need ARG_WITH('php-build', 'Path to where you extracted the development libraries (http://wiki.php.net/internals/windows/libs). Assumes that it is a sibling of this source dir (..\\deps) if not specified', 'no'); - -if (PHP_PHP_BUILD == 'no') { - if (FSO.FolderExists("..\\deps")) { - PHP_PHP_BUILD = "..\\deps"; - } else { - if (FSO.FolderExists("..\\php_build")) { - PHP_PHP_BUILD = "..\\php_build"; - } else { - if (X64) { - if (FSO.FolderExists("..\\win64build")) { - PHP_PHP_BUILD = "..\\win64build"; - } else if (FSO.FolderExists("..\\php-win64-dev\\php_build")) { - PHP_PHP_BUILD = "..\\php-win64-dev\\php_build"; - } - } else { - if (FSO.FolderExists("..\\win32build")) { - PHP_PHP_BUILD = "..\\win32build"; - } else if (FSO.FolderExists("..\\php-win32-dev\\php_build")) { - PHP_PHP_BUILD = "..\\php-win32-dev\\php_build"; - } - } - } - } - PHP_PHP_BUILD = FSO.GetAbsolutePathName(PHP_PHP_BUILD); -} -DEFINE("PHP_BUILD", PHP_PHP_BUILD); +php_build_option_handle(); ARG_WITH('extra-includes', 'Extra include path to use when building everything', ''); ARG_WITH('extra-libs', 'Extra library path to use when linking everything', ''); diff --git a/win32/build/confutils.js b/win32/build/confutils.js index da2ffc6..1c47ace 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2679,3 +2679,32 @@ function setup_zts_stuff() } } +function php_build_option_handle() +{ + if (PHP_PHP_BUILD == 'no') { + if (FSO.FolderExists("..\\deps")) { + PHP_PHP_BUILD = "..\\deps"; + } else { + if (FSO.FolderExists("..\\php_build")) { + PHP_PHP_BUILD = "..\\php_build"; + } else { + if (X64) { + if (FSO.FolderExists("..\\win64build")) { + PHP_PHP_BUILD = "..\\win64build"; + } else if (FSO.FolderExists("..\\php-win64-dev\\php_build")) { + PHP_PHP_BUILD = "..\\php-win64-dev\\php_build"; + } + } else { + if (FSO.FolderExists("..\\win32build")) { + PHP_PHP_BUILD = "..\\win32build"; + } else if (FSO.FolderExists("...\\php-win32-dev\\php_build")) { + PHP_PHP_BUILD = "..\\php-win32-dev\\php_build"; + } + } + } + } + PHP_PHP_BUILD = FSO.GetAbsolutePathName(PHP_PHP_BUILD); + } + DEFINE("PHP_BUILD", PHP_PHP_BUILD); +} +

« previous php.cvs (#83020) next »