Some distros and users have unusual installation needs that don't
conform to the standard $libdir/pkgconfig and $datadir/pkgconfig
pathways. Help packagers support these users with the macros
PKG_INSTALLDIR and PKG_NOARCH_INSTALLDIR. These are simple macros that
provide the configure parameters --with-pkgconfigdir and
--with-noarch-pkgconfigdir to allow users to override the standard
locations.
Freedesktop #48743
The macros provide a succint way to run a pkg-config check over modules
depending on a --with-name configure option.
There is a flexible variant to have custom behaviour if the package is
found or not and two more limited ones that just set HAVE_NAME make and
preprocessor variables.