[svn:parrot] r47318 - in trunk: . compilers/data_json compilers/imcc compilers/pct compilers/pge compilers/tge config/auto config/auto/cpu/i386 config/auto/cpu/ppc config/auto/cpu/sun4 config/auto/cpu/x86_64 config/auto/sizes config/auto/zlib config/gen config/init config/init/hints config/inter docs/book/draft docs/book/pct docs/dev docs/pdds examples/embed examples/languages/abc examples/languages/squaak examples/pge ext/nqp-rx include/parrot lib/Parrot lib/Parrot/Configure/Step ports/cygwin ports/debian ports/fedora/2.3.0 ports/suse/2.2.0 runtime/parrot/languages runtime/parrot/library runtime/parrot/library/Math src/call src/gc src/interp src/runcore t/compilers/tge t/oo t/pmc t/src t/steps/auto t/steps/gen t/steps/init t/steps/init/hints t/steps/inter tools/build tools/dev tools/util

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Thu Jun 3 01:36:47 UTC 2010


Author: jkeenan
Date: Thu Jun  3 01:36:45 2010
New Revision: 47318
URL: https://trac.parrot.org/parrot/changeset/47318

Log:
Merge tt1452_configure_debug branch into trunk.  Implements Parrot::Configure::debug().

Deleted:
   trunk/config/auto/extra_nci_thunks.pm
   trunk/t/steps/auto/extra_nci_thunks-01.t
Modified:
   trunk/   (props changed)
   trunk/MANIFEST
   trunk/compilers/data_json/Rules.mak   (props changed)
   trunk/compilers/imcc/Rules.in   (props changed)
   trunk/compilers/pct/Rules.mak   (props changed)
   trunk/compilers/pge/Rules.mak   (props changed)
   trunk/compilers/tge/Rules.mak   (props changed)
   trunk/config/auto/arch.pm
   trunk/config/auto/attributes.pm
   trunk/config/auto/cpu.pm
   trunk/config/auto/cpu/i386/auto.pm
   trunk/config/auto/cpu/ppc/auto.pm
   trunk/config/auto/cpu/sun4/auto.pm
   trunk/config/auto/cpu/x86_64/auto.pm
   trunk/config/auto/ctags.pm
   trunk/config/auto/env.pm
   trunk/config/auto/gc.pm
   trunk/config/auto/gcc.pm
   trunk/config/auto/gettext.pm
   trunk/config/auto/gmp.pm
   trunk/config/auto/headers.pm
   trunk/config/auto/icu.pm
   trunk/config/auto/inline.pm
   trunk/config/auto/isreg.pm
   trunk/config/auto/memalign.pm
   trunk/config/auto/msvc.pm
   trunk/config/auto/neg_0.pm
   trunk/config/auto/opengl.pm
   trunk/config/auto/pcre.pm
   trunk/config/auto/readline.pm
   trunk/config/auto/signal.pm
   trunk/config/auto/sizes/intval_maxmin_c.in   (props changed)
   trunk/config/auto/snprintf.pm
   trunk/config/auto/thread.pm
   trunk/config/auto/warnings.pm
   trunk/config/auto/zlib/   (props changed)
   trunk/config/auto/zlib.pm
   trunk/config/gen/opengl.pm
   trunk/config/gen/platform.pm
   trunk/config/init/defaults.pm
   trunk/config/init/hints.pm
   trunk/config/init/hints/darwin.pm
   trunk/config/init/hints/linux.pm
   trunk/config/init/optimize.pm
   trunk/config/inter/libparrot.pm
   trunk/config/inter/progs.pm
   trunk/docs/book/draft/README   (props changed)
   trunk/docs/book/draft/appa_glossary.pod   (props changed)
   trunk/docs/book/draft/appb_patch_submission.pod   (props changed)
   trunk/docs/book/draft/appc_command_line_options.pod   (props changed)
   trunk/docs/book/draft/appd_build_options.pod   (props changed)
   trunk/docs/book/draft/appe_source_code.pod   (props changed)
   trunk/docs/book/draft/ch01_introduction.pod   (props changed)
   trunk/docs/book/draft/ch02_getting_started.pod   (props changed)
   trunk/docs/book/draft/ch07_dynpmcs.pod   (props changed)
   trunk/docs/book/draft/ch08_dynops.pod   (props changed)
   trunk/docs/book/draft/ch10_opcode_reference.pod   (props changed)
   trunk/docs/book/draft/ch11_directive_reference.pod   (props changed)
   trunk/docs/book/draft/ch12_operator_reference.pod   (props changed)
   trunk/docs/book/draft/chXX_hlls.pod   (props changed)
   trunk/docs/book/draft/chXX_library.pod   (props changed)
   trunk/docs/book/draft/chXX_testing_and_debugging.pod   (props changed)
   trunk/docs/book/pct/ch01_introduction.pod   (props changed)
   trunk/docs/book/pct/ch02_getting_started.pod   (props changed)
   trunk/docs/book/pct/ch03_compiler_tools.pod   (props changed)
   trunk/docs/book/pct/ch04_pge.pod   (props changed)
   trunk/docs/book/pct/ch05_nqp.pod   (props changed)
   trunk/docs/dev/c_functions.pod   (props changed)
   trunk/docs/pdds/pdd30_install.pod   (props changed)
   trunk/examples/embed/cotorra.c   (props changed)
   trunk/examples/languages/abc/   (props changed)
   trunk/examples/languages/squaak/   (props changed)
   trunk/examples/pge/demo.pir   (props changed)
   trunk/ext/nqp-rx/Rules.mak   (props changed)
   trunk/include/parrot/call.h   (props changed)
   trunk/include/parrot/gc_api.h   (props changed)
   trunk/include/parrot/runcore_api.h   (props changed)
   trunk/include/parrot/runcore_profiling.h   (props changed)
   trunk/include/parrot/runcore_trace.h   (props changed)
   trunk/lib/Parrot/Configure.pm
   trunk/lib/Parrot/Configure/Step/List.pm
   trunk/lib/Parrot/Configure/Step/Test.pm   (props changed)
   trunk/lib/Parrot/H2inc.pm   (props changed)
   trunk/ports/cygwin/parrot-1.0.0-1.cygport   (props changed)
   trunk/ports/debian/libparrot-dev.install.in   (props changed)
   trunk/ports/debian/libparrot.install.in   (props changed)
   trunk/ports/debian/parrot-doc.install.in   (props changed)
   trunk/ports/debian/parrot.install.in   (props changed)
   trunk/ports/fedora/2.3.0/   (props changed)
   trunk/ports/suse/2.2.0/   (props changed)
   trunk/runtime/parrot/languages/   (props changed)
   trunk/runtime/parrot/library/Math/Rand.pir   (props changed)
   trunk/runtime/parrot/library/Rules.mak   (props changed)
   trunk/src/call/ops.c   (props changed)
   trunk/src/call/pcc.c   (props changed)
   trunk/src/gc/alloc_memory.c   (props changed)
   trunk/src/gc/alloc_resources.c   (props changed)
   trunk/src/gc/api.c   (props changed)
   trunk/src/gc/malloc.c   (props changed)
   trunk/src/gc/malloc_trace.c   (props changed)
   trunk/src/gc/mark_sweep.c   (props changed)
   trunk/src/gc/system.c   (props changed)
   trunk/src/interp/inter_cb.c   (props changed)
   trunk/src/interp/inter_create.c   (props changed)
   trunk/src/interp/inter_misc.c   (props changed)
   trunk/src/runcore/cores.c   (props changed)
   trunk/src/runcore/main.c   (props changed)
   trunk/src/runcore/profiling.c   (props changed)
   trunk/src/runcore/trace.c   (props changed)
   trunk/t/compilers/tge/NoneGrammar.tg   (props changed)
   trunk/t/oo/root_new.t   (props changed)
   trunk/t/pmc/namespace-old.t   (props changed)
   trunk/t/src/embed.t   (props changed)
   trunk/t/steps/auto/ctags-01.t
   trunk/t/steps/auto/gettext-01.t
   trunk/t/steps/auto/gmp-01.t
   trunk/t/steps/auto/icu-01.t
   trunk/t/steps/auto/msvc-01.t
   trunk/t/steps/auto/neg_0-01.t
   trunk/t/steps/auto/opengl-01.t
   trunk/t/steps/auto/pcre-01.t
   trunk/t/steps/auto/readline-02.t
   trunk/t/steps/auto/zlib-01.t
   trunk/t/steps/gen/opengl-01.t
   trunk/t/steps/gen/platform-01.t
   trunk/t/steps/init/defaults-01.t
   trunk/t/steps/init/hints/darwin-01.t
   trunk/t/steps/init/hints/linux-01.t   (contents, props changed)
   trunk/t/steps/inter/libparrot-01.t
   trunk/tools/build/h2inc.pl   (props changed)
   trunk/tools/dev/fetch_languages.pl   (props changed)
   trunk/tools/dev/mk_gitignore.pl   (props changed)
   trunk/tools/util/perlcritic-cage.conf   (props changed)

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/MANIFEST	Thu Jun  3 01:36:45 2010	(r47318)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Sat May 29 07:05:55 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Mon May 31 01:10:45 2010 UT
 #
 # See below for documentation on the format of this file.
 #
@@ -189,7 +189,6 @@
 config/auto/env.pm                                          []
 config/auto/env/test_setenv_c.in                            []
 config/auto/env/test_unsetenv_c.in                          []
-config/auto/extra_nci_thunks.pm                             []
 config/auto/format.pm                                       []
 config/auto/frames.pm                                       []
 config/auto/frames/test_exec_cygwin_c.in                    []
@@ -1968,7 +1967,6 @@
 t/steps/auto/cpu-01.t                                       [test]
 t/steps/auto/ctags-01.t                                     [test]
 t/steps/auto/env-01.t                                       [test]
-t/steps/auto/extra_nci_thunks-01.t                          [test]
 t/steps/auto/format-01.t                                    [test]
 t/steps/auto/frames-01.t                                    [test]
 t/steps/auto/gc-01.t                                        [test]

Modified: trunk/config/auto/arch.pm
==============================================================================
--- trunk/config/auto/arch.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/arch.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -42,8 +42,7 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-    $verbose and print "\n";
+    $conf->debug("\n");
 
     my $archname = $conf->data->get('archname');
     # This was added to convert IA64.ARCHREV_0 on HP-UX, TT #645, TT #653
@@ -51,10 +50,10 @@
     my ( $cpuarch, $osname ) = split( /-/, $archname );
 
 
