package Configure::Step;

use strict;
use vars qw($description @args);
use Parrot::Configure::Step ':auto';

$description="Verifying that the compiler supports function pointer casts...";

@args=();

sub runstep {
  my $jitcapable=Configure::Data->get('jitcapable');

  if ($jitcapable) {
    cc_gen('config/auto/funcptr/test_c.in');
    eval { cc_build(); };

    if ($@ || cc_run() !~ /OK/) {
      print <<"END";
Although it is not required by the ANSI C standard,
Parrot requires the ability to cast from void pointers to function
pointers for its JIT support.

Your compiler does not appear to support this behavior with the
flags you have specified.  You must adjust your settings in order
to use the JIT code.

If you wish to continue without JIT support, please re-run this script
With the '--jitcapable=0' argument.
END
      exit(-1);
    }
    cc_clean();
  }
}

1;