diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-01-14 09:10:32 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-01-14 09:10:32 (EST) |
commit | 9b5ed6e3a48c85f21fac0e9ad372fc300360947b (patch) | |
tree | 40cc620a54c247e33816722e6b51c115ee456d58 /configure.ac | |
parent | aaa0964ce46f7f257f4439e31cba24b80161dc36 (diff) |
configure.ac: Find sfdisk and fdisk utilities
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])], [ |