-    if ($verbose) {
-        print "determining operating system and cpu architecture\n";
-        print "archname: $archname\n";
-    }
+    $conf->debug(
+        "determining operating system and cpu architecture\n",
+        "archname: $archname\n")
+    ;
 
     if ( !defined $osname ) {
         ( $osname, $cpuarch ) = ( $cpuarch, q{} );
@@ -127,12 +126,11 @@
 
 sub _report_verbose {
     my ($conf) = @_;
-    my $verbose = $conf->options->get( 'verbose' );
-    if ( $verbose ) {
-        print "osname:   ", $conf->data->get('osname'), "\n";
-        print "cpuarch:  ", $conf->data->get('cpuarch'), "\n";
-        print "platform: ", $conf->data->get('platform'), "\n";
-    }
+    $conf->debug(
+        "osname:   ", $conf->data->get('osname'), "\n",
+        "cpuarch:  ", $conf->data->get('cpuarch'), "\n",
+        "platform: ", $conf->data->get('platform'), "\n",
+    );
     return 1;
 }
 

Modified: trunk/config/auto/attributes.pm
==============================================================================
--- trunk/config/auto/attributes.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/attributes.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -49,21 +49,20 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-    print "\n" if $verbose;
+    $conf->debug("\n");
 
     for my $maybe_attr (@potential_attributes) {
-        $self->try_attr( $conf, $maybe_attr, $verbose );
+        $self->try_attr( $conf, $maybe_attr);
     }
     return 1;
 }
 
 sub try_attr {
-    my ( $self, $conf, $attr, $verbose ) = @_;
+    my ( $self, $conf, $attr ) = @_;
 
     my $output_file = 'test.cco';
 
-    $verbose and print "trying attribute '$attr'\n";
+    $conf->debug("trying attribute '$attr'\n");
 
     my $cc = $conf->option_or_data('cc');
     $conf->cc_gen('config/auto/attributes/test_c.in');
@@ -79,29 +78,29 @@
     my $tryflags = "$ccflags -D$attr $disable_warnings";
 
     my $command_line = Parrot::Configure::Utils::_build_compile_command( $cc, $tryflags );
-    $verbose and print "  ", $command_line, "\n";
+    $conf->debug("  ", $command_line, "\n");
 
     # Don't use cc_build, because failure is expected.
     my $exit_code =
         Parrot::Configure::Utils::_run_command( $command_line, $output_file, $output_file );
-    $verbose and print "  exit code: $exit_code\n";
+    $conf->debug("  exit code: $exit_code\n");
 
     $conf->cc_clean();
     $conf->data->set( $attr => !$exit_code | 0 );
 
     if ($exit_code) {
         unlink $output_file or die "Unable to unlink $output_file: $!";
-        $verbose and print "Rejecting bogus attribute:  $attr\n";
+        $conf->debug("Rejecting bogus attribute:  $attr\n");
         return;
     }
 
     my $output = Parrot::BuildUtil::slurp_file($output_file);
-    $verbose and print "  output: $output\n";
+    $conf->debug("  output: $output\n");
 
     if ( $output !~ /error|warning/i ) {
         $conf->data->set( ccflags => $tryflags );
         my $ccflags = $conf->data->get("ccflags");
-        $verbose and print "  ccflags: $ccflags\n";
+        $conf->debug("  ccflags: $ccflags\n");
     }
     unlink $output_file or die "Unable to unlink $output_file: $!";
 

Modified: trunk/config/auto/cpu.pm
==============================================================================
--- trunk/config/auto/cpu.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/cpu.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -32,20 +32,18 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-
     $conf->data->add( ' ', TEMP_atomic_o => '' );    # assure a default
 
     my $hints = "auto::cpu::" . $conf->data->get('cpuarch') . "::auto";
 
-    print "\t(cpu hints = '$hints') " if $verbose;
+    $conf->debug("\t(cpu hints = '$hints') ");
 
     eval "use $hints";
     unless ($@) {
         $hints->runstep( $conf, @_ );
     }
     else {
-        print "(no cpu specific hints)" if $verbose;
+        $conf->debug("(no cpu specific hints)");
     }
 
     return 1;

Modified: trunk/config/auto/cpu/i386/auto.pm
==============================================================================
--- trunk/config/auto/cpu/i386/auto.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/cpu/i386/auto.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -22,21 +22,19 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-
     my @files = qw( test_gcc_cmpxchg_c.in );
     for my $f (@files) {
-        print " $f " if $verbose;
+        $conf->debug(" $f ");
         my ($suffix) = $f =~ /test_(\w+)/;
         my $path_f = "config/auto/cpu/i386/$f";
         $conf->cc_gen($path_f);
         eval { $conf->cc_build("-DPARROT_CONFIG_TEST") };
         if ($@) {
-            print " $@ " if $verbose;
+            $conf->debug(" $@ ");
         }
         else {
             if ( $conf->cc_run() =~ /ok/ ) {
-                _handle_cc_run_ok($conf, $suffix, $path_f, $verbose);
+                _handle_cc_run_ok($conf, $suffix, $path_f);
             }
         }
         $conf->cc_clean();
@@ -45,12 +43,12 @@
 }
 
 sub _handle_cc_run_ok {
-    my ($conf, $suffix, $path_f, $verbose) = @_;
+    my ($conf, $suffix, $path_f) = @_;
     $conf->data->set(
         "i386_has_$suffix" => '1',
         "HAS_i386_$suffix" => '1',
     );
-    print " (\U$suffix) " if ($verbose);
+    $conf->debug(" (\U$suffix) ");
     $conf->data->add( ' ', TEMP_generated => $path_f );
 }
 

Modified: trunk/config/auto/cpu/ppc/auto.pm
==============================================================================
--- trunk/config/auto/cpu/ppc/auto.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/cpu/ppc/auto.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -19,17 +19,15 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-
     my @files = qw( test_gcc_cmpset_c.in );
     for my $f (@files) {
-        print " $f " if $verbose;
+        $conf->debug(" $f ");
         my ($suffix) = $f =~ /test_(\w+)/;
         $f = "config/auto/cpu/ppc/$f";
         $conf->cc_gen($f);
         eval { $conf->cc_build("-DPARROT_CONFIG_TEST") };
         if ($@) {
-            print " $@ " if $verbose;
+            $conf->debug(" $@ ");
         }
         else {
             if ( $conf->cc_run() =~ /ok/ ) {
@@ -37,7 +35,7 @@
                     "ppc_has_$suffix" => '1',
                     "HAS_PPC_$suffix" => '1',
                 );
-                print " (\U$suffix) " if ($verbose);
+                $conf->debug(" (\U$suffix) ");
                 $conf->data->add( ' ', TEMP_generated => $f );
             }
         }

Modified: trunk/config/auto/cpu/sun4/auto.pm
==============================================================================
--- trunk/config/auto/cpu/sun4/auto.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/cpu/sun4/auto.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -40,19 +40,17 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-
     build_asm( $self, $conf );
 
     my @files = qw( test_atomic_c.in );
     for my $f (@files) {
-        print " $f " if $verbose;
+        $conf->debug(" $f ");
         my ($suffix) = $f =~ /test_(\w+)/;
         $f = "config/auto/cpu/sun4/$f";
         $conf->cc_gen($f);
         eval { $conf->cc_build("-DPARROT_CONFIG_TEST", "sparcasm" . $conf->data->get('o') ) };
         if ($@) {
-            print " $@ " if $verbose;
+            $conf->debug(" $@ ");
         }
         else {
             if ( $conf->cc_run() =~ /ok/ ) {
@@ -60,7 +58,7 @@
                     "sparc_has_$suffix" => '1',
                     "HAS_SPARC_$suffix" => '1',
                 );
-                print " (\U$suffix) " if ($verbose);
+                $conf->debug(" (\U$suffix) ");
                 $conf->data->add( ' ', TEMP_atomic_o => 'src/atomic/sparc_v9.o' );
             }
         }

Modified: trunk/config/auto/cpu/x86_64/auto.pm
==============================================================================
--- trunk/config/auto/cpu/x86_64/auto.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/cpu/x86_64/auto.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -20,8 +20,6 @@
     my ( $self, $conf ) = @_;
 
     # x86_64 is recently new and has cmpxchg
-
-    my $verbose = $conf->options->get('verbose');
     my $gcc     = $conf->data->get('gccversion');
 
     # when running on gcc, we just define the config item

Modified: trunk/config/auto/ctags.pm
==============================================================================
--- trunk/config/auto/ctags.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/ctags.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -40,11 +40,10 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get( 'verbose' );
-    print "\n" if $verbose;
+    $conf->debug("\n");
 
     my ($ctags, $has_ctags) =
-        _probe_for_ctags($conf, [ @ctags_variations ], $verbose);
+        _probe_for_ctags($conf, [ @ctags_variations ]);
     $self->_evaluate_ctags($conf, $ctags, $has_ctags);
     return 1;
 }
@@ -52,12 +51,11 @@
 sub _probe_for_ctags {
     my $conf = shift;
     my $variations_ref = shift;
-    my $verbose = shift;
     my ($ctags, $has_ctags);
     while (defined (my $t = shift(@$variations_ref))) {
         my $output = capture_output( $t, '--version' ) || '';
-        print $output, "\n" if $verbose;
-        $has_ctags = _probe_for_ctags_output($output, $verbose);
+        $conf->debug("$output\n");
+        $has_ctags = _probe_for_ctags_output($conf, $output);
         $ctags = $t if $has_ctags;
         last if $has_ctags;
     }
@@ -65,9 +63,9 @@
 }
 
 sub _probe_for_ctags_output {
-    my ($output, $verbose) = @_;
+    my ($conf, $output) = @_;
     my $has_ctags = ( $output =~ m/Exuberant Ctags/ ) ? 1 : 0;
-    print $has_ctags, "\n" if $verbose;
+    $conf->debug("$has_ctags\n");
     return $has_ctags;
 }
 

Modified: trunk/config/auto/env.pm
==============================================================================
--- trunk/config/auto/env.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/env.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -57,26 +57,25 @@
 
 sub _evaluate_env {
     my ($self, $conf, $setenv, $unsetenv) = @_;
-    my $verbose = $conf->options->get('verbose');
     $conf->data->set(
         setenv   => $setenv,
         unsetenv => $unsetenv
     );
 
     if ( $setenv && $unsetenv ) {
-        print " (both) " if $verbose;
+        $conf->debug(" (both) ");
         $self->set_result('both');
     }
     elsif ($setenv) {
-        print " (setenv) " if $verbose;
+        $conf->debug(" (setenv) ");
         $self->set_result('setenv');
     }
     elsif ($unsetenv) {
-        print " (unsetenv) " if $verbose;
+        $conf->debug(" (unsetenv) ");
         $self->set_result('unsetenv');
     }
     else {
-        print " (no) " if $verbose;
+        $conf->debug(" (no) ");
         $self->set_result('no');
     }
 }

Deleted: trunk/config/auto/extra_nci_thunks.pm
==============================================================================
--- trunk/config/auto/extra_nci_thunks.pm	Thu Jun  3 01:36:45 2010	(r47317)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,54 +0,0 @@
-# Copyright (C) 2010, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-config/auto/extra_nci_thunks - Static NCI Frame Building
-
-=head1 DESCRIPTION
-
-If C<--without-extra-nci-thunks> is specified, builds parrot without NCI thunks
-not required by core.
-
-=cut
-
-package auto::extra_nci_thunks;
-
-use strict;
-use warnings;
-
-use base 'Parrot::Configure::Step';
-
-sub _init {
-    my $self = shift;
-    return {
-        description => 'Determine whether to build extra NCI thunks',
-    };
-}
-
-sub runstep {
-    my ($self, $conf) = @_;
-    my $without = $conf->options->get( 'without-extra-nci-thunks' );
-
-    if ($without) {
-        $conf->data->set( has_extra_nci_thunks => 0 );
-        $conf->data->set( HAS_EXTRA_NCI_THUNKS => 0 );
-        $self->set_result( 'no' );
-    }
-    else {
-        $conf->data->set( has_extra_nci_thunks => 1 );
-        $conf->data->set( HAS_EXTRA_NCI_THUNKS => 1 );
-        $self->set_result( 'yes' );
-    }
-
-    return 1;
-}
-
-1;
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: trunk/config/auto/gc.pm
==============================================================================
--- trunk/config/auto/gc.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/gc.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -50,7 +50,7 @@
         TEMP_gc_o => "src/gc/alloc_resources\$(O)",
         gc_flag   => '',
     );
-    print(" ($gc) ") if $conf->options->get('verbose');
+    $conf->debug(" ($gc) ");
 
     return 1;
 }

Modified: trunk/config/auto/gcc.pm
==============================================================================
--- trunk/config/auto/gcc.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/gcc.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -62,9 +62,8 @@
     my $minor = $gnucref->{__GNUC_MINOR__};
     my $intel = $gnucref->{__INTEL_COMPILER};
 
