Christian and I independently solved this with the following fix:
diff --git i/libltdl/config/ltmain.m4sh w/libltdl/config/ltmain.m4sh
index ca67c8a..f79ab5b 100644 libltdl/config/ltmain.m4sh
--- i/libltdl/config/ltmain.m4sh
+++ w/libltdl/config/ltmain.m4sh
@@ -6391,8 +6391,7 @@ func_mode_link ()
# Pragmatically, this seems to cause very few problems in
# practice:
case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
+ -L*|-R*) new_libs="$deplib $new_libs" ;;
*)
# And here is the reason: when a library appears more
# than once as an explicit dependence of a library, or
With this patch, the -R flag inside the dependency_libs list is honored and
appropriately added to the link command.
Is there anything wrong with this approach. If not we propose this patch for
inclusion. A proper ChangeLog and Signed-of-by line will follow than. I will
also try to transform Christians example into an test than.