From 31ddb20fa4ce196b63e69306946c98166440d523 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 15 Jan 2016 17:43:38 -0500 Subject: configure.ac: Find cpio and xz --- (limited to 'configure.ac') 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]) -- cgit v0.9.1