[PATCH V3] configure.ac: Fallback to older detection code if pkg-config can't find expat

Bill Spitzak spitzak at gmail.com
Tue Feb 3 14:10:32 PST 2015

On 02/03/2015 01:50 PM, Peter Hutterer wrote:
> On Tue, Feb 03, 2015 at 12:33:35PM -0800, Bill Spitzak wrote:
>> This paritally reverts commit a4afd90f9f0c27ed5f3f313b915c260673f8be34.
>> On older expat versions (ie the one on Ubuntu 12.04) there is no pkg-config
>> file, so fall back to a test for the header and library.
> hmm, this is the first time I read this paragraph: 12.04 is almost 2 years
> old now, are there any more recent examples that need this patch? If not,
> I'd recommend going with "install newer expat in your prefix" than
> adding build system workarounds.

Any idea where it is? I can find a cvs repository on SourceForge. Would 
rather not add yet another dependency on using cvs! Is it on git 
somewhere or is this cvs the official version?

I could also just place a fake pkg-config file in the install directory.

Both of these would require updating the Ubuntu build directions page.

Both by previous employers are frozen at Ubuntu 12.04, I don't think 
this is uncommon. The earlier one had finally updated from a 5 year old 
system from SUSE.

> that looks correct, but the ,, almost caught me and the nesting is a bit
> hard to read. How about:
> if test x$HAVE_EXPAT = "xno"; then
>          ...
>          AC_SEARCH_LIBS
>          ...
>          AC_SUBST # I think you should have it explicitly here
> fi

I find that much harder to read because of the unreadability of binary 
tests in M4 and reliance on an intermediate variable. Also it makes it 
harder to remove the fallback code in the future. But I think I can get 
rid of the double commas, though they are used elsewhere.

More information about the wayland-devel mailing list