diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-01-15 17:43:38 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-01-15 17:43:38 (EST) |
commit | 31ddb20fa4ce196b63e69306946c98166440d523 (patch) | |
tree | 647ffd70bfe8f539413bea7f81837cd94d5b23b3 /configure.ac | |
parent | e76dcfd51cf5e1f780383ab6ff12df8d8cc59eed (diff) |
configure.ac: Find cpio and xz
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ba00970..bf44d0b 100644 --- a/configure.ac +++ b/configure.ac @@ -217,6 +217,59 @@ AC_ARG_WITH( if ! ${MKE2FS} -V >/dev/null 2>&1; then AC_MSG_ERROR([mke2fs from the e2fsprogs package is required]) fi +AC_ARG_WITH( + [cpio], + [AS_HELP_STRING([--with-cpio=PATH], [path to cpio utility])], + [ + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR( + [--with-cpio requires an argument]) + ;; + 'no') + AC_MSG_ERROR([cpio is required]) + ;; + *) + CPIO="${withval}" + AC_SUBST([CPIO]) + ;; + esac + ], + [ + AC_PATH_PROG([CPIO], [cpio]) + if test -z "${CPIO}"; then + AC_MSG_ERROR([cpio not found]) + fi + ] +) +AC_ARG_WITH( + [xz], + [AS_HELP_STRING([--with-xz=PATH], [path to xz utility])], + [ + case "${withval}" in + 'yes'|'') + AC_MSG_ERROR( + [--with-xz requires an argument]) + ;; + 'no') + AC_MSG_ERROR([xz is required]) + ;; + *) + XZ="${withval}" + AC_SUBST([XZ]) + ;; + esac + ], + [ + AC_PATH_PROG([XZ], [xz]) + if test -z "${XZ}"; then + AC_MSG_ERROR([xz not found]) + fi + ] +) +if ! ${XZ} -V 2>&1 | grep '^xz (XZ Utils) ' >/dev/null 2>&1; then + AC_MSG_ERROR([xz from the XZ Utils package is required]) +fi AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([config.sh]) |