]> granicus.if.org Git - php/commitdiff
A more general check for dirs under Release or Debug.
authorWez Furlong <wez@php.net>
Tue, 23 Dec 2003 17:20:50 +0000 (17:20 +0000)
committerWez Furlong <wez@php.net>
Tue, 23 Dec 2003 17:20:50 +0000 (17:20 +0000)
win32/build/config.w32
win32/build/confutils.js

index 409906a73baaabf89dd254ff87269ec44c0345c3..b56ba24bd01da1aaae3da905eb3735626b7511c0 100644 (file)
@@ -116,12 +116,6 @@ 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";
 
-if (PHP_DEBUG == "yes") {
-       php_usual_lib_suspects += ";..\\bindlib_w32\\Debug";
-} else {
-       php_usual_lib_suspects += ";..\\bindlib_w32\\Release";
-}
-
 // Poke around for some headers
 function probe_basic_headers()
 {
index 3d3fdb72999abecbc445b7390cf31d7ba84d7fe8..fcab584e40f9773dbfe1af5dff5832d93a1548ea 100644 (file)
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-// $Id: confutils.js,v 1.29 2003-12-23 13:10:54 wez Exp $
+// $Id: confutils.js,v 1.30 2003-12-23 17:20:50 wez Exp $
 
 var STDOUT = WScript.StdOut;
 var STDERR = WScript.StdErr;
@@ -463,7 +463,6 @@ function CHECK_LIB(libnames, target, path_to_check)
        } else {
                target = "_" + target.toUpperCase();
        }
-
        
        if (path_to_check == null) {
                path_to_check = php_usual_lib_suspects;
@@ -475,11 +474,20 @@ function CHECK_LIB(libnames, target, path_to_check)
        var i;
        var libname;
 
+       var subdir = PHP_DEBUG == "yes" ? "Debug" : "Release";
+
        libnames = libnames.split(';');
        for (i = 0; i < libnames.length; i++) {
                libname = libnames[i];
                p = search_paths(libname, path_to_check, "LIB");
 
+               if (!p) {
+                       p = search_paths(subdir + "\\" + libname, path_to_check, "LIB");
+                       if (p) {
+                               p += "\\" + subdir;
+                       }
+               }
+
                if (typeof(p) == "string") {
                        ADD_FLAG("LDFLAGS" + target, '/libpath:"' + p + '" ');
                        ADD_FLAG("LIBS" + target, libname);