[vlc-devel] [PATCH 3/4] contrib:libarchive: force static build

Steve Lhomme robux4 at videolabs.io
Wed Jul 19 08:46:03 CEST 2017


When linking on Windows it assumes by default we link with DLLs.
---
 contrib/src/libarchive/rules.mak | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/contrib/src/libarchive/rules.mak b/contrib/src/libarchive/rules.mak
index 3c1e0315c7..09b9acf034 100644
--- a/contrib/src/libarchive/rules.mak
+++ b/contrib/src/libarchive/rules.mak
@@ -9,6 +9,11 @@ endif
 
 DEPS_libarchive = zlib
 
+LIBARCHIVE_CFLAGS := $(CFLAGS) -DLIBARCHIVE_STATIC
+ifdef HAVE_WIN32
+LIBARCHIVE_CFLAGS += -DLIBARCHIVE_STATIC
+endif
+
 $(TARBALLS)/libarchive-$(LIBARCHIVE_VERSION).tar.gz:
 	$(call download_pkg,$(LIBARCHIVE_URL),libarchive)
 
@@ -32,7 +37,7 @@ endif
 ifdef HAVE_WINSTORE
 	$(RECONF)
 endif
-	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) \
+	cd $< && $(HOSTVARS) CFLAGS="$(LIBARCHIVE_CFLAGS)" ./configure $(HOSTCONF) \
 		--disable-bsdcpio --disable-bsdtar --disable-bsdcat \
 		--without-nettle \
 		--without-xml2 --without-lzma --without-iconv --without-expat
-- 
2.12.1



More information about the vlc-devel mailing list