| 1 |
NAME |
| 2 |
ExtUtils::PkgConfig - simplistic interface to pkg-config |
| 3 |
|
| 4 |
SYNOPSIS |
| 5 |
use ExtUtils::PkgConfig; |
| 6 |
|
| 7 |
$package = 'gtk+-2.0'; |
| 8 |
|
| 9 |
%pkg_info = ExtUtils::PkgConfig->find ($package); |
| 10 |
print "modversion: $pkg_info{modversion}\n"; |
| 11 |
print "cflags: $pkg_info{cflags}\n"; |
| 12 |
print "libs: $pkg_info{libs}\n"; |
| 13 |
|
| 14 |
$exists = ExtUtils::PkgConfig->exists($package); |
| 15 |
|
| 16 |
$modversion = ExtUtils::PkgConfig->modversion($package); |
| 17 |
|
| 18 |
$libs = ExtUtils::PkgConfig->libs($package); |
| 19 |
|
| 20 |
$cflags = ExtUtils::PkgConfig->cflags($package); |
| 21 |
|
| 22 |
$cflags_only_I = ExtUtils::PkgConfig->cflags_only_I($package); |
| 23 |
|
| 24 |
$cflags_only_other = ExtUtils::PkgConfig->cflags_only_other($package); |
| 25 |
|
| 26 |
$libs_only_L = ExtUtils::PkgConfig->libs_only_L($package); |
| 27 |
|
| 28 |
$libs_only_l = ExtUtils::PkgConfig->libs_only_l($package); |
| 29 |
|
| 30 |
$libs_only_other = ExtUtils::PkgConfig->libs_only_other($package); |
| 31 |
|
| 32 |
$static_libs = ExtUtils::PkgConfig->static_libs($package); |
| 33 |
|
| 34 |
$var_value = ExtUtils::PkgConfig->variable($package, $var); |
| 35 |
|
| 36 |
if (ExtUtils::PkgConfig->atleast_version($package,$version)) { |
| 37 |
... |
| 38 |
} |
| 39 |
|
| 40 |
if (ExtUtils::PkgConfig->exact_version($package,$version)) { |
| 41 |
... |
| 42 |
} |
| 43 |
|
| 44 |
if (ExtUtils::PkgConfig->max_version($package,$version)) { |
| 45 |
... |
| 46 |
} |
| 47 |
|
| 48 |
DESCRIPTION |
| 49 |
The pkg-config program retrieves information about installed libraries, |
| 50 |
usually for the purposes of compiling against and linking to them. |
| 51 |
|
| 52 |
ExtUtils::PkgConfig is a very simplistic interface to this utility, |
| 53 |
intended for use in the Makefile.PL of perl extensions which bind |
| 54 |
libraries that pkg-config knows. It is really just boilerplate code that |
| 55 |
you would've written yourself. |
| 56 |
|
| 57 |
USAGE |
| 58 |
HASH = ExtUtils::PkgConfig->find (STRING, [STRING, ...]) |
| 59 |
Call pkg-config on the library specified by *STRING* (you'll have to |
| 60 |
know what to use here). The returned *HASH* contains the modversion, |
| 61 |
cflags, and libs values under keys with those names. If multiple |
| 62 |
STRINGS are passed they are attempted in the order they are given |
| 63 |
till a working package is found. |
| 64 |
|
| 65 |
If pkg-config fails to find a working *STRING*, this function croaks |
| 66 |
with a message intended to be helpful to whomever is attempting to |
| 67 |
compile your package. |
| 68 |
|
| 69 |
For example: |
| 70 |
|
| 71 |
*** can not find package bad1 |
| 72 |
*** check that it is properly installed and available |
| 73 |
*** in PKG_CONFIG_PATH |
| 74 |
|
| 75 |
or |
| 76 |
|
| 77 |
*** can't find cflags for gtk+-2.0 |
| 78 |
*** is it properly installed and available in PKG_CONFIG_PATH? |
| 79 |
|
| 80 |
STRING = ExtUtils::PkgConfig->create_version_macros (PACKAGE, STEM) |
| 81 |
Create a set of version macros with the prefix *STEM* for the |
| 82 |
library specified by *PACKAGE*. The result is returned. |
| 83 |
|
| 84 |
Example input would be "gtk+-2.0" for *PACKAGE* and "GTK" for |
| 85 |
*STEM*. |
| 86 |
|
| 87 |
ExtUtils::PkgConfig->write_version_macros (FILE, PACKAGE, STEM, |
| 88 |
[PACKAGE, STEM, ...]) |
| 89 |
Create one or more sets of version macros for the libraries and |
| 90 |
prefixes specified by the *PACKAGE* and *STEM* pairs and write them |
| 91 |
to the file *FILE*. If it doesn't exist, *FILE* will be created. If |
| 92 |
it does exist, it will be overwritten. |
| 93 |
|
| 94 |
SEE ALSO |
| 95 |
ExtUtils::PkgConfig was designed to work with ExtUtils::Depends for |
| 96 |
compiling the various modules of the gtk2-perl project. |
| 97 |
|
| 98 |
L<ExtUtils::Depends> |
| 99 |
|
| 100 |
L<http://gtk2-perl.sourceforge.net/> |
| 101 |
|
| 102 |
This module is really just an interface to the pkg-config utility |
| 103 |
program. http://www.freedesktop.org/Software/pkgconfig |
| 104 |
|
| 105 |
AUTHORS |
| 106 |
muppet <scott at asofyet dot org>. |
| 107 |
|
| 108 |
COPYRIGHT AND LICENSE |
| 109 |
Copyright 2003-2004, 2012-2013 by muppet, Ross McFarland, and the |
| 110 |
gtk2-perl team |
| 111 |
|
| 112 |
This library is free software; you can redistribute it and/or modify it |
| 113 |
under the terms of the Lesser General Public License (LGPL). For more |
| 114 |
information, see http://www.fsf.org/licenses/lgpl.txt |
| 115 |
|