[vlc-commits] commit: contrib: Make sure we can override default CC and CFLAGS from bootstrap. (Pierre d' Herbemont )

git at videolan.org git at videolan.org
Sun Oct 31 18:47:40 CET 2010


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sun Oct 31 17:40:43 2010 +0100| [e46f41086a48546a5baf9aae29cb7f23d43ff2b9] | committer: Pierre d'Herbemont 

contrib: Make sure we can override default CC and CFLAGS from bootstrap.

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

 extras/contrib/bootstrap |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/extras/contrib/bootstrap b/extras/contrib/bootstrap
index 1024317..71a60a6 100755
--- a/extras/contrib/bootstrap
+++ b/extras/contrib/bootstrap
@@ -143,12 +143,12 @@ rm -f "${distro_mak}"
 } > "${distro_mak}"
 
 if test "$TARGET" != "$BUILD"; then
-    CC="${TARGET}-gcc"
-    CXX="${TARGET}-g++"
-    LD="${TARGET}-ld"
-    RANLIB="${TARGET}-ranlib"
-    AR="${TARGET}-ar"
-    STRIP="${TARGET}-strip"
+    test -z "$CC"    && CC="${TARGET}-gcc"
+    test -z "$CXX"   && CXX="${TARGET}-g++"
+    test -z "$LD"    && LD="${TARGET}-ld"
+    test -z "$RANLIB"&& RANLIB="${TARGET}-ranlib"
+    test -z "$AR"    && AR="${TARGET}-ar"
+    test -z "$STRIP" && STRIP="${TARGET}-strip"
 fi
 
 case $TARGET in
@@ -356,6 +356,12 @@ test -z "${DISTRO}" && DISTRO=unix
 
 cat src/Distributions/"${DISTRO}".mak >> "${distro_mak}"
 
+# Save passed flags
+EXTRA_CFLAGS+=" $CFLAGS"
+EXTRA_LDFLAGS+=" $LDFLAGS"
+EXTRA_CPPFLAGS+=" $CPPFLAGS"
+EXTRA_CXXFLAGS+=" $CXXFLAGS"
+
 add_makefile_cfg "BUILD = $BUILD"
 add_makefile_cfg "HOST = $TARGET"
 add_makefile_cfg "SRCDIR = `pwd`"



More information about the vlc-commits mailing list