ithreads: use runtime (not configure time) detection of perl threads
authorMike Frysinger <vapier@gentoo.org>
Sat, 12 Jan 2013 05:19:40 +0000 (00:19 -0500)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 12 Jan 2013 10:29:34 +0000 (11:29 +0100)
commit182626687f2640609f8eb28ad1b04b078342f2c7
tree9e16590f02f6efd005207e7be5ece5a37dda188d
parentd353dbc3f01357e9bfce59d1720a8cb2498d12bd
ithreads: use runtime (not configure time) detection of perl threads

I can't imagine the runtime checks being a big runtime penalty, so there
shouldn't be a need to do the checks at configure check and hardcode the
result in the generated automake.

With the current system, it means if you change your perl config (build
perl w/threads, build automake, build perl w/out threads), or deploy a
compiled automake package on a different system (build had threads, but
deployed system does not), you get errors when trying to run automake.

So take the logic from configure.ac and move it to the one place where
PERL_THREADS is used (lib/Automake/Config.in) and do the version/config
checking at runtime.

* bootstrap.sh (PERL_THREADS): Delete assignment and use in sed.
* configure.ac (am_cv_prog_PERL_ithreads, PERL_THREADS): Delete all code
related to these two variables.
* lib/Automake/Config.in (perl_threads): Initialize to 0, and only set to
1 if the perl version is at least 5.007_002, and useithreads is in Config.

Copyright-paperwork-exempt: yes
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
bootstrap.sh
configure.ac
lib/Automake/Config.in