You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
248 lines
8.6 KiB
248 lines
8.6 KiB
From: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
|
|
Date: Mon, 29 Feb 2016 14:59:51 +0200
|
|
Subject: [PATCH] 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>
|
|
[Mart: Added Makefile.in and configure changes to patch file to avoid autoreconf]
|
|
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
|
|
---
|
|
Makefile.am | 5 ++++-
|
|
Makefile.in | 20 ++++++++++++--------
|
|
configure | 18 ++++++++++++++++--
|
|
configure.ac | 5 +++--
|
|
src/scanner.c | 6 +++---
|
|
5 files changed, 38 insertions(+), 16 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 f54a8b9..b27f34b 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -76,7 +76,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)
|
|
|
|
@@ -112,7 +112,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/aclocal.m4 b/aclocal.m4
|
|
index 71ca3dc..86eace8 100644
|
|
--- a/aclocal.m4
|
|
+++ b/aclocal.m4
|
|
@@ -1327,6 +1327,7 @@ AC_SUBST([am__tar])
|
|
AC_SUBST([am__untar])
|
|
]) # _AM_PROG_TAR
|
|
|
|
+#timestamp update to avoid regen
|
|
m4_include([m4/libtool.m4])
|
|
m4_include([m4/ltoptions.m4])
|
|
m4_include([m4/ltsugar.m4])
|
|
diff --git a/config.h.in b/config.h.in
|
|
index 1400592..33f0e99 100644
|
|
--- a/config.h.in
|
|
+++ b/config.h.in
|
|
@@ -15,6 +15,7 @@
|
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
#undef HAVE_INTTYPES_H
|
|
|
|
+/* Timestamp update */
|
|
/* libxml-2.0 is available */
|
|
#undef HAVE_LIBXML
|
|
|
|
diff --git a/Makefile.in b/Makefile.in
|
|
index 6d9ffb2..32e6d51 100644
|
|
--- a/Makefile.in
|
|
+++ b/Makefile.in
|
|
@@ -82,8 +82,9 @@ POST_UNINSTALL = :
|
|
build_triplet = @build@
|
|
host_triplet = @host@
|
|
bin_PROGRAMS = wayland-scanner$(EXEEXT)
|
|
-@ENABLE_LIBRARIES_TRUE@am__append_1 = libwayland-private.la
|
|
-@ENABLE_LIBRARIES_TRUE@am__append_2 = src/wayland-client.pc \
|
|
+@DTD_VALIDATION_TRUE@am__append_1 = src/dtddata.S
|
|
+@ENABLE_LIBRARIES_TRUE@am__append_2 = libwayland-private.la
|
|
+@ENABLE_LIBRARIES_TRUE@am__append_3 = src/wayland-client.pc \
|
|
@ENABLE_LIBRARIES_TRUE@ src/wayland-server.pc \
|
|
@ENABLE_LIBRARIES_TRUE@ cursor/wayland-cursor.pc
|
|
@ENABLE_LIBRARIES_TRUE@TESTS = array-test$(EXEEXT) \
|
|
@@ -101,7 +102,7 @@ bin_PROGRAMS = wayland-scanner$(EXEEXT)
|
|
@ENABLE_LIBRARIES_TRUE@ resources-test$(EXEEXT) \
|
|
@ENABLE_LIBRARIES_TRUE@ message-test$(EXEEXT) \
|
|
@ENABLE_LIBRARIES_TRUE@ headers-test$(EXEEXT) $(am__EXEEXT_1)
|
|
-@ENABLE_CPP_TEST_TRUE@@ENABLE_LIBRARIES_TRUE@am__append_3 = cpp-compile-test
|
|
+@ENABLE_CPP_TEST_TRUE@@ENABLE_LIBRARIES_TRUE@am__append_4 = cpp-compile-test
|
|
@ENABLE_LIBRARIES_TRUE@check_PROGRAMS = $(am__EXEEXT_2) \
|
|
@ENABLE_LIBRARIES_TRUE@ exec-fd-leak-checker$(EXEEXT)
|
|
@ENABLE_LIBRARIES_TRUE@noinst_PROGRAMS = fixed-benchmark$(EXEEXT)
|
|
@@ -382,8 +383,10 @@ am__socket_test_SOURCES_DIST = tests/socket-test.c
|
|
@ENABLE_LIBRARIES_TRUE@ tests/socket-test.$(OBJEXT)
|
|
socket_test_OBJECTS = $(am_socket_test_OBJECTS)
|
|
@ENABLE_LIBRARIES_TRUE@socket_test_DEPENDENCIES = libtest-runner.la
|
|
+am__wayland_scanner_SOURCES_DIST = src/scanner.c src/dtddata.S
|
|
+@DTD_VALIDATION_TRUE@am__objects_1 = src/dtddata.$(OBJEXT)
|
|
am_wayland_scanner_OBJECTS = src/wayland_scanner-scanner.$(OBJEXT) \
|
|
- src/dtddata.$(OBJEXT)
|
|
+ $(am__objects_1)
|
|
wayland_scanner_OBJECTS = $(am_wayland_scanner_OBJECTS)
|
|
wayland_scanner_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
|
$(am__DEPENDENCIES_1) libwayland-util.la
|
|
@@ -491,7 +494,8 @@ DIST_SOURCES = $(am__libtest_runner_la_SOURCES_DIST) \
|
|
$(am__resources_test_SOURCES_DIST) \
|
|
$(am__sanity_test_SOURCES_DIST) \
|
|
$(am__signal_test_SOURCES_DIST) \
|
|
- $(am__socket_test_SOURCES_DIST) $(wayland_scanner_SOURCES)
|
|
+ $(am__socket_test_SOURCES_DIST) \
|
|
+ $(am__wayland_scanner_SOURCES_DIST)
|
|
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
|
ctags-recursive dvi-recursive html-recursive info-recursive \
|
|
install-data-recursive install-dvi-recursive \
|
|
@@ -918,8 +922,8 @@ dist_pkgdata_DATA = \
|
|
protocol/wayland.dtd
|
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
-pkgconfig_DATA = src/wayland-scanner.pc $(am__append_2)
|
|
-wayland_scanner_SOURCES = src/scanner.c src/dtddata.S
|
|
+pkgconfig_DATA = src/wayland-scanner.pc $(am__append_3)
|
|
+wayland_scanner_SOURCES = src/scanner.c $(am__append_1)
|
|
wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS)
|
|
wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la
|
|
@USE_HOST_SCANNER_FALSE@wayland_scanner = $(top_builddir)/wayland-scanner
|
|
@@ -929,7 +933,7 @@ libwayland_util_la_SOURCES = \
|
|
src/wayland-util.c \
|
|
src/wayland-util.h
|
|
|
|
-noinst_LTLIBRARIES = libwayland-util.la $(am__append_1)
|
|
+noinst_LTLIBRARIES = libwayland-util.la $(am__append_2)
|
|
@ENABLE_LIBRARIES_TRUE@lib_LTLIBRARIES = libwayland-server.la \
|
|
@ENABLE_LIBRARIES_TRUE@ libwayland-client.la \
|
|
@ENABLE_LIBRARIES_TRUE@ libwayland-cursor.la
|
|
diff --git a/configure b/configure
|
|
index 83e4971..6340d4f 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -711,6 +711,8 @@ HAVE_XSLTPROC_TRUE
|
|
XSLTPROC
|
|
LIBXML_LIBS
|
|
LIBXML_CFLAGS
|
|
+DTD_VALIDATION_FALSE
|
|
+DTD_VALIDATION_TRUE
|
|
EXPAT_LIBS
|
|
EXPAT_CFLAGS
|
|
FFI_LIBS
|
|
@@ -15728,7 +15730,7 @@ fi
|
|
if test "${enable_dtd_validation+set}" = set; then :
|
|
enableval=$enable_dtd_validation;
|
|
else
|
|
- enable_dtdvalidation=yes
|
|
+ enable_dtd_validation=yes
|
|
fi
|
|
|
|
|
|
@@ -16114,7 +16116,15 @@ $as_echo "yes" >&6; }
|
|
|
|
fi
|
|
|
|
-if test "x$enable_dtdvalidation" = "xyes"; then
|
|
+ if test "x$enable_dtd_validation" = "xyes"; then
|
|
+ DTD_VALIDATION_TRUE=
|
|
+ DTD_VALIDATION_FALSE='#'
|
|
+else
|
|
+ DTD_VALIDATION_TRUE='#'
|
|
+ DTD_VALIDATION_FALSE=
|
|
+fi
|
|
+
|
|
+if test "x$enable_dtd_validation" = "xyes"; then
|
|
|
|
pkg_failed=no
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML" >&5
|
|
@@ -16669,6 +16679,10 @@ if test -z "${ENABLE_LIBRARIES_TRUE}" && test -z "${ENABLE_LIBRARIES_FALSE}"; th
|
|
as_fn_error $? "conditional \"ENABLE_LIBRARIES\" was never defined.
|
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
|
fi
|
|
+if test -z "${DTD_VALIDATION_TRUE}" && test -z "${DTD_VALIDATION_FALSE}"; then
|
|
+ as_fn_error $? "conditional \"DTD_VALIDATION\" was never defined.
|
|
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
|
+fi
|
|
if test -z "${HAVE_XSLTPROC_TRUE}" && test -z "${HAVE_XSLTPROC_FALSE}"; then
|
|
as_fn_error $? "conditional \"HAVE_XSLTPROC\" was never defined.
|
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
|
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,
|
|
--
|
|
2.6.4
|
|
|