Commit 468b3e92 authored by Boris Glimcher's avatar Boris Glimcher Committed by Konrad Sztyber
Browse files

configure: Add correct CFLAGS and LDFLAGS for libssl11



This is continuation of previous commit on OpenSSL 1.1
The new 1.1 version is needed for TLSv1.3 support.
By default centos7 uses openssl-devel version 1.0.2k.
The newer version 1.1.1k is available with EPEL repo.

From the naming perspective for pkg-config:
- Only Centos7 via EPEL calls it `libssl11`
- All the rest call it `libssl`

Even on Fedora with OpenSSL 3 is is called `libssl`.

See:
$ pkg-config --modversion libssl
1.0.2k
$ pkg-config --modversion libssl11
1.1.1k
$ pkg-config --modversion libssl
3.0.2

So it's safe to check for `libssl11` here

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


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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>
parent 0849aadc
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -304,9 +304,18 @@ CXXFLAGS += $(COMMON_CFLAGS) -std=c++11

SYS_LIBS += -lrt
SYS_LIBS += -luuid
SYS_LIBS += -lssl
SYS_LIBS += -lcrypto
SYS_LIBS += -lm

PKGCONF ?= pkg-config
# `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

ifneq ($(CONFIG_NVME_CUSE)$(CONFIG_FUSE),nn)
SYS_LIBS += -lfuse3
endif