From b5743683080e07bc264dc9287868f3e2c74bf569 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 Dec 2006 06:29:50 +0000 Subject: [PATCH] * gnulib-tool (SORT): Remove, since we no longer assume GNU sort. Rewrite so as not to assume GNU sort. Also, don't assume the C locale, and avoid an "eval" that could cause trouble. --- ChangeLog | 4 ++++ gnulib-tool | 17 +++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index d516f93c2..8aa538bbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-12-30 Paul Eggert + * gnulib-tool (SORT): Remove, since we no longer assume GNU sort. + Rewrite so as not to assume GNU sort. Also, don't assume + the C locale, and avoid an "eval" that could cause trouble. + * lib/getpagesize.h (getpagesize) [defined __amigaos4__]: Define. Trivial patch from Henning Nielsen Lund, originally sent to bug-grep@gnu.org today. diff --git a/gnulib-tool b/gnulib-tool index 922fa8e91..6c7f50b4f 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2006-12-26 18:42:09 $' +cvsdatestamp='$Date: 2006-12-31 06:29:50 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` nl=' @@ -66,12 +66,6 @@ if test -z "${AUTOPOINT}" || test -n "${GETTEXTPATH}"; then AUTOPOINT="${GETTEXTPATH}autopoint" fi -# GNU sort is needed. Set SORT to its location (not needed if it's called -# 'sort' and already in the PATH). -if test -z "$SORT"; then - SORT=sort -fi - # When using GNU sed, turn off as many GNU extensions as possible, # to minimize the risk of accidentally using non-portable features. # However, do this only for gnulib-tool itself, not for the code that @@ -699,11 +693,14 @@ func_ln_if_changed () s,^dnl .*$,, s, dnl .*$,, /AC_PREREQ/ { - s,^.*AC_PREREQ([[ ]*\([^])]*\).*$,prereqs="$prereqs \1",p + s,^.*AC_PREREQ([[ ]*\([^])]*\).*$,\1,p }' - eval `sed -n -e "$my_sed_traces" < "$configure_ac"` + prereqs=`sed -n -e "$my_sed_traces" < "$configure_ac"` if test -n "$prereqs"; then - autoconf_minversion=`for version in $prereqs; do echo $version; done | $SORT -g -u | tail -1` + autoconf_minversion=` + for version in $prereqs; do echo $version; done | + LC_ALL=C sort -nu | sed 1q + ` fi fi if test -z "$autoconf_minversion"; then -- 2.11.0