summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBryan Quigley <gquigs@gmail.com>2017-02-24 11:05:48 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2017-03-03 14:16:03 +0000
commitfaef35d8653003786f9a0ea2ae1a2330fd15d632 (patch)
treeab93ca16d245fa002da5e13526cd54d38d506d45 /configure.ac
parentbb2a3df2d5b5a01aa58fb3567686e50762186036 (diff)
Move file download verification from md5sum to sha256sum
This leaves all the md5sum parts in place for now, but switches to using sha256sum. Tries both shasum -a 256 and sha256sum. Change-Id: I393d0dde56521f6e9e76f3d5a8d15c6c830fd683 Reviewed-on: https://gerrit.libreoffice.org/34633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9b4f7422891e..9480220d0759 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11853,6 +11853,37 @@ fi
AC_SUBST(MD5SUM)
+#
+# check for sha256sum
+#
+SHA256SUM=
+
+for i in shasum /usr/local/bin/shasum /usr/sfw/bin/shasum /opt/sfw/bin/shasum /opt/local/bin/shasum; do
+ eval "$i -a 256 --version" > /dev/null 2>&1
+ ret=$?
+ if test $ret -eq 0; then
+ SHA256SUM="$i -a 256"
+ break
+ fi
+done
+
+if test -z "$SHA256SUM"; then
+ for i in sha256sum /usr/local/bin/sha256sum /usr/sfw/bin/sha256sum /opt/sfw/bin/sha256sum /opt/local/bin/sha256sum; do
+ eval "$i --version" > /dev/null 2>&1
+ ret=$?
+ if test $ret -eq 0; then
+ SHA256SUM=$i
+ break
+ fi
+ done
+fi
+
+if test -z "$SHA256SUM"; then
+ AC_MSG_ERROR([no sha256sum found!])
+fi
+
+AC_SUBST(SHA256SUM)
+
dnl ===================================================================
dnl Dealing with l10n options
dnl ===================================================================