From cf8d39f861f8572a175b72a6254a26e13840e30c Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 07 Dec 2015 17:17:43 -0500 Subject: configure.ac: Find mke2fs utility --- (limited to 'configure.ac') 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]) -- cgit v0.9.1