The function func_ltwrapper_executable_p is used right before func_ltwrapper_scriptname a couple of times in ltmain; the latter again calls the former. This costs an extra grep. The only time we don't call func_ltwrapper_executable_p first is on a just-created wrapper executable.
So this should be safe. And the documentation is there already before the function, too. Any reasons against committing this? Thanks, Ralf Optimize func_ltwrapper_scriptname to assume a cwrapper. * libltdl/config/ltmain.m4sh (func_ltwrapper_scriptname): Do not call func_ltwrapper_executable_p again here, this function is documented to allow being called with wrapper executables. diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index b764ab7..cf15ebc 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -519,12 +519,9 @@ func_ltwrapper_executable_p () # temporary ltwrapper_script. func_ltwrapper_scriptname () { - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file