pkg-config provides information about installed libraries/packages in the system and is useful in combination with compiling C/C++ files(?) and linking the resulting object files.
This information is stored in files with a .pc file suffix. These files are typically found under
prefix=/home/hp/unst # This defines a variable (Query on command line with pkg-config --variable=prefix)
exec_prefix=${prefix} # Defining another variable in terms of the first
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: GObject # human-readable name
Description: Object/type system for GLib # human-readable description
Version: 1.3.1
URL: http://www.gtk.org
Requires: glib-2.0 = 1.3.1
Conflicts: foobar <= 4.5
Libs: -L${libdir} -lgobject-1.3
Libs.private: -lm
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib/include
Perl seems to install pkg-config.pl under /usr/local/bin. The header of this Perl script says that the script is a «lightweight no-dependency version of pkg-config». The script simply invokes package.