2 package Module::Install::External;
4 # Provides dependency declarations for external non-Perl things
7 use Module::Install::Base;
9 use vars qw{$VERSION $ISCORE @ISA};
13 @ISA = qw{Module::Install::Base};
16 sub requires_external_cc {
19 # We need a C compiler, use the can_cc method for this
20 unless ( $self->can_cc ) {
21 print "Unresolvable missing external dependency.\n";
22 print "This package requires a C compiler.\n";
23 print STDERR "NA: Unable to build distribution on this platform.\n";
27 # Unlike some of the other modules, while we need to specify a
28 # C compiler as a dep, it needs to be a build-time dependency.
33 sub requires_external_bin {
34 my ($self, $bin, $version) = @_;
36 die "requires_external_bin does not support versions yet";
39 # Load the package containing can_run early,
40 # to avoid breaking the message below.
41 $self->load('can_run');
44 print "Locating required external dependency bin:$bin...";
45 my $found_bin = $self->can_run( $bin );
47 print " found at $found_bin.\n";
50 print "Unresolvable missing external dependency.\n";
51 print "Please install '$bin' seperately and try again.\n";
52 print STDERR "NA: Unable to build distribution on this platform.\n";
56 # Once we have some way to specify external deps, do it here.
57 # In the mean time, continue as normal.