-    my $verbose = $conf->options->get('verbose');
     if ( defined $intel || !defined $major ) {
-        print " (no) " if $verbose;
+        $conf->debug(" (no) ");
         $self->set_result('no');
         $conf->data->set( gccversion => undef );
         return 1;
@@ -76,7 +75,7 @@
         undef $minor;    # Don't use it
     }
     if ( ! defined $major ) {
-        print " (no) " if $verbose;
+        $conf->debug(" (no) ");
         $self->set_result('no');
         $conf->data->set( gccversion => undef );
         return 1;

Modified: trunk/config/auto/gettext.pm
==============================================================================
--- trunk/config/auto/gettext.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/gettext.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -37,12 +37,7 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my ( $verbose, $without ) = $conf->options->get(
-        qw|
-            verbose
-            without-gettext
-        |
-    );
+    my $without = $conf->options->get( qw| without-gettext | );
 
     if ($without) {
         $conf->data->set( has_gettext => 0 );
@@ -66,10 +61,10 @@
     my $has_gettext = 0;
     if ( !$@ ) {
         my $test = $conf->cc_run();
-        $has_gettext = $self->_evaluate_cc_run($test, $verbose);
+        $has_gettext = $self->_evaluate_cc_run($conf, $test);
     }
     if ($has_gettext) {
-        _handle_gettext($conf, $verbose, $extra_libs);
+        _handle_gettext($conf, $extra_libs);
     }
     $conf->data->set( HAS_GETTEXT => $has_gettext );
 
@@ -77,22 +72,21 @@
 }
 
 sub _evaluate_cc_run {
-    my $self = shift;
-    my ($test, $verbose) = @_;
+    my ($self, $conf, $test) = @_;
     my $has_gettext = 0;
     if ( $test eq "Hello, world!\n" ) {
         $has_gettext = 1;
-        print " (yes) " if $verbose;
+        $conf->debug(" (yes) ");
         $self->set_result('yes');
     }
     return $has_gettext;
 }
 
 sub _handle_gettext {
-    my ($conf, $verbose, $libs) = @_;
+    my ($conf, $libs) = @_;
     $conf->data->add( ' ', ccflags => "-DHAS_GETTEXT" );
     $conf->data->add( ' ', libs => $libs );
-    $verbose and print "\n  ccflags: ", $conf->data->get("ccflags"), "\n";
+    $conf->debug("\n  ccflags: ", $conf->data->get("ccflags"), "\n");
     return 1;
 }
 

Modified: trunk/config/auto/gmp.pm
==============================================================================
--- trunk/config/auto/gmp.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/gmp.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -43,12 +43,7 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my ( $verbose, $without ) = $conf->options->get(
-        qw|
-            verbose
-            without-gmp
-        |
-    );
+    my $without = $conf->options->get( qw| without-gmp | );
 
     if ($without) {
         $conf->data->set( has_gmp => 0 );
@@ -71,7 +66,7 @@
     my $has_gmp = 0;
     if ( !$@ ) {
         my $test = $conf->cc_run();
-        $has_gmp = $self->_evaluate_cc_run( $conf, $test, $has_gmp, $verbose );
+        $has_gmp = $self->_evaluate_cc_run( $conf, $test, $has_gmp );
     }
     if ($has_gmp) {
         $conf->data->add( ' ', libs => $extra_libs );
@@ -82,10 +77,10 @@
 }
 
 sub _evaluate_cc_run {
-    my ($self, $conf, $test, $has_gmp, $verbose) = @_;
+    my ($self, $conf, $test, $has_gmp) = @_;
     if ( $test eq $self->{cc_run_expected} ) {
         $has_gmp = 1;
-        print " (yes) " if $verbose;
+        $conf->debug(" (yes) ");
         $self->set_result('yes');
 
         $conf->data->set(

Modified: trunk/config/auto/headers.pm
==============================================================================
--- trunk/config/auto/headers.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/headers.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -64,7 +64,7 @@
         my $flag = "i_$header";
         $flag =~ s/\.h$//g;
         $flag =~ s/\///g;
-        print "$flag: $pass\n" if defined $conf->options->get('verbose');
+        $conf->debug("$flag: $pass\n");
         $conf->data->set( $flag => $pass ? 'define' : undef );
     }
 

Modified: trunk/config/auto/icu.pm
==============================================================================
--- trunk/config/auto/icu.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/icu.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -46,9 +46,8 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my ( $verbose, $icushared_opt, $icuheaders_opt,
+    my ( $icushared_opt, $icuheaders_opt,
         $icuconfig_opt, $without_opt ) = $conf->options->get( qw|
-            verbose
             icushared
             icuheaders
             icu-config
@@ -101,21 +100,21 @@
                         ( ! defined($icuheaders) );
 
     my $without = 0;
-    ($icuconfig, $autodetect, $without) =
-        $self->_handle_autodetect( {
+    ($icuconfig, $autodetect, $without) = $self->_handle_autodetect(
+        $conf,
+        {
             icuconfig   => $icuconfig,
             autodetect  => $autodetect,
             without     => $without,
-            verbose     => $verbose,
-    } );
+        }
+    );
     # Inside _handle_autodetect(), $without can be set to 1 by
     # _handle_search_for_icu_config().  In that case, we're abandoning our
     # attempt to configure with ICU and so may return here.
     # 2nd possible return point
     if ( $without ) {
         $self->_set_no_configure_with_icu($conf, q{no icu-config});
-        print "Could not locate an icu-config program\n"
-            if $verbose;
+        $conf->debug("Could not locate an icu-config program\n");
         return 1;
     }
 
@@ -126,7 +125,6 @@
                 without         => $without,
                 autodetect      => $autodetect,
                 icuconfig       => $icuconfig,
-                verbose         => $verbose,
                 icushared       => $icushared,
                 icuheaders      => $icuheaders,
             },
@@ -137,7 +135,7 @@
         return 1;
     }
 
-    _verbose_report($verbose, $icuconfig, $icushared, $icuheaders);
+    _verbose_report($conf, $icuconfig, $icushared, $icuheaders);
 
     $icuheaders = $self->_handle_icuconfig_errors( {
         icushared   => $icushared,
@@ -169,7 +167,6 @@
         $conf,
         {
             ccflags_status  => $ccflags_status,
-            verbose         => $verbose,
             icuheaders      => $icuheaders,
         },
     );
@@ -222,8 +219,7 @@
 }
 
 sub _handle_search_for_icu_config {
-    my $self = shift;
-    my $arg = shift;
+    my ($self, $conf, $arg) = @_;
     if ( $arg->{ret} ) {
         undef $arg->{icuconfig};
         $arg->{autodetect} = 0;
@@ -231,40 +227,38 @@
     }
     else {
         $arg->{icuconfig} = $self->{icuconfig_default};
-        if ($arg->{verbose}) {
-            print "icu-config found... good!\n";
-        }
+        $conf->debug("icu-config found... good!\n");
     }
     return ( $arg->{icuconfig}, $arg->{autodetect}, $arg->{without} );
 }
 
 sub _handle_autodetect {
-    my $self = shift;
-    my $arg = shift;
+    my ($self, $conf, $arg) = @_;
     if ( $arg->{autodetect} ) {
         if ( ! $arg->{icuconfig} ) {
 
             my ( undef, undef, $ret ) =
                 capture_output( $self->{icuconfig_default}, "--exists" );
 
-            print "Discovered $self->{icuconfig_default} --exists returns $ret\n"
-                if $arg->{verbose};
+            $conf->debug("Discovered $self->{icuconfig_default} --exists returns $ret\n");
 
             ($arg->{icuconfig}, $arg->{autodetect}, $arg->{without}) =
-                $self->_handle_search_for_icu_config( {
-                    icuconfig   => $arg->{icuconfig},
-                    autodetect  => $arg->{autodetect},
-                    without     => $arg->{without},
-                    verbose     => $arg->{verbose},
-                    ret         => $ret,
-            } );
+                $self->_handle_search_for_icu_config(
+                    $conf,
+                    {
+                        icuconfig   => $arg->{icuconfig},
+                        autodetect  => $arg->{autodetect},
+                        without     => $arg->{without},
+                        ret         => $ret,
+                    }
+                );
         }
     } # end $autodetect true
     else {
-        if ($arg->{verbose}) {
-            print "Specified an ICU config parameter,\n";
-            print "ICU autodetection disabled.\n";
-        }
+        $conf->debug(
+            "Specified an ICU config parameter,\n",
+            "ICU autodetection disabled.\n",
+        );
     } # end $autodetect false
     return ( $arg->{icuconfig}, $arg->{autodetect}, $arg->{without} );
 }
@@ -285,28 +279,22 @@
         $arg->{icuconfig}
     ) {
         # ldflags
-        print "Trying $arg->{icuconfig} with '--ldflags'\n"
-            if $arg->{verbose};
+        $conf->debug("Trying $arg->{icuconfig} with '--ldflags'\n");
         $icushared = capture_output("$arg->{icuconfig} --ldflags");
         chomp $icushared;
-        print "icushared:  captured $icushared\n"
-            if $arg->{verbose};
+        $conf->debug("icushared:  captured $icushared\n");
         ($icushared, $arg->{without}) =
             $self->_handle_icushared($icushared, $arg->{without});
-        print "For icushared, found $icushared and $arg->{without}\n"
-            if $arg->{verbose};
+        $conf->debug("For icushared, found $icushared and $arg->{without}\n");
 
         # location of header files
-        print "Trying $arg->{icuconfig} with '--prefix'\n"
-            if $arg->{verbose};
+        $conf->debug("Trying $arg->{icuconfig} with '--prefix'\n");
         $icuheaders = capture_output("$arg->{icuconfig} --prefix");
         chomp($icuheaders);
-        print "icuheaders:  captured $icuheaders\n"
-            if $arg->{verbose};
+        $conf->debug("icuheaders:  captured $icuheaders\n");
         ($icuheaders, $arg->{without}) =
             $self->_handle_icuheaders($conf, $icuheaders, $arg->{without});
-        print "For icuheaders, found $icuheaders and $arg->{without}\n"
-            if $arg->{verbose};
+        $conf->debug("For icuheaders, found $icuheaders and $arg->{without}\n");
     }
 
     return ($arg->{without}, $icushared, $icuheaders);
@@ -348,8 +336,8 @@
 }
 
 sub _verbose_report {
-    my ($verbose, $icuconfig, $icushared, $icuheaders) = @_;
-    if ($verbose) {
+    my ($conf, $icuconfig, $icushared, $icuheaders) = @_;
+    if ($conf->options->get('verbose')) {
         print "icuconfig: $icuconfig\n"  if defined $icuconfig;
         print "icushared='$icushared'\n" if defined $icushared;
         print "headers='$icuheaders'\n"  if defined $icuheaders;
@@ -395,9 +383,7 @@
     my $arg = shift;
     if ($arg->{ccflags_status}) {
         # Ok, we don't need anything more.
-        if ($arg->{verbose}) {
-            print "Your compiler found the icu headers... good!\n";
-        }
+        $conf->debug("Your compiler found the icu headers... good!\n");
     }
     else {
         my $icuheaders = $arg->{icuheaders};
@@ -410,9 +396,7 @@
             $icuflags = "-I $arg->{icuheaders}";
         }
 
-        if ($arg->{verbose}) {
-            print "Adding $icuflags to ccflags for icu headers.\n";
-        }
+        $conf->debug( "Adding $icuflags to ccflags for icu headers.\n");
         $conf->data->add( ' ', ccflags => $icuflags );
     }
 }

Modified: trunk/config/auto/inline.pm
==============================================================================
--- trunk/config/auto/inline.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/inline.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -79,13 +79,12 @@
 
 sub _evaluate_inline {
     my ($self, $conf, $test) = @_;
-    my $verbose = $conf->options->get(qw(verbose));
     if ($test) {
-        print " ($test) " if $verbose;
+        $conf->debug(" ($test) ");
         $self->set_result('yes');
     }
     else {
-        print " no " if $verbose;
+        $conf->debug(" no ");
         $self->set_result('no');
         $test = '';
     }

Modified: trunk/config/auto/isreg.pm
==============================================================================
--- trunk/config/auto/isreg.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/isreg.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -63,7 +63,8 @@
     my $test;
     $test = (! defined $anyerror) ? 1 : 0;
     $conf->data->set( isreg => $test );
-    print( $test ? " (Yep) " : " (no) " ) if $conf->options->get('verbose');
+    my $test_str = $test ? " (Yep) " : " (no) ";
+    $conf->debug($test_str);
     $self->set_result( $test ? 'yes' : 'no' );
     return 1;
 }

Modified: trunk/config/auto/memalign.pm
==============================================================================
--- trunk/config/auto/memalign.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/memalign.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -95,7 +95,8 @@
         : $test  ? 'memalign'
         :          '';
     $conf->data->set( memalign => $f );
-    print( $test ? " (Yep:$f) " : " (no) " ) if $conf->options->get('verbose');
+    my $test_str = $test ? " (Yep:$f) " : " (no) ";
+    $conf->debug($test_str);
     $self->set_result( $test ? 'yes' : 'no' );
 }
 

Modified: trunk/config/auto/msvc.pm
==============================================================================
--- trunk/config/auto/msvc.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/msvc.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -33,8 +33,7 @@
     my ( $self, $conf ) = ( shift, shift );
 
     if ($conf->data->get('gccversion')) {
-        my $verbose = $conf->options->get('verbose');
-        print " (skipped) " if $verbose;
+        $conf->debug(" (skipped) ");
         $self->set_result('skipped');
         $conf->data->set( msvcversion => undef );
         return 1;
@@ -57,7 +56,6 @@
 
 sub _evaluate_msvc {
     my ($self, $conf, $msvcref) = @_;
-    my $verbose = $conf->options->get('verbose');
     # Set msvcversion to undef.  This will also trigger any hints-file
     # callbacks that depend on knowing whether or not we're using Visual C++.
 
@@ -73,10 +71,10 @@
 
     my $major = int( $msvcref->{_MSC_VER} / 100 );
     my $minor = $msvcref->{_MSC_VER} % 100;
-    my $status = $self->_handle_not_msvc($conf, $major, $minor, $verbose);
+    my $status = $self->_handle_not_msvc($conf, $major, $minor);
     return 1 if $status;
 
-    my $msvcversion = $self->_compose_msvcversion($major, $minor, $verbose);
+    my $msvcversion = $self->_compose_msvcversion($major, $minor);
 
     $conf->data->set( msvcversion => $msvcversion );
 
@@ -96,10 +94,10 @@
 
 sub _handle_not_msvc {
     my $self = shift;
-    my ($conf, $major, $minor, $verbose) = @_;
+    my ($conf, $major, $minor) = @_;
     my $status;
     unless ( defined $major && defined $minor ) {
-        print " (no) " if $verbose;
+        $conf->debug(" (no) ");
         $self->set_result('no');
         $conf->data->set( msvcversion => undef );
         $status++;
@@ -109,7 +107,7 @@
 
 sub _compose_msvcversion {
     my $self = shift;
-    my ($major, $minor, $verbose) = @_;
+    my ($major, $minor) = @_;
     my $msvcversion = "$major.$minor";
     $self->set_result("yes, $msvcversion");
     return $msvcversion;

Modified: trunk/config/auto/neg_0.pm
==============================================================================
--- trunk/config/auto/neg_0.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/neg_0.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -33,7 +33,6 @@
 
 sub runstep {
     my ( $self, $conf ) = @_;
-    my ( $verbose ) = $conf->options->get('verbose');
     $conf->cc_gen('config/auto/neg_0/test_c.in');
     eval { $conf->cc_build( q{} ); };
     my $has_neg_0 = 0;
@@ -43,7 +42,6 @@
             $conf,
             $test,
             $has_neg_0,
-            $verbose,
         );
     }
     $conf->cc_clean();
@@ -54,10 +52,11 @@
 
 sub _evaluate_cc_run {
     my $self = shift;
-    my ($conf, $test, $has_neg_0, $verbose) = @_;
+    my ($conf, $test, $has_neg_0) = @_;
     $has_neg_0 = ($test =~ m/^-0/ ? 1 : 0);
     $self->set_result( $has_neg_0 ? 'yes' : 'no' );
-    print $has_neg_0 ? ' (yes) ' : ' (no) ' if $verbose;
+    my $output = $has_neg_0 ? ' (yes) ' : ' (no) ';
+    $conf->debug($output);
     return $has_neg_0;
 }
 

Modified: trunk/config/auto/opengl.pm
==============================================================================
--- trunk/config/auto/opengl.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/opengl.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -158,12 +158,7 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my ( $verbose, $without ) = $conf->options->get(
-        qw|
-            verbose
-            without-opengl
-        |
-    );
+    my $without = $conf->options->get( qw| without-opengl | );
 
     return $self->_handle_no_opengl($conf) if $without;
 
@@ -192,15 +187,15 @@
     }
     else {
         my $test = $conf->cc_run();
-        return _handle_glut($conf, $extra_libs, $self->_evaluate_cc_run($test, $verbose));
+        return _handle_glut($conf, $extra_libs, $self->_evaluate_cc_run($conf, $test));
     }
 }
 
 sub _evaluate_cc_run {
-    my ($self, $test, $verbose) = @_;
+    my ($self, $conf, $test) = @_;
     my ($glut_api_version, $glut_brand) = split ' ', $test;
 
-    print " (yes, $glut_brand API version $glut_api_version) " if $verbose;
+    $conf->debug(" (yes, $glut_brand API version $glut_api_version) ");
     $self->set_result("yes, $glut_brand $glut_api_version");
 
     return ($glut_api_version, $glut_brand);

Modified: trunk/config/auto/pcre.pm
==============================================================================
--- trunk/config/auto/pcre.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/pcre.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -33,12 +33,7 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my ( $verbose, $without ) = $conf->options->get(
-        qw|
-            verbose
-            without-pcre
-        |
-    );
+    my $without = $conf->options->get( qw| without-pcre | );
 
     if ($without) {
         $conf->data->set( HAS_PCRE => 0 );
@@ -61,7 +56,7 @@
     my $has_pcre = 0;
     if ( !$@ ) {
         my $test = $conf->cc_run();
-        $has_pcre = $self->_evaluate_cc_run($test, $verbose);
+        $has_pcre = $self->_evaluate_cc_run($conf, $test);
     }
     $conf->data->set( HAS_PCRE => $has_pcre);
 
@@ -70,12 +65,12 @@
 
 sub _evaluate_cc_run {
     my $self = shift;
-    my ($test, $verbose) = @_;
+    my ($conf, $test) = @_;
     my $has_pcre = 0;
     if ( $test =~ /pcre (\d+\.\d+)/ ) {
         my $pcre_version = $1;
         $has_pcre = 1;
-        print " (yes, $pcre_version) " if $verbose;
+        $conf->debug(" (yes, $pcre_version) ");
         $self->set_result("yes, $pcre_version");
     }
     return $has_pcre;

Modified: trunk/config/auto/readline.pm
==============================================================================
--- trunk/config/auto/readline.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/readline.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -36,8 +36,6 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-
     my $cc     = $conf->data->get('cc');
     my $osname = $conf->data->get('osname');
 
@@ -54,7 +52,7 @@
     eval { $conf->cc_build( q{}, $extra_libs ) };
     if ( !$@ ) {
         if ( $conf->cc_run() ) {
-            $has_readline = $self->_evaluate_cc_run($verbose);
+            $has_readline = $self->_evaluate_cc_run($conf);
         }
         _handle_readline($conf, $extra_libs);
     }
@@ -71,7 +69,7 @@
         eval { $conf->cc_build( q{}, $extra_libs) };
         if ( !$@ ) {
             if ( $conf->cc_run() ) {
-                $has_readline = $self->_evaluate_cc_run($verbose);
+                $has_readline = $self->_evaluate_cc_run($conf);
             }
             _handle_readline($conf, $extra_libs);
         }
@@ -83,9 +81,9 @@
 }
 
 sub _evaluate_cc_run {
-    my ($self, $verbose) = @_;
+    my ($self, $conf) = @_;
     my $has_readline = 1;
-    print " (yes) " if $verbose;
+    $conf->debug(" (yes) ");
     $self->set_result('yes');
     return $has_readline;
 }

Modified: trunk/config/auto/signal.pm
==============================================================================
--- trunk/config/auto/signal.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/signal.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -39,26 +39,24 @@
         has_setitimer      => undef
     );
 
-    my $verbose = $conf->options->get('verbose');
-
     $conf->cc_gen('config/auto/signal/test1_c.in');
     eval { $conf->cc_build(); };
     unless ( $@ || $conf->cc_run() !~ /ok/ ) {
-        _handle__sighandler_t($conf, $verbose);
+        _handle__sighandler_t($conf);
     }
     $conf->cc_clean();
 
     $conf->cc_gen('config/auto/signal/test2_c.in');
     eval { $conf->cc_build(); };
     unless ( $@ || $conf->cc_run() !~ /ok/ ) {
-        _handle_sigaction($conf, $verbose);
+        _handle_sigaction($conf);
     }
     $conf->cc_clean();
 
     $conf->cc_gen('config/auto/signal/test_itimer_c.in');
     eval { $conf->cc_build(); };
     unless ( $@ || $conf->cc_run() !~ /ok/ ) {
-        _handle_setitimer($conf, $verbose);
+        _handle_setitimer($conf);
     }
     $conf->cc_clean();
 
@@ -70,26 +68,26 @@
 }
 
 sub _handle__sighandler_t {
-    my ($conf, $verbose) = @_;
+    my ($conf) = @_;
     $conf->data->set( has___sighandler_t => 'define' );
-    print " (__sighandler_t)" if $verbose;
+    $conf->debug(" (__sighandler_t)");
     return 1;
 }
 
 sub _handle_sigaction {
-    my ($conf, $verbose) = @_;
+    my ($conf) = @_;
     $conf->data->set( has_sigaction => 'define' );
-    print " (sigaction)" if $verbose;
+    $conf->debug(" (sigaction)");
     return 1;
 }
 
 sub _handle_setitimer {
-    my ($conf, $verbose) = @_;
+    my ($conf) = @_;
     $conf->data->set(
         has_setitimer    => 'define',
         has_sig_atomic_t => 'define',
     );
-    print " (setitimer) " if $verbose;
+    $conf->debug(" (setitimer) ");
     return 1;
 }
 

Modified: trunk/config/auto/snprintf.pm
==============================================================================
--- trunk/config/auto/snprintf.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/snprintf.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -56,7 +56,7 @@
     elsif ( $res =~ /^old snprintf/ ) {
         $conf->data->set( HAS_OLD_SNPRINTF => 1 );
     }
-    print " ($res) " if $conf->options->get('verbose');
+    $conf->debug(" ($res) ");
     return 1;
 }
 

Modified: trunk/config/auto/thread.pm
==============================================================================
--- trunk/config/auto/thread.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/thread.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -31,12 +31,7 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my ( $verbose, $without ) = $conf->options->get(
-        qw|
-            verbose
-            without-threads
-        |
-    );
+    my $without = $conf->options->get( qw| without-threads |);
 
     if ($without) {
         $conf->data->set( HAS_THREADS => 0 );

Modified: trunk/config/auto/warnings.pm
==============================================================================
--- trunk/config/auto/warnings.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/warnings.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -274,8 +274,7 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-    print "\n" if $verbose;
+    $conf->debug("\n");
 
     my $compiler = '';
     if ( defined $conf->data->get('gccversion') ) {
@@ -289,8 +288,7 @@
     }
 
     if ($compiler eq '') {
-        print "We do not (yet) probe for warnings for your compiler\n"
-            if $verbose;
+        $conf->debug("We do not (yet) probe for warnings for your compiler\n");
         $self->set_result('skipped');
         return 1;
     }
@@ -357,12 +355,10 @@
 sub valid_warning {
     my ( $self, $conf, $warning ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-
     # This should be using a temp file name.
     my $output_file = 'test.cco';
 
-    $verbose and print "trying attribute '$warning'\n";
+    $conf->debug("trying attribute '$warning'\n");
 
     my $cc = $conf->option_or_data('cc');
     $conf->cc_gen('config/auto/warnings/test_c.in');
@@ -372,7 +368,7 @@
     my $tryflags = "$ccflags $warnings $warning";
 
     my $command_line = Parrot::Configure::Utils::_build_compile_command( $cc, $tryflags );
-    $verbose and print '  ', $command_line, "\n";
+    $conf->debug("  ", $command_line, "\n");
 
     # Don't use cc_build, because failure is expected.
     my $exit_code = Parrot::Configure::Utils::_run_command(
@@ -390,15 +386,15 @@
     my $output = Parrot::BuildUtil::slurp_file($output_file);
     unlink $output_file or die "Unable to unlink $output_file: $!";
 
-    $verbose and print "  output: $output\n";
+    $conf->debug("  output: $output\n");
 
     if ( $output !~ /\berror|warning|not supported|ignoring (unknown )?option\b/i ) {
         push @{$self->{'validated'}}, $warning;
-        $verbose and print "    valid warning: '$warning'\n";
+        $conf->debug("    valid warning: '$warning'\n");
         return 1;
     }
     else {
-        $verbose and print "  invalid warning: '$warning'\n";
+        $conf->debug("  invalid warning: '$warning'\n");
         return 0;
     }
 }

Modified: trunk/config/auto/zlib.pm
==============================================================================
--- trunk/config/auto/zlib.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/auto/zlib.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -32,12 +32,7 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my ( $verbose, $without ) = $conf->options->get(
-        qw|
-            verbose
-            without-zlib
-        |
-    );
+    my $without = $conf->options->get( qw| without-zlib | );
 
     if ($without) {
         $conf->data->set( has_zlib => 0 );
@@ -60,7 +55,7 @@
     my $has_zlib = 0;
     if ( !$@ ) {
         my $test = $conf->cc_run();
-        $has_zlib = $self->_evaluate_cc_run($conf, $test, $has_zlib, $verbose);
+        $has_zlib = $self->_evaluate_cc_run($conf, $test, $has_zlib);
     }
     $conf->data->set( has_zlib => $has_zlib );
     $self->set_result($has_zlib ? 'yes' : 'no');
@@ -70,11 +65,11 @@
 
 sub _evaluate_cc_run {
     my $self = shift;
-    my ($conf, $test, $has_zlib, $verbose) = @_;
+    my ($conf, $test, $has_zlib) = @_;
     if ( $test =~ m/^(\d\.\d\.\d)/ ) {
         my $version = $1;
         $has_zlib = 1;
-        print " (yes) " if $verbose;
+        $conf->debug(" (yes) ");
         $self->set_result("yes, $version");
     }
     return $has_zlib;

Modified: trunk/config/gen/opengl.pm
==============================================================================
--- trunk/config/gen/opengl.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/gen/opengl.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -457,8 +457,6 @@
         return 1;
     }
 
-    my $verbose = $conf->options->get('verbose') || 0;
-
     my @include_paths_win32 = grep /\S/ => split /;/ => ($ENV{INCLUDE} || '');
 
     my $osname = $conf->data->get('osname');
@@ -522,22 +520,28 @@
     # X freeglut only if DISPLAY is set, otherwise use native w32api GLUT
     shift @header_globs if $^O eq 'cygwin' and !$ENV{DISPLAY};
 
-    print "\nChecking for OpenGL headers using the following globs:\n\t",
-        join("\n\t", @header_globs), "\n"
-        if $verbose;
+    my $globs_str = join("\n\t", @header_globs) . "\n";
+    $conf->debug(
+        "\n",
+        "Checking for OpenGL headers using the following globs:\n",
+        "\t$globs_str"
+    );
 
     my @header_files = sort map {File::Glob::bsd_glob($_)} @header_globs;
 
     my %skip = map {($_ => 1)} @SKIP;
-    @header_files = grep {my ($file) = m{([^/]+)$}; !$skip{$file}} @header_files;
-
-    print "\nFound the following OpenGL headers:\n\t",
-        join("\n\t", @header_files), "\n"
-        if $verbose;
-
+    @header_files =
+        grep {my ($file) = m{([^/]+)$}; !$skip{$file}} @header_files;
     die "OpenGL enabled and detected, but no OpenGL headers found!"
         unless @header_files;
 
+    my $files_str = join("\n\t", @header_files) . "\n";
+    $conf->debug(
+        "\n",
+        "Found the following OpenGL headers:\n",
+        "\t$files_str\n",
+    );
+
     my $autogen_header = <<'HEADER';
 # DO NOT EDIT THIS FILE.
 #
@@ -550,15 +554,15 @@
 
     $autogen_header .= "# $_\n" foreach @header_files;
 
-    $self->gen_opengl_defines ($conf, \@header_files, $autogen_header, $verbose);
-    $self->gen_opengl_wrappers($conf, \@header_files, $autogen_header, $verbose);
+    $self->gen_opengl_defines ($conf, \@header_files, $autogen_header);
+    $self->gen_opengl_wrappers($conf, \@header_files, $autogen_header);
     $self->gen_glut_callbacks ($conf);
 
     return 1;
 }
 
 sub gen_opengl_defines {
-    my ($self, $conf, $header_files, $autogen_header, $verbose) = @_;
+    my ($self, $conf, $header_files, $autogen_header) = @_;
 
     my (%defs, @macros, %non_numeric);
     my $max_len = 0;
@@ -590,7 +594,7 @@
             }
             else {
                 $non_numeric{$F[1]}++;
-                print "\nNon-numeric value for '$F[1]': '$F[2]'\n" if $verbose;
+                $conf->debug("Non-numeric value for '$F[1]': '$F[2]'\n");
             }
         }
     }
@@ -630,7 +634,8 @@
 }
 
 sub gen_opengl_wrappers {
-    my ($self, $conf, $header_files, $autogen_header, $verbose) = @_;
+    my ($self, $conf, $header_files, $autogen_header) = @_;
+    my $verbose = $conf->options->get('verbose') || 0;
 
     my %IGNORE = map {($_ => 1)} @IGNORE;
 
@@ -772,7 +777,8 @@
             $sigs{$nci_sig}++;
             push @{$funcs{$group}}, [$name, $nci_sig];
 
-            print "$group\t$nci_sig\t$return $name($params);\n" if $verbose >= 3;
+            print "$group\t$nci_sig\t$return $name($params);\n"
+                if $verbose >= 3;
         }
     }
 

Modified: trunk/config/gen/platform.pm
==============================================================================
--- trunk/config/gen/platform.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/gen/platform.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -39,35 +39,32 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose     = $conf->options->get('verbose');
-    my $generated   = $self->_get_generated($conf, $verbose);
-
+    my $generated   = $self->_get_generated($conf);
 
     # headers are merged into platform.h
-    $self->_set_headers($conf, $verbose, $generated);
+    $self->_set_headers($conf, $generated);
 
     # implementation files are merged into platform.c
-    $self->_set_implementations($conf, $verbose, $generated);
+    $self->_set_implementations($conf, $generated);
 
     $self->_handle_asm($conf);
 
-    $self->_set_limits($conf, $verbose);
+    $self->_set_limits($conf);
 
     return 1;
 }
 
 sub _get_generated {
-    my $self = shift;
-    my ($conf, $verbose) = @_;
+    my ($self, $conf) = @_;
     my $generated = $conf->data->get('TEMP_generated');
     $generated = '' unless defined $generated;
-    print " ($generated) " if $verbose;
+    $conf->debug(" ($generated) \n");
     return $generated;
 }
 
 sub _set_headers {
     my $self = shift;
-    my ($conf, $verbose, $generated) = @_;
+    my ($conf, $generated) = @_;
     my $platform = $conf->data->get('platform');
     my @headers = qw/
         io.h
@@ -112,7 +109,7 @@
 
         if ( -e $header_file ) {
             local $/ = undef;
-            print("\t$header_file\n") if $verbose;
+            $conf->debug("\t$header_file\n");
             open my $IN_H, "<", "$header_file"
                 or die "Can't open $header_file: $!";
 
@@ -144,7 +141,7 @@
     for my $h (@headers) {
         if ( -e $h ) {
             local $/ = undef;
-            print("\t$h\n") if $verbose;
+            $conf->debug("\t$h\n");
             open my $IN_H, "<", $h or die "Can't open $h: $!";
             print {$PLATFORM_H} <<"END_HERE";
 /*
@@ -186,7 +183,7 @@
 
 sub _set_implementations {
     my $self = shift;
-    my ($conf, $verbose, $generated) = @_;
+    my ($conf, $generated) = @_;
     my $platform = $conf->data->get('platform');
     my @impls = qw/
         time.c
@@ -238,7 +235,7 @@
 
         if ( -e $impl_file ) {
             local $/ = undef;
-            print("\t$impl_file\n") if $verbose;
+            $conf->debug("\t$impl_file\n");
             open my $IN_C, "<", $impl_file or die "Can't open $impl_file: $!";
 
             # slurp in the C file
@@ -263,7 +260,7 @@
     for my $im (@impls) {
         if ( -e $im ) {
             local $/ = undef;
-            print("\t$im\n") if $verbose;
+            $conf->debug("\t$im\n");
             open my $IN_C, "<", $im or die "Can't open $im: $!";
             print {$PLATFORM_C} <<"END_HERE";
 /*

Modified: trunk/config/init/defaults.pm
==============================================================================
--- trunk/config/init/defaults.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/init/defaults.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -258,6 +258,13 @@
 
     $conf->data->set( 'archname', $Config{archname});
 
+    $conf->data->set( has_extra_nci_thunks => 1 );
+    $conf->data->set( HAS_EXTRA_NCI_THUNKS => 1 );
+    if ( $conf->options->get( 'without-extra-nci-thunks' ) ) {
+        $conf->data->set( has_extra_nci_thunks => 0 );
+        $conf->data->set( HAS_EXTRA_NCI_THUNKS => 0 );
+    }
+
     # adjust archname, cc and libs for e.g. --m=32
     # remember corrected archname - jit.pm was using $Config('archname')
     _64_bit_adjustments($conf);

Modified: trunk/config/init/hints.pm
==============================================================================
--- trunk/config/init/hints.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/init/hints.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -31,8 +31,7 @@
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    my $verbose = $conf->options->get('verbose');
-    print "\n[ " if $verbose;
+    $conf->debug("\n[ ");
 
     my $hints_used = 0;
     my $hints_file;
@@ -46,7 +45,7 @@
     if ( -f $hints_file ) {
         my $hints_pkg = "init::hints::" . $hints_file_name;
 
-        print "$hints_pkg " if $verbose;
+        $conf->debug("$hints_pkg ");
 
         eval "use $hints_pkg";
         die $@ if $@;
@@ -57,7 +56,7 @@
         $hints_used++;
 
         $hints_pkg = "init::hints::local";
-        print "$hints_pkg " if $verbose;
+        $conf->debug("$hints_pkg ");
         eval "use $hints_pkg";
 
         unless ($@) {
@@ -66,14 +65,14 @@
         }
     }
     else {
-        print "No $hints_file found.  " if $verbose;
+        $conf->debug("No $hints_file found.  ");
     }
 
-    if ( $hints_used == 0 and $verbose ) {
-        print "(no hints) ";
+    if ( $hints_used == 0 ) {
+        $conf->debug("(no hints) ");
     }
 
-    print "]" if $verbose;
+    $conf->debug("]");
 
     return 1;
 }

Modified: trunk/config/init/hints/darwin.pm
==============================================================================
--- trunk/config/init/hints/darwin.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/init/hints/darwin.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -25,7 +25,6 @@
 
     my $share_ext = $conf->option_or_data('share_ext');
     my $version   = $conf->option_or_data('VERSION');
-    my $verbose = $conf->options->get('verbose');
 
     # The hash referenced by $flagsref is the list of options that have -arch
     # flags added to them implicitly through config/init/defaults.pm when
@@ -35,7 +34,7 @@
     # friends.  So, it's time to remove all -arch flags set in $conf->data and
     # force a single, native architecture to being the default build.
 
-    my $flagsref = _strip_arch_flags($conf, $verbose);
+    my $flagsref = _strip_arch_flags($conf);
 
     # And now, after possibly losing a few undesired compiler and linker
     # flags, on to the main Darwin config.
@@ -98,11 +97,11 @@
 #################### INTERNAL SUBROUTINES ####################
 
 sub _precheck {
-    my ($flag, $stored, $verbose) = @_;
-    if ($verbose) {
-        print "Checking $flag...\n";
-        print "Pre-check: " . ($stored || '(nil)') . "\n";
-    }
+    my ($conf, $flag, $stored) = @_;
+    $conf->debug(
+        "Checking $flag...\n",
+        "Pre-check: " . ($stored || '(nil)') . "\n",
+    );
 }
 
 sub _strip_arch_flags_engine {
@@ -116,27 +115,26 @@
 }
 
 sub _postcheck {
-    my ($flagsref, $flag, $verbose) = @_;
-    if ($verbose) {
-        print "Post-check: ", ( $flagsref->{$flag} or '(nil)' ), "\n";
-    }
+    my ($conf, $flagsref, $flag) = @_;
+    my $f = $flagsref->{$flag} || '(nil)';
+    $conf->debug("Post-check: $f\n");
 }
 
 sub _strip_arch_flags {
-    my ($conf, $verbose) = @_;
+    my ($conf) = @_;
     my $flagsref  = { map { $_ => '' } @{ $defaults{problem_flags} } };
 
-    print "\nStripping -arch flags due to Apple multi-architecture build problems:\n" if $verbose;
+    $conf->debug("\nStripping -arch flags due to Apple multi-architecture build problems:\n");
     for my $flag ( keys %{ $flagsref } ) {
         my $stored = $conf->data->get($flag) || '';
 
-        _precheck($flag, $stored, $verbose);
+        _precheck($conf, $flag, $stored);
 
         $flagsref = _strip_arch_flags_engine(
             $defaults{architectures}, $stored, $flagsref, $flag
         );
 
-        _postcheck($flagsref, $flag, $verbose);
+        _postcheck($conf, $flagsref, $flag);
     }
     return $flagsref;
 }
@@ -167,12 +165,11 @@
 
 sub _probe_for_fink {
     my $conf = shift;
-    my $verbose = $conf->options->get( 'verbose' );
     # Per fink(8), this is location for Fink configuration file, presumably
     # regardless of where Fink itself is installed.
     my $fink_conf    = $defaults{fink_conf};
     unless (-f $fink_conf) {
-        print "Fink configuration file not located\n" if $verbose;
+        $conf->debug("Fink configuration file not located\n");
         return;
     }
     my $fink_conf_str = Parrot::BuildUtil::slurp_file($fink_conf);
@@ -185,8 +182,7 @@
         last;
     }
     unless (defined $fink_base_dir) {
-        print "Fink configuration file defective:  no 'Basepath'\n"
-            if $verbose;
+        $conf->debug("Fink configuration file defective:  no 'Basepath'\n");
         return;
     }
     my $fink_lib_dir = qq{$fink_base_dir/lib};
@@ -196,8 +192,7 @@
         push @unlocateables, $dir unless (-d $dir);
     }
     if (@unlocateables) {
-        print "Could not locate Fink directories:  @unlocateables\n"
-            if $verbose;
+        $conf->debug("Could not locate Fink directories:  @unlocateables\n");
         return;
     }
     else {
@@ -212,7 +207,6 @@
 
 sub _probe_for_macports {
     my $conf = shift;
-    my $verbose = $conf->options->get( 'verbose' );
     my $ports_base_dir = $defaults{ports_base_dir};
     my $ports_lib_dir = qq{$ports_base_dir/lib};
     my $ports_include_dir = qq{$ports_base_dir/include};
@@ -221,8 +215,7 @@
         push @unlocateables, $dir unless (-d $dir);
     }
     if (@unlocateables) {
-        print "Could not locate Macports directories:  @unlocateables\n"
-            if $verbose;
+        $conf->debug("Could not locate Macports directories:  @unlocateables\n");
         return;
     }
     else {
@@ -239,7 +232,6 @@
     my ($conf, $flagsref, $library) = @_;
     my $no_library_option = "darwin_no_$library";
     my $title = ucfirst(lc($library));
-    my $verbose = $conf->options->get( 'verbose' );
     unless ($conf->options->get( $no_library_option ) ) {
         my $addl_flags_ref;
         if ($library eq 'fink') {
@@ -248,14 +240,14 @@
         if ($library eq 'macports') {
             $addl_flags_ref = _probe_for_macports($conf);
         }
-        my $rv = _add_to_flags( $addl_flags_ref, $flagsref, $title, $verbose );
+        my $rv = _add_to_flags( $conf, $addl_flags_ref, $flagsref, $title );
         return $rv;
     }
     return;
 }
 
 sub _add_to_flags {
-    my ( $addl_flags_ref, $flagsref, $title, $verbose ) = @_;
+    my ( $conf, $addl_flags_ref, $flagsref, $title ) = @_;
     if ( defined $addl_flags_ref ) {
         foreach my $addl ( keys %{ $addl_flags_ref } ) {
             my %seen;
@@ -266,10 +258,10 @@
             $flagsref->{$addl} .= " $addl_flags_ref->{$addl}"
                 unless $seen{ $addl_flags_ref->{$addl} };
         }
-        print "Probe for $title successful\n" if $verbose;
+        $conf->debug("Probe for $title successful\n");
     }
     else {
-        print "Probe for $title unsuccessful\n" if $verbose;
+        $conf->debug("Probe for $title unsuccessful\n");
     }
     return 1;
 }

Modified: trunk/config/init/hints/linux.pm
==============================================================================
--- trunk/config/init/hints/linux.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/init/hints/linux.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -15,10 +15,8 @@
     my $linkflags = $conf->option_or_data('linkflags');
     my $share_ext = $conf->option_or_data('share_ext');
     my $version   = $conf->option_or_data('VERSION');
-    my $verbose;
 
-    $verbose = $conf->options->get('verbose');
-    print "\n" if $verbose;
+    $conf->debug("\n");
 
     # should find g++ in most cases
     my $link = $conf->data->get('link') || 'c++';
@@ -39,7 +37,7 @@
         $ld_share_flags = ' -shared -g -pipe -fexceptions -fPIC';
         $cc_shared .= ' -fPIC';
 
-        $ccflags = _handle_icc_ccflags($ccflags, $verbose);
+        $ccflags = _handle_icc_ccflags($conf, $ccflags);
 
     }
     elsif ( $cc =~ /suncc/ ) {
@@ -96,7 +94,7 @@
 }
 
 sub _handle_icc_ccflags {
-    my ($ccflags, $verbose) = @_;
+    my ($conf, $ccflags) = @_;
 
     # enable correct floating point behavior
     # which is *not* the default behavior. ahem.
@@ -106,7 +104,7 @@
     # for negative zero without this.
     $ccflags .= ' -fp-model source';
 
-    $verbose and print " ccflags: $ccflags\n";
+    $conf->debug(" ccflags: $ccflags\n");
     return $ccflags;
 }
 

Modified: trunk/config/init/optimize.pm
==============================================================================
--- trunk/config/init/optimize.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/init/optimize.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -27,16 +27,12 @@
     };
 }
 
-our $verbose;
-
 sub runstep {
     my ( $self, $conf ) = @_;
 
-    $verbose = $conf->options->get( 'verbose' );
-    print "\n" if $verbose;
+    $conf->debug("\n");
 
-    print "(optimization options: init::optimize)\n"
-        if $verbose;
+    $conf->debug("(optimization options: init::optimize)\n");
 
     # A plain --optimize means use perl5's $Config{optimize}.  If an argument
     # is given, however, use that instead.
@@ -44,7 +40,7 @@
 
     if (! defined $optimize) {
         $self->set_result('no');
-        print "(none requested) " if $conf->options->get('verbose');
+        $conf->debug("(none requested) ");
         return 1;
     }
 
@@ -68,7 +64,7 @@
 
     # save the options, however we got them.
     $conf->data->set( optimize => $options );
-    print "optimize options: ", $options, "\n" if $verbose;
+    $conf->debug("optimize options: ", $options, "\n");
 
     # disable debug flags.
     $conf->data->set( cc_debug => '' );

Modified: trunk/config/inter/libparrot.pm
==============================================================================
--- trunk/config/inter/libparrot.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/inter/libparrot.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -46,27 +46,8 @@
     # Parrot can't necessarily handle a pre-existing installed shared
     # libparrot.so. At this point, we don't know the actual name
     # of the shared parrot library. So we try some candidates.
-    my @libs = ('libparrot.so');
-    my @libpaths = ('/usr/local/lib', '/usr/lib', $conf->data->get('libdir'));
-    if ($^O eq 'MSWin32') {
-        push @libpaths, (split /;/, $ENV{PATH});
-        @libs = ('libparrot.dll', 'libparrot.lib', 'libparrot.dll.a');
-    }
-    if ($^O eq 'cygwin') {
-        @libs = ('libparrot.dll.a');
-    }
-    if ($^O eq 'darwin'){
-        @libs = qw/libparrot.dylib libparrot.a/;
-    }
-    if (defined $ENV{LD_LIBRARY_PATH}) {
-        push @libpaths, (split /:/, $ENV{LD_LIBRARY_PATH});
-    }
-    if (defined $ENV{LD_RUN_PATH}) {
-        push @libpaths, (split /:/, $ENV{LD_RUN_PATH});
-    }
-    if (defined $ENV{DYLD_LIBRARY_PATH}) {
-        push @libpaths, (split /:/, $ENV{DYLD_LIBRARY_PATH});
-    }
+    my @libs = get_libs();
+    my @libpaths = get_libpaths($conf);
     foreach my $f (@libs) {
         foreach my $d (@libpaths) {
             my $oldversion = File::Spec->catfile($d, $f);
@@ -164,6 +145,38 @@
     return 1;
 }
 
+sub get_libs {
+    my @libs = ('libparrot.so');
+    if ($^O eq 'MSWin32') {
+        @libs = ('libparrot.dll', 'libparrot.lib', 'libparrot.dll.a');
+    }
+    if ($^O eq 'cygwin') {
+        @libs = ('libparrot.dll.a');
+    }
+    if ($^O eq 'darwin'){
+        @libs = qw/libparrot.dylib libparrot.a/;
+    }
+    return @libs;
+}
+
+sub get_libpaths {
+    my $conf = shift;
+    my @libpaths = ('/usr/local/lib', '/usr/lib', $conf->data->get('libdir'));
+    if ($^O eq 'MSWin32') {
+        push @libpaths, (split /;/, $ENV{PATH});
+    }
+    if (defined $ENV{LD_LIBRARY_PATH}) {
+        push @libpaths, (split /:/, $ENV{LD_LIBRARY_PATH});
+    }
+    if (defined $ENV{LD_RUN_PATH}) {
+        push @libpaths, (split /:/, $ENV{LD_RUN_PATH});
+    }
+    if (defined $ENV{DYLD_LIBRARY_PATH}) {
+        push @libpaths, (split /:/, $ENV{DYLD_LIBRARY_PATH});
+    }
+    return @libpaths
+}
+
 1;
 
 # Local Variables:

Modified: trunk/config/inter/progs.pm
==============================================================================
--- trunk/config/inter/progs.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/config/inter/progs.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -100,7 +100,7 @@
         if $ask;
     $conf->data->set( ccflags => $ccflags );
 
-    $conf->options->get('verbose') and print "\nccflags: $ccflags\n";
+    $conf->debug("\nccflags: $ccflags\n");
 
     $linkflags = $conf->data->get('linkflags');
     $linkflags =~ s/-libpath:\S+//g;    # TT #854: No idea why.

Modified: trunk/lib/Parrot/Configure.pm
==============================================================================
--- trunk/lib/Parrot/Configure.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/lib/Parrot/Configure.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -21,6 +21,7 @@
 
     $conf->add_steps(@steps);
     $conf->runsteps;
+    $conf->debug(@messages);
 
 =head1 DESCRIPTION
 
@@ -554,6 +555,22 @@
     return;
 }
 
+=item * C<debug()>
+
+When C<--verbose> is requested, or when a particular configuration step is
+specified in C<--verbose-step>, this method prints its arguments as a string
+on STDOUT.
+
+=cut
+
+sub debug {
+    my ($conf, @messages) = @_;
+    if ($conf->options->get('verbose')) {
+        print join('' => @messages);
+    }
+    return 1;
+}
+
 =back
 
 =head1 CREDITS

Modified: trunk/lib/Parrot/Configure/Step/List.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Step/List.pm	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/lib/Parrot/Configure/Step/List.pm	Thu Jun  3 01:36:45 2010	(r47318)
@@ -48,7 +48,6 @@
     auto::socklen_t
     auto::neg_0
     auto::env
-    auto::extra_nci_thunks
     auto::thread
     auto::gmp
     auto::readline

Modified: trunk/t/steps/auto/ctags-01.t
==============================================================================
--- trunk/t/steps/auto/ctags-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/ctags-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -100,14 +100,14 @@
 } );
 $conf->options->set( %{$args} );
 $step = test_step_constructor_and_description($conf);
-ok(auto::ctags::_probe_for_ctags_output('Exuberant Ctags', 0),
+ok(auto::ctags::_probe_for_ctags_output($conf, 'Exuberant Ctags'),
     "Probe returned true when output matched");
-ok(! auto::ctags::_probe_for_ctags_output('alpha', 0),
+ok(! auto::ctags::_probe_for_ctags_output($conf, 'alpha'),
     "Probe returned false when output matched");
 {
     my $stdout;
     my $rv = capture(
-        sub { auto::ctags::_probe_for_ctags_output('Exuberant Ctags', 1) },
+        sub { auto::ctags::_probe_for_ctags_output($conf, 'Exuberant Ctags') },
         \$stdout
     );
     ok($rv, "Probe returned true when output matched");
@@ -115,7 +115,7 @@
 {
     my $stdout;
     my $rv = capture(
-        sub { auto::ctags::_probe_for_ctags_output('alpha', 1) },
+        sub { auto::ctags::_probe_for_ctags_output($conf, 'alpha') },
         \$stdout
     );
     ok(! $rv, "Probe returned false when output matched");

Deleted: trunk/t/steps/auto/extra_nci_thunks-01.t
==============================================================================
--- trunk/t/steps/auto/extra_nci_thunks-01.t	Thu Jun  3 01:36:45 2010	(r47317)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,87 +0,0 @@
-#! perl
-# Copyright (C) 2010, Parrot Foundation.
-# $Id$
-# auto/extra_nci_thunks-01.t
-
-=head1 NAME
-
-auto/extra_nci_thunks-01.t - test auto::extra_nci_thunks
-
-=head1 SYNOPSIS
-
-    % prove t/steps/auto/extra_nci_thunks-01.t
-
-=head1 DESCRIPTION
-
-The files in this directory test functionality used by F<Configure.pl>.
-
-The tests in this file test auto::extra_nci_thunks.
-
-=head1 SEE ALSO
-
-config::auto::libjit, F<Configure.pl>.
-
-=cut
-
-use strict;
-use warnings;
-
-use Test::More tests => 21;
-
-use lib qw( lib t/configure/testlib );
-use Parrot::Configure;
-use Parrot::Configure::Options 'process_options';
-use Parrot::Configure::Test qw(
-    test_step_thru_runstep
-    rerun_defaults_for_testing
-    test_step_constructor_and_description
-);
-
-use_ok('config::init::defaults');
-use_ok('config::auto::extra_nci_thunks');
-
-my ($args, $step_list_ref) = process_options( {
-    argv => [ q{--without-extra-nci-thunks} ],
-    mode => 'configure',
-} );
-
-my $conf = Parrot::Configure->new;
-my $serialized = $conf->pcfreeze();
-
-test_step_thru_runstep( $conf, 'init::defaults', $args );
-
-my $pkg = 'auto::extra_nci_thunks';
-my ($step, $ret);
-
-$conf->add_steps($pkg);
-$conf->options->set(%$args);
-$step = test_step_constructor_and_description($conf);
-$ret = $step->runstep($conf);
-ok( $ret, "runstep() returned true value" );
-is( $step->result(), 'no', "Result is 'no', as expected" );
-is( $conf->data->get( 'HAS_EXTRA_NCI_THUNKS' ), 0,
-    "Got the expected result with '--without-extra-nci-thunks' option" );
-
-$conf->replenish($serialized);
-
-($args, $step_list_ref) = process_options( {
-    argv => [ ],
-    mode => 'configure',
-} );
-rerun_defaults_for_testing($conf, $args);
-$conf->add_steps($pkg);
-$conf->options->set( %{$args} );
-$step = test_step_constructor_and_description($conf);
-$ret = $step->runstep($conf);
-ok( $ret, "runstep() returned a true value" );
-is( $step->result(), 'yes', "Default result is 'yes' as expected" );
-is( $conf->data->get( 'has_extra_nci_thunks' ), 1,
-    "Get the expected result without '--without-extra-nci-thunks' option" );
-
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: trunk/t/steps/auto/gettext-01.t
==============================================================================
--- trunk/t/steps/auto/gettext-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/gettext-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -112,12 +112,12 @@
 
 ########## _evaluate_cc_run() ##########
 
-my ($test, $verbose);
+my $test;
 my $has_gettext;
 
 $test = "Hello, world!\n";
-$verbose = undef;
-$has_gettext = $step->_evaluate_cc_run($test, $verbose);
+$conf->options->set(verbose => undef);
+$has_gettext = $step->_evaluate_cc_run($conf, $test);
 is($has_gettext, 1, "Got expected value for has_gettext");
 is($step->result(), 'yes', "Expected result was set");
 # Prepare for next test
@@ -126,10 +126,10 @@
 {
     my $stdout;
     $test = "Hello, world!\n";
-    $verbose = 1;
+    $conf->options->set(verbose => 1);
     capture(
         sub {
-            $has_gettext = $step->_evaluate_cc_run($test, $verbose);
+            $has_gettext = $step->_evaluate_cc_run($conf, $test);
         },
         \$stdout,
     );
@@ -141,8 +141,8 @@
 }
 
 $test = "Foobar\n";
-$verbose = undef;
-$has_gettext = $step->_evaluate_cc_run($test, $verbose);
+$conf->options->set(verbose => undef);
+$has_gettext = $step->_evaluate_cc_run($conf, $test);
 is($has_gettext, 0, "Got expected value for has_gettext");
 ok(! defined $step->result(), "As expected, result is not yet defined");
 
@@ -157,11 +157,11 @@
 $conf->options->set( %{$args} );
 $step = test_step_constructor_and_description($conf);
 
-$verbose = undef;
+$conf->options->set(verbose => undef);
 $conf->data->set( ccflags => q{} );
 $conf->data->set( libs    => q{} );
 my $libs = q{foo bar baz};
-ok(auto::gettext::_handle_gettext($conf, $verbose, $libs),
+ok(auto::gettext::_handle_gettext($conf, $libs),
     "_handle_gettext() returned true value");
 like($conf->data->get( 'ccflags' ), qr/-DHAS_GETTEXT/,
     "HAS_GETTEXT was added to 'ccflags'");
@@ -172,9 +172,9 @@
 $conf->data->set( libs    => q{} );
 {
     my ($stdout, $rv);
-    $verbose = 1;
+    $conf->options->set(verbose => 1);
     capture(
-        sub { $rv = auto::gettext::_handle_gettext($conf, $verbose, $libs); },
+        sub { $rv = auto::gettext::_handle_gettext($conf, $libs); },
         \$stdout,
     );
     ok($rv, "_handle_gettext() returned true value");
@@ -186,6 +186,7 @@
         qr/ccflags:\s.*-DHAS_GETTEXT/,
         "Got expected verbose output"
     );
+    $conf->options->set(verbose => undef);
 }
 
 pass("Completed all tests in $0");

Modified: trunk/t/steps/auto/gmp-01.t
==============================================================================
--- trunk/t/steps/auto/gmp-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/gmp-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -110,12 +110,12 @@
 $conf->options->set( %{$args} );
 $step = test_step_constructor_and_description($conf);
 
-my ($test, $has_gmp, $verbose);
+my ($test, $has_gmp);
 
 $test = $step->{cc_run_expected};
 $has_gmp = 0;
-$verbose = undef;
-$has_gmp = $step->_evaluate_cc_run($conf, $test, $has_gmp, $verbose);
+$conf->options->set(verbose => undef);
+$has_gmp = $step->_evaluate_cc_run($conf, $test, $has_gmp);
 is($step->result, 'yes', "Got expected result");
 is($conf->data->get('gmp'), 'define', "Expected value set for 'gmp'");
 is($conf->data->get('HAS_GMP'), 1, "Expected value set for 'HAS_GMP'");
@@ -126,8 +126,8 @@
 
 $test = '12345';
 $has_gmp = 0;
-$verbose = undef;
-$has_gmp = $step->_evaluate_cc_run($conf, $test, $has_gmp, $verbose);
+$conf->options->set(verbose => undef);
+$has_gmp = $step->_evaluate_cc_run($conf, $test, $has_gmp);
 ok(! defined($step->result), "Result undefined as expected");
 is($has_gmp, 0, "gmp status unchanged");
 
@@ -135,10 +135,10 @@
     my $stdout;
     $test = $step->{cc_run_expected};
     $has_gmp = 0;
-    $verbose = 1;
+    $conf->options->set(verbose => 1);
     capture(
         sub { $has_gmp =
-            $step->_evaluate_cc_run($conf, $test, $has_gmp, $verbose); },
+            $step->_evaluate_cc_run($conf, $test, $has_gmp); },
         \$stdout,
     );
     is($step->result, 'yes', "Got expected result");

Modified: trunk/t/steps/auto/icu-01.t
==============================================================================
--- trunk/t/steps/auto/icu-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/icu-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -72,53 +72,59 @@
 
 my ($autodetect, $without);
 
-($icuconfig, $autodetect, $without) =
-    $step->_handle_search_for_icu_config( {
+($icuconfig, $autodetect, $without) = $step->_handle_search_for_icu_config(
+    $conf,
+    {
         icuconfig   => q{},
         autodetect  => 1,
         without     => 0,
-        verbose     => 0,
         ret         => -1,
-} );
+    }
+);
 ok(! defined $icuconfig, "icu-config not found, as expected");
 is($autodetect, 0, "Autodetection cancelled, as expected");
 is($without, 1, "Continuing to configure without ICU");
 
-($icuconfig, $autodetect, $without) =
-    $step->_handle_search_for_icu_config( {
+($icuconfig, $autodetect, $without) = $step->_handle_search_for_icu_config(
+    $conf,
+    {
         icuconfig   => q{},
         autodetect  => 1,
         without     => 0,
-        verbose     => 0,
         ret         => 256,
-} );
+    }
+);
 ok(! defined $icuconfig, "icu-config not found, as expected");
 is($autodetect, 0, "Autodetection cancelled, as expected");
 is($without, 1, "Continuing to configure without ICU");
 
-($icuconfig, $autodetect, $without) =
-    $step->_handle_search_for_icu_config( {
+($icuconfig, $autodetect, $without) = $step->_handle_search_for_icu_config(
+    $conf,
+    {
         icuconfig   => q{},
         autodetect  => 1,
         without     => 0,
-        verbose     => 0,
         ret         => 0,
-} );
+    }
+);
 is($icuconfig, q{icu-config}, "icu-config found, as expected");
 is($autodetect, 1, "Autodetection continues, as expected");
 is($without, 0, "Continuing to try to configure with ICU");
 
 {
+    $conf->options->set( verbose => 1 );
     my ($stdout, $stderr);
     capture( sub {
             ($icuconfig, $autodetect, $without) =
-                $step->_handle_search_for_icu_config( {
+            $step->_handle_search_for_icu_config(
+                $conf,
+                {
                     icuconfig   => q{},
                     autodetect  => 1,
                     without     => 0,
-                    verbose     => 1,
                     ret         => 0,
-            } );
+                }
+            );
         },
         \$stdout,
         \$stderr,
@@ -128,30 +134,33 @@
     is($without, 0, "Continuing to try to configure with ICU");
     like($stdout, qr/icu-config found/,
         "Got expected verbose output");
+    $conf->options->set( verbose => undef );
 }
 
 ########## _handle_autodetect() ##########
 
-($icuconfig, $autodetect, $without) =
-    $step->_handle_autodetect( {
+($icuconfig, $autodetect, $without) = $step->_handle_autodetect(
+    $conf,
+    {
         icuconfig   => $phony,
         autodetect  => 1,
         without     => 0,
-        verbose     => 0,
-} );
+    }
+);
 is($icuconfig, $phony, "icu-config unchanged, as expected");
 is($autodetect, 1, "Autodetection still active, as expected");
 is($without, 0, "Continuing to try to configure with ICU");
 
 {
+    $conf->options->set( verbose => 1 );
     my ($stdout, $stderr);
     capture( sub {
-        ($icuconfig, $autodetect, $without) =
-            $step->_handle_autodetect( {
+        ($icuconfig, $autodetect, $without) = $step->_handle_autodetect(
+            $conf,
+            {
                 icuconfig   => $phony,
                 autodetect  => 0,
                 without     => 0,
-                verbose     => 1,
             } );
         },
         \$stdout,
@@ -162,6 +171,7 @@
     is($without, 0, "Continuing to try to configure with ICU");
     like($stdout, qr/ICU autodetection disabled/s,
         "Got expected verbose output");
+    $conf->options->set( verbose => undef );
 }
 
 ########## _handle_icushared() ##########
@@ -247,7 +257,6 @@
             without         => 1,
             autodetect      => 1,
             icuconfig       => 1,
-            verbose         => 0,
         }
     );
 is($without, 1, "Not trying to configure with ICU");
@@ -262,7 +271,6 @@
             without         => 0,
             autodetect      => 0,
             icuconfig       => 1,
-            verbose         => 0,
         }
     );
 is($without, 0, "Still trying to configure with ICU");
@@ -277,7 +285,6 @@
             without         => 0,
             autodetect      => 1,
             icuconfig       => q{},
-            verbose         => 0,
         }
     );
 is($without, 0, "Still trying to configure with ICU");
@@ -292,48 +299,54 @@
     "Got expected die message");
 
 {
+    $conf->options->set( verbose => 1 );
     my $phony = q{/path/to/icu-config};
     my ($stdout, $stderr);
     capture(
-        sub { auto::icu::_verbose_report(1, $phony, undef, undef); },
+        sub { auto::icu::_verbose_report($conf, $phony, undef, undef); },
         \$stdout,
         \$stderr,
     );
     like( $stdout, qr/icuconfig:\s+$phony/s,
         "Got expected verbose output"
     );
+    $conf->options->set( verbose => undef );
 }
 
 {
+    $conf->options->set( verbose => 1 );
     my $phony = q{-lalpha};
     my ($stdout, $stderr);
     capture(
-        sub { auto::icu::_verbose_report(1, undef, $phony, undef); },
+        sub { auto::icu::_verbose_report($conf, undef, $phony, undef); },
         \$stdout,
         \$stderr,
     );
     like( $stdout, qr/icushared='$phony'/s,
         "Got expected verbose output"
     );
+    $conf->options->set( verbose => undef );
 }
 
 {
+    $conf->options->set( verbose => 1 );
     my $phony = q{alpha/include};
     my ($stdout, $stderr);
     capture(
-        sub { auto::icu::_verbose_report(1, undef, undef, $phony); },
+        sub { auto::icu::_verbose_report($conf, undef, undef, $phony); },
         \$stdout,
         \$stderr,
     );
     like( $stdout, qr/headers='$phony'/s,
         "Got expected verbose output"
     );
+    $conf->options->set( verbose => undef );
 }
 
 {
     my ($stdout, $stderr);
     capture(
-        sub { auto::icu::_verbose_report(0, 'alpha', 'beta', 'gamma'); },
+        sub { auto::icu::_verbose_report($conf, 'alpha', 'beta', 'gamma'); },
         \$stdout,
         \$stderr,
     );
@@ -343,6 +356,7 @@
 ########## _handle_icuconfig_errors() ##########
 
 {
+    $conf->options->set( verbose => undef );
     my ($stdout, $stderr);
     capture(
         sub {
@@ -368,13 +382,14 @@
 my $status = $conf->data->get( 'ccflags' );
 
 {
+    $conf->options->set(verbose => 1);
     my ($stdout, $stderr);
     capture(
         sub {
-           auto::icu::_handle_ccflags_status($conf,
+           auto::icu::_handle_ccflags_status(
+               $conf,
                {
                    ccflags_status  => 1,
-                   verbose         => 1,
                    icuheaders      => $icuheaders,
                },
            );
@@ -388,13 +403,14 @@
 $conf->data->set( ccflags => $status ); # re-set for next test
 
 {
+    $conf->options->set(verbose => 1);
     my ($stdout, $stderr);
     capture(
         sub {
-           auto::icu::_handle_ccflags_status($conf,
+           auto::icu::_handle_ccflags_status(
+               $conf,
                {
                    ccflags_status  => 0,
-                   verbose         => 1,
                    icuheaders      => $icuheaders,
                },
            );
@@ -427,13 +443,14 @@
 $conf->data->set( ccflags => $status ); # re-set for next test
 
 {
+    $conf->options->set( verbose => undef );
     my ($stdout, $stderr);
     capture(
         sub {
-           auto::icu::_handle_ccflags_status($conf,
+           auto::icu::_handle_ccflags_status(
+               $conf,
                {
                    ccflags_status  => 0,
-                   verbose         => 0,
                    icuheaders      => $icuheaders,
                },
            );
@@ -652,6 +669,7 @@
         $conf->options->set( %{$args} );
         $step = test_step_constructor_and_description($conf);
         {
+            $conf->options->set( verbose => 1 );
             my ($stdout, $stderr, $ret);
             my $icuconfig;
             my ($without, $icushared, $icuheaders);
@@ -664,7 +682,6 @@
                             without         => 0,
                             autodetect      => 1,
                             icuconfig       => $icuconfig,
-                            verbose         => 1,
                         }
                     );
                 },

Modified: trunk/t/steps/auto/msvc-01.t
==============================================================================
--- trunk/t/steps/auto/msvc-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/msvc-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -93,15 +93,13 @@
 
 $major = 13;
 $minor = 99;
-$verbose = undef;
-$status = $step->_handle_not_msvc($conf, $major, $minor, $verbose);
+$status = $step->_handle_not_msvc($conf, $major, $minor);
 ok(! defined $status, 'sub return value, as expected, not yet set');
 ok(! $step->result(), 'result, as expected, not yet set');
 
 $major = 13;
 $minor = undef;
-$verbose = undef;
-$status = $step->_handle_not_msvc($conf, $major, $minor, $verbose);
+$status = $step->_handle_not_msvc($conf, $major, $minor);
 ok($status, 'sub return value, as expected, set to true value');
 is($step->result(), q{no}, 'Got expected result');
 ok(! defined ($conf->data->get( 'msvcversion' )),
@@ -109,13 +107,21 @@
 
 $major = undef;
 $minor = 99;
-$verbose = undef;
-$status = $step->_handle_not_msvc($conf, $major, $minor, $verbose);
+$status = $step->_handle_not_msvc($conf, $major, $minor);
 ok($status, 'sub return value, as expected, set to true value');
 is($step->result(), q{no}, 'Got expected result');
 ok(! defined ($conf->data->get( 'msvcversion' )),
     'msvcversion is undef, as expected');
 
+$conf->replenish($serialized);
+
+########## _handle_not_msvc() ##########
+
+($args, $step_list_ref) = process_options( {
+    argv            => [ q{--verbose=1} ],
+    mode            => q{configure},
+} );
+$conf->options->set(%{$args});
 {
     my $stdout;
     $major = undef;
@@ -123,7 +129,7 @@
     $verbose = 1;
     capture(
         sub { $status =
-            $step->_handle_not_msvc($conf, $major, $minor, $verbose); },
+            $step->_handle_not_msvc($conf, $major, $minor); },
         \$stdout,
     );
     ok($status, 'sub return value, as expected, set to true value');
@@ -141,8 +147,7 @@
 
 $major = 13;
 $minor = 99;
-$verbose = undef;
-$msvcversion = $step->_compose_msvcversion($major, $minor, $verbose);
+$msvcversion = $step->_compose_msvcversion($major, $minor);
 is($msvcversion, '13.99', "Got expected MSVC version");
 is($step->result(), 'yes, 13.99', "Got expected result");
 $step->set_result(undef);
@@ -151,10 +156,9 @@
     my $stdout;
     $major = 13;
     $minor = 99;
-    $verbose = 1;
     capture(
         sub { $msvcversion =
-            $step->_compose_msvcversion($major, $minor, $verbose); },
+            $step->_compose_msvcversion($major, $minor); },
         \$stdout,
     );
     is($msvcversion, '13.99', "Got expected MSVC version");

Modified: trunk/t/steps/auto/neg_0-01.t
==============================================================================
--- trunk/t/steps/auto/neg_0-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/neg_0-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -55,11 +55,10 @@
 
 my $d_neg_0;
 my $orig_has_neg_0 = 0;
-my $verbose = $conf->data->get('verbose');
 
 $d_neg_0 = '-0';
 
-is( $step->_evaluate_cc_run($conf, $d_neg_0, $orig_has_neg_0, $verbose),
+is( $step->_evaluate_cc_run($conf, $d_neg_0, $orig_has_neg_0),
     1,
     '_evaluate_cc_run() completed satisfactorily' );
 
@@ -67,7 +66,7 @@
 
 $d_neg_0 = '0';
 
-is( $step->_evaluate_cc_run($conf, $d_neg_0, $orig_has_neg_0, $verbose),
+is( $step->_evaluate_cc_run($conf, $d_neg_0, $orig_has_neg_0),
     0,
     '_evaluate_cc_run() completed satisfactorily' );
 is( $step->result(), 'no', 'Got expected result' );
@@ -85,7 +84,6 @@
 $conf->options->set( %{$args} );
 $step = test_step_constructor_and_description($conf);
 
-$verbose = $conf->options->get('verbose');
 my $has_neg_0;
 
 $d_neg_0 = '-0';
@@ -94,7 +92,7 @@
     capture(
         sub {
             $has_neg_0 = $step->_evaluate_cc_run(
-                $conf, $d_neg_0, $orig_has_neg_0, $verbose
+                $conf, $d_neg_0, $orig_has_neg_0
             ),
         },
         \$stdout,
@@ -111,7 +109,7 @@
     capture(
         sub {
             $has_neg_0 = $step->_evaluate_cc_run(
-                $conf, $d_neg_0, $orig_has_neg_0, $verbose
+                $conf, $d_neg_0, $orig_has_neg_0
             ),
         },
         \$stdout,

Modified: trunk/t/steps/auto/opengl-01.t
==============================================================================
--- trunk/t/steps/auto/opengl-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/opengl-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -5,7 +5,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 32;
+use Test::More tests => 29;
 use Carp;
 use lib qw( lib );
 use_ok('config::auto::opengl');
@@ -138,26 +138,8 @@
     my ($glut_api_version, $glut_brand);
     capture(
         sub { ($glut_api_version, $glut_brand) = $step->_evaluate_cc_run(
+            $conf,
             $test,
-            0,
-        ); },
-        \$stdout,
-        \$stderr,
-    );
-    is( $glut_api_version, $try[0],
-        "Got first expected return value for _evaluate_cc_run()." );
-    is( $glut_brand, $try[1],
-        "Got first expected return value for _evaluate_cc_run()." );
-    ok(! $stdout, "Nothing captured on STDOUT, as expected");
-}
-
-{
-    my ($stdout, $stderr);
-    my ($glut_api_version, $glut_brand);
-    capture(
-        sub { ($glut_api_version, $glut_brand) = $step->_evaluate_cc_run(
-            $test,
-            $conf->options->get( 'verbose' )
         ); },
         \$stdout,
         \$stderr,
@@ -171,6 +153,8 @@
         qr/yes, $glut_brand API version $glut_api_version/,
         "Got expected verbose output for _evaluate_cc_run()"
     );
+    # prepare for next test
+    $conf->options->set(verbose => undef);
 }
 
 ########## _handle_glut() ##########

Modified: trunk/t/steps/auto/pcre-01.t
==============================================================================
--- trunk/t/steps/auto/pcre-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/pcre-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -98,14 +98,13 @@
 
 # Mock different outcomes of _evaluate_cc_run
 my ($test, $has_pcre);
-my $verbose = $conf->options->get('verbose');
 
 $test = q{pcre foobar};
-ok(! $step->_evaluate_cc_run($test, $verbose),
+ok(! $step->_evaluate_cc_run($conf, $test),
     "Got expected setting for HAS_PCRE");
 
 $test = q{pcre 4.1};
-ok($step->_evaluate_cc_run($test, $verbose),
+ok($step->_evaluate_cc_run($conf, $test),
     "_evaluate_cc_run returned true value as expected");
 is($step->result(), q{yes, 4.1}, "Got expected PCRE version");
 
@@ -122,14 +121,13 @@
 $step = test_step_constructor_and_description($conf);
 
 # Mock different outcomes of _evaluate_cc_run
-$verbose = $conf->options->get('verbose');
 
 $test = q{pcre 4.0};
 {
     my ($stdout, $stderr);
     capture(
         sub {
-            $has_pcre = $step->_evaluate_cc_run($test, $verbose);
+            $has_pcre = $step->_evaluate_cc_run($conf, $test);
         },
         \$stdout,
     );

Modified: trunk/t/steps/auto/readline-02.t
==============================================================================
--- trunk/t/steps/auto/readline-02.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/readline-02.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -35,10 +35,10 @@
 
 ########## _evaluate_cc_run() ##########
 
-my ($has_readline, $verbose);
+my ($has_readline);
 
-$verbose = undef;
-$has_readline = $step->_evaluate_cc_run($verbose);
+$conf->options->set(verbose => undef);
+$has_readline = $step->_evaluate_cc_run($conf);
 is($has_readline, 1, "Got expected value for has_readline");
 is($step->result(), 'yes', "Expected result was set");
 # Prepare for next test
@@ -46,9 +46,9 @@
 
 {
     my $stdout;
-    $verbose = 1;
+    $conf->options->set(verbose => 1);
     capture(
-        sub { $has_readline = $step->_evaluate_cc_run($verbose); },
+        sub { $has_readline = $step->_evaluate_cc_run($conf); },
         \$stdout,
     );
     is($has_readline, 1, "Got expected value for has_readline");
@@ -56,6 +56,7 @@
     like($stdout, qr/\(yes\)/, "Got expected verbose output");
     # Prepare for next test
     $step->set_result(undef);
+    $conf->options->set(verbose => undef);
 }
 
 ########## _handle_readline() ##########

Modified: trunk/t/steps/auto/zlib-01.t
==============================================================================
--- trunk/t/steps/auto/zlib-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/auto/zlib-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -90,8 +90,6 @@
    '-lz',
    "_select_lib() returned expected value");
 
-my $verbose = undef;
-
 $conf->replenish($serialized);
 
 ########## --without-zlib; _evaluate_cc_run() ##########
@@ -105,8 +103,8 @@
 my ($test, $has_zlib);
 $test = qq{1.2.3\n};
 $has_zlib = 0;
-$verbose = undef;
-$has_zlib = $step->_evaluate_cc_run($conf, $test, $has_zlib, $verbose);
+$conf->options->set(verbose => undef);
+$has_zlib = $step->_evaluate_cc_run($conf, $test, $has_zlib);
 is($has_zlib, 1, "'has_zlib' set as expected");
 is($step->result(), 'yes, 1.2.3', "Expected result was set");
 # Prepare for next test
@@ -114,8 +112,8 @@
 
 $test = qq{foobar};
 $has_zlib = 0;
-$verbose = undef;
-$has_zlib = $step->_evaluate_cc_run($conf, $test, $has_zlib, $verbose);
+$conf->options->set(verbose => undef);
+$has_zlib = $step->_evaluate_cc_run($conf, $test, $has_zlib);
 is($has_zlib, 0, "'has_zlib' set as expected");
 ok(! defined $step->result(), "Result is undefined, as expected");
 
@@ -123,10 +121,10 @@
     my $stdout;
     $test = qq{1.2.3\n};
     $has_zlib = 0;
-    $verbose = 1;
+    $conf->options->set(verbose => 1);
     capture(
         sub { $has_zlib =
-            $step->_evaluate_cc_run($conf, $test, $has_zlib, $verbose); },
+            $step->_evaluate_cc_run($conf, $test, $has_zlib); },
         \$stdout,
     );
     is($has_zlib, 1, "'has_zlib' set as expected");

Modified: trunk/t/steps/gen/opengl-01.t
==============================================================================
--- trunk/t/steps/gen/opengl-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/gen/opengl-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -5,7 +5,7 @@
 
 use strict;
 use warnings;
-use Test::More tests =>  7;
+use Test::More tests =>  20;
 use Carp;
 use lib qw( lib );
 use_ok('config::gen::opengl');
@@ -14,6 +14,7 @@
 use Parrot::Configure::Test qw(
     test_step_constructor_and_description
 );
+use IO::CaptureOutput qw( capture );
 
 ########## regular ##########
 
@@ -27,17 +28,84 @@
 my $conf = Parrot::Configure::Step::Test->new;
 $conf->include_config_results( $args );
 
-my $pkg = q{gen::opengl};
+my ($pkg, $step, $result);
+my $serialized = $conf->pcfreeze();
+
+$pkg = q{gen::opengl};
 $conf->add_steps($pkg);
 $conf->options->set( %{$args} );
-my $step = test_step_constructor_and_description($conf);
+$step = test_step_constructor_and_description($conf);
 
 ##### mock no OpenGL #####
 $conf->data->set( has_opengl => 0 );
-my $result = $step->runstep($conf);
+$result = $step->runstep($conf);
 ok($result, "runstep() returned true value");
 is($step->result(), q{skipped}, "Got expected result when no 'has_opengl'" );
 
+$conf->replenish($serialized);
+
+########### verbose ###########
+
+($args, $step_list_ref) = process_options( {
+    argv => [ q{--verbose} ],
+    mode => q{configure},
+} );
+
+$conf->add_steps($pkg);
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+{
+    my ($stdout, $stderr);
+    capture(
+        sub { $result = $step->runstep($conf); },
+        \$stdout,
+        \$stderr,
+    );
+    ok($result, "runstep() returned true value");
+    like( $stdout,
+        qr/Checking for OpenGL headers using the following globs/s,
+        "Got expected verbose output"
+    );
+    like( $stdout,
+        qr/Found the following OpenGL headers/s,
+        "Got expected verbose output"
+    );
+    like( $stdout,
+        qr/PASS\s+FAIL\s+IGNORE\s+HEADER/s,
+        "Got expected verbose output"
+    );
+    like( $stdout,
+        qr/unique signatures successfully translated/s,
+        "Got expected verbose output"
+    );
+}
+
+$conf->replenish($serialized);
+
+########### extra verbose ###########
+
+($args, $step_list_ref) = process_options( {
+    argv => [ q{--verbose=3} ],
+    mode => q{configure},
+} );
+
+$conf->add_steps($pkg);
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+{
+    my ($stdout, $stderr);
+    capture(
+        sub { $result = $step->runstep($conf); },
+        \$stdout,
+        \$stderr,
+    );
+    ok($result, "runstep() returned true value");
+    like( $stdout,
+        qr/COUNT\s+NCI SIGNATURE/s,
+        "Got expected verbose output"
+    );
+}
+
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################

Modified: trunk/t/steps/gen/platform-01.t
==============================================================================
--- trunk/t/steps/gen/platform-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/gen/platform-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -42,18 +42,17 @@
 my $platform_orig = $conf->data->get('osname');
 my $archname_orig = $conf->data->get('archname');
 $conf->data->set( archname => 'foo-bar' );
-my $verbose = 0;
 
 ########## _get_generated() ##########
 
 my $TEMP_generated_orig = $conf->data->get('TEMP_generated');
 {
-    $verbose = 1;
+    $conf->options->set(verbose => 1);
     my ($stdout, $stderr, $rv);
     my $expected = q{foo};
     $conf->data->set( TEMP_generated => $expected );
     capture(
-        sub { $rv = $step->_get_generated( $conf, $verbose ) },
+        sub { $rv = $step->_get_generated( $conf ) },
         \$stdout,
         \$stderr,
     );
@@ -61,8 +60,8 @@
     like( $stdout, qr/\($expected\)/, "Got expected verbose output");
 }
 $conf->data->set( TEMP_generated => undef );
-$verbose = 0;
-is( $step->_get_generated( $conf, $verbose ), q{},
+$conf->options->set(verbose => 0);
+is( $step->_get_generated( $conf ), q{},
     "Got expected generated");
 
 # re-set to original values

Modified: trunk/t/steps/init/defaults-01.t
==============================================================================
--- trunk/t/steps/init/defaults-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/init/defaults-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -5,7 +5,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 37;
+use Test::More tests => 49;
 use Carp;
 use Cwd;
 use File::Copy;
@@ -143,6 +143,44 @@
 is($conf->data->get( 'linkflags' ), '-bundle -L/usr/local/lib64',
     "Got expected value for 'linkflags'");
 
+$conf->replenish($serialized);
+
+##### with extra-nci-thunks #####
+($args, $step_list_ref) = process_options(
+    {
+        argv => [ ],
+        mode => q{configure},
+    }
+);
+
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+$ret = $step->runstep($conf);
+ok( defined $ret, "runstep() returned defined value" );
+ok($conf->data->get( 'has_extra_nci_thunks' ),
+    "Got expected value for has_extra_nci_thunks" );
+ok($conf->data->get( 'HAS_EXTRA_NCI_THUNKS' ),
+    "Got expected value for HAS_EXTRA_NCI_THUNKS" );
+
+$conf->replenish($serialized);
+
+##### without extra-nci-thunks #####
+($args, $step_list_ref) = process_options(
+    {
+        argv => [ q{--without-extra-nci-thunks} ],
+        mode => q{configure},
+    }
+);
+
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+$ret = $step->runstep($conf);
+ok( defined $ret, "runstep() returned defined value" );
+ok(! $conf->data->get( 'has_extra_nci_thunks' ),
+    "Got expected value for has_extra_nci_thunks" );
+ok(! $conf->data->get( 'HAS_EXTRA_NCI_THUNKS' ),
+    "Got expected value for HAS_EXTRA_NCI_THUNKS" );
+
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################

Modified: trunk/t/steps/init/hints/darwin-01.t
==============================================================================
--- trunk/t/steps/init/hints/darwin-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/init/hints/darwin-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -40,10 +40,11 @@
 my $stored = $conf->data->get($problematic_flag);
 
 {
+    $conf->options->set( verbose => undef );
     my ($stdout, $stderr);
     capture(
         sub { init::hints::darwin::_precheck(
-            $problematic_flag, $stored, 0
+            $conf, $problematic_flag, $stored
         ) },
         \$stdout,
         \$stderr,
@@ -52,10 +53,11 @@
 }
 
 {
+    $conf->options->set( verbose => 1 );
     my ($stdout, $stderr);
     capture(
         sub { init::hints::darwin::_precheck(
-            $problematic_flag, $stored, 1
+            $conf, $problematic_flag, $stored
         ) },
         \$stdout,
         \$stderr,
@@ -68,10 +70,11 @@
 }
 
 {
+    $conf->options->set( verbose => 1 );
     my ($stdout, $stderr);
     capture(
         sub { init::hints::darwin::_precheck(
-            $problematic_flag, q{}, 1
+            $conf, $problematic_flag, q{}
         ) },
         \$stdout,
         \$stderr,
@@ -81,6 +84,7 @@
         "_precheck():  Got expected verbose output" );
     like($stdout, qr/Pre-check:\s+\(nil\)/,
         "_precheck():  Got expected verbose output" );
+    $conf->options->set( verbose => undef );
 }
 
 ##### _strip_arch_flags_engine #####
@@ -107,22 +111,24 @@
 ##### _postcheck #####
 
 {
+    $conf->options->set( verbose => undef );
     my $flag = 'ccflags';
     my $flagsref = { 'ccflags' => 'my ccflag' };
     my ($stdout, $stderr);
 
     capture(
         sub { init::hints::darwin::_postcheck(
-            $flagsref, $flag, 0
+            $conf, $flagsref, $flag
         ) },
         \$stdout,
         \$stderr,
     );
     ok( ! $stdout, "_postcheck():  Non-verbose mode produced no output" );
 
+    $conf->options->set( verbose => 1 );
     capture(
         sub { init::hints::darwin::_postcheck(
-            $flagsref, $flag, 1
+            $conf, $flagsref, $flag
         ) },
         \$stdout,
         \$stderr,
@@ -131,10 +137,11 @@
     like($stdout, qr/Post-check:\s+$flagsref->{$flag}/,
         "_postcheck():  Got expected verbose output" );
 
+    $conf->options->set( verbose => 1 );
     $flagsref = { 'ccflags' => undef };
     capture(
         sub { init::hints::darwin::_postcheck(
-            $flagsref, $flag, 1
+            $conf, $flagsref, $flag
         ) },
         \$stdout,
         \$stderr,
@@ -164,10 +171,11 @@
         "_strip_arch_flags(): '-arch' flags and extra whitespace removed",
     );
 
+    $conf->options->set( verbose => 1 );
     my ($stdout, $stderr);
     capture(
         sub {
-            $flagsref = init::hints::darwin::_strip_arch_flags($conf, 1);
+            $flagsref = init::hints::darwin::_strip_arch_flags($conf);
         },
         \$stdout,
         \$stderr,
@@ -351,17 +359,17 @@
     $addl_flags_ref = undef;
     $flagsref = undef;
     $title = 'Fink';
-    $verbose = 0;
+    $conf->options->set( 'verbose' => undef );
     ok( init::hints::darwin::_add_to_flags(
-        $addl_flags_ref, $flagsref, $title, $verbose
+        $conf, $addl_flags_ref, $flagsref, $title
     ), "_add_to_flags(): returned true value when no probes found" );
 
-    $verbose = 1;
+    $conf->options->set( 'verbose' => 1 );
     {
         my ($stdout, $stderr);
         capture(
             sub { init::hints::darwin::_add_to_flags(
-                $addl_flags_ref, $flagsref, $title, $verbose
+                $conf, $addl_flags_ref, $flagsref, $title
             ); },
             \$stdout,
             \$stderr,
@@ -381,9 +389,9 @@
     $flagsref->{ccflags} = " -pipe -fno-common -Wno-long-double ";
     $flagsref->{linkflags} = undef;
     $title = 'Fink';
-    $verbose = 0;
+    $conf->options->set( 'verbose' => undef );
     my $rv = init::hints::darwin::_add_to_flags(
-        $addl_flags_ref, $flagsref, $title, $verbose
+        $conf, $addl_flags_ref, $flagsref, $title
     );
     is( $flagsref->{linkflags}, " $addl_flags_ref->{linkflags}",
         "_add_to_flags():  flag added where not previously populated" );

Modified: trunk/t/steps/init/hints/linux-01.t
==============================================================================
--- trunk/t/steps/init/hints/linux-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/init/hints/linux-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -37,17 +37,16 @@
 ##### _handle_icc_ccflags() #####
 
 my $ccflags = '';
-my $verbose = 0;
-$ccflags = init::hints::linux::_handle_icc_ccflags($ccflags, $verbose);
+$ccflags = init::hints::linux::_handle_icc_ccflags($conf, $ccflags);
 like( $ccflags, qr/\s-we147/, "On icc, 'cc_flags' set as expected" );
 
 $ccflags = '';
-$verbose = 1;
 {
+    $conf->options->set( verbose => 1 );
     my ($stdout, $stderr);
     capture(
         sub { $ccflags =
-            init::hints::linux::_handle_icc_ccflags($ccflags, $verbose); },
+            init::hints::linux::_handle_icc_ccflags($conf, $ccflags); },
         \$stdout,
         \$stderr,
     );

Modified: trunk/t/steps/inter/libparrot-01.t
==============================================================================
--- trunk/t/steps/inter/libparrot-01.t	Thu Jun  3 00:55:19 2010	(r47317)
+++ trunk/t/steps/inter/libparrot-01.t	Thu Jun  3 01:36:45 2010	(r47318)
@@ -5,7 +5,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 48;
+use Test::More tests => 74;
 use Carp;
 use lib qw( lib t/configure/testlib );
 use_ok('config::inter::libparrot');
@@ -258,6 +258,101 @@
 $conf->data->set('has_dynamic_linking' => $has_dynamic_linking_orig);
 @prompts = ();
 
+##### get_libs() #####
+
+my %seen;
+{
+    local $^O = 'foobar';
+    %seen = map { $_ => 1 } inter::libparrot::get_libs();
+    is( scalar keys %seen, 1, "Got expected number of libs: generic" );
+    ok( $seen{'libparrot.so'}, "Got expected lib" );
+}
+
+{
+    local $^O = 'MSWin32';
+    %seen = map { $_ => 1 } inter::libparrot::get_libs();
+    is( scalar keys %seen, 3, "Got expected number of libs: Win32" );
+    is_deeply(
+        \%seen,
+        {
+            'libparrot.dll' => 1,
+            'libparrot.lib' => 1,
+            'libparrot.dll.a' => 1,
+        },
+        "Got expected libs"
+    );
+}
+
+{
+    local $^O = 'cygwin';
+    %seen = map { $_ => 1 } inter::libparrot::get_libs();
+    is( scalar keys %seen, 1, "Got expected number of libs: cygwin" );
+    is_deeply(
+        \%seen,
+        {
+            'libparrot.dll.a' => 1,
+        },
+        "Got expected libs"
+    );
+}
+
+{
+    local $^O = 'darwin';
+    %seen = map { $_ => 1 } inter::libparrot::get_libs();
+    is( scalar keys %seen, 2, "Got expected number of libs: darwin" );
+    is_deeply(
+        \%seen,
+        {
+            'libparrot.dylib' => 1,
+            'libparrot.a' => 1,
+        },
+        "Got expected libs"
+    );
+}
+
+##### get_libpaths() #####
+
+%seen = map { $_ => 1 } inter::libparrot::get_libpaths($conf);
+ok( $seen{'/usr/local/lib'}, "Got expected lib: generic" );
+ok( $seen{'/usr/lib'}, "Got expected lib: generic" );
+
+{
+    local $^O  = 'MSWin32';
+    local $ENV{PATH} = 'alpha;beta';
+    %seen = map { $_ => 1 } inter::libparrot::get_libpaths($conf);
+    ok( $seen{'/usr/local/lib'}, "Got expected lib: MSWin32" );
+    ok( $seen{'/usr/lib'}, "Got expected lib: MSWin32" );
+    ok( $seen{'alpha'}, "Got expected lib: MSWin32" );
+    ok( $seen{'beta'}, "Got expected lib: MSWin32" );
+}
+
+{
+    local $ENV{LD_LIBRARY_PATH} = 'alpha:beta';
+    %seen = map { $_ => 1 } inter::libparrot::get_libpaths($conf);
+    ok( $seen{'/usr/local/lib'}, "Got expected lib: LD_LIBRARY_PATH" );
+    ok( $seen{'/usr/lib'}, "Got expected lib: LD_LIBRARY_PATH" );
+    ok( $seen{'alpha'}, "Got expected lib: LD_LIBRARY_PATH" );
+    ok( $seen{'beta'}, "Got expected lib: LD_LIBRARY_PATH" );
+}
+
+{
+    local $ENV{LD_RUN_PATH} = 'alpha:beta';
+    %seen = map { $_ => 1 } inter::libparrot::get_libpaths($conf);
+    ok( $seen{'/usr/local/lib'}, "Got expected lib: LD_RUN_PATH" );
+    ok( $seen{'/usr/lib'}, "Got expected lib: LD_RUN_PATH" );
+    ok( $seen{'alpha'}, "Got expected lib: LD_RUN_PATH" );
+    ok( $seen{'beta'}, "Got expected lib: LD_RUN_PATH" );
+}
+
+{
+    local $ENV{DYLD_LIBRARY_PATH} = 'alpha:beta';
+    %seen = map { $_ => 1 } inter::libparrot::get_libpaths($conf);
+    ok( $seen{'/usr/local/lib'}, "Got expected lib: DYLD_LIBRARY_PATH" );
+    ok( $seen{'/usr/lib'}, "Got expected lib: DYLD_LIBRARY_PATH" );
+    ok( $seen{'alpha'}, "Got expected lib: DYLD_LIBRARY_PATH" );
+    ok( $seen{'beta'}, "Got expected lib: DYLD_LIBRARY_PATH" );
+}
+
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################


More information about the parrot-commits mailing list