From d89e0b031db38261c79bdac74234a37ef78868d1 Mon Sep 17 00:00:00 2001 From: Charles Wilson Date: Wed, 13 Oct 2004 13:47:54 +0000 Subject: [PATCH] * config/ltmain.m4sh: add foo/bin for every foo/lib in dllsearchpath when creating wrapper script. Fixes depdemo-relink test failure. * config/ltmain.m4sh (func_mode_link): don't relink on cygwin/mingw; no need. But do ensure that wrappers are created unless doing a purely static build. --- ChangeLog | 12 ++++++++++++ config/ltmain.m4sh | 43 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7a82ac2e..29b3b49d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2004-10-13 Charles Wilson + + * config/ltmain.m4sh: add foo/bin for every foo/lib + in dllsearchpath when creating wrapper script. Fixes + depdemo-relink test failure. + +2004-10-13 Charles Wilson + + * config/ltmain.m4sh (func_mode_link): don't relink + on cygwin/mingw; no need. But do ensure that wrappers + are created unless doing a purely static build. + 2004-10-13 Gary V. Vaughan * tests/tagdemo-undef.test: New test for hosts that allow shared diff --git a/config/ltmain.m4sh b/config/ltmain.m4sh index 45edebe63..efb3a28bf 100644 --- a/config/ltmain.m4sh +++ b/config/ltmain.m4sh @@ -2543,10 +2543,15 @@ func_mode_link () esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`${ECHO} "$dir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac continue @@ -3541,10 +3546,19 @@ func_mode_link () link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi + case $host in + *cygwin* | *mingw*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac # This is a shared library # Warn about portability, can't link against -module's on some @@ -5370,10 +5384,15 @@ EOF fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac done @@ -5429,7 +5448,21 @@ EOF func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" -- 2.47.2