summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-10-26 19:29:25 +0100
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-10-26 19:35:07 +0100
commit937775c8efa56c28891748aa75ab540a7a884315 (patch)
tree254db483a73695dafc72fa661469af14060845f7 /configure
parent2b85923e0b06f7f633b7f9f18bdec2b16ec5d958 (diff)
downloadautomake-937775c8efa56c28891748aa75ab540a7a884315.tar.gz
Parallel automake execution: AUTOMAKE_JOBS.
* lib/Automake/Config.in (perl_threads): New global. * automake.in: Use it. If the perl supports interpreter-based threading, then use `threads' and `Thread::Queue'. (handle_makefile, handle_makefiles_serial): New functions, factored out from main. (get_number_of_threads): New function, compute number of threads to use, based on environment variable `AUTOMAKE_JOBS' and number of independent makefiles. (handle_makefiles_threaded): New function. Spawn threads, use thread queue to distribute handling the different makefiles. Collect $exit_code values from threads. (main): Use new functions. * aclocal.in: No threads here. * configure.ac: Substitute PERL_THREADS; enabled with perl >= 5.7.2 and when ithreads are available. * bootstrap (dosubst): Likewise. * Makefile.am (do_subst): Likewise. * lib/Automake/Makefile.am (do_subst): Likewise. * lib/Automake/ChannelDefs.pm: Use `Automake::Config' and `threads'. (verb): Prepend thread ID (tid) to verbose messages. * lib/Automake/Channels.pm (msg): Before exiting, flush stderr, needed for worker threads. * lib/Automake/tests/Makefile.am (TESTS_ENVIRONMENT): Also include the build tree path, so Config.pm is found. * tests/parallel-am.test: New test. * tests/Makefile.am: Update. * doc/automake.texi (Invoking Automake): Document AUTOMAKE_JOBS. * NEWS, THANKS: Update. Report about long execution times by Joakim Tjernlund and others. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 32 insertions, 0 deletions
diff --git a/configure b/configure
index 235f1a0ba..9452a620f 100755
--- a/configure
+++ b/configure
@@ -610,6 +610,7 @@ MODIFICATION_DELAY
LN
HELP2MAN
TEX
+PERL_THREADS
PERL
pkgvdatadir
APIVERSION
@@ -2378,6 +2379,37 @@ installed, select the one Automake should use using
{ (exit 1); exit 1; }; }
}
+# We require ithreads support, and version 5.7.2 for CLONE.
+{ $as_echo "$as_me:$LINENO: checking whether $PERL supports ithreads" >&5
+$as_echo_n "checking whether $PERL supports ithreads... " >&6; }
+if test "${am_cv_prog_PERL_ithreads+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if $PERL -e '
+ require 5.007_002;
+ use Config;
+ if ($Config{useithreads})
+ {
+ use threads;
+ use Thread::Queue;
+ exit 0;
+ }
+ exit 1;' >&5 2>&1
+then
+ am_cv_prog_PERL_ithreads=yes
+else
+ am_cv_prog_PERL_ithreads=no
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_prog_PERL_ithreads" >&5
+$as_echo "$am_cv_prog_PERL_ithreads" >&6; }
+if test $am_cv_prog_PERL_ithreads = yes; then
+ PERL_THREADS=1;
+else
+ PERL_THREADS=0;
+fi
+
+
# The test suite will skip some tests if tex is absent.
# Extract the first word of "tex", so it can be a program name with args.
set dummy tex; ac_word=$2