pkg-config is the preferred way to detect these libraries for several years now. The old libpng-config and libxml2-config scripts are deprecated and don't work in some environments.
We could keep them as a fallback in case pkg-config fails, but I don't think this is really necessary at this point.
Here's a related patch to remove the unused (since r5349) glib-2.0.m4 file.
Thanks, committed in [r5706].
Related
Commit: [r5706]
Hmm, looks like I'm going to need to start putting in detailed build instructions like the Windows one for the Mac in the INSTALL file as it is getting to be a beast, I can't say pkg-config has made my life any easier!
libxml2-config works on the Mac while pkg-config doesn't for libxml2 (pkg-config points to a non-existent includes directory but needs an OS fix to sort out - maybe in the next revision in September).
I can use your patch if I do:
Any better ideas for specifying the xml2 cflags when using a broken pkg-config install or am I stuck updating INSTALL? I don't want to have Fuse stuck in the past for this build infrastructure despite my struggles (on the bright side, using your patch makes Fuse find and use libpng from the X install which didn't work before and made me have to explicitly use the --without-png flag to get a functioning build).
Last edit: Fredrick Meunier 2016-07-31
Well, if there are systems where pkg-config does not work we can still keep the old system. Here's a simple patch to do that.
Ah, wait, you mean that in OSX pkg-config exists but returns incorrect values??
Exactly - its Apple's fault but I still need to use it. Just looking for any obvious option I've missed through only being in passing familiarity with pkg-config.
You could use XML_CFLAGS, but that is not likely to fix the problem.
To be clear - I am planning on committing this patch by next weekend barring feedback to the contrary as it seems to be the right way to go.
Looks good to me. Just a suggestion: use AC_SUBST outside a conditional or use AS_IF instead of 'if' [1]. But I think we are not using AC_SUBST in other places because the macro distributed in pkg.m4 is already calling AC_SUBST [2].
[1] http://lists.gnu.org/archive/html/autoconf/2010-01/msg00091.html
[2] https://autotools.io/pkgconfig/pkg_check_modules.html
Here's AC_SUBST outside the conditional. AC_SUBST is not necessary in recent versions of pkg-config, but it doesn't hurt and it keeps compatibility with older versions.
Thanks Alberto, I've tried to combine the patches and I've committed in [r5731]. Please have a look and let me know if I've made any errors.
Related
Commit: [r5731]
It looks good, thanks!