Change nghttp2 link flags to support macOS

Previously '-l:nghttp2.a' was used to specify static linking with
nghttp2 and to stop the linker from linking dynamically with
libnghttp2.so. This way of linking is not supported on macOS. Instead,
add '--disable-shared' to prevent libnghttp2.so from even being
compiled. This way the linker will find the static library only and link
against it.
This commit is contained in:
lwthiker
2022-04-17 17:01:15 +03:00
parent a6c4fa6ac1
commit d7ed859ad0
8 changed files with 17 additions and 72 deletions
+2 -11
View File
@@ -137,19 +137,10 @@ $(boringssl_static_libs): boringssl.zip boringssl/.patched
$(NGHTTP2_VERSION).tar.bz2:
curl -L $(NGHTTP2_URL) -o $(NGHTTP2_VERSION).tar.bz2
# Patch nghttp2 and use a dummy '.patched' file to mark it patched
$(NGHTTP2_VERSION)/.patched: $(srcdir)/firefox/patches/libnghttp2-*.patch
rm -Rf $(NGHTTP2_VERSION)
$(nghttp2_static_libs): $(NGHTTP2_VERSION).tar.bz2
tar -xf $(NGHTTP2_VERSION).tar.bz2
cd $(NGHTTP2_VERSION)
for p in $^; do patch -p1 < $$p; done
# Re-generate the configure script
autoreconf -i && automake && autoconf
touch .patched
$(nghttp2_static_libs): $(NGHTTP2_VERSION).tar.bz2 $(NGHTTP2_VERSION)/.patched
cd $(NGHTTP2_VERSION)
./configure --prefix=$(nghttp2_install_dir) --with-pic
./configure --prefix=$(nghttp2_install_dir) --with-pic --disable-shared
$(MAKE) MAKEFLAGS=
$(MAKE) install MAKEFLAGS=