Wire-up the imported sources, test and pkg-config files.
v2:
- Don't mangle with existing EXTRA_DIST list
- Add the symbols check script to the `make check' target
- Rename wayland-egl-{priv,backend}.h
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
When configured with --disable-dtd-validation:
CPPAS src/dtddata.o
src/dtddata.S: Assembler messages:
src/dtddata.S:39: Error: file not found: src/wayland.dtd.embed
Makefile:1520: recipe for target 'src/dtddata.o' failed
This is because the variable name used does not match the implicit
variable name in autoconf.
Fix the variable name, making both --disable-dtd-validation and
--enable-dtd-validation to what they should.
Do not try to build dtddata.S if dtd-validation is disabled. It depends
on wayland.dtd.embed which is created by configure only if
dtd-validation is enabled.
If not building dtddata.S, also make sure the extern definitions in
scanner.c are compiled out.
Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=575212
Reported-by: leio@gentoo.org
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Bryce Harrington <bryce@osg.samsung.com>
New --enable-fatal-warnings ./configure option that just adds -Werror
to GCC_CFLAGS
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Embed the wayland.dtd protocol data into the scanner binary so we can validate
external protocol files without requiring makefile changes. Hat-tip to Pekka
Paalanen for the embedding trick.
The embedding trick doesn't work well if the to-be-embedded file is in a
different location than the source file, so copy/link it during configure and
then build it in from the local directory.
The current expat parser is not a validating parser, moving scanner.c to
another parser has the risk of breaking compatibility. This patch adds libxml2
as extra (optional) dependency, but that also requires parsing the input
twice.
If the protocol fails validation a warning is printed but no error is returned
otherwise.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
The previous idiom for building a cross-compiled Wayland is to build once for
the build host (with --enable-scanner --disable-libraries) to get a
wayland-scanner binary that can then be used in a cross-compile (with
--disable-scanner). The problem with this is that the cross wayland is missing
a wayland-scanner binary, which means you then can't do any Wayland development
on the target.
Instead, always build wayland-scanner for the target and change
--enable/disable-scanner to --with/without-host-scanner. Normal builds use the
default of --without-host-scanner and run the wayland-scanner it just built, and
cross-compiled builds pass --with-host-scanner to use a previously built host
scanner but still get a wayland-scanner to install.
(a theoretically neater solution would be to build two scanners if required (one
to run and one to install), but automake makes this overly complicated)
[daniels: Bikeshedded naming with Ross's OK.]
Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
When building just the scanner or docs it's not required.
This can reduce requirements for a host cross compiling wayland,
since only the scanner needs to be built natively.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
When cross-compiling it may be useful to build only the wayland-scanner
natively. This patch makes it possible to disable build of the libraries.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
I wasted a lot of time before I figured out that I needed to add those
square brackets to get this to work. Sigh...
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This paritally reverts commit a4afd90f9f.
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. In addition the
source for expat does not seem to be in a git repository but in cvs instead
and it seems preferrable to not require cvs to build wayland.
The restored test has been updated to use AC_SEARCH_LIBS. This version
uses empty square brackets for the unused branches, similar to many other
if statements in configure.ac.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Andrew Oakley <aoakley@espial.com>