diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2016-02-29 14:59:51 +0200 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2016-02-29 15:32:35 -0800 |
commit | 4a41d26c4d0f4775f3a013a41a32ac1512a0a177 (patch) | |
tree | 18e8ff0b4043e8ff7570aec21d94d94fc2a206f1 | |
parent | 564623653a146ba74714bcf3569d8082a2afd3f0 (diff) | |
download | wayland-4a41d26c4d0f4775f3a013a41a32ac1512a0a177.tar.gz |
build: fix ./configure --disable-dtd-validation
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>
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | src/scanner.c | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index e850abc..49e25a6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,11 +23,14 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = bin_PROGRAMS = wayland-scanner -wayland_scanner_SOURCES = src/scanner.c src/dtddata.S +wayland_scanner_SOURCES = src/scanner.c wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS) wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la pkgconfig_DATA += src/wayland-scanner.pc +if DTD_VALIDATION +wayland_scanner_SOURCES += src/dtddata.S +endif src/dtddata.o: protocol/wayland.dtd if USE_HOST_SCANNER diff --git a/configure.ac b/configure.ac index af5b7cd..bbe62f7 100644 --- a/configure.ac +++ b/configure.ac @@ -85,7 +85,7 @@ AC_ARG_ENABLE([dtd-validation], [AC_HELP_STRING([--disable-dtd-validation], [Disable DTD validation of the protocol])], [], - [enable_dtdvalidation=yes]) + [enable_dtd_validation=yes]) AM_CONDITIONAL(USE_HOST_SCANNER, test "x$with_host_scanner" = xyes) @@ -121,7 +121,8 @@ PKG_CHECK_MODULES(EXPAT, [expat], [], AC_SUBST(EXPAT_LIBS) ]) -if test "x$enable_dtdvalidation" = "xyes"; then +AM_CONDITIONAL([DTD_VALIDATION], [test "x$enable_dtd_validation" = "xyes"]) +if test "x$enable_dtd_validation" = "xyes"; then PKG_CHECK_MODULES(LIBXML, [libxml-2.0]) AC_DEFINE(HAVE_LIBXML, 1, [libxml-2.0 is available]) AC_CONFIG_LINKS([src/wayland.dtd.embed:protocol/wayland.dtd]) diff --git a/src/scanner.c b/src/scanner.c index d3e2328..04747e3 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -40,13 +40,13 @@ #if HAVE_LIBXML #include <libxml/parser.h> -#endif - -#include "wayland-util.h" /* Embedded wayland.dtd file, see dtddata.S */ extern char DTD_DATA_begin; extern int DTD_DATA_len; +#endif + +#include "wayland-util.h" enum side { CLIENT, |