diff --git a/CONFIG b/CONFIG index 9e636276b..c1946fca6 100644 --- a/CONFIG +++ b/CONFIG @@ -154,6 +154,9 @@ CONFIG_URING=n # Path to custom built IO_URING library CONFIG_URING_PATH= +# Path to custom built OPENSSL library +CONFIG_OPENSSL_PATH= + # Build with FUSE support CONFIG_FUSE=n diff --git a/configure b/configure index 87d016c73..50bd16aef 100755 --- a/configure +++ b/configure @@ -92,6 +92,8 @@ function usage() { echo " --without-uring If an argument is provided, it is considered a directory containing" echo " liburing.a and io_uring.h. Otherwise the regular system paths will" echo " be searched." + echo " --with-openssl[=DIR] Build OPENSSL with custom path. Otherwise the regular system paths will" + echo " be searched." echo " --with-fuse Build FUSE components for mounting a blobfs filesystem." echo " --without-fuse No path required." echo " --with-nvme-cuse Build NVMe driver with support for CUSE-based character devices." @@ -586,6 +588,10 @@ for i in "$@"; do CONFIG[URING]=n CONFIG[URING_PATH]= ;; + --with-openssl=*) + check_dir "$i" + CONFIG[OPENSSL_PATH]=$(readlink -f ${i#*=}) + ;; --with-fuse) CONFIG[FUSE]=y ;; diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk index c378f3229..9e00225c4 100644 --- a/mk/spdk.common.mk +++ b/mk/spdk.common.mk @@ -285,12 +285,17 @@ SYS_LIBS += -lcrypto SYS_LIBS += -lm PKGCONF ?= pkg-config +ifneq ($(strip $(CONFIG_OPENSSL_PATH)),) +CFLAGS += -I$(CONFIG_OPENSSL_PATH)/include +LDFLAGS += -L$(CONFIG_OPENSSL_PATH) +else # `libssl11` name is unique to Centos7 via EPEL # So it's safe to add it here without additional check for Centos7 ifeq ($(shell $(PKGCONF) --exists libssl11 && echo 1),1) CFLAGS += $(shell $(PKGCONF) --cflags libssl11) LDFLAGS += $(shell $(PKGCONF) --libs libssl11) endif +endif ifneq ($(CONFIG_NVME_CUSE)$(CONFIG_FUSE),nn) SYS_LIBS += -lfuse3