Subject: | Makefile.PL shouldn't run "pkg-config libexslt" if LIBS or INC were provided |
If LIBS or INC were provided manually on the command line, Makefile.PL shouldn't try to run exslt-config, just like it doesn't run xslt-config. Otherwise, it's impossible to build with LIBS and INC provided manually if "pkg-config libexslt" fails. Even if running "pkg-config libexslt" succeeds, its results shouldn't be used if values for LIBS or INC are provided manually. Example:
$ perl Makefile.PL LIBS="-L/my/lib -lxslt -lexslt" INC="-I/my/include"
looking for -lxslt... yes
looking for -lexslt... yes
running pkg-config libexslt... failed
using fallback values for LIBS and INC
Warning (mostly harmless): No library found for -ldb
Generating a Unix-style Makefile
Writing Makefile for XML::LibXSLT
Writing MYMETA.yml and MYMETA.json
libxslt and libexslt were found, but since "pkg-config libexslt" failed, Makefile.PL uses the fallback values which ignore the user's preference and typically won't work. I'd suggest to use the following test from the libxslt section in the libexslt section as well:
# if a user defined INC and LIBS on the command line we must not
# override them
if ( not defined $config{LIBS} and not defined $config{INC} ) {