* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [cygwin*]:
Add w32api to sys_lib_search_path_spec without overriding gcc's
own search path.

Original patch by Yaakov Selkowitz. As he explained:

With gcc4 providing shared libs, it should now perfectly legitimate to
add any of these libs to the libtool link command.  Right now, though,
libtool can't find these libraries because $sys_lib_search_path_spec is
hard-coded to ignore it, and libtool will refuse to link against any
library it can't find (even though the linker itself can).

Instead, this patch simply adds /usr/lib/w32api to the default
gcc-specific search path.  The m4_if() makes sure that w32api is added
only once, as is done with Darwin a few lines later.

Tested in combination with several other cygwin patches, as part of the
recent cygwin "official" 2.2.7a-N libtool release(s):
http://cygwin.com/ml/cygwin-announce/2009-03/msg00080.html
http://cygwin.com/ml/cygwin-announce/2009-03/msg00081.html

No regressions.  Okay to push?

---
 libltdl/m4/libtool.m4 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 15612c0..63e831e 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -2156,7 +2156,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | 
$SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+m4_if([$1], [],[
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-- 
1.6.1.2



Reply via email to