[FFmpeg-cvslog] build: support some non-standard ar variants

Mans Rullgard git at videolan.org
Thu Sep 20 04:44:41 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Mon Sep 17 23:56:32 2012 +0100| [3dbc777c7f30409b844c38641941d5e7f90af97e] | committer: Mans Rullgard

build: support some non-standard ar variants

This adds support for the TI and Microsoft (lib.exe) variants of
the ar utility.

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3dbc777c7f30409b844c38641941d5e7f90af97e
---

 configure   |   13 +++++++++++++
 library.mak |    2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 2d400c0..8a7eaf4 100755
--- a/configure
+++ b/configure
@@ -2415,6 +2415,17 @@ if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
     DEPCCFLAGS=$_flags
 fi
 
+if $ar 2>&1 | grep -q Microsoft; then
+    arflags="-nologo"
+    ar_o='-out:$@'
+elif $ar 2>&1 | grep -q 'Texas Instruments'; then
+    arflags="rq"
+    ar_o='$@'
+else
+    arflags="rc"
+    ar_o='$@'
+fi
+
 add_cflags $extra_cflags
 add_asflags $extra_cflags
 
@@ -3645,6 +3656,8 @@ DEPASFLAGS=$DEPASFLAGS \$(CPPFLAGS)
 YASM=$yasmexe
 DEPYASM=$yasmexe
 AR=$ar
+ARFLAGS=$arflags
+AR_O=$ar_o
 RANLIB=$ranlib
 LN_S=$ln_s
 CPPFLAGS=$CPPFLAGS
diff --git a/library.mak b/library.mak
index d89050e..19f05f9 100644
--- a/library.mak
+++ b/library.mak
@@ -25,7 +25,7 @@ $(TESTOBJS): CPPFLAGS += -DTEST
 
 $(SUBDIR)$(LIBNAME): $(OBJS)
 	$(RM) $@
-	$(AR) rc $@ $^ $(EXTRAOBJS)
+	$(AR) $(ARFLAGS) $(AR_O) $^ $(EXTRAOBJS)
 	$(RANLIB) $@
 
 install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig



More information about the ffmpeg-cvslog mailing list