Bio-DB-Big
view release on metacpan or search on metacpan
sub find_libbigwig {
my ($self) = @_;
# If either of these are set, we expect to find the libBigWig files there:
# (They're explicitly set by the user, so we shouldn't fall back to
# finding another copy somewhere else.)
if ( my $dir = $self->args('libbigwig') ) {
return 1 if $self->find_libbigwig_in_build_dir($dir);
return 1 if $self->find_libbigwig_in_install_dir($dir);
$self->die_libbigwig_not_found(
"--libbigwig '$dir' command line parameter does not contain expected files\n"
);
}
elsif ( $dir = $ENV{'LIBBIGWIG_DIR'} ) {
return 1 if $self->find_libbigwig_in_build_dir($dir);
return 1 if $self->find_libbigwig_in_install_dir($dir);
$self->die_libbigwig_not_found(
"LIGBIGWIG_DIR=$ENV{LIBBIGWIG_DIR} environment variable does not contain expected files\n"
);
}
# Search through remaining possible (but not fatal) locations:
my $found = 0;
foreach my $dir (
$self->prefix, from_Alien(),
scalar `pkg-config --variable=libdir libBigWig 2>/dev/null`,
qw{ /usr /usr/local /usr/share /opt/local },
)
{
if ( $dir and $self->find_libbigwig_in_install_dir($dir) ) {
$found = 1;
last;
}
}
return 1 if $found;
$self->die_libbigwig_not_found();
}
sub set_include_and_compiler_flags {
my ($self) = @_;
my $libbigwig_include = $self->config_data('libbigwig_include');
my $libbigwig_lib = $self->config_data('libbigwig_lib');
my $static = $self->args('static');
$self->include_dirs( [$libbigwig_include] );
if ($static) {
if ( -f "$libbigwig_lib/libBigWig.a" && -f "$libbigwig_include/bigWig.h" ) {
$self->config_data( 'libbigwig_lib' => $libbigwig_lib );
$self->config_data( 'libbigwig_include' => $libbigwig_include );
return 1;
}
else {
return 0;
}
}
sub die_libbigwig_not_found {
my ( $self, $msg ) = @_;
$msg ||= '';
die $msg, <<END;
This module requires libBigWig (https://github.com/dpryan79/libBigWig)
Install it if you have not done so already.
This script will attempt to locate libBigWig by looking for BigWig.h and libBigWig.a in:
new_stackinfo||5.005000|
new_version||5.009000|
new_warnings_bitfield|||
next_symbol|||
nextargv|||
nextchar|||
ninstr|||
no_bareword_allowed|||
no_fh_allowed|||
no_op|||
not_a_number|||
nothreadhook||5.008000|
nuke_stacks|||
num_overflow|||n
offer_nice_chunk|||
oopsAV|||
oopsHV|||
op_clear|||
op_const_sv|||
op_dump||5.006000|
op_free|||
#define DPPP_CAT2(x,y) CAT2(x,y)
#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
/* Replace: 1 */
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
/* Replace PERL_PATCHLEVEL with PERL_VERSION */
/* Replace: 0 */
# endif
#endif
( run in 1.266 second using v1.01-cache-2.11-cpan-0a987023a57 )