diff --git a/configure b/configure index 1050b17e873..9e3c0fff5fd 100755 --- a/configure +++ b/configure @@ -9561,7 +9561,10 @@ $as_echo "$ac_enable_autodepend" >&6; } fi if test $ac_enable_autodepend = yes; then DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' - MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR}' + ## In parallel builds, another make might create depdir between + ## the first test and mkdir, so stick another test on the end. + ## Or use mkinstalldirs? mkdir -p is not portable. + MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' deps_frag=autodeps.mk fi fi