Alien-LibANN
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my $SRC = File::Spec->catfile(qw(src ann_1.1.2));
$_ = File::Spec->rel2abs($_) for $PKG, $SRC, $DIST;
my $VERSION = do {
require ExtUtils::MM_Unix;
ExtUtils::MM_Unix->parse_version($DIST);
};
my $LIBANN_VERSION = '1.1.2';
my $CCFLAGS = $ENV{CCFLAGS} || '-I/usr/local/include';
my $LDFLAGS = $ENV{LDFLAGS} || '-L/usr/local/lib';
eval { Devel::CheckLib::assert_lib( lib => "ANN", LIBS => $LDFLAGS ) };
my $install_libann = 1;
if ( !$@ ) {
print <<EOF;
*** We've detected an existing installation of libANN ***
That existing installation of libANN may have been installed before by:
Makefile.PL view on Meta::CPAN
my $prefix = prompt( "Where would you like to install ${name}?", "/usr/local" );
my $configure_args = '';
$configure_args .= "--prefix=$prefix " if $prefix;
$configure_args .= prompt("Are there any other arguments you would like to pass to configure?");
print "\n$name will be configured with the following arguments:\n", " $configure_args\n";
chdir $destination;
local $ENV{CFLAGS} = $CCFLAGS;
local $ENV{LDFLAGS} = $LDFLAGS;
my @cmd = ( File::Spec->catfile( $destination, "configure" ), split( /\s+/, $configure_args ) );
if ( system(@cmd) != 0 ) {
print <<EOF;
configure $configure_args failed: $!
Something went wrong with the $name configuration.
You should correct it and re-run Makefile.PL.
EOF
chdir $CWD;
exit 0;
}
( run in 0.366 second using v1.01-cache-2.11-cpan-8d75d55dd25 )