summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2011-01-03 23:08:47 (GMT)
committerKalle Sommer Nielsen <kalle@php.net>2011-01-03 23:08:47 (GMT)
commit79b997d7bae880ed47e2cf29423635484295d3a6 (patch)
tree3b7d2d78456159620118391aeaeb94461b180dcb /win32
parent21719326246f008dee6d15249b4e7e33a0d98fdd (diff)
downloadphp-79b997d7bae880ed47e2cf29423635484295d3a6.tar.gz
Fixed linking of extensions that would use a static .lib file (libname_a.lib rather than libname.lib)
# This fixes `configure --with-mcrypt=shared' to properly find and # link against libmcrypt.lib rather than libmcrypt_a.lib
Diffstat (limited to 'win32')
-rw-r--r--win32/build/confutils.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 55dbfc2..4539a10 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -648,6 +648,9 @@ function CHECK_LIB(libnames, target, path_to_check, common_name)
// Expand path to include general dirs
path_to_check += ";" + php_usual_lib_suspects;
+ // For static libs
+ eval('var static_lib = !PHP_' + common_name.toUpperCase() + '_SHARED;');
+
// It is common practice to put libs under one of these dir names
var subdirs = new Array(PHP_DEBUG == "yes" ? "Debug" : (PHP_DEBUG_PACK == "yes"?"Release_Dbg":"Release"), "lib", "libs", "libexec");
@@ -663,6 +666,14 @@ function CHECK_LIB(libnames, target, path_to_check, common_name)
name = name.replace(rExp,"_debug.lib");
libnames.unshift(name);
}
+ } else if (!static_lib) {
+ var length = libnames.length;
+ for (var i = 0; i < length; i++) {
+ var name = new String(libnames[i]);
+ rExp = /_a.lib$/i;
+ name = name.replace(rExp,".lib");
+ libnames.unshift(name);
+ }
}
var i, j, k, libname;