From 67d9ac47e7390ba6efd9c71c45e922cab905f208 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 21 Aug 2008 02:08:33 +0200 Subject: [PATCH] Make it possible to compile autoconf tests remotely If $DISTCC_AUTOCONF_REMOTE is set to "1", then configuration tests will be compiled remotely as well. This can be dangerous in case the remote machines are not available (all configuration test will fail), but it may speed up the configure part if the remote machines are faster then the host machine. --- man/distcc.1 | 6 ++++++ src/filename.c | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletions(-) diff --git a/man/distcc.1 b/man/distcc.1 index 96c7ee2..2082380 100644 --- a/man/distcc.1 +++ b/man/distcc.1 @@ -682,6 +682,12 @@ and the succeeding local compilation. .TP .B "DCC_EMAILLOG_WHOM_TO_BLAME" The email address for discrepancy email; the default is "distcc-pump-errors". +.TP +.B "DISTCC_AUTOCONF_REMOTE" +If set to "1", then configuration tests will be compiled remotely as +well. This can be dangerous in case the remote machines are not +available (all configuration test will fail), but it may speed up the +configure part if the remote machines are faster then the host machine. .SH "CROSS COMPILING" Cross compilation means building programs to run on a machine with a different processor, architecture, or diff --git a/src/filename.c b/src/filename.c index 9b23b38..9ca9e3e 100644 --- a/src/filename.c +++ b/src/filename.c @@ -290,11 +290,23 @@ int dcc_is_object(const char *filename) } -/* Some files should always be built locally... */ +/** + * Some files should always be built locally... + * + * If $DISTCC_AUTOCONF_REMOTE is set to "1", then configuration tests + * will be compiled remotely as well. This can be dangerous in case the + * remote machines are not available (all configuration test will fail), + * but it may speed up the configure part if the remote machines are + * faster then the host machine. + **/ int dcc_source_needs_local(const char *filename) { const char *p; + int autoconf_remote = dcc_getenv_bool("DISTCC_AUTOCONF_REMOTE", 0); + + if (autoconf_remote) + return 0; p = dcc_find_basename(filename);