announce-gen: use Digest::SHA when possible
[gnulib.git] / build-aux / announce-gen
index 3ca90a9..b9c9360 100755 (executable)
@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
     if 0;
 # Generate a release announcement message.
 
-my $VERSION = '2012-01-06 07:46'; # UTC
+my $VERSION = '2012-03-20 23:17'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -30,7 +30,8 @@ use strict;
 
 use Getopt::Long;
 use Digest::MD5;
-use Digest::SHA1;
+eval { require Digest::SHA; }
+  or eval { use Digest::SHA1; };
 use POSIX qw(strftime);
 
 (my $ME = $0) =~ s|.*/||;