ffmpeg-0001-configure-fix-failures-with-long-command-lines.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 974f3a25674e771776ada5ac8c4cd1b87e9dbb18 Mon Sep 17 00:00:00 2001
  2. From: Ricardo Constantino <wiiaboo@gmail.com>
  3. Date: Sun, 4 Jun 2017 00:39:10 +0100
  4. Subject: [PATCH] configure: fix failures with long command lines
  5. ---
  6. configure | 13 +++++++++++++
  7. 1 file changed, 13 insertions(+)
  8. diff --git a/configure b/configure
  9. index 03dc5ab1ca..8b1e7fb65c 100755
  10. --- a/configure
  11. +++ b/configure
  12. @@ -6692,6 +6692,19 @@ enabled stripping || strip="echo skipping strip"
  13. config_files="$TMPH ffbuild/config.mak doc/config.texi"
  14. +if test "${#extralibs}" -gt 3000; then
  15. + extralib_dirs=""
  16. + for extralib_dir in $(printf '%s\n' $LDFLAGS $extralibs | grep '^-L' | tac | awk '!x[$0]++' | tac | tr '\n' ' '); do
  17. + test -d "${extralib_dir#-L}" && extralib_dirs+=" $extralib_dir"
  18. + done
  19. + extralibs_tmp="$(printf '%s\n' $extralibs | grep -v '^-L' | tr '\n' ' ')"
  20. + if test "${#extralibs_tmp}" -gt 2500; then
  21. + extralibs="$(printf '%s\n' $extralib_dirs $extralibs_tmp | tac | awk '!x[$0]++' | tac | tr '\n' ' ')"
  22. + else
  23. + extralibs="$extralib_dirs $extralibs_tmp"
  24. + fi
  25. +fi
  26. +
  27. cat > ffbuild/config.mak <<EOF
  28. # Automatically generated by configure - do not modify!
  29. ifndef FFMPEG_CONFIG_MAK
  30. --
  31. 2.13.0