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: Boris 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: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
Boris Glimcher 2022-05-04 21:57:37 +03:00 committed by Konrad Sztyber
parent 0849aadceb
commit 468b3e9255

View File

@ -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