]> granicus.if.org Git - php/commitdiff
VC stores lib path in LIB not LIBS.
authorWez Furlong <wez@php.net>
Wed, 3 Dec 2003 18:31:04 +0000 (18:31 +0000)
committerWez Furlong <wez@php.net>
Wed, 3 Dec 2003 18:31:04 +0000 (18:31 +0000)
Add --with-extra-includes and --with-extra-libs to be able to specify
general additions to those paths from the environment.

win32/build/Makefile
win32/build/config.w32
win32/build/confutils.js

index 03edc92f6fd90c0aff006f6cdffed87e86716dce..187ba0ad528d6643bcf8c5cd641d581c4ab141e1 100644 (file)
@@ -60,7 +60,7 @@ clean:
        del /F /Q $(BUILD_DIR)\*.*
 
 test:
-       %COMSPEC% /c <<test_suite_uses_lame_env_vars.bat
+       <<test_suite_uses_lame_env_vars.bat
 set TEST_PHP_EXECUTABLE=$(BUILD_DIR)\\php.exe
 $(BUILD_DIR)\\php.exe -d open_basedir= -d safe_mode=0 -d output_buffering=0 run-tests.php $(TESTS)
 <<NOKEEP
index d91f8b2d560dfe0529aab961903413dcdb8720ed..107d6882de8ed2c84a4dc533c34a3f2fca334c9c 100644 (file)
@@ -88,6 +88,9 @@ if (PHP_DEBUG == "yes" && PHP_ZTS == "yes") {
 // that we need
 ARG_WITH('php-build', 'Path to where you extracted http://www.php.net/extra/win32build.zip. Assumes that it is a sibling of this source dir (..\\php_build) if not specified', 'no');
 
+ARG_WITH('extra-includes', 'Extra include path to use when building everything', '');
+ARG_WITH('extra-libs', 'Extra library path to use when linking everything', '');
+
 var php_usual_include_suspects = "..\\php_build\\include;..\\win32build\\include;..\\bindlib_w32";
 var php_usual_lib_suspects = "..\\php_build\\lib;..\\win32build\\lib;..\\bindlib_w32";
 
@@ -111,7 +114,29 @@ function probe_basic_headers()
        }
 }
 
+function add_extra_dirs()
+{
+       var path, i, f;
+
+       path = PHP_EXTRA_INCLUDES.split(';');
+       for (i = 0; i < path.length; i++) {
+               f = FSO.GetAbsolutePathName(path[i]);
+               if (FSO.FolderExists(f)) {
+                       ADD_FLAG("CFLAGS", '/I "' + f + '" ');
+               }
+       }       
+       path = PHP_EXTRA_LIBS.split(';');
+       for (i = 0; i < path.length; i++) {
+               f = FSO.GetAbsolutePathName(path[i]);
+               if (FSO.FolderExists(f)) {
+                       ADD_FLAG("LDFLAGS", '/libpath:"' + f + '" ');
+               }
+       }       
+
+}
+
 probe_basic_headers();
+add_extra_dirs();
 
 //DEFINE("PHP_BUILD", PHP_PHP_BUILD);
 
index f4f65ea7149ca97f4cb0ce89f4553e407424db7a..786dab16cde2ac284bfd07a3ed077433ccd48bdb 100644 (file)
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-// $Id: confutils.js,v 1.7 2003-12-03 17:04:30 wez Exp $
+// $Id: confutils.js,v 1.8 2003-12-03 18:31:04 wez Exp $
 
 var STDOUT = WScript.StdOut;
 var STDERR = WScript.StdErr;
@@ -352,7 +352,7 @@ function CHECK_LIB(libname, target, path_to_check)
                path_to_check += ";" + php_usual_lib_suspects;
        }
        
-       var p = search_paths(libname, path_to_check, "LIBS");
+       var p = search_paths(libname, path_to_check, "LIB");
        var have = 0;
 
        if (typeof(p) == "string") {
@@ -605,6 +605,11 @@ function generate_files()
        dir = get_define("BUILD_DIR");
        build_dirs.sort();
        last = null;
+
+       if (!FSO.FolderExists(dir)) {
+               FSO.CreateFolder(dir);
+       }
+       
        for (i = 0; i < build_dirs.length; i++) {
                bd = FSO.BuildPath(dir, build_dirs[i]);
                if (bd == last) {