.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ExtUtils::PkgConfig 3pm" .TH ExtUtils::PkgConfig 3pm "2020-12-27" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" ExtUtils::PkgConfig \- simplistic interface to pkg\-config .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use ExtUtils::PkgConfig; \& \& $package = \*(Aqgtk+\-2.0\*(Aq; \& \& %pkg_info = ExtUtils::PkgConfig\->find ($package); \& print "modversion: $pkg_info{modversion}\en"; \& print "cflags: $pkg_info{cflags}\en"; \& print "libs: $pkg_info{libs}\en"; \& \& $exists = ExtUtils::PkgConfig\->exists($package); \& \& $modversion = ExtUtils::PkgConfig\->modversion($package); \& \& $libs = ExtUtils::PkgConfig\->libs($package); \& \& $cflags = ExtUtils::PkgConfig\->cflags($package); \& \& $cflags_only_I = ExtUtils::PkgConfig\->cflags_only_I($package); \& \& $cflags_only_other = ExtUtils::PkgConfig\->cflags_only_other($package); \& \& $libs_only_L = ExtUtils::PkgConfig\->libs_only_L($package); \& \& $libs_only_l = ExtUtils::PkgConfig\->libs_only_l($package); \& \& $libs_only_other = ExtUtils::PkgConfig\->libs_only_other($package); \& \& $static_libs = ExtUtils::PkgConfig\->static_libs($package); \& \& $var_value = ExtUtils::PkgConfig\->variable($package, $var); \& \& if (ExtUtils::PkgConfig\->atleast_version($package,$version)) { \& ... \& } \& \& if (ExtUtils::PkgConfig\->exact_version($package,$version)) { \& ... \& } \& \& if (ExtUtils::PkgConfig\->max_version($package,$version)) { \& ... \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The pkg-config program retrieves information about installed libraries, usually for the purposes of compiling against and linking to them. .PP 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. .SS "\s-1USAGE\s0" .IX Subsection "USAGE" .IP "\s-1HASH\s0 = ExtUtils::PkgConfig\->find (\s-1STRING,\s0 [\s-1STRING, ...\s0])" 4 .IX Item "HASH = ExtUtils::PkgConfig->find (STRING, [STRING, ...])" Call pkg-config on the library specified by \fI\s-1STRING\s0\fR (you'll have to know what to use here). The returned \fI\s-1HASH\s0\fR contains the modversion, cflags, and libs values under keys with those names. If multiple \s-1STRINGS\s0 are passed they are attempted in the order they are given till a working package is found. .Sp If pkg-config fails to find a working \fI\s-1STRING\s0\fR, this function croaks with a message intended to be helpful to whomever is attempting to compile your package. .Sp For example: .Sp .Vb 3 \& *** can not find package bad1 \& *** check that it is properly installed and available \& *** in PKG_CONFIG_PATH .Ve .Sp or .Sp .Vb 2 \& *** can\*(Aqt find cflags for gtk+\-2.0 \& *** is it properly installed and available in PKG_CONFIG_PATH? .Ve .IP "\s-1STRING\s0 = ExtUtils::PkgConfig\->create_version_macros (\s-1PACKAGE, STEM\s0)" 4 .IX Item "STRING = ExtUtils::PkgConfig->create_version_macros (PACKAGE, STEM)" Create a set of version macros with the prefix \fI\s-1STEM\s0\fR for the library specified by \fI\s-1PACKAGE\s0\fR. The result is returned. .Sp Example input would be \*(L"gtk+\-2.0\*(R" for \fI\s-1PACKAGE\s0\fR and \*(L"\s-1GTK\*(R"\s0 for \fI\s-1STEM\s0\fR. .IP "ExtUtils::PkgConfig\->write_version_macros (\s-1FILE, PACKAGE, STEM,\s0 [\s-1PACKAGE, STEM, ...\s0])" 4 .IX 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 \fI\s-1PACKAGE\s0\fR and \fI\s-1STEM\s0\fR pairs and write them to the file \&\fI\s-1FILE\s0\fR. If it doesn't exist, \fI\s-1FILE\s0\fR will be created. If it does exist, it will be overwritten. .SH "SEE ALSO" .IX Header "SEE ALSO" ExtUtils::PkgConfig was designed to work with ExtUtils::Depends for compiling the various modules of the gtk2\-perl project. .PP .Vb 1 \& L \& \& L .Ve .PP This module is really just an interface to the pkg-config utility program. http://www.freedesktop.org/Software/pkgconfig .SH "AUTHORS" .IX Header "AUTHORS" muppet . .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2003\-2004, 2012\-2013 by muppet, Ross McFarland, and the gtk2\-perl team .PP This library is free software; you can redistribute it and/or modify it under the terms of the Lesser General Public License (\s-1LGPL\s0). For more information, see http://www.fsf.org/licenses/lgpl.txt