More control of linking / including dependencies with Makefile
These lines
# WITH_LIBDEFLATE=1 enables fast paths for SHARED_COMPRESSOR and inflation
ifeq ($(WITH_LIBDEFLATE),1)
override CXXFLAGS += -I libdeflate -DUWS_USE_LIBDEFLATE
override LDFLAGS += libdeflate/libdeflate.a
endif
require bundled libdeflate but libdeflate packages are available on many systems: https://repology.org/project/libdeflate/versions
From what I understand - every Linux dist pretty much has its own "build system" and its own package manager / dependency resolution.
So if the goal is to play better with the "native" dependency manager of a particular Linux dist - that's probably a task of that package for that particular platform.
What I mean is if Homebrew is a platform we want to support then of course that Homebrew package will have to play along with Homebrew's packages.
Same for Fedora, etc.
Or how do you think about it? Simply a way to specify what prefix to use?
WITH_LIBDEFLATE=/usr/include?
WITH_LIBDEFLATE=/usr/include?
Something like this would work.
That could also be a good idea for OpenSSL/BoringSSL where both are compatible and only need a linking / include change