Allow building of XFA branch without XFA

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1399833002 .
diff --git a/BUILD.gn b/BUILD.gn
index 9f40bc3..77498ce0 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -3,14 +3,7 @@
 # found in the LICENSE file.
 
 import("//testing/test.gni")
-
-pdf_use_skia = false
-
-declare_args() {
-  # On Android there's no system FreeType. On Windows and Mac, only a few
-  # methods are used from it.
-  pdfium_bundle_freetype = !is_linux
-}
+import("pdfium.gni")
 
 config("pdfium_config") {
   cflags = []
@@ -28,6 +21,10 @@
     defines += [ "_SKIA_SUPPORT_" ]
   }
 
+  if (pdf_enable_xfa) {
+    defines += [ "PDF_ENABLE_XFA" ]
+  }
+
   if (is_linux) {
     if (current_cpu == "x64") {
       defines += [ "_FX_CPU_=_FX_X64_" ]
@@ -114,9 +111,12 @@
     ":javascript",
     ":jsapi",
     ":pdfwindow",
-    ":xfa",
   ]
 
+  if (pdf_enable_xfa) {
+    deps += [ ":xfa" ]
+  }
+
   if (is_win) {
     libs += [ "advapi32.lib", "gdi32.lib", "user32.lib" ]
   }