Hi/2.

OS/2 does not support links, so it's better to create import libraries
instead.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.11
Under OS/2 Warp 4 for Korean with FixPak #15
On Intel Core2Duo T5500 1.66 GHz with 2 GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

From 3f89343398f821c9e9a75e74510f6c007334c447 Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <k...@chollian.net>
Date: Sat, 15 Jan 2011 18:10:09 +0900
Subject: [PATCH 09/10] Create import libraries instead of links to the real 
library on OS/2

---
 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 f119c1a..bd139fa 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
 
@@ -7794,7 +7803,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

Reply via email to