From: Paul Eggert Date: Mon, 6 May 2002 14:51:24 +0000 (+0000) Subject: * ltmain.in: Don't assume that "sort +2" works, as POSIX X-Git-Tag: release-1-4-3~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=842a56080ada03e702bed99f073a17b3395f7e0c;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 2ed58b390..5dd32ebc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ +2002-05-06 Paul Eggert + + * 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 * ltmain.in: Remove convenience libraries from deplibs for Darwin. + 2002-05-02 Fritz Elfert * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): Modify archive_expsym_cmds diff --git a/ltmain.in b/ltmain.in index 13eacfc54..556e81765 100644 --- 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 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S