summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-12-07 17:17:43 (EST)
committer P. J. McDermott <pj@pehjota.net>2015-12-07 17:17:43 (EST)
commitcf8d39f861f8572a175b72a6254a26e13840e30c (patch)
tree1efff46bec05aba6224c07ec2751f5829fbae4aa
parent5c44408f5485c92bdce363a05126615a4b1ac32f (diff)
configure.ac: Find mke2fs utility
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9ef0852..299fda9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,6 +103,34 @@ AC_ARG_WITH(
fi
]
)
+AC_ARG_WITH(
+ [mke2fs],
+ [AS_HELP_STRING([--with-mke2fs=PATH], [path to mke2fs utility])],
+ [
+ case "${withval}" in
+ 'yes'|'')
+ AC_MSG_ERROR(
+ [--with-mke2fs requires an argument])
+ ;;
+ 'no')
+ AC_MSG_ERROR([mke2fs is required])
+ ;;
+ *)
+ MKE2FS="${withval}"
+ AC_SUBST([MKE2FS])
+ ;;
+ esac
+ ],
+ [
+ AC_PATH_PROG([MKE2FS], [mke2fs])
+ if test -z "${MKE2FS}"; then
+ AC_MSG_ERROR([mke2fs not found])
+ fi
+ ]
+)
+if ! ${MKE2FS} -V >/dev/null 2>&1; then
+ AC_MSG_ERROR([mke2fs from the e2fsprogs package is required])
+fi
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([config.sh])