use ExtUtils::MakeMaker;
my %options = (
'NAME' => 'P4::Journal',
'VERSION_FROM' => 'Journal.pm', # finds $VERSION
);
# Ask if they have a compiler and want to use it.
print <<EOF;
If you have a C compiler you can use the optimized (C) implementations
of some heavily used functions. This makes P4::Journal much faster to
use. If you don't have a C compiler you can use the slower, pure-perl
versions.
EOF
print( "Do you have a C compiler (y/n)?: ");
my $reply = <>;
my $opt_build = 1;
if ( $reply !~ /^y/i )
{
$options{ 'C' } = [];
$opt_build = 0;
print( "OK, I'll disable the C components...\n" );
}
WriteMakefile( %options );