diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 61 |
1 files changed, 61 insertions, 0 deletions
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])], [ |