From 9b5ed6e3a48c85f21fac0e9ad372fc300360947b Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 14 Jan 2016 09:10:32 -0500 Subject: configure.ac: Find sfdisk and fdisk utilities --- (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f97791f..fc38feb 100644 --- a/configure.ac +++ b/configure.ac @@ -129,6 +129,67 @@ AC_ARG_WITH( ] ) AC_ARG_WITH( + [sfdisk], + [AS_HELP_STRING([--with-sfdisk=PATH], [path to sfdisk utility])], + [ + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR( + [--with-sfdisk requires an argument]) + ;; + 'no') + HAVE_SFDISK=false + ;; + *) + SFDISK="${withval}" + AC_SUBST([SFDISK]) + HAVE_SFDISK=true + ;; + esac + ], + [ + AC_PATH_PROG([SFDISK], [sfdisk]) + if test -z "${SFDISK}"; then + HAVE_SFDISK=false + else + HAVE_SFDISK=true + fi + ] +) +AC_SUBST([HAVE_SFDISK]) +AC_ARG_WITH( + [fdisk], + [AS_HELP_STRING([--with-fdisk=PATH], [path to fdisk utility])], + [ + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR( + [--with-fdisk requires an argument]) + ;; + 'no') + HAVE_FDISK=false + ;; + *) + FDISK="${withval}" + AC_SUBST([FDISK]) + HAVE_FDISK=true + ;; + esac + ], + [ + AC_PATH_PROG([FDISK], [fdisk]) + if test -z "${FDISK}"; then + HAVE_FDISK=false + else + HAVE_FDISK=true + fi + ] +) +AC_SUBST([HAVE_FDISK]) +if ! ${HAVE_SFDISK} && ! ${HAVE_FDISK}; then + AC_MSG_ERROR([sfdisk or fdisk is required]) +fi +AC_ARG_WITH( [mke2fs], [AS_HELP_STRING([--with-mke2fs=PATH], [path to mke2fs utility])], [ -- cgit v0.9.1