michaelrsweet / pdfio

PDFio is a simple C library for reading and writing PDF files.
https://www.msweet.org/pdfio
Apache License 2.0
198 stars 44 forks source link

configure: use the pkg.m4 macro library to handle pkg-config search #60

Closed eli-schwartz closed 11 months ago

eli-schwartz commented 11 months ago

PKG_CHECK_MODULES is battle tested and provides some convenient functionality such as standardizing on $PKG_CONFIG instead of $PKGCONFIG, marking various additional variables as precious, and upating the ./configure --help text to notify you which variables can be used to control the configure checks.

It's also shorter and simpler from the perspective of configure.ac (and the added complexity in pkg.m4 is someone else's maintenance burden).

Note: pkg.m4 is GPL-2-or-later licensed. The GPL 2 is incompatible with pdfio's Apache license. There are two reasons why this is still okay:

eli-schwartz commented 11 months ago

@michaelrsweet I've kept it in tree and checked that running autoconf -f without any other autotools programs works, and as far as I can tell the license issue is not a problem due to the special exception. Hopefully this means it's okay to use.

michaelrsweet commented 11 months ago

Sorry, I don’t want to embed this in pdfio.