summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-12-07 13:47:28 (EST)
committer P. J. McDermott <pj@pehjota.net>2015-12-07 13:47:28 (EST)
commitdb777c51b8a714b33554aa57c74e2981c186cd94 (patch)
treec5a348e494ee46bc46e8fd2a257005507cb2572d
parentde1c09a6ed216c1e5b20ccebd7dcfac1a2dd8df3 (diff)
configure.ac: Find sha256sum utility
-rw-r--r--configure.ac25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 22997d8..9ef0852 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,31 @@ AC_ARG_WITH(
fi
]
)
+AC_ARG_WITH(
+ [sha256sum],
+ [AS_HELP_STRING([--with-sha256sum=PATH], [path to sha512sum utility])],
+ [
+ case "${withval}" in
+ 'yes'|'')
+ AC_MSG_ERROR(
+ [--with-sha256sum requires an argument])
+ ;;
+ 'no')
+ AC_MSG_ERROR([sha256sum is required])
+ ;;
+ *)
+ SHA256SUM="${withval}"
+ AC_SUBST([SHA256SUM])
+ ;;
+ esac
+ ],
+ [
+ AC_PATH_PROG([SHA256SUM], [sha512sum])
+ if test -z "${SHA256SUM}"; then
+ AC_MSG_ERROR([sha256sum not found])
+ fi
+ ]
+)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([config.sh])