>From 7b7907511fe5d5b32ac3fe3a48eb0a031c8effc8 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Wed, 1 Apr 2020 15:44:22 +1100 Subject: [PATCH] rumpdisk: Make optional based on configure --with-librump --- Makefile | 5 ++++- configure.ac | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0e23c5b2..fa80398d 100644 --- a/Makefile +++ b/Makefile @@ -47,9 +47,12 @@ prog-subdirs = auth proc exec term \ devnode \ eth-multiplexer \ acpi \ - rumpdisk \ shutdown +ifeq ($(HAVE_LIBRUMP),yes) +prog-subdirs += rumpdisk +endif + ifeq ($(HAVE_SUN_RPC),yes) prog-subdirs += nfs nfsd endif diff --git a/configure.ac b/configure.ac index 897a9146..3b275e26 100644 --- a/configure.ac +++ b/configure.ac @@ -243,6 +243,20 @@ AS_IF([test "x$with_libz" != xno], [ ]) AC_SUBST([HAVE_LIBZ]) +AC_ARG_WITH([librump], + [AS_HELP_STRING([--without-librump], [disable librump])], , [with_librump=yes]) + +AC_DEFUN([LIBRUMP_FAIL], [ + AC_MSG_FAILURE([Please install required libraries or use --without-librump.]) +]) +AS_IF([test "x$with_librump" != xno], [ + AC_CHECK_HEADER([rump/rump.h], + [AC_DEFINE(HAVE_RUMP_RUMP_H)], + [LIBRUMP_FAIL]) + AC_CHECK_LIB(rump, rump_init, [HAVE_LIBRUMP=yes], [LIBRUMP_FAIL]) +]) +AC_SUBST([HAVE_LIBRUMP]) + AC_ARG_ENABLE(boot-store-types, [ --enable-boot-store-types=TYPES... list of store types included in statically -- 2.25.1