Alt-ExtUtils-PkgConfig-PLICEASE

 view release on metacpan or  search on metacpan

lib/ExtUtils/PkgConfig.pm  view on Meta::CPAN

The pkg-config program retrieves information about installed libraries,
usually for the purposes of compiling against and linking to them.

ExtUtils::PkgConfig is a very simplistic interface to this utility, intended
for use in the Makefile.PL of perl extensions which bind libraries that
pkg-config knows.  It is really just boilerplate code that you would've
written yourself.

=head2 USAGE

=over

=item HASH = ExtUtils::PkgConfig->find (STRING, [STRING, ...])

Call pkg-config on the library specified by I<STRING> (you'll have to know what
to use here).  The returned I<HASH> contains the modversion, cflags, and libs
values under keys with those names. If multiple STRINGS are passed they are
attempted in the order they are given till a working package is found.

If pkg-config fails to find a working I<STRING>, this function croaks with a
message intended to be helpful to whomever is attempting to compile your
package.

For example:

  *** can not find package bad1
  *** check that it is properly installed and available
  *** in PKG_CONFIG_PATH

or

  *** can't find cflags for gtk+-2.0
  *** is it properly installed and available in PKG_CONFIG_PATH?

=item STRING = ExtUtils::PkgConfig->create_version_macros (PACKAGE, STEM)

Create a set of version macros with the prefix I<STEM> for the library
specified by I<PACKAGE>.  The result is returned.

Example input would be "gtk+-2.0" for I<PACKAGE> and "GTK" for I<STEM>.

=item ExtUtils::PkgConfig->write_version_macros (FILE, PACKAGE, STEM, [PACKAGE, STEM, ...])

Create one or more sets of version macros for the libraries and prefixes
specified by the I<PACKAGE> and I<STEM> pairs and write them to the file
I<FILE>.  If it doesn't exist, I<FILE> will be created.  If it does exist, it
will be overwritten.

=back

=head1 SEE ALSO

ExtUtils::PkgConfig was designed to work with ExtUtils::Depends for compiling
the various modules of the gtk2-perl project.

  L<ExtUtils::Depends>

  L<http://gtk2-perl.sourceforge.net/>

This module is really just an interface to the pkg-config utility program.
http://www.freedesktop.org/Software/pkgconfig

=head1 BUNDLED CODE

This version of L<ExtUtils::PkgConfig> comes with functions and documentation
that were taken from the original, which was distributable under the LGPL.
I would prefer to distribute under the same terms as Perl, but I am not a lawyer
and to simplify things I am using the same license.  The original module included
the following notice which must be respected:

AUTHORS:

muppet E<lt>scott at asofyet dot orgE<gt>.

COPYRIGHT AND LICENSE:

Copyright 2003-2004, 2012-2013 by muppet, Ross McFarland, and the gtk2-perl
team

This library is free software; you can redistribute it and/or modify
it under the terms of the Lesser General Public License (LGPL).  For
more information, see http://www.fsf.org/licenses/lgpl.txt

=head1 AUTHOR

Graham Ollis <plicease@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2016 by Graham Ollis.

This is free software, licensed under:

  The GNU Lesser General Public License, Version 2.1, February 1999

=cut



( run in 1.460 second using v1.01-cache-2.11-cpan-e1769b4cff6 )