Alien-VideoLAN-LibVLC
view release on metacpan or search on metacpan
Alien-VideoLAN-LibVLC
This module checks if libvlc is installed on the system.
If libvlc is installed, provides some flags for compiler.
INSTALLATION
To install this module, run the following commands:
perl Build.PL
./Build
./Build test
./Build install
lib/Alien/VideoLAN/LibVLC.pm view on Meta::CPAN
if ($a{suppress_error_message}) {
my $str;
open my $fh, '>', \$str;
local *STDERR = $fh;
%p = ExtUtils::PkgConfig->find("$lib $version");
} else {
%p = ExtUtils::PkgConfig->find("$lib $version");
}
my @cflags = grep { $_ ne '' } split /\s/, $p{cflags};
$p{cflags} = \@cflags;
my @ldflags = grep { $_ ne '' } split /\s/, $p{libs};
delete $p{libs};
$p{ldflags} = \@ldflags;
$p{version} = $p{modversion};
delete $p{modversion};
return %p;
}
=head1 SYNOPSIS
use Alien::VideoLAN::LibVLC;
my %x = Alien::VideoLAN::LibVLC->find_libvlc();
print $x{version};
lib/Alien/VideoLAN/LibVLC.pm view on Meta::CPAN
nothing will be put to STDERR if libvlc is not found.
Returns hash with following fields:
=over 4
=item * B<version>
a string with version.
=item * B<cflags>
arrayref of strings, e.g. C<['-I/foo/bar']>
=item * B<ldflags>
arrayref of strings, e.g. C<['-L/foo/baz', '-lvlc']>
=back
If libvlc of specified version isn't found, croaks.
=cut
sub find_libvlc {
( run in 0.490 second using v1.01-cache-2.11-cpan-94b05bcf43c )