Commit 34192459 authored by Boris Glimcher's avatar Boris Glimcher Committed by Tomasz Zawadzki
Browse files

configure: add --with-openssl=<dir> option



Users can now provide custom location for openssl lib.

Example:
    ./configure --with-openssl=../openssl-3.0.2
    LD_LIBRARY_PATH=../openssl-3.0.2 ./build/examples/hello_sock --help

Change-Id: I07b653ddef5e6333d4e7bf4c05144601eb4ee275
Signed-off-by: default avatarBoris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13470


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
parent 022da3d2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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

+6 −0
Original line number Diff line number Diff line
@@ -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
			;;
+5 −0
Original line number Diff line number Diff line
@@ -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