From 75d2492f20dc513337de3ef2d45e1d5c68c7dff8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 May 2016 17:16:48 +0200 Subject: Make the aws-cpp-sdk dependency optional --- src/libstore/local.mk | 6 +++++- src/libstore/s3-binary-cache-store.cc | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libstore/local.mk b/src/libstore/local.mk index 22b0f235e0b2..9d5c04dca0c5 100644 --- a/src/libstore/local.mk +++ b/src/libstore/local.mk @@ -8,7 +8,11 @@ libstore_SOURCES := $(wildcard $(d)/*.cc) libstore_LIBS = libutil libformat -libstore_LDFLAGS = $(SQLITE3_LIBS) -lbz2 $(LIBCURL_LIBS) $(SODIUM_LIBS) -laws-cpp-sdk-s3 -laws-cpp-sdk-core -pthread +libstore_LDFLAGS = $(SQLITE3_LIBS) -lbz2 $(LIBCURL_LIBS) $(SODIUM_LIBS) -pthread + +ifeq ($(ENABLE_S3), 1) + libstore_LDFLAGS += -laws-cpp-sdk-s3 -laws-cpp-sdk-core +endif ifeq ($(OS), SunOS) libstore_LDFLAGS += -lsocket diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc index cffcb1bf214f..e64d0eb852aa 100644 --- a/src/libstore/s3-binary-cache-store.cc +++ b/src/libstore/s3-binary-cache-store.cc @@ -1,3 +1,7 @@ +#include "config.h" + +#if ENABLE_S3 + #include "s3-binary-cache-store.hh" #include "nar-info.hh" #include "nar-info-disk-cache.hh" @@ -251,3 +255,5 @@ static RegisterStoreImplementation regStore([]( }); } + +#endif -- cgit 1.4.1