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

Bill Spitzak spitzak at gmail.com
Tue Feb 3 12:32:22 PST 2015

It looks like $(LIBS) is added by automake to every link, I can't figure 
out a way to stop it. Is this correct?

On 02/02/2015 10:46 PM, Peter Hutterer wrote:
> On Mon, Feb 02, 2015 at 06:33:49PM -0800, Bill Spitzak wrote:
>> On 02/02/2015 03:12 PM, sardemff7+wayland at sardemff7.net wrote:
>>> On 2015-02-02 22:29, 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 the previous test for the header file when it
>>>> fails.
>>>> Test is slightly cleaned up from previous one.
>>>> I could not use AC_SEARCH_LIBS as was suggested, as this leaves the
>>>> switch
>>>> in LIBS, not EXPAT_LIBS, and thus does not match the pkg-config results.
>>> Well, you can perfectly do that, especially since AC_CHECK_LIB does not
>>> export EXPAT_LIBS either.
>> I think I may need some expert autotools help. I was basing these changes on
>> looking at what got put into the config.h and Makefile. If I used
>> AC_SEARCH_LIBS it added "-lexpat" to LIBS. I could make it also add it to
>> EXPAT_LIBS but I could not figure out a way to stop it from being added to
>> LIBS.
> the usual process is (used to be?):
> so you save the current state and restore it after it got mangled. we do
> that for the rdp compositro CPPFLAGS already for example.

More information about the wayland-devel mailing list