--- libltdl/config/ltmain.m4sh | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 3619343..9052a9d 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -2222,8 +2222,17 @@ func_mode_install () # so we also need to try rm && ln -s. for linkname do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + if test "$linkname" != "$realname"; then + case $host_os in + os2*) + # Create import libraries instead of links on OS/2 + func_show_eval "(emximp -o $destdir/$linkname $dir/${linkname%%_dll.$libext}.def)" + ;; + *) + func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + ;; + esac + fi done fi @@ -7799,7 +7808,15 @@ EOF # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + case $host_os in + os2*) + # Create import libraries instead of links on OS/2 + func_show_eval '(emximp -o $output_objdir/$linkname $output_objdir/$libname.def)' 'exit $?' + ;; + *) + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + ;; + esac fi done -- 1.7.3.2