From 260e3a1ea414ecf8c9d9b26295927413ede9efcd Mon Sep 17 00:00:00 2001
From: P. J. McDermott <pj@pehjota.net>
Date: Wed, 28 Oct 2015 12:15:23 -0400
Subject: configure.ac: Find sha512sum utility

---
diff --git a/configure.ac b/configure.ac
index 57fd6dc..b76752f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,6 +99,31 @@ AC_ARG_WITH(
 	]
 )
 AC_ARG_WITH(
+	[sha512sum],
+	[AS_HELP_STRING([--with-sha512sum=PATH], [path to sha512sum utility])],
+	[
+		case "${withval}" in
+			'yes'|'')
+				AC_MSG_ERROR(
+					[--with-sha512sum requires an argument])
+				;;
+			'no')
+				AC_MSG_ERROR([sha512sum is required])
+				;;
+			*)
+				SHA512SUM="${withval}"
+				AC_SUBST([SHA512SUM])
+				;;
+		esac
+	],
+	[
+		AC_PATH_PROG([SHA512SUM], [sha512sum])
+		if test -z "${SHA512SUM}"; then
+			AC_MSG_ERROR([sha512sum not found])
+		fi
+	]
+)
+AC_ARG_WITH(
 	[ich9gen],
 	[AS_HELP_STRING([--with-ich9gen=PATH], [path to ich9gen utility])],
 	[
--
cgit v0.9.1