mirror of
https://github.com/status-im/miniupnp.git
synced 2025-02-04 02:23:24 +00:00
miniupnpd: Makefile: move libssl detection to configure
fix: use "openssl" pkg-config instead of "libssl" (libcrypto was missing) Improvement : libssl is linked only when needed (IGD2 and HTTPS both enabled)
This commit is contained in:
parent
6ab64d765b
commit
d1fb15e40e
@ -120,8 +120,6 @@ LIBS += -lkvm
|
||||
LIBS += -lsocket -lnsl -lkstat -lresolv
|
||||
.endif
|
||||
|
||||
LIBS += -lssl -lcrypto
|
||||
|
||||
# set PREFIX variable to install in the wanted place
|
||||
|
||||
INSTALLBINDIR = $(PREFIX)/sbin
|
||||
|
@ -74,11 +74,6 @@ NETFILTER_SCRIPTS = $(addprefix $(SRCDIR)/netfilter/, \
|
||||
|
||||
#LDLIBS += -lnfnetlink
|
||||
|
||||
# OpenWrt packager disables https server for IGD v2 and hardcodes libuuid support
|
||||
ifeq ($(TARGET_OPENWRT),)
|
||||
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
|
||||
endif # ($(TARGET_OPENWRT,)
|
||||
|
||||
ifneq ($(shell ldd --version | grep GLIBC),)
|
||||
GLIBC_VERSION := $(shell ldd --version | head -n 1 | sed 's/^.* //')
|
||||
GLIBC_VERSION_MAJOR = $(shell echo $(GLIBC_VERSION) | cut -f 1 -d . )
|
||||
|
@ -67,8 +67,6 @@ NFT_SCRIPTS = $(addprefix $(SRCDIR)/netfilter_nft/scripts/, \
|
||||
|
||||
#LDLIBS += -lnfnetlink
|
||||
|
||||
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
|
||||
|
||||
# genuuid uses the uuidgen CLI tool which is part of libuuid
|
||||
# from the e2fsprogs
|
||||
# 'cat /proc/sys/kernel/random/uuid' could be also used
|
||||
|
16
miniupnpd/configure
vendored
16
miniupnpd/configure
vendored
@ -751,6 +751,22 @@ case $OS_FAMILY in
|
||||
;;
|
||||
esac
|
||||
|
||||
# OpenSSL : only with IGDv2 enabled
|
||||
if [ -n "$HTTPS" ] && [ -n "$IGD2" ] ; then
|
||||
case $OS_FAMILY in
|
||||
Linux)
|
||||
if pkg_detect openssl; then
|
||||
:
|
||||
else
|
||||
echo "Warning: openssl pkg-config not found!"
|
||||
fi
|
||||
;;
|
||||
*BSD)
|
||||
echo "LIBS += -lssl -lcrypto" >> bsdmake.inc
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above
|
||||
if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then
|
||||
V6SOCKETS_ARE_V6ONLY=0
|
||||
|
Loading…
x
Reference in New Issue
Block a user