]> git.sesse.net Git - ffmpeg/commitdiff
configure: use ar and ranlib in deterministic mode if available
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Mon, 26 Jan 2015 22:50:29 +0000 (23:50 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Jan 2015 00:15:09 +0000 (01:15 +0100)
this makes the static libraries binary reproducible

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
configure

index 9fcdaee2c8a832a793fef48b60b2fccc9459a638..c684d2326fd7971942860f9b0dd0b2404c109c62 100755 (executable)
--- a/configure
+++ b/configure
@@ -2702,7 +2702,11 @@ ln_s="ln -s -f"
 nm_default="nm -g"
 objformat="elf"
 pkg_config_default=pkg-config
-ranlib_default="ranlib"
+if ranlib 2>&1 | grep -q "\-D "; then
+    ranlib_default="ranlib -D"
+else
+    ranlib_default="ranlib"
+fi
 strip_default="strip"
 yasmexe_default="yasm"
 windres_default="windres"
@@ -3600,6 +3604,9 @@ elif $ar 2>&1 | grep -q 'Texas Instruments'; then
 elif $ar 2>&1 | grep -q 'Usage: ar.*-X.*any'; then
     arflags='-Xany -r -c'
     ar_o='$@'
+elif $ar 2>&1 | grep -q "\[D\] "; then
+    arflags="rcD"
+    ar_o='$@'
 else
     arflags="rc"
     ar_o='$@'