From 12ba2812528cc977ac0979ab5a374293fdaf53a1 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Tue, 8 Feb 2022 15:43:21 +0100 Subject: [PATCH] build: Improve eltorito-efi configure option --- configure.ac | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 4a4b521a..c3bd144c 100644 --- a/configure.ac +++ b/configure.ac @@ -41,19 +41,24 @@ if ! test "x$GZIP_FOUND" = "xyes"; then AC_MSG_ERROR([gzip not found, please install gzip before configuring]) fi -BUILD_ELTORITO_EFI="yes" +BUILD_ELTORITO_EFI="default" AC_ARG_ENABLE([eltorito-efi], AS_HELP_STRING([--disable-eltorito-efi], [disable limine-eltorito-efi.bin build]), BUILD_ELTORITO_EFI="$enableval") -AC_CHECK_PROG([MTOOLS_FOUND], [mcopy], [yes]) -if ! test "x$MTOOLS_FOUND" = "xyes"; then - AC_MSG_WARN([mtools not found, install mtools to build limine-eltorito-efi.bin]) - BUILD_ELTORITO_EFI="no" +if ! test "x$BUILD_ELTORITO_EFI" = "xno"; then + AC_CHECK_PROG([MTOOLS_FOUND], [mcopy], [yes]) + if ! test "x$MTOOLS_FOUND" = "xyes"; then + if test "x$BUILD_ELTORITO_EFI" = "xyes"; then + AC_MSG_ERROR([mtools not found, install mtools to build limine-eltorito-efi.bin]) + fi + AC_MSG_WARN([mtools not found, install mtools to build limine-eltorito-efi.bin]) + BUILD_ELTORITO_EFI="no" + fi fi -if test "$BUILD_ELTORITO_EFI" = "yes"; then +if ! test "x$BUILD_ELTORITO_EFI" = "xno"; then AC_SUBST(build_eltorito_efi, [yes]) fi