[PATCH v2 wayland] pkg-config: scanner isn't arch-independent

Emilio Pozuelo Monfort pochu27 at gmail.com
Tue Nov 19 05:56:24 PST 2013


On 19/11/13 14:15, Arnaud Vrac wrote:
> I'm wondering how you are supposed to use the .pc file when cross-compiling
> weston for example. Typically you would have the following directory layout:
> 
> wayland build for host:
> 
> host/usr/bin/wayland-scanner
> host/usr/lib/pkgconfig/wayland-scanner.pc
> host/usr/share/aclocal/wayland-scanner.m4
> host/usr/share/wayland/wayland.dtd
> host/usr/share/wayland/wayland-scanner.mk
> host/usr/share/wayland/wayland.xml
> 
> wayland build for target (configured with --disable-scanner):
> 
> target/usr/include/wayland-client.h
> target/usr/include/wayland-client-protocol.h
> target/usr/include/wayland-cursor.h
> target/usr/include/wayland-egl.h
> target/usr/include/wayland-server.h
> target/usr/include/wayland-server-protocol.h
> target/usr/include/wayland-util.h
> target/usr/include/wayland-version.h
> target/usr/lib/libwayland-client.a
> target/usr/lib/libwayland-client.la
> target/usr/lib/libwayland-client.so.0.1.0
> target/usr/lib/libwayland-cursor.a
> target/usr/lib/libwayland-cursor.la
> target/usr/lib/libwayland-cursor.so.0.0.0
> target/usr/lib/libwayland-server.a
> target/usr/lib/libwayland-server.la
> target/usr/lib/libwayland-server.so.0.1.0
> target/usr/lib/pkgconfig/wayland-client.pc
> target/usr/lib/pkgconfig/wayland-cursor.pc
> target/usr/lib/pkgconfig/wayland-server.pc
> target/usr/share/aclocal/wayland-scanner.m4
> target/usr/share/wayland/wayland.dtd
> target/usr/share/wayland/wayland-scanner.mk
> target/usr/share/wayland/wayland.xml
> 
> Weston must be configured with PKG_CONFIG_LIBDIR=target/lib/pkgconfig, so
> that the host pc files are not used. This prevents detecting
> wayland-scanner.pc in the configure, making the build fail as
> wayland-scanner.pc is needed to find the DTD.
> 
> What's the right way to make it work ?

I see weston is checking for wayland-scanner twice, once in $PATH and again
through wayland-scanner.pc. It may be safe to drop the PKG_CONFIG_CHECK and just
rely on AC_PATH_PROG. At that point, I don't know what benefit
wayland-scanner.pc brings in.

Emilio


More information about the wayland-devel mailing list