miniupnpd: Makefile: move libuuid detection to configure

This commit is contained in:
Ivan Shapovalov 2024-09-03 14:22:06 +02:00 committed by Thomas Bernard
parent e9d63f63ef
commit cd01381bb3
3 changed files with 10 additions and 17 deletions

View File

@ -77,13 +77,6 @@ NETFILTER_SCRIPTS = $(addprefix $(SRCDIR)/netfilter/, \
# OpenWrt packager disables https server for IGD v2 and hardcodes libuuid support
ifeq ($(TARGET_OPENWRT),)
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
ifeq ($(TEST),1)
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l uuid)
else
$(info please install uuid-dev package / libuuid)
endif # ($(TEST),1)
endif # ($(TARGET_OPENWRT,)
ifneq ($(shell ldd --version | grep GLIBC),)

View File

@ -69,13 +69,6 @@ NFT_SCRIPTS = $(addprefix $(SRCDIR)/netfilter_nft/scripts/, \
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
ifeq ($(TEST),1)
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l uuid)
else
$(info please install uuid-dev package / libuuid)
endif # ($(TEST),1)
# genuuid uses the uuidgen CLI tool which is part of libuuid
# from the e2fsprogs
# 'cat /proc/sys/kernel/random/uuid' could be also used

13
miniupnpd/configure vendored
View File

@ -716,9 +716,16 @@ if [ "$MAKEFILE" ] ; then
fi
# UUID API
case $OS_NAME in
OpenWrt)
echo "#define LIB_UUID" >> ${CONFIGFILE}
case $OS_FAMILY in
Linux)
if [ "$OS_NAME" = "OpenWrt" ]; then
# OpenWrt hardcodes libuuid support
echo "#define LIB_UUID" >> ${CONFIGFILE}
elif pkg_detect uuid; then
echo "#define LIB_UUID" >> ${CONFIGFILE}
else
echo "Warning: uuid pkg-config not found"
fi
;;
*)
if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then