summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2003-07-11 06:30:43 +0000
committerKris Kennaway <kris@FreeBSD.org>2003-07-11 06:30:43 +0000
commit7213e2db1d7de013f33a8ffb0c4a0926f47eb253 (patch)
treee20e0e673db9494e431a602e5e62c74d845af17b /Mk
parentRecognise amd64 machines. (diff)
If GNU_CONFIGURE is defined, replace all instances of config.guess
and config.sub found under ${WRKDIR} with the master versions from ${PORTSDIR}/Template. This allows old ports (which contain old versions of these scripts) to build on newer architectures like ia64 and amd64. Submitted by: naddy (initial patch, reworked by me)
Notes
Notes: svn path=/head/; revision=84648
Diffstat (limited to 'Mk')
-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}" \