aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2024-05-01 19:40:00 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2024-05-01 19:40:00 +0200
commit476688095f5f5ecb4e3b1d77f96eecf7de7e3c3c (patch)
treea51ca616dd5259f2980a3c9689490b41fbdd3fc0 /configure
parent95edaf72b4825f8d89627e2f91a1bed6d868ab1b (diff)
downloadffmpeg-476688095f5f5ecb4e3b1d77f96eecf7de7e3c3c.tar.gz
configure: handle xargs versions that exec empty commands
Some versions of xargs don't run any commands if no input is given, others do run it at least once, causing errors. Pass -r to xargs to avoid that behaviour and never run empty commands.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure b/configure
index 89af5f75e7..6f3746ce35 100755
--- a/configure
+++ b/configure
@@ -5037,7 +5037,7 @@ probe_cc(){
_ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r')
fi
if [ -x "$(command -v wslpath)" ]; then
- _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); if (!match($$0, / /)) { print $$0 } }'\'' | xargs -d\\n -n1 wslpath -u | awk '\''BEGIN { printf "%s:", "$@" }; { sub(/\r/,""); printf " %s", $$0 }; END { print "" }'\'' > $(@:.o=.d)'
+ _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); if (!match($$0, / /)) { print $$0 } }'\'' | xargs -r -d\\n -n1 wslpath -u | awk '\''BEGIN { printf "%s:", "$@" }; { sub(/\r/,""); printf " %s", $$0 }; END { print "" }'\'' > $(@:.o=.d)'
else
_DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'