[PATCH] libtool: use $PATH_SEPARATOR instead ':'

KO Myung-Hun <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
On OS/2, a path separator is ';' not ':'. So use $PATH_SEPARATOR.

* build-aux/ltmain.in (func_exec_program) [shlibpath_var]:
Replace ':' with $PATH_SEPARATOR.
(func_mode_link) [shlib_search_path]: Likewise.
* m4/libtool.m4 (func_munge_path_list): Likewise.
---
 build-aux/ltmain.in |  4 ++--
 m4/libtool.m4       | 16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 96b37003..46ddb6d1 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -3587,7 +3587,7 @@ func_exec_program ()
 
     # Some systems cannot cope with colon-terminated $shlibpath_var
     # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/'$PATH_SEPARATOR$PATH_SEPARATOR'*\$//'\`
 
     export $shlibpath_var
 "
@@ -5563,7 +5563,7 @@ func_mode_link ()
 
     if test -n "$shlibpath_var"; then
       # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+      eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/$PATH_SEPARATOR/ /g\'\`
     else
       shlib_search_path=
     fi
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index f2d1f398..684c2256 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2278,18 +2278,18 @@ func_munge_path_list ()
     case x@S|@2 in
     x)
         ;;
-    *:)
-        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
+    *$PATH_SEPARATOR)
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/'$PATH_SEPARATOR'/ /g'` \@S|@@S|@1\"
         ;;
-    x:*)
-        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
+    x$PATH_SEPARATOR*)
+        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/'$PATH_SEPARATOR'/ /g'`\"
         ;;
-    *::*)
-        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
-        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
+    *$PATH_SEPARATOR$PATH_SEPARATOR*)
+        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*'$PATH_SEPARATOR$PATH_SEPARATOR'//' -e 's/'$PATH_SEPARATOR'/ /g'`\"
+        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/'$PATH_SEPARATOR$PATH_SEPARATOR'.*//' -e 's/'$PATH_SEPARATOR'/ /g'`\ \@S|@@S|@1\"
         ;;
     *)
-        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/'$PATH_SEPARATOR'/ /g'`\"
         ;;
     esac
 }
-- 
2.22.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.