common/autoconf/autogen.sh

changeset 598
db46b1c27a93
parent 571
7a3c6ffdf1fb
child 664
15c1642967c9
     1.1 --- a/common/autoconf/autogen.sh	Fri Jan 18 11:31:33 2013 -0800
     1.2 +++ b/common/autoconf/autogen.sh	Mon Jan 28 14:23:20 2013 +0100
     1.3 @@ -26,9 +26,11 @@
     1.4  
     1.5  # Create a timestamp as seconds since epoch
     1.6  if test "x`uname -s`" = "xSunOS"; then
     1.7 -  # date +%s is not available on Solaris, use this workaround
     1.8 -  # from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html
     1.9 -  TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 |  nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'`
    1.10 +  TIMESTAMP=`date +%s`
    1.11 +  if test "x$TIMESTAMP" = "x%s"; then
    1.12 +    # date +%s not available on this Solaris, use workaround from nawk(1):
    1.13 +    TIMESTAMP=`nawk 'BEGIN{print srand()}'`
    1.14 +  fi
    1.15  else
    1.16    TIMESTAMP=`date +%s`
    1.17  fi

mercurial