10FINDING BUILD DEPENDENCIES WITH PKG-CONFIG

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.—Douglas Adams, The Hitchhiker’s Guide to the Galaxy

Image

Let’s say your project depends on a library called stpl—some third-party library. How can your build system determine where libstpl.so is installed on an end user’s system? Where are stpl’s header files to be found? Do you simply assume /usr/lib and /usr/include? This is effectively what Autoconf does if you don’t tell it to look elsewhere, and for many packages perhaps that’s fine—it’s a common convention to install ...

Get Autotools, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.