diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 0418007..13fbe05 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -4356,6 +4356,10 @@ func_mode_link () xrpath= perm_rpath= temp_rpath= + nl_add= # nl_add will contain a converted newlib_search_path + # to be added to temp_rpath for the wrapper + abs_base=$(cd `dirname $0` && pwd) # this is used to check if a path is + # relative to our build directory thread_safe=no vinfo= vinfo_number=no @@ -5839,6 +5843,15 @@ func_mode_link () test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # quick and dirty patch to obey -L and -R options in the wrapper + # script + if [ -z "$nl_add" ]; then case "$absdir" in + *"$abs_base"*) ;; # when we leave the build base + *) # we will simply add newlib_search_path + nl_add=$(printf "$newlib_search_path"| sed -e "s/ *\(.*\)$/\1/"|tr \\040 :) + temp_rpath+="$nl_add:" + ;; + esac fi # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;;