mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
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
This commit is contained in:
parent
d1eb2cd737
commit
ec040e9657
1 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue