[vlc-commits] contrib: zlib: Set the CROSS_PREFIX variable

Martin Storsjö git at videolan.org
Tue Apr 2 11:56:10 CEST 2013


vlc | branch: master | Martin Storsjö <martin at martin.st> | Tue Apr  2 12:44:41 2013 +0300| [860752f7f41f99b120e636335ecf74526131dad1] | committer: Rafaël Carré

contrib: zlib: Set the CROSS_PREFIX variable

This fixes cross compilation from OS X.

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=860752f7f41f99b120e636335ecf74526131dad1
---

 contrib/src/zlib/rules.mak |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/contrib/src/zlib/rules.mak b/contrib/src/zlib/rules.mak
index 4e07918..6181f7f 100644
--- a/contrib/src/zlib/rules.mak
+++ b/contrib/src/zlib/rules.mak
@@ -7,6 +7,10 @@ ifeq ($(call need_pkg,"zlib"),)
 PKGS_FOUND += zlib
 endif
 
+ifdef HAVE_CROSS_COMPILE
+CONFIG_VARS=CROSS_PREFIX=$(HOST)-
+endif
+
 $(TARBALLS)/zlib-$(ZLIB_VERSION).tar.gz:
 	$(call download,$(ZLIB_URL))
 
@@ -18,6 +22,6 @@ zlib: zlib-$(ZLIB_VERSION).tar.gz .sum-zlib
 	$(MOVE)
 
 .zlib: zlib
-	cd $< && $(HOSTVARS) ./configure --prefix=$(PREFIX) --static
+	cd $< && $(HOSTVARS) $(CONFIG_VARS) ./configure --prefix=$(PREFIX) --static
 	cd $< && $(MAKE) install
 	touch $@



More information about the vlc-commits mailing list