* 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.
This commit is contained in:
Paul Eggert 2002-05-06 14:51:40 +00:00 committed by Robert Boehne
parent 338e2996c6
commit d197caf0e1
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,10 @@
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-06 Loren James Rittle <rittle@latour.rsch.comm.mot.com>
* ltmain.sh: Detect and handle object name conflicts while

View File

@ -3812,7 +3812,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