]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: Don't assume that "sort +2" works, as POSIX
authorPaul Eggert <eggert@twinsun.com>
Mon, 6 May 2002 14:51:24 +0000 (14:51 +0000)
committerRobert Boehne <rboehne@gnu.org>
Mon, 6 May 2002 14:51:24 +0000 (14:51 +0000)
1003.1-2001 says that "sort +2" is supposed to sort the file
named "+2".  An example host that behaves like this is
textutils 2.0.21 with _POSIX2_VERSION=200112.

ChangeLog
ltmain.in

index 2ed58b390dce81aa1649a39f2aaf8efb7b563a55..5dd32ebc51accb2e13ed5a2497f6ab0abf258f26 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+2002-05-06  Paul Eggert  <eggert@twinsun.com>
+
+       * ltmain.in: Don't assume that "sort +2" works, as POSIX
+       1003.1-2001 says that "sort +2" is supposed to sort the file
+       named "+2".  An example host that behaves like this is
+       textutils 2.0.21 with _POSIX2_VERSION=200112.
+
 2002-05-02  Dave Vasilevsky  <thevas@mac.com>
 
        * ltmain.in: Remove convenience libraries from deplibs for Darwin.
+
 2002-05-02  Fritz Elfert  <felfert@to.com>
 
        * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): Modify archive_expsym_cmds
index 13eacfc54549c634034f3cf9f08920cd8bcadc0d..556e8176510266a1be101680a925798bfb56634f 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -3363,7 +3363,13 @@ extern \"C\" {
            fi
 
            # Try sorting and uniquifying the output.
-           if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+           if grep -v "^: " < "$nlist" |
+               if sort -k 3 </dev/null >/dev/null 2>&1; then
+                 sort -k 3
+               else
+                 sort +2
+               fi |
+               uniq > "$nlist"S; then
              :
            else
              grep -v "^: " < "$nlist" > "$nlist"S