Subject: | Convoluted/redundant check for poppler lib |
Date: | Tue, 19 Mar 2013 08:03:47 -0400 |
To: | bug-Poppler [...] rt.cpan.org |
From: | "Daniel Macks" <dmacks [...] netspace.org> |
Poppler-0.04's Makefile.PL first does:
eval { %poppler_cfg = ExtUtils::PkgConfig->find ("poppler >= $extreqs{poppler}"); }
and then does (among other WriteMakefile fields):
WriteMakefile(
INC => `pkg-config --cflags poppler-glib`,
LIBS => `pkg-config --libs poppler-glib`,
);
For purposes of actually building, it only needs poppler-glib, so there's no need to check for the lower-level poppler core library (note that you throw away the flags from the core library check). And having an acceptable version of the poppler core library doesn't mean that the actually-used poppler-glib bindings/wrapper is also that high a version. And finally, there are two separate ways of using pkg-config, which makes a bit of a porting nightmare if there are platform hacks required for p-c. If you like the ExtUtils::PkgConfig way ("it's perl, and gives nice eval{} handling on failure"), just do:
eval { %poppler_cfg = ExtUtils::PkgConfig->find ("poppler-glib >= $extreqs{poppler}"); }
WriteMakefile(
INC => $pkg_info{cflags},
LIBS => $pkg_info{libs},
);
dan
--
Daniel Macks
dmacks@netspace.org