summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-19 01:06:05 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-19 01:06:05 (EDT)
commit5a771c1b3c45c3d602662a480915f7ddd87af2c1 (patch)
tree5a7bfe2654334426e28a77d65a282674eaaf3a3f
parent5a9f00fa31329aba9f56bda7148a4e5966d078f1 (diff)
configure.ac, config.sh.in: Find md5sum
-rw-r--r--config.sh.in1
-rw-r--r--configure.ac25
2 files changed, 26 insertions, 0 deletions
diff --git a/config.sh.in b/config.sh.in
index ce059bb..5d1fb56 100644
--- a/config.sh.in
+++ b/config.sh.in
@@ -2,6 +2,7 @@ PACKAGE='@PACKAGE@'
PACKAGE_NAME='@PACKAGE_NAME@'
WGET='@WGET@'
GUNZIP='@GUNZIP@'
+MD5SUM='@MD5SUM@'
SHA256SUM='@SHA256SUM@'
HAVE_SFDISK='@HAVE_SFDISK@'
SFDISK='@SFDISK@'
diff --git a/configure.ac b/configure.ac
index 69c2186..9c5ddb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,31 @@ AC_ARG_WITH(
]
)
AC_ARG_WITH(
+ [md5sum],
+ [AS_HELP_STRING([--with-md5sum=PATH], [path to md5sum utility])],
+ [
+ case "${withval}" in
+ 'yes'|'')
+ AC_MSG_ERROR(
+ [--with-md5sum requires an argument])
+ ;;
+ 'no')
+ AC_MSG_ERROR([md5sum is required])
+ ;;
+ *)
+ MD5SUM="${withval}"
+ AC_SUBST([MD5SUM])
+ ;;
+ esac
+ ],
+ [
+ AC_PATH_PROG([MD5SUM], [md5sum])
+ if test -z "${MD5SUM}"; then
+ AC_MSG_ERROR([md5sum not found])
+ fi
+ ]
+)
+AC_ARG_WITH(
[sha256sum],
[AS_HELP_STRING([--with-sha256sum=PATH], [path to sha256sum utility])],
[