On 10/05/2010 09:28 AM, Pádraig Brady wrote:
On 05/10/10 15:22, Eric Blake wrote:
On 10/05/2010 08:13 AM, Eric Blake wrote:
@@ -351,7 +351,7 @@ check_versions() {
         app=libtoolize
       fi
       # Honor $APP variables ($TAR, $AUTOCONF, etc.)
-    appvar=`echo $app | tr '[a-z]' '[A-Z]'`
+    appvar=`echo $app | tr '-a-z' '_A-Z'`

Actually, 'tr -- -a-z _A-Z' is not universally supported, and leading
dash caused a failure; so after better testing, I'm actually pushing:

tr 'a-z-' 'A-Z_'

solaris needs [] around ranges

Thanks.  The autoconf manual was not clear on that point:

Not all versions of @command{tr} recognize ranges of characters: at
least Solaris @command{/usr/bin/tr} still fails to do so.  But you can
use @command{/usr/xpg4/bin/tr} instead.

@example
$ @kbd{echo "Hazy Fantazy" | LC_ALL=C /usr/bin/tr a-z A-Z}
HAZy FAntAZy
$ @kbd{echo "Hazy Fantazy" | LC_ALL=C /usr/xpg4/bin/tr a-z A-Z}
HAZY FANTAZY
@end example

It looks like I have a documentation patch to write, since you are indeed correct:

$ echo "Hazy Fantazy" | LC_ALL=C /usr/bin/tr '[a-z]' '[A-Z]'
HAZY FANTAZY

And meanwhile, I guess I'd better add those [] back in, since it never hurts to transliterate a character to itself on a POSIX-compliant tr.

--
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to