On Thu, Mar 10, 2011 at 1:53 PM, Jef Driesen<address@hidden> wrote:
You don't have to convince me of the advantages of using pkg-config.
I want to use pkg-config for exactly the same reasons as you explain.
But when I tried to build my project on a system without pkg-config
installed it failed. Proceeding without the feature (that would be enabled
through the pkg-config checks) would be perfectly acceptable, except
that autoconf fails on the PKG_* macros and aborts. So I can't build
anything at all and that's the main problem.
I actually didn't use the PKG_ macros at all so I didn't run into this
problem -- configure.ac searches for pkg-config using AC_PATH_TOOL and
invokes it.
However, I like the idea of using PKG_* m4 macros instead, and I'm
disappointed to hear of your snag. Do not despair, you can use the
macros on systems that have them (and not break on systems without) by
using m4_ifdef to conditionalize the use. For example, this is how
ntp-dev enables Automake's silent rules generation without requiring
automake 1.11, which was the first release to provide AM_SILENT_RULES:
m4_ifdef(
[AM_SILENT_RULES],
[AM_SILENT_RULES([yes])]
)