.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 3" .TH ExtUtils::PkgConfig 3 2023-07-25 "perl v5.38.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 USAGE .IX Subsection "USAGE" .IP "HASH = ExtUtils::PkgConfig\->find (STRING, [STRING, ...])" 4 .IX Item "HASH = ExtUtils::PkgConfig->find (STRING, [STRING, ...])" Call pkg-config on the library specified by \fISTRING\fR (you'll have to know what to use here). The returned \fIHASH\fR 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. .Sp If pkg-config fails to find a working \fISTRING\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 "STRING = ExtUtils::PkgConfig\->create_version_macros (PACKAGE, STEM)" 4 .IX Item "STRING = ExtUtils::PkgConfig->create_version_macros (PACKAGE, STEM)" Create a set of version macros with the prefix \fISTEM\fR for the library specified by \fIPACKAGE\fR. The result is returned. .Sp Example input would be "gtk+\-2.0" for \fIPACKAGE\fR and "GTK" for \fISTEM\fR. .IP "ExtUtils::PkgConfig\->write_version_macros (FILE, PACKAGE, STEM, [PACKAGE, STEM, ...])" 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 \fIPACKAGE\fR and \fISTEM\fR pairs and write them to the file \&\fIFILE\fR. If it doesn't exist, \fIFILE\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 (LGPL). For more information, see http://www.fsf.org/licenses/lgpl.txt