summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mk/bsd.port.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index c1fd582de3c1..230d96c1037d 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -2825,6 +2825,16 @@ do-configure:
cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
${SCRIPTDIR}/configure; \
fi
+.if defined(GNU_CONFIGURE)
+ @CONFIG_GUESS_DIRS=$$(${FIND} ${WRKDIR} -name config.guess -o -name config.sub \
+ | ${XARGS} -n 1 /usr/bin/dirname); \
+ for _D in $${CONFIG_GUESS_DIRS}; do \
+ ${CP} -f ${TEMPLATES}/config.guess $${_D}/config.guess; \
+ ${CHMOD} a+rx $${_D}/config.guess; \
+ ${CP} -f ${TEMPLATES}/config.sub $${_D}/config.sub; \
+ ${CHMOD} a+rx $${_D}/config.sub; \
+ done
+.endif
.if defined(HAS_CONFIGURE)
@(cd ${CONFIGURE_WRKSRC} && \
if ! ${SETENV} CC="${CC}" CXX="${CXX}" \