[build] require linux for DTD validation
This change removes the use of DTD validation (requiring libxml2) for
non-linux builds.
Test: CQ
Change-Id: I37794f8d28fb470cf0715d00bf934bcb42943b4c
diff --git a/BUILD.gn b/BUILD.gn
index 9aa4323..2f190c8 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -113,10 +113,12 @@
source_set("scanner_static") {
visibility = [ ":*" ]
- deps = [
- "//third_party/expat",
- "//third_party/libxml2",
- ]
+ deps = [ "//third_party/expat" ]
+
+ if (is_linux) {
+ deps += [ "//third_party/libxml2" ]
+ defines = [ "HAVE_LIBXML=1" ]
+ }
sources = [
"protocol/wayland.dtd.c",
diff --git a/README.fuchsia b/README.fuchsia
index 211ed5b..7eb66c5 100644
--- a/README.fuchsia
+++ b/README.fuchsia
@@ -8,7 +8,7 @@
After updating this library, maintainers should regenerate dependent configuration files:
1. git clone -n <upstream> && cd wayland && git checkout <commit>
-2. ./autogen.sh --disable-documentation
+2. ./autogen.sh --disable-documentation --disable-dtd-validation
3. cp ./src/wayland-version.h ${FUCHSIA_DIR}/third_party/wayland/src
4. cp ./config.h ${FUCHSIA_DIR}/third_party/wayland
5. ${FUCHSIA_DIR}/third_party/wayland/protocol/wayland.dtd.c.gen.sh ./protocol/wayland.dtd > ${FUCHSIA_DIR}/third_party/wayland/protocol/wayland.dtd.c
diff --git a/config.h b/config.h
index 5f4849c..8b240bb 100644
--- a/config.h
+++ b/config.h
@@ -11,7 +11,7 @@
#define HAVE_INTTYPES_H 1
/* libxml-2.0 is available */
-#define HAVE_LIBXML 1
+/* #undef HAVE_LIBXML */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1