]> mj.ucw.cz Git - pciutils.git/commitdiff
Work-around for Solaris tr.
authorMartin Mares <mj@ucw.cz>
Tue, 6 Feb 2007 11:59:03 +0000 (12:59 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 6 Feb 2007 11:59:03 +0000 (12:59 +0100)
ChangeLog
lib/configure

index 3e673bb0ba60cf3ac321e98eb2cb34fcf40b072b..3ebadcf9849550caec75f39d7a67e50c0d471911 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-02-06  Martin Mares  <mj@ucw.cz>
 
+       * lib/configure: tr on Solaris is a bit weird and it requires `[A-Z]'
+       instead of `A-Z'. Fortunately, the extra brackets don't hurt otherwise.
+
        * lib/types.h, lib/configure: Solaris should use <stdint.h> to get precise
        integer types.
 
index 77393a56195724422b56139d90d273a4ad3c7b95..a031ca79488b17746aadc89de346ab656bf9e333 100755 (executable)
@@ -27,7 +27,8 @@ then
        sys=freebsd
 fi
 host=${3:-$cpu-$sys}
-host=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr 'A-Z' 'a-z'`
+# CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
+host=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'`
 cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 rel=${4:-$rel}
@@ -36,8 +37,8 @@ zlib=$5
 
 c=config.h
 m=config.mk
-echo >$c "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
-echo >>$c "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
+echo >$c "#define PCI_ARCH_`echo $cpu | tr '[a-z]' '[A-Z]'`"
+echo >>$c "#define PCI_OS_`echo $sys | tr '[a-z]' '[A-Z]'`"
 rm -f $m
 
 echo_n "Looking for access methods